My sample PCI Expansion ROM code over at
Low Cost Embedded x86 Teaching Tool is no longer compile-able on recent x64 Linux distributions. This is due to the fact that the default GCC toolchain in those Linux distros doesn't support output in the form of the particular ELF32 i386 required by the source code. Other possible problem is the GCC toolchain doesn't support 16-bit code output anymore, as required by the linker script.
For trouble free source code compilation, you're advised to download and build Coreboot cross compiler, see:
http://www.coreboot.org/Build_HOWTO#Known_issues. Just invoke:
make crossgcc
in the directory where you download Coreboot (Coreboot root directory) to build the cross compiler. You'll also need to alter the
Makefile of the PCI Expansion ROM code to use the newly built cross compiler. The toolchain components that you need to change in the
Makefile is pretty much everyone of them, i.e:
CC,
LD,
AS and
OBJCOPY. The cross compiler should be located in the
/util/crossgcc/xgcc/bin directory, once you have completed building the cross compiler. If you are still unsure about the path of the cross compiler toolchain, open the
.xcompile file in Coreboot root
directory.