[coreboot] Building coreboot on 64-bit host

llandre r&d2 at dave-tech.it
Fri May 16 16:01:59 CEST 2008

>> I'm experiencing the problem shown below when trying to build coreboot 
>> release 3324 for Geode LX evaluation board db800 on 64-bit host.
>> It seems ld is not invoked properly.
> ..
>> Usage: /usr/bin/ld [options] file...
> ..
>> /usr/bin/ld: supported targets: elf64-x86-64 elf32-i386 a.out-i386-linux 
>> efi-app-ia32 elf64-little elf64-big elf32-little elf32-big srec 
>> symbolsrec tekhex binary ihex
> It seems your ld will prefer/default to elf64-x86-64, and the options
> specified in the build scripts are possibly only available for
> elf32-i386.
> Maybe --oformat elf32-i386 in the ld command line will help?

I changed the file src/config/Config.lb like this:

makerule coreboot
	action	"$(CC) $(DISTRO_LFLAGS) -nostdlib -nostartfiles -static 
--oformat elf32-i386 -o $@ -T ldscript.ld crt0.o $(INIT-OBJECTS)"
	action	"$(CROSS_COMPILE)nm -n coreboot | sort > coreboot.map"

The file targets/amd/db800/db800/fallback/Makefile is generated accordingly:

	$(CC) $(DISTRO_LFLAGS) -nostdlib -nostartfiles -static --oformat 
elf32-i386 -o $@ -T ldscript.ld crt0.o $(INIT-OBJECTS)
	$(CROSS_COMPILE)nm -n coreboot | sort > coreboot.map

but linker still does not like it :(


DAVE Electronics System House - R&D Department
web:   http://www.dave.eu
email: r&d2 at dave-tech.it

More information about the coreboot mailing list