[coreboot] trying to understand the build process of coreboot-v2

Harald Gutmann harald.gutmann at gmx.net
Wed Jan 23 17:13:56 CET 2008


As now SPI-Chips with more space than 512kB are supported for the Gigabyte 
M57SLI-4 Mainboard, i want to build a coreboot image with Linux as Payload.

First i tried to do that with buildrom-devel, but i wasn't successful. 
Buildrom-devel created a payload.elf file (in 
which should be a  linux- image with my current kernel config, but 
without modules, everything compiled into the kernel. This payload.elf file 
has a size of about three megabytes.

The buildrom tool failed to create a working image, so i tired to build the 
stuff manually. First i checked out the current coreboot svn tree, and edited 
the "payload" option in targets/gigabyte/m57sli/Config.lb to point at the 
payload.elf file which i got from the buildrom tool. I also set the "option 
ROM_SIZE" to the correct value for 4megabytes.

Compilling the image manually worked nearly, at the end i got an error in the 
fallback directory, where it complains about the image size. Here it is:

"objcopy --gap-fill 0xff -O binary coreboot coreboot.strip
./buildrom coreboot.strip coreboot.rom payload 0x20000 0x3f000
ERROR: payload (2956431) + coreboot (131072) - Size is 2829455 bytes larger 
than ROM size (258048).
make: *** [coreboot.rom] Error 1"

After that error i had a look to the Makefile in that directory and noticed 
that there is written the following:
"coreboot.rom: coreboot.strip buildrom $(PAYLOAD-1)
        ./buildrom $< $@ $(PAYLOAD-1) $(ROM_IMAGE_SIZE) $(ROM_SECTION_SIZE)"

I just had set the ROM_SIZE in the Config.lb but it seems that here the 
ROM_SECTION_SIZE is used to generate the image.

But at that point i've a (maybe) stupid question:
What is the difference between normal/fallback/failover, and are all these 3 
images needed?

Another quite simple/stupid question is, how do i generate a payload.elf with 
the correct kernel options by hand? (or are the kernel options not in the 
payload.elf which was generated by buildrom?)

It would be quite easyier for me, if someone would be so nice, and add an 
article to the Wiki how the procesess for Linux as payload works, manually 
and with buildrom.

Kind regards,
Harald Gutmann

More information about the coreboot mailing list