how to create device

Norman Feske norman.feske at ...1...
Thu May 9 15:01:03 CEST 2013


Hello,

> i use pandapoard to run l4android,when i insert usb mouse,it worked.
> i wonder who creates the device node for the usb mouse,the code in
> dde-linux or l4android?can you tell me which file does the thing?
> there is another question,how can i create a device node to
> communication with Android?

there are no device nodes in Genode. Devices are connected to processes
by using sessions. A device driver provides a session interface, which,
in turn, can be used by another process acting as a client. The policy
of which session of a process gets connected to which server is
expressed in the configuration of the init process as described here:

  http://genode.org/documentation/developer-resources/init

In short, you need to make sure that you route 'Input' session requests
of the nitpicker GUI server to your touch screen driver, which provides
this session interface. From Genode's perspective, Android is just a
client of the 'Input' session interface (among other interfaces). From
the Linux kernel's perspective, an 'Input' session is looks like a
physical device. (i.e., there exists a special device driver for it,
compiled in the Linux kernel)

The session-routing concept is pretty powerful. Just by changing the
routing, you could connect Android directly to the input driver, leaving
the nitpicker GUI server out of the picture. Maybe this would be a good
exercise after revisiting the documentation mentioned above? ;-)

Btw, I wonder how the USB mouse worked for you when executing the
l4android.run script for the Pandaboard. The run script does not start
the USB driver that would be needed for that. Have you used a modified
version?

Regards
Norman

-- 
Dr.-Ing. Norman Feske
Genode Labs

http://www.genode-labs.com · http://genode.org

Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth




More information about the users mailing list