Cross-compiling L4Re for MIPS32

Paul Boddie paul at boddie.org.uk
Sun Jun 12 01:19:26 CEST 2016


Hello,

I finally got round to looking at L4/Fiasco.OC again, and having previously 
looked at the MIPS32 port that was made available on GitHub...

https://github.com/MIPS/fiasco-l4re

...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-
SHARED_FLAGS=-mips32r2 -EL -msoft-float -mno-abicalls -fno-pic

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.

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.

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.

Paul



More information about the l4-hackers mailing list