L4Linux/ser shm: Difference between revisions

From TUDOS-Wiki
Jump to navigationJump to search
Jester (talk | contribs)
Created page with "== L4Linux shared memory network == The driver '''l4ser_shm''' can connect two L4Linuxes, providing tty interfaces (ttyLsX) and using a shared memory to exchange data. To use th..."
 
Jester (talk | contribs)
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
== L4Linux shared memory network ==
== 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.
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.
Line 17: Line 17:
  caps = { .... , shmns = shmns:mode("rw"), .... }
  caps = { .... , shmns = shmns:mode("rw"), .... }


You need to add a tty device to both instances:
Boot both instances and do the following tasks:
 
You need to add a tty device to both instances
  mknod /dev/ttyLs0 c 204 15
  mknod /dev/ttyLs0 c 204 15


Then run  
Then run
  getty 115200 /dev/ttyLs0
  getty 115200 /dev/ttyLs0
on one instance and
on one instance and
  microcom -c 115200 /dev/ttyLs0
  microcom -c 115200 /dev/ttyLs0
to connect to this console from the other instance
to connect to this console from the other instance

Latest revision as of 00:21, 30 November 2011

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