Adding Sparc/LEON3 support to Genode
Johannes Schlatow
schlatow at ...238...
Mon Aug 4 18:24:58 CEST 2014
Hey guys,
I'm trying to add a new architecture, namely the LEON3, to Genode.
Some time ago, I already added rudimentary LEON3 support to Fiasco.OC.
Thus I thought it shouldn't take too much of an effort to get this
working with Genode on top of it.
The LEON3 port for Fiasco.OC was based on the l4re snapshot from April
2013. I therefore (back)ported the implementation to Genode's foc clone.
You can find the code at github [1] (beware, it's not tested yet).
I also added the foc_leon3 build target along with the required
platform-specific code to Genode [2].
Unfortunately, I got stuck a little at this point. I.e. when I run e.g.
'make run/printf' for this target, I get a couple of linker errors that
I cannot relate to anything in the Genode source code, e.g.:
repos/os/src/init/main.cc:178: undefined reference to `atexit'
`.text.__sparc_get_pc_thunk.l7' referenced in section `.text'
of /build/foc_leon3/var/libcache/cxx/cxx.lib.a(supc++.o):
defined in discarded section
`.text.__sparc_get_pc_thunk.l7[__sparc_get_pc_thunk.l7]'
of build/foc_leon3/var/libcache/cxx/cxx.lib.a(supc++.o)
build/foc_leon3/var/libcache/cxx/cxx.lib.a(supc++.o):
In function `__gnu_cxx::__verbose_terminate_handler()':
(.text+0x31cc): undefined reference to `_impure_ptr'
I assume these errors might be related to the tool chain but this is a
rather wild guess. Do you have any (more educated) suggestions?
I'm using the dev version of the bare-c compiler provided by gaisler [3]
which bases on gcc 4.6.0. Of course, this is not an optimal solution
but the best I could achieve so far.
[1] https://github.com/ValiValpas/foc/tree/leon3
[2] https://github.com/ValiValpas/genode/tree/leon3
[3] http://developer.gaisler.net/download/bcc/linux/4.6.0/
Cheers
Johannes
More information about the users
mailing list