Genode/Linux USB Application

Norman Feske norman.feske at ...1...
Wed Jul 6 08:56:39 CEST 2016

Hi Daniel,

> Next, I want to use it with Linux as kernel (linux_x86). If I try to run
> the resulting application, the usb_drv component throws the following error:
>> no route to service "Platform"
> So, is it possible to compile and run the intended application without
> modifications?
> If I want to use the linux devices (e.g. usb), who can I achieve this in
> code?

on base-linux, the USB driver resides in the Linux kernel. Genode's
usb_drv cannot be used. However, your 'ServoController' doesn't actually
need a USB driver but merely a terminal session. Your scenario relies on
the usb_drv + usb_terminal in this respect. On Linux, I would use a
completely different terminal service.

The best approach would be to have a Genode component - let's call it
lx_terminal - that opens a character device on Linux and provides a
terminal service by forwarding all 'read' and 'write' operations to the
Linux device. This component could then be used with any arbitrary Linux
device, on particular your USB-serial device that would normally appear
at /dev/ttyUSB0.

The resulting picture would look like this:

     lx_terminal   |
       |    |          Genode
          Linux kernel

Unfortunately, the lx_terminal component does not exist yet. But similar
components for other Genode services exist, which you could use blue print:

* os/src/drivers/nic/spec/linux/
  (provides a NIC session via a Linux tap device)

* os/src/server/lx_fs/
  (provides a file-system session by accessing the Linux file system)

* os/src/drivers/framebuffer/spec/sdl
  (provides a framebuffer and input session via libSDL)

* os/src/drivers/audio/spec/linux
  (provides an audio-out session via ALSA)

Actually, when looking at this list, it might be even possible to
emulate the lx_terminal component by combining the lx_fs with the
file_terminal component (gems/src/server/file_terminal). But a dedicated
lx_terminal component would certainly be nicer.


PS: In principle, it would be interesting to use Genode's device drivers
on top of the Linux kernel by facilitating Linux' user-level
device-driver infrastructure. This would clear the way to run your
entire scenario including the USB driver on Linux. We have briefly
documented this idea of "microkernelizing Linux" at

Dr.-Ing. Norman Feske
Genode Labs ·

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