[coreboot] CoreBoot and Payloads

Piotr Brostovski p.brostovski at levigo.de
Mon Feb 2 17:18:17 CET 2009


Hi, Peter!

Peter Stuge schrieb:
> Piotr Brostovski wrote:
>> Do anyone have an idea why this doesn't work?
> 
> Yes.
> 
> As you know, both mknbi and wraplinux add some glue to the Linux
> kernel binary to turn it into a "boot image."
> 
> That glue relies on BIOS interrupt services however, and coreboot
> does not provide any such services by design.

Thank you for this information! :-)

> Instead, you can use mkelfImage. It isn't really maintained anymore
> but we're making it available from the coreboot.org repo.
> 
> The glue added by mkelfImage does not rely on BIOS interrupt services
> and it is indeed the old-and-tried way of starting Linux from coreboot.

Ok, i tried to make an image with the gpxe.lkrn file first.
The result is:

file gpxe.lkrn
gpxe.lkrn: Linux/i386 Kernel, Setup Version 0x207, zImage

mkelfImage --kernel=gpxe.lkrn --output=gpxe.elf

file gpxe.elf
gpxe.elf: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linkedfile:
corrupted section header size.


compiled and bootet, but coreboot says also corrupted header:

elfboot: Attempting to load payload.
rom_stream: 0xfffa0000 - 0xfffeffff
Found ELF candidate at offset 0
header_offset is 0
Try to load at offset 0x0
Dropping non PT_LOAD segment
New segment addr 0x10000 size 0x5544 offset 0x104 filesize 0x12a8
(cleaned up) New segment addr 0x10000 size 0x5544 offset 0x104 filesize 0x12a8
New segment addr 0x20000 size 0x1070 offset 0x13ac filesize 0x0
(cleaned up) New segment addr 0x20000 size 0x1070 offset 0x13ac filesize 0x0
New segment addr 0x100000 size 0x700000 offset 0x13ac filesize 0xcff9
(cleaned up) New segment addr 0x100000 size 0x700000 offset 0x13ac filesize 0xcff9
Loading Segment: addr: 0x000000001dfd0000 memsz: 0x0000000000005544 filesz: 0x00000000000012a8
Clearing Segment: addr: 0x000000001dfd12a8 memsz: 0x000000000000429c
Loading Segment: addr: 0x000000001dfe0000 memsz: 0x0000000000001070 filesz: 0x0000000000000000
Clearing Segment: addr: 0x000000001dfe0000 memsz: 0x0000000000001070
Loading Segment: addr: 0x0000000000100000 memsz: 0x0000000000700000 filesz: 0x000000000000cff9
Clearing Segment: addr: 0x000000000010cff9 memsz: 0x00000000006f3007
Image checksum: 2f79 != computed checksum: 8562
Can not load ELF Image.


then the kernel:
file vmlinuz
vmlinuz: Linux/i386 Kernel, Setup Version 0x203, bzImage

mkelfImage -t bzImage-i386 --append="root=/dev/nfs nfsroot=/srv/ceptix.auslieferung
vga=785 initrd=initrd.splash ide=nodma splash=silent" --initrd=initrd.splash
--kernel=vmlinuz --output=vmlinuz2.4.28.elf

file vmlinuz2.4.28.elf vmlinuz2.4.28.elf: ELF 32-bit LSB executable, Intel 80386, version
1 (SYSV), statically linkedfile: corrupted section header size.

But it also have a corrupted section header?

> 
> http://coreboot.org/Mkelfimage
> 
> Note the comment on that page about using vmlinux as payload
> directly. If you have a chance to test that, please let us know
> the result!
> 

sadly my kernel for testing is too big to fit in the eeprom (512K - coreboot), but i test
it if i can make him small enough.


--
Regards,
Piotr




More information about the coreboot mailing list