L4Linux/ser shm

From TUDOS-Wiki
Revision as of 01:21, 30 November 2011 by Jester (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

L4Linux shared memory serial communication

The driver l4ser_shm can connect two L4Linuxes, providing tty interfaces (ttyLsX) and using a shared memory to exchange data. To use the driver to make sure to include in your L4Linux build, it's available under that L4Linux/stub drivers menu.

For the first Linux add as a kernel parameter:

l4ser_shm.add=shmns,create

For the second add as a kernel parameter:

l4ser_shm.add=shmns

In the start script, add:

local shmns = L4.default_loader:create_namespace({ shm = "placeholder" });

and add shmns with rw rights to both L4Linuxes:

caps = { .... , shmns = shmns:mode("rw"), .... }

Boot both instances and do the following tasks:

You need to add a tty device to both instances

mknod /dev/ttyLs0 c 204 15

Then run

getty 115200 /dev/ttyLs0

on one instance and

microcom -c 115200 /dev/ttyLs0

to connect to this console from the other instance