Cross compiling qemu for ARM
Hi,
I'm trying to get Qemu 0.9.1 cross compiled for the ARM platform.
I have been using these configure flags:
--target-list=arm-softmmu
--source-path=$HOME/Source/qemu-0.9.1/
--cross-prefix=arm-linux-
--static
--host-cc=/usr/bin/gcc-3.4
--prefix=$HOME/Binary/qemu/
--disable-linux-user
--disable-darwin-user
--disable-sdl
--disable-gfx-check
I have the complete arm crosscompiling toolchain including crosscompilers and libs like zlib. (Unfortunatly I didn't find an option to give paths to zlib headers and lib, so I set them manually. Do you know an easy way to set them?)
Compiling goes well until dyngen tries to execute:
make[1]: Entering directory `/home/s1010824/Build/arm/qemu/arm-softmmu' ../dyngen -o op.h op.o
dyngen: op_movl_T0_r0, 8: function too small
make[1]: *** [op.h] Error 1
make[1]: Leaving directory `/home/s1010824/Build/arm/qemu/arm-softmmu'
Do you have an idea how I can fix that? Did you do cross compilation of qemu yourself and know good documention about it?
Thank you in advance,
Steffen Liebergeld
Hi (again),
Quoted 4 lines · Steffen Liebergeld
Hi,
I'm trying to get Qemu 0.9.1 cross compiled for the ARM platform.
Quoted 11 lines
I have been using these configure flags:
--target-list=arm-softmmu
--source-path=$HOME/Source/qemu-0.9.1/
--cross-prefix=arm-linux-
--static
--host-cc=/usr/bin/gcc-3.4
--prefix=$HOME/Binary/qemu/
--disable-linux-user
--disable-darwin-user
--disable-sdl
--disable-gfx-check
I forgot those:
--cpu=armv4l
and:
--extra-cflags=-I$HOME/Build/arm/buildroot/build_arm/zlib-1.2.3 --extra-ldflags=-L$HOME/Build/arm/buildroot/build_arm/zlib-1.2.3
Which solve my zlib related problem.
Now the build stops like this:
make[1]: Entering directory `/home/s1010824/Build/arm/qemu/arm-softmmu'
arm-linux-gcc -Wall -O2 -g -fno-strict-aliasing -fno-reorder-blocks -fno-gcse -fno-optimize-sibling-calls
-fno-align-labels -fno-align-jumps -fno-align-functions -mno-sched-prolog -fno-omit-frame-pointer -I. -I.. -I/home/s1010824/Source/qemu-0.9.1//target-arm -I/home/s1010824/Source/qemu-0.9.1/ -MMD -MP -DNEED_CPU_H -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/home/s1010824/Source/qemu-0.9.1//fpu -DHAS_AUDIO -I/home/s1010824/Source/qemu-0.9.1//slirp -c -o op.o /home/s1010824/Source/qemu-0.9.1//target-arm/op.c/home/s1010824/Source/qemu-0.9.1/target-arm/op.c: In function `op_goto_tb0':/home/s1010824/Source/qemu-0.9.1/target-arm/op.c:369: warning: used' attribute ignored /home/s1010824/Source/qemu-0.9.1/target-arm/op.c:369: warning: used' attribute ignored /home/s1010824/Source/qemu-0.9.1/target-arm/op.c:369: warning: unused variable dummy0' /home/s1010824/Source/qemu-0.9.1/target-arm/op.c:369: warning: unused variable __op_label0' /home/s1010824/Source/qemu-0.9.1/target-arm/op.c: In function `op_goto_tb1':/home/s1010824/Source/qemu-0.9.1/target-arm/op.c:374: warning: used' attribute ignored /home/s1010824/Source/qemu-0.9.1/target-arm/op.c:374: warning: used' attribute ignored /home/s1010824/Source/qemu-0.9.1/target-arm/op.c:374: warning: unused variable dummy1' /home/s1010824/Source/qemu-0.9.1/target-arm/op.c:374: warning: unused variable __op_label1'
In file included from /home/s1010824/Source/qemu-0.9.1/target-arm/op.c:1923:/home/s1010824/Source/qemu-0.9.1/target-arm/op_iwmmxt.c: In function `op_iwmmxt_muluw_M0_wRn':/home/s1010824/Source/qemu-0.9.1/target-arm/op_iwmmxt.c:144: unable to find a register to spill in class `GENERAL_REGS' /home/s1010824/Source/qemu-0.9.1/target-arm/op_iwmmxt.c:144: this is the insn:
(insn 143 139 201 (set (reg:DI 85)
(ior:DI (reg:DI 54)
(reg:DI 82))) 94 {iordi3} (insn_list 142 (insn_list 60 (nil)))
(expr_list:REG_DEAD (reg:DI 54)
(expr_list:REG_DEAD (reg:DI 82)
(nil))))/home/s1010824/Source/qemu-0.9.1/target-arm/op_iwmmxt.c:144: confused by earlier errors, bailing out make[1]: *** [op.o] Error 1
I guess this is a bug in gcc? Which version do you use to compile qemu on an ARM host?
Many thanks in advance,
Steffen Liebergeld
Quoted 1 line · Steffen Liebergeld
I guess this is a bug in gcc? Which version do you use to compile qemu on an ARM host?
qemu 0.9.1 requires a gcc 3.x.y compiler.
Laurent
Hi,
Quoted 5 lines · Laurent Desnogues
Quoted 2 lines · Steffen Liebergeld
I guess this is a bug in gcc? Which version do you use to compile qemu on an ARM host?
qemu 0.9.1 requires a gcc 3.x.y compiler.
I'm using 3.2.2. Did you use a specific version?
Steffen
Quoted 4 lines · Steffen Liebergeld
Quoted 2 lines
qemu 0.9.1 requires a gcc 3.x.y compiler.
I'm using 3.2.2. Did you use a specific version?
Well I don't compile for ARM host and never used 0.9.1. So I'll let others answer.
I use svn version which, except for PowerPC target, can be compiled with gcc 4. However I am not sure of the quality of the ARM host in svn; it seems to have been tested by few people; Andrzej, any comment? :)
Laurent
Quoted 3 lines · Steffen Liebergeld
Hi,
I'm trying to get Qemu 0.9.1 cross compiled for the ARM platform.
Don't bother. Use SVN.
Paul
Hi Paul,
Quoted 6 lines · Paul Brook
Quoted 3 lines · Steffen Liebergeld
Hi,
I'm trying to get Qemu 0.9.1 cross compiled for the ARM platform.
Don't bother. Use SVN.
Okay. I did this, and actually got a binary this time;-)
But in the file tcg/arm/tcg-target.c, function tcg_out_goto (line 677), a block of code commented out, and replaced by an tcg_abort(). Why has this been done?
If I replace the about with the outcommented code, qemu segfaults. So I guess qemu support for target arm is currently broken?
Who is currently working on this?
Steffen
2008/11/28 Steffen Liebergeld <[email protected]>:
Quoted 8 lines
Hi Paul,
Quoted 5 lines · Paul Brook
Quoted 3 lines · Steffen Liebergeld
Hi,
I'm trying to get Qemu 0.9.1 cross compiled for the ARM platform.
Quoted 7 lines
Quoted 1 line
Don't bother. Use SVN.
Okay. I did this, and actually got a binary this time;-)
But in the file
tcg/arm/tcg-target.c, functiontcg_out_goto(line 677), a block of code commented out, and replaced by antcg_abort(). Why has this been done?
It hasn't been tested because there's hope that it won't be needed. If you see TCG abort in that place it means that a branch to a place further away than 1 << 26 is being attempted and maybe this can be avoided by modifying arm.ld.
Quoted 3 lines
If I replace the about with the outcommented code, qemu segfaults. So I guess qemu support for target arm is currently broken?
That's possible.
Cheers