Deploy genode on arndale

Stefan Kalkowski stefan.kalkowski at ...1...
Mon Nov 4 12:46:06 CET 2013

Hi Claudio,

welcome to the Genode mailing list.

On 11/02/2013 11:17 PM, Claudio L. wrote:
> Hello,
> I'm new to genode but not new to develoment. I'd like to port genode to 
> my dev board (Odroid-XU). To begin, I built the foc_arndale target 
> successfully following the instructions.

That sounds cool.

> What I couldn't find anywhere is instructions on how to build a boot 
> image for u-boot, which files are needed in the image, entry point, etc.
> Where can I find that information? An explanation or a link would be 
> helpful.
> As a constructive critic to the Genode project: Documentation is 
> fantastic, but there's nothing on how to create a partition, put all the 
> files and boot on x86, or for other platforms as well (at least 
> something generic, saying that we need to load the kernel image (where 
> to find it in the path), the 'core' executable, drivers, build an image, 
> etc.
> The description on the website begins with how to configure the 'init' 
> process, which says it is loaded by 'core', which is the first task 
> started by the kernel. So how do we put it all together in an image?
> I think we'd need an image with the kernel, core, init, the uart driver, 
> and perhaps an sd/mmc driver, so that init reads the rest of the 
> services from the sd card.

Indeed, appropriated documentation for such a task is sometimes hard to
find on Genode's website, or source code's inline documents. Mostly,
you'll have luck when searching in the extraordinary detailed release
notes that can be found on the website, or in the 'doc' directory of the

With respect to your question, on how to build a corresponding image to
boot it via u-boot, I recommend to have a deeper look at the run tool
integrated in Genode's build system. As we use a bunch of kernels on
different hardware all the time at Genode Labs, there was the impulse at
an early stage to automate the task of building, and testing of
different platforms. Therefore, Genode's run tool was initiated years
ago. In the meantime, it became a powerful tool that enables to build,
start, and test complex scenarios with a simple run of 'make'. For more
details, please refer to the corresponding section of the notes of
release 13.05:

For general information of the run tool, please consider the general
build system documentation:

In your case, it will be sufficient to add an argument to the "RUN_OPT"
environment variable, which is interpreted by the run tool. Just add:

  RUN_OPT = --target uboot

into the 'etc/build.conf' file of your build directory, or invoke 'make'
like the following:

  RUN_OPT="--target uboot" make run/[run_script_you_want_to_build]

The run tool will produce a ready to use u-boot image containing all
necessary files, including the kernel, core etc., at
'var/run/[run_script_name]/uImage' in your build directory. You can
either copy that uImage to a SD-card, or load it via TFTP to the target
board. Just mind to load the uImage to a different memory area than its
defined load address.
After you've loaded the uImage to memory, you can invoke u-boot's
'bootm' command together with the memory address you put the uImage at.
U-boot will look at the header of the uImage in memory, copy the
contents to the load address that is specified in there, and jump to the
entry point defined. If you want to read the uImage details, like the
load address, you can use the u-boot tool 'mkimage' in combination with
the '-l' argument. Also be aware to not load the uImage to the memory
area u-boot resides in, and leave the first physical page free.
Typically u-boot doesn't warn, if it fails to load an image to memory,
because of a memory region clash.

In your position, I would start with a very simple test scenario, like
the 'base/run/' script. It includes: the kernel, core, init,
and a simple test-printf program. Debug output is printed using a
in-kernel debug printing feature. An additional UART driver isn't needed
here, mostly the kernel builtin UART driver is sufficient.
As you can see in the mentioned run script, the 'build_boot_image'
command is given a list of all binaries that should be incorporated into
the the target image (in your case uImage). The corresponding kernel is
integrated automatically. All binaries, inside such a boot image, are
accessible via core's ROM service.
If you don't want to integrate all binaries, you want to execute in a
scenario, into the boot image, e.g. to minimize u-boot's load time, you
might load binaries on demand, e.g. from a SD card. Of course, that
implies to first enable the regarding drivers for your target platform.

> I noticed the build directory has a large file, fiasco.image (15 MB?),
> what does it contain?

I assume its the unstripped version of the Fiasco.OC kernel containing
all kinds of debug symbols. The stripped version should have a size of
something like 500KB .

> I have too many questions, please bear with me. Once I learn all this, I 
> can write some tutorials for other people like me.

Don't hesitate to ask these questions. They are more than welcome. We
would be glad, if you help us to improve the documentation fo new users,
and developers.

Best regards

> Thanks,
> Claudio
> ------------------------------------------------------------------------------
> Android is increasing in popularity, but the open development platform that
> developers love is also attractive to malware creators. Download this white
> paper to learn more about secure code signing practices that can help keep
> Android apps secure.
> _______________________________________________
> Genode-main mailing list
> Genode-main at

Stefan Kalkowski
Genode Labs ยท

More information about the users mailing list