Cross-compiling L4Re for MIPS32

Adam Lackorzynski adam at os.inf.tu-dresden.de
Mon Jun 13 00:41:12 CEST 2016


Hi Paul,

On Sun Jun 12, 2016 at 01:19:26 +0200, Paul Boddie wrote:
> ...I have been attempting to cross-compile Fiasco and L4Re using the l4re.org 
> sources. Getting Fiasco to cross-compile was mostly a matter of repeating the 
> same procedure as last time:
> 
> cd src/kernel/fiasco
> make BUILDDIR=mybuild
> cd mybuild/
> make config
> make
> 
> However, I needed to edit src/kernel/fiasco/src/Makeconf.mips32 to change the 
> compiler settings. I'm using the toolchains in Debian unstable:
> 
> CROSS_COMPILE             ?= mipsel-linux-gnu-
> 
> Previously, I used a Makeconf.local file to set the following:
> 
> SYSTEM_TARGET=mipsel-linux-gnu-

Please use CROSS_COMPILE=mipsel-linux-gnu- here.

> SHARED_FLAGS=-mips32r2 -EL -msoft-float -mno-abicalls -fno-pic

Setting SHARED_FLAGS flags is not required (actually must not, otherwise
I'd regard this as a bug).

> Maybe the previous work used some different mechanisms to those used by the 
> more general source distribution, but this trick didn't seem to influence the 
> build successfully this time around. However, the build did complete 
> successfully with the toolchain set appropriately.
> 
> Meanwhile, I had more problems with the L4Re part. I had expected to be able 
> to do the following:
> 
> cd src/l4
> make B=mybuild
> make O=mybuild config
> make O=mybuild E=mips-fbspectrum
> 
> (The target was something that I had managed to build previously after some 
> messing around with packages and configuration files. I'd managed to build the 
> fbspectrum example for Fiasco.OC-UX, as the list archives will attest.)
> 
> However, I also had to change the compiler settings (as done above) in 
> src/l4/mk/arch/Makeconf.mips, instead of using src/l4/Makeconf.local (as done 
> previously). Again, maybe the way of doing things was different in the 
> previous incarnation of this port.

Also use CROSS_COMPILE here.

> I also needed to edit src/l4/tool/gendep/syscall.c to add a definition before 
> unistd.h gets included:
> 
> #define __ARCH_WANT_SYSCALL_NO_AT
> 
> I can't remember if I or anyone else has mentioned this before now, but 
> without it, things like __NR_open are not defined.

On which system are you compiling this? This doesn't happen for us, so
I'm wondering.

> Unfortunately, I haven't yet reached a satisfactory conclusion in this latter 
> exercise. Looking back at my previous messages, it seems that a bit more work 
> might be needed to configure and build a suitable target, and so I was 
> wondering if anyone had done this (and written it up) for any of the MIPS 
> boards, perhaps the CI20. Indeed, I wonder if things like the framebuffer are 
> even supported for the CI20 or other MIPS boards.

We do not have any support for framebuffers on MIPS targets yet.



Adam




More information about the l4-hackers mailing list