[OpenBIOS] a couple of problem while compiling and running openfirmware on qemu

Gleb Natapov gleb at redhat.com
Sun Nov 7 10:42:25 CET 2010


On Sat, Nov 06, 2010 at 03:41:34PM +0100, Andreas Färber wrote:
> Hello Gleb,
> 
> Am 01.11.2010 um 15:15 schrieb Gleb Natapov:
> 
> >I tried to compile openfirmware for qemu like described here
> >http://www.openfirmware.info/Building_OFW_for_QEMU. But after running
> >make in cpu/x86/pc/emu/build on 64bit host I get linkage error:
> >ld -T inflate.ld inflate.lo -o inflate.o
> >ld: i386 architecture of input file `inflate.lo' is incompatible
> >with i386:x86-64 output
> >
> >After applying this patch:
> >Index: cpu/x86/Linux/Makefile
> >===================================================================
> >--- cpu/x86/Linux/Makefile	(revision 1996)
> >+++ cpu/x86/Linux/Makefile	(working copy)
> >@@ -34,7 +34,7 @@
> >	${CC} -c -m32 -Wall -fno-stack-protector -ffreestanding -
> >D_FORTIFY_SOURCE=0 -DNEED_BCOPY -O3 -fpic $< -o $@
> >
> >inflate.o: inflate.lo
> >-	${LD} -T inflate.ld $< -o $@
> >+	${LD} -melf_i386 -T inflate.ld $< -o $@
> 
> Can't say much about OFW but since no one has replied yet: maybe try
> specifying OUTPUT_FORMAT(elf_i386) in inflate.ld or check where LD
> gets defined? Not sure if this code is supposed to build for both
> architectures or just 32-bit x86.
> 
Only 32 bit I think. Specifying OUTPUT_FORMAT it not enough though. I
had to add two lines:
OUTPUT_ARCH(i386)
OUTPUT_FORMAT(elf32-i386)

> You may find better answers on the openfirmware list (cc'ed):
> http://www.openfirmware.info/mailman/listinfo/openfirmware
>
Thanks.
 
--
			Gleb.



More information about the OpenBIOS mailing list