POSIX is the universally accepted programming interface provided by the most modern operating systems such as Windows, Unix, Mac OS X, and QNX. Also in the embedded systems domain, POSIX is wide spread. Applications developed with the POSIX API are easily portable among those OSes?.
The goal of the project is the realization of a POSIX programming environment on Genode to enable the reuse of the wealth of existing POSIX applications. An appropriate starting point for this work is the L4VFS project conducted by Martin Pohlack. L4VFS is the implementation of a subset of POSIX for the L4 environment.
Approach
We suggest the following approach:
- The practical goal is the port of Busybox or a similar shell to Genode. This porting work will reveal a meaningful set of functional requirements to be addressed in the following steps. We expect that the port will requre at least a naming service for managing the POSIX file name space, a C library, a set of higher-level helper libraries such as libreadline, and the shell itself.
- The first POSIX functions required to be implemented will be the handling of interactive I/O and files.
- At a later stage, functions for networking support could be supplemented.
- For the first steps of the porting work, we suggest using the Linux version of Genode. On Linux, you can temporarily rely on Linux' POSIX functionality. For example, you could implement a file service that accesses files stored on the Linux file system. Later, this services can be transparently replaced by a native file service.
Interesting questions to conquer
- For the work on L4VFS, the support of fork turned out to be quite cumbersome because L4VFS relies on heavily distributed state in various servers. By using of pread/pwrite (a la NFS) rather than read/write, state information is effectively removed from the server side, relieving the distributed-state problem. However, it remains unclear whether this change suffices to ease the support of fork.
- How does the hierarchical structure of Genode affect the organization of file name spaces? Can this property of the OS framework be utilized?
- L4VFS relies on the interface-inheritance feature of the used DICE IDL compiler. How does this approach translate to Genode's RPC framework?
- How to map POSIX signals to the primitives provided by the Genode OS framework?
References
- http://os.inf.tu-dresden.de/~mp26
- Website of Martin Pohlack who created L4VFS
- http://svn.tudos.org/repos/tudos/trunk/l4/pkg/l4vfs
- L4VFS in the subversion repository of the L4 environment
- http://www.uclibc.org
- Website of the uclibC C library

