[Genode] why do I need to rebuild ports for different platforms? was: buid directory outside ...

Norman Feske norman.feske at ...1...
Tue Jan 29 19:20:10 CET 2013


Hi Paul,

> In fact I expect everything running above Core, to not be
> platform-specific, including device drivers.
> Sure, we don't need to build some drivers if the architecture does not
> have the coresponing hardware, but that does not means it would be
> compiled differently.

there is a difference between source-level compatibility and binary
compatibility. The code of non-core Genode components is independent
from the used kernel at source level only.

> And I definitively *do not* expect libraries to be compiled with
> specific kernel headers file. I expect libc, device drivers, to call
> Core the same way, and Core to be compiled in a specific manner for
> each platform.

I wonder where your expectation comes from. Do you expect a library
compiled on FreeBSD to be usable when copied onto a Linux system? I
wouldn't expect this to work (although I never tried .-)

>From 10000 feet above the ground, I can perfectly follow your reasoning.
But when looking more closely, it is not that simple. Just consider the
following problem. How do you expect a non-core process to "call" core?
On Linux, this process uses Unix domain sockets (by issuing the
respective Linux system calls). On Pistachio, the process would use the
L4-IPC mechanism (by using Pistachio-specific system calls). On NOVA,
the process would use NOVA's portal mechanism (by using NOVA-specific
system calls). Similar stories can be told about thread creation,
process creation, locking, etc. All these things need platform-specific
bits that are not solely encapsulated in core but need platform-specific
support code in each non-core process.

That said, I don't think that it's entirely impossible to achieve binary
compatibility. Maybe you'd like to give this experiment a try?  We try
to keep the platform-specific bits as small as possible. They are
(almost) all contained in the respective 'base-<platform>' directories.
If you like to explore this topic, a good start would be to compare the
differences of the various 'base-<platform>' repositories, in particular
the header files at 'base-<platform>/include'. The ultimate goal would
be to completely unify those, and to move all base libraries (the
libraries provided by the 'base-<platform>' repositories) into one
single shared library per platform.

Personally, I think it is very challenging. But maybe you like such damn
hard challenges? ;-)

Cheers
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