dde_linux module loading

Josef Söntgen josef.soentgen at ...1...
Wed Apr 26 15:45:16 CEST 2017

Hello Johannes,

* Johannes Kliemann <Johannes.Kliemann at ...250...> [2017-04-26 15:00:35 +0200]:
> how are modules in dde_linux loaded exactly? For example the i915 driver
> seems to be loaded with `module_i915_init` which somehow connects to
> `module_init(i915_init)` but I can't see how this is done.

Please take a look at 'repos/dde_linux/src/include/lx_emul/module.h'
which defines the macros used by the vanilla sources. In this case
we just generated a function that can be called directly.

> I want to add a new driver which is loaded by
> `module_platform_driver(...)`. What steps are required to add this
> driver besides adding the declaration in main.cc?

Until now the usb_drv on ARM was the only dde_linux driver that needed
this macro, hence it is defined in its private Linux emulation header
(see 'repos/dde_linux/src/lib/usb/include/spec/arm/platform/lx_emul.h').
Normally we only move definitions or rather emulation code to the somewhat
generic lx_kit/lx_emul locations if used by more than one driver.

For now I suggest to implement the macro privately in the intel_fb
driver as well and we will come up with a better solution later on.


Josef Söntgen
Genode Labs

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

More information about the users mailing list