On Tuesday 28. May 2019 18.45.15 Lei Zhou wrote:
HI, I'm looking for the information and procedure how to compile and deploy L4Re on Raspberry PI. Any feedbacks would be greatly appreciated!
I guess you should start here:
https://l4re.org/download.html https://l4re.org/build.html https://l4re.org/fiasco/build.html
If you are using a modern Debian-based system, you can get away with something like this to obtain all the tools needed for compilation:
apt-get install build-essential subversion libncurses5-dev gawk bison flex
This is a bit different from what the above pages say:
apt-get install make gawk g++ binutils pkg-config g++-multilib subversion \ flex bison
But getting things like build-essential is less likely to cause surprises later on. Plus, I found the libncurses5-dev package to be necessary.
The online instructions have you downloading and running the repomgr tool to get the sources. If you are a bit cautious, like I am, you can do this in two steps:
svn cat https://svn.l4re.org/repos/oc/l4re/trunk/repomgr > repomgr ./repomgr init https://svn.l4re.org/repos/oc/l4re fiasco l4re
This lets you inspect the repomgr script and also allows you to keep it around in an obvious place.
At this point, you can build Fiasco.OC with something like this:
cd src/kernel/fiasco/ make BUILDDIR=mybuild cd mybuild/ make config make
Then, building L4Re should be possible by going back up to the src/l4 directory:
cd ../../../l4
You may need to create a conf/Makeconf.boot file. I have the following in mine:
MODULE_SEARCH_PATH += $(L4DIR_ABS)/../kernel/fiasco/mybuild MODULE_SEARCH_PATH += $(L4DIR_ABS)/conf/examples MODULE_SEARCH_PATH += $(L4DIR_ABS)/pkg/io/io/config BOOTSTRAP_SEARCH_PATH = $(L4DIR_ABS)/conf/examples BOOTSTRAP_SEARCH_PATH += $(L4DIR_ABS)/../kernel/fiasco/mybuild BOOTSTRAP_SEARCH_PATH += $(L4DIR_ABS)/pkg/io/io/config BOOTSTRAP_MODULES_LIST = $(L4DIR_ABS)/conf/modules.list
And then you can try and do something like this:
make B=mybuild make O=mybuild config make O=mybuild
If everything worked, you can try and build an image. This tends to be done as follows:
mkdir mybuild/images make O=mybuild uimage E=hello
Deploying the image should be a matter of copying a file onto a suitable media device for the Raspberry Pi (SD card, I guess):
cp mybuild/images/bootstrap_hello.uimage /media/sdcard
Here, only you will really know where to copy the file to.
I hope this helps!
Paul