Hello!
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 buildrom-devel/work/coreboot/svn/targets/gigabyte/m57sli/m57sli/payload.elf), which should be a linux-2.6.22.2 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
On Wed, Jan 23, 2008 at 05:13:56PM +0100, Harald Gutmann wrote:
I just had set the ROM_SIZE..
This is a mess in v2.
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?
No. failover chooses between normal or fallback. If you only want one image use fallback and failover. See e.g. m57sli/Config.lb.kernel
Another quite simple/stupid question is, how do i generate a payload.elf with the correct kernel options by hand?
Using the tool mkelfImage, but the latest version I know of does not support x86_64 kernels. :\
Yinghai Lu sent a patch which added support, but I gave it a quick try without success.
//Peter
From: Peter Stuge On Wed, Jan 23, 2008 at 05:13:56PM +0100, Harald Gutmann wrote:
I just had set the ROM_SIZE..
This is a mess in v2.
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?
No. failover chooses between normal or fallback. If you only want one image use fallback and failover. See e.g. m57sli/Config.lb.kernel
Another quite simple/stupid question is, how do i generate a payload.elf with the correct kernel options by hand?
Using the tool mkelfImage, but the latest version I know of does not support x86_64 kernels. :\
Yinghai Lu sent a patch which added support, but I gave it a quick try without success.
This works with buildrom for several targets. AMD Serengeti Cheetah is one place to look. If you configure it for LAB (Linux As Bootloader) x86_64, it will build a kernel and an initrd, then use mkelfImage and put it all together.
It will also set up the Config.lb file correctly to save space (fallback only).
The caveat is that something broke for me when I upgraded to Fedora Core 6, and it won't boot all the way. Fedora Core 5 works fine. Other distros?
Myles
//Peter
-- coreboot mailing list coreboot@coreboot.org http://www.coreboot.org/mailman/listinfo/coreboot
Am Freitag, 25. Januar 2008 12:55:45 schrieb Peter Stuge:
On Wed, Jan 23, 2008 at 05:13:56PM +0100, Harald Gutmann wrote:
I just had set the ROM_SIZE..
This is a mess in v2.
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?
No. failover chooses between normal or fallback. If you only want one image use fallback and failover. See e.g. m57sli/Config.lb.kernel
Could someone explain that a little more in detail?
I built the normal image, but it didn't boot like expected. It seems that the ide drives get initialised, but i don't get any response on my monitor. I also tried to compile a LAB image, where i get as response on the monitor just a blinking "_". On building the LAB image, i used the normal buildrom and just modified two ROM size parameters.
Another quite simple/stupid question is, how do i generate a payload.elf with the correct kernel options by hand?
Using the tool mkelfImage, but the latest version I know of does not support x86_64 kernels. :\
Yinghai Lu sent a patch which added support, but I gave it a quick try without success.
//Peter
Regards, Harald