VOGONS


First post, by Medox

User metadata
Rank Newbie
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

p.s. about the binary flat format for ucLinux.

Reply 1 of 2, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

No idea about that stuff, but try to check the actual gcc/gccxxx lines when
executing make (maybe that stuff is in some log actually).

Reply 2 of 2, by jal

User metadata
Rank Oldbie
Rank
Oldbie
Medox wrote:

Any idea what I'm doing wrong?

No, but did you see this page? It seems to take a slightly different approach in creating a flat executable.

Also, did you use hd (or od, or whatever) to check the header of your final executable? If so, did it resemble the structure that is described on the BFLT page you referenced?

JAL