GP32 Qemu For Gp2x... Plz Help Me


Emu&Co

Active Member
Joined
Feb 12, 2004
Messages
803
Age
37
Location
Germany / Bavaria
Website
dreimer.de.vu
Hello, as the title says, I would like to port QEmu 0.8.1 fot GP2X. The Homepage says that it supports ARM Architecture as host, so this is not a Problem. I tried with this DevKit (http://archive.gp2x.de/cgi-bin/cfiles.cgi?0,0,0,0,14,1362). My first problem was the SDL, because ./configure in QEmu Source told me that it does not exist. I managed to get past this by modifying the configure file:

# SDL probe

sdl_too_old=no

if test -z "$sdl" ; then

sdl_config="sdl-config"
sdl=yes
sdl_static=yes

if test "$mingw32" = "yes" -a ! -z "$cross_prefix" ; then
# win32 cross compilation case
sdl_config="sdl-config"
sdl=yes

After this It told me it found SDL and will link it static (as I wanted to) but then it stuck on build again. I found out that it still tries to build a x86 app, so I changed this part of the config, too.

cpu=armv4b DID not build
cpu=armv4l DID not build
cpu=armv4t Not Supported...

http://mitglied.lycos.de/reimerdaniel/configure

This happens for me

$ make
gcc -Wall -O2 -g -fno-strict-aliasing -I. -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -o dyngen.exe dyngen.c
dyngen.c:1254: error: syntax error before 'ELF_RELOC'
dyngen.c: In function 'arm_emit_ldr_info':
dyngen.c:1264: error: 'p_start' undeclared (first use in this function)
dyngen.c:1264: error: (Each undeclared identifier is reported only once
dyngen.c:1264: error: for each function it appears in.)
dyngen.c:1265: error: 'p_end' undeclared (first use in this function)
dyngen.c:1275: error: 'name' undeclared (first use in this function)
dyngen.c:1275: error: 'start_offset' undeclared (first use in this function)
dyngen.c:1283: error: 'outfile' undeclared (first use in this function)
dyngen.c:1295: error: 'ELF_RELOC' undeclared (first use in this function)
dyngen.c:1295: error: 'rel' undeclared (first use in this function)
dyngen.c:1305: warning: value computed is not used
dyngen.c:1305: warning: value computed is not used
dyngen.c:1310: warning: implicit declaration of function 'ELF32_R_TYPE'
dyngen.c:1311: error: 'R_ARM_ABS32' undeclared (first use in this function)
dyngen.c:1297: warning: unused variable 'p'
dyngen.c: In function 'gen_code':
dyngen.c:2224: warning: implicit declaration of function 'ELFW'
dyngen.c:2224: error: 'R_SYM' undeclared (first use in this function)
dyngen.c:2224: error: 'struct coff_rel' has no member named 'r_info'
dyngen.c:2224: error: called object 'ELFW(<erroneous-expression>)' is not a function
dyngen.c:2229: error: 'struct coff_rel' has no member named 'r_info'
dyngen.c:2233: error: 'R_ARM_ABS32' undeclared (first use in this function)
dyngen.c:2237: error: 'R_ARM_PC24' undeclared (first use in this function)
make: *** [dyngen.exe] Error 1


What can I do or could you try out and tell me what you did?

Thanks
 
Did you change config.sub?
Try scratchbox if you are using linux. Otherwise use andlinux and then scratchbox. Many programs dont cross-compile nicely. Scratchbox is supposed to help with that since it has CPU transparency i.e it allows you to run arm programs using qemu arm automatically.
havent got scratchbox to work myself though.
 
OK there is no config.sub to change

./configure --cross-prefix=gp2x- --host-cc=gcc-3.3 --disable-gcc-check --prefix=$GP2XDEV --disable-kqemu
rename sdl-config for gp2x to sdl-config
in Makefile
change sdl-config to gp2x-sdl-config
add -L/$(GP2XDEV)/lib to LDFLAGS
in Makefile.target
remove preferred-stack=2

lots of warning(probably because gcc is 4.02)

stops here
gp2x-gcc -Wall -O2 -g -fno-strict-aliasing -fomit-frame-pointer -falign-functions=0 -fno-gcse -fno-reorder-blocks -fno-optimize-sibling-calls -I. -I.. -I/root/qemu-0.8.1/target-i386 -I/root/qemu-0.8.1 -I/root/qemu-0.8.1/linux-user -I/root/qemu-0.8.1/linux-user/i386 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/root/qemu-0.8.1/fpu -DHAS_AUDIO -I/root/qemu-0.8.1/slirp -c -o op.o /root/qemu-0.8.1/target-i386/op.c
../dyngen -o op.h op.o
dyngen: Unsupported CPU (e_machine=40)
make[1]: *** [op.h] Error 1
make[1]: Leaving directory `/root/qemu-0.8.1/i386-user'
make: *** [all] Error 1
 
The guys in QEmu chat said that there is some ASM Code to edit. So the quest ends here for me. If someone gets this to work, tell me and send me your PayPal Account Address, too.
 
Back
Top