Program development for L4Re

Björn Döbel doebel at os.inf.tu-dresden.de
Tue Jun 11 11:40:42 CEST 2013


On 11.06.2013 10:57, Rahul Singhal wrote:
> I have recently ported l4 fiasco + l4Re on raspberry pi. I tested the
> port with the sample hello world program and it works fine.Now I want
> to write some of my own programs (C++, C and python) and run it on
> this environment. All I have done as of now is modify the sample hello
> world code a bit and test it. How do I go about doing this and where
> to start from?

If you want to start your own program, it's best to create a new package 
in l4/pkg and implement everything there. To start off with an empty 
application, there is a script that sets up a build-system-compatible 
directory for you:

$> cd l4/pkg
$l4/pkg> mkdir my_pkg
$l4/pkg> cd my_pkg
$l4/pkg/my_pkg> ../../mk/tmp/inst

-> At this point an empty server can be found in 
l4/pkg/my_pkg/server/src. Running "make O=<build dir>" in the package 
will compile everything. And you can adapt the Makefiles to suit your needs.

That's it for C/C++ code. For Python you build the Python package and 
then load it along with your Python programs. To use L4 services from 
Python, you will need to have Python C extensions, which can for 
instance be generated using SWIG (http://www.swig.org).

Bjoern
-- 
Dipl.-Inf. Bjoern Doebel    Mail:  doebel at tudos.org
TU Dresden, OS Chair        Phone: +49 351 463 38 799
Noethnitzer Str. 46         Fax:   +49 351 463 38 284
01187 Dresden, Germany      WWW:   http://www.tudos.org/~doebel
--
"When the seagulls follow the trawler, it's because they think
  sardines will be thrown into the sea." (Eric Cantona)




More information about the l4-hackers mailing list