First post, by Medox
- Rank
- Newbie
Hello. I'm trying for days to get this working, so please help.
There is a ucLinux port for the PSP (see this or this) and I want to compile DOSBox for this distribution. The problem is it doesn't support the elf executable that I get after compiling, just the flat format.
There isn't any problem with the ucLinux on PSP toolchain. I created helloworld files that show up just fine, using "-Wl,-elf2flt" but I don't know how exactly to integrate an option like "elf2flt" while compiling DOSBox.
The steps I used so far:
1. ./autogen.sh
2. ./configure --enable-static --disable-shared --prefix=/whatever (or only with ./configure... same results)
3. ./make CROSS_COMPILE=mipsel-linux- LDFLAGS="-static -Wl,-elf2flt" CFLAGS="-fno-jump-tables"
4. ./make ...(the same)... install
(like in the busybox example on the authors site, from the link above)
Everything compiles fine and I get the dosbox executable. No errors at all.
The problem is that this executable still isn't a flat one, even dough I used elf2flt & co. 😒. I still get this output inside ucLinux:
BINFMT_FLAT: bad header magic
BINFMT_FLAT: bad header magic
dosbox: applet not found
Creating and running helloworld.c or any other .c file works just fine using:
mipsel-linux-gcc -static -Wl,-elf2flt -fno-jump-tables file.c -o file
...but only for single files, not for applications like dosbox.
I've already tried the above command for /bin/dosbox, like this:
mipsel-linux-gcc -static -Wl,-elf2flt -fno-jump-tables dosbox -o dosboxflat
...using the generated/cross-compiled version, but this gave only errors, of course...
Any idea what I'm doing wrong? 😢
Thanks