[Barrelfish-users] ARM Architectures on QEMU

Kornilios Kourtis kornilios.kourtis at inf.ethz.ch
Wed Nov 27 12:16:24 CET 2013


Dear Dominic,

I'm inlining some responses to your questions below.

On Wed, Nov 27, 2013 at 05:49:23PM +0800, Dominic Hung wrote:
> Dear Sir/Madam,
> 
> I would like to make few queries into the compilation of barrelfish-2013-11-17
> on ARM architectures.
> 
> ARMv5
> ----------
> 
> I am writing to see if anyone has successfully built barrelfish-2013-11-17 on
> ARMv5. I have experienced linker error after doing a "make"
> 
> arm-none-linux-gnueabi-gcc -g -O2 -T./armv5/kernel/linker.lds -o ./armv5/sbin/
> cpu -Wl,-N -Wl,-Map,./armv5/kernel/kernel.map -fno-builtin -nostdlib
> -Wl,--fatal-warnings ./armv5/kernel/arch/armv5/boot.o ./armv5/kernel/arch/armv5
> /exceptions.o ./armv5/kernel/arch/arm/exn.o ./armv5/kernel/arch/arm/exec.o ./
> armv5/kernel/arch/arm/misc.o ./armv5/kernel/arch/arm/phys_mmap.o ./armv5/kernel
> /arch/armv5/init.o ./armv5/kernel/arch/armv5/integrator.o ./armv5/kernel/arch/
> armv5/kludges.o ./armv5/kernel/arch/armv5/kputchar.o ./armv5/kernel/arch/armv5/
> pl011_uart.o ./armv5/kernel/arch/armv5/cp15.o ./armv5/kernel/arch/armv5/
> paging.o ./armv5/kernel/arch/armv5/startup_arch.o ./armv5/kernel/arch/armv5/
> syscall.o ./armv5/kernel/gdb_stub.o ./armv5/kernel/capabilities.o ./armv5/
> kernel/dispatch.o ./armv5/kernel/schedule_rbed.o ./armv5/kernel/memset.o ./
> armv5/kernel/memmove.o ./armv5/kernel/paging_generic.o ./armv5/kernel/printf.o
> ./armv5/kernel/startup.o ./armv5/kernel/stdlib.o ./armv5/kernel/string.o ./
> armv5/kernel/syscall.o ./armv5/kernel/wakeup.o ./armv5/kernel/useraccess.o ./
> armv5/lib/libelf.a ./armv5/lib/libcpio.a ./armv5/lib/libgetopt.a ./armv5/lib/
> libmdb_kernel.a -lgcc 
> 
> /opt/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_GNU_Linux/bin/../lib/gcc/
> arm-none-linux-gnueabi/4.7.3/libgcc.a(bpabi.o):(.ARM.exidx+0x0): undefined
> reference to `__aeabi_unwind_cpp_pr1'
> 
> collect2: error: ld returned 1 exit status
> 
> make: *** [armv5/sbin/cpu] Error 1
> 
> 1) -> I would like to see if anyone has the above problem compiling the latest
> code for armv5 and have the respective solution?

We have successfully compiled the aforementioned Barrelfish release
for armv5 without problems in our environment. The version we use is:
arm-none-linux-gnueabi-gcc (Sourcery CodeBench Lite 2012.03-57) 4.6.3.

>From the error above, it seems to me that there is something wrong
with your building environment, since the undefined reference should
be a part of gcc.

> 
> I tried the 2013-08-16 build as well, bearing similar problems.
> 
> ARMv7
> ----------
> 
> 2) -> For 2013-11-17 build, the compilation requires editing the
> symbolic_link.mk for successful compilation on the armv7 architecture. Changing
> "armv7/sbin/fish" to "sbin/fish" and commenting out the "sbin/examples/
> xmplspawn". This error is not in the 2013-08-16 build.
> 
> 3) -> Furthermore, I would like to see to the proper method running armv7 build
> on QEMU. Now, to let the compilation success, firstly, I am making a link for
> menu.lst.armv7, pointing to menu.lst.pandaboard. Secondly, in the
> symbolic_link.mk, I appeneded the following lines,
> 
> else ifeq ($(ARCH),armv7)
>         QEMU_CMD=qemu-system-arm -cpu cortex-a9 -M realview-pbx-a9 -kernel
> armv7/sbin/cpu_omap44xx -append "console=ttyAMA0"
>         GDB=arm-linux-gnueabi-gdb
> 
> after the arm11mp-condition in the simulate part of Make codes, and make
> adjustment mentioned in 2) to make the compilation goes.
> 
> But even after QEMU can be successfully triggered after make sim, nothing is
> running inside the QEMU. No console output, no display output.

Unfortunately, we are not using ARMv7 qemu, so I'm not sure how to solve
the problems you are experiencing. 

For several reasons, we are using GEM5 for ARMv7 simulation, and you
can find some instructions here:
http://wiki.barrelfish.org/Running_on_gem5.

> 4) -> I am wondering whether a cpu_omap44xx.bin is missing as compare to armv5
> modules. May anyone give me any hint what is the difference between sbin/cpu
> and sbin/cpu.bin?

>From a quick look in our hake files:
ARMv5.hs:

148 --
149 -- Link the kernel (CPU Driver)
150 --
151 linkKernel :: Options -> [String] -> [String] -> String -> HRule
152 linkKernel opts objs libs kbin =
153     let linkscript = "/kernel/linker.lds"
154         kbootable  = kbin ++ ".bin"

And:

168               -- Edit ELF header so qemu-system-arm will treat it as a Linux kernel
169               Rule [ In SrcTree "src" "/tools/arm-mkbootelf.sh",
170                      Str objdump, In BuildTree arch kbin, Out arch (kbootable)],

Hence, according to the comment in line 168, .bin seems to be an
edited elf binary using the arm-mkbootelf.sh script so that it can be
booted with qemu.


> 
> ARM11MP
> ----------
> 
> 5) -> According to the following link, someone in the community mentioned
> ARM11MP is not supported because it cannot be compiled. (Available: https://
> lists.inf.ethz.ch/pipermail/barrelfish-users/2011-July/000207.html) I would
> like to see if the barrelfish team can speak of this officially, which ARM
> architecture(s) are currently supported?

The short answer is that we support ARMv5 and ARMv7 -- so indeed we
do support not ARMv6. I think, however, that it would be useful for
you and other members of the community to give you a more detailed
description of our support level for different ARM platforms.

The main ARM platform we use daily is the Pandaboard (see
http://wiki.barrelfish.org/PandaBoard). Hence, running Barrelfish on
the pandaboard should work without problems. Furthermore, fixing
potential problems on Pandaboard currently has the  highest priority
among all ARM platforms for us.  Subsequently, ARMv7 is the main
platform we are currently using and is bound to get more attention
than ARMv5.

The simulator we use for ARMv7 is GEM5, and in every release we make
sure that at least the automated tests for building and running a
simple program on ARMv7/GEM5 work without problems.

Similarly, we have a similar automated test (i.e., building and
running a simple program) for ARMv5/qemu. 

Although we would want to provide wider and better support for
different ARM platforms, this is something that we cannot easily do.
As a result, Barrelfish support for different platforms tends to be
skewed towards the parts of Barrelfish we are actively working on. 

That being said, we would be happy to help people add support for
different platforms and incorporate these changes to Barrelfish.

Hope this helps,
Kornilios.



> 
> Any help would be most appreciated! Thanks in advance!
> 
> Cheers,
> Dominic Hung
> 
> --------------------------------------------------
> C H Dominic Hung, B.Eng. (CE) HK
> M. Phil. Student, Dept. of CS., Faculty of Engg.
> 
> Email: domchdh at hku.hk

> _______________________________________________
> Barrelfish-users mailing list
> Barrelfish-users at lists.inf.ethz.ch
> https://lists.inf.ethz.ch/mailman/listinfo/barrelfish-users


-- 
Kornilios Kourtis



More information about the Barrelfish-users mailing list