Last modified 9 years ago Last modified on 06/10/08 20:16:35

Coreboot Notes

Coreboot/Etherboot? booting in K12Linux requires a patch to mkelfimage (now shipped in F-8+).

Earlier x86 machines prior to PXE required NBI (Network bootable image) format images. Newer Coreboot/Etherboot? machines support either NBI or ELF images. Both NBI and ELF images wrap the kernel and initrd into a single file which is downloaded over the network and booted. The old tool to achieve this was mknbi. A newer implementation called mkelfimage exists. Unfortunately both are known to be poorly coded and unmaintained for many years now. H Peter Anvin wrote a similar tool from scratch called wraplinux to achieve a similar goal.


Coreboot completely lacks what they call "legacy" BIOS calls. It seems that wraplinux will never work with Coreboot/Etherboot? because it relies on "int 15h, AX=2401h (unless A20 is enabled) and int 15h, AX=E820h (for probing memory)". wraplinux wrapped kernel + initrd boots fine on regular BIOS and qemu-kvm, but not at all on Coreboot/Etherboot?. hpa said coreboot is misguided in design and he has no interest in supporting it. wraplinux does work for kvm virtualization since qemu has a compatible (not coreboot) BIOS.


mknbi generated images fail with a CRC error during download.


mkelfimage reportedly "avoids BIOS calls entirely" and thus of all the wrapping tools has the only chance of working with coreboot. mkelfimage generated images can fail booting here:

checking if image is isn't (bad gzip magic numbers); 
looks like an initrd

mkelfimage-4.7 uses a 1MB hard coded offset for the ramdisk image in memory. This is a faulty assumption because any kernel with CONFIG_PHYSICAL_ALIGN set to larger than 1024 or certain other machines will fail with the above error. The kernel decompresses and corrupts part of the ramdisk in memory. Peter Jones wrote a patch for mkelfimage that intelligently detects an a safe place to put the ramdisk, in a similar fashion to how other boot loaders have worked for years.