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

Mitch Bradley wmb at laptop.org
Sat Nov 13 00:59:05 CET 2010


I checked in the changes suggested below; I hope it helps.

Mitch Bradley

On 11/6/2010 11:42 PM, Gleb Natapov wrote:
> 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.
>
> _______________________________________________
> openfirmware mailing list
> openfirmware at openfirmware.info
> https://openfirmware.info/mailman/listinfo/openfirmware



More information about the openfirmware mailing list