[coreboot] cbfstool, Linux trampoline and SeaBIOS

Curt Brune curt at cumulusnetworks.com
Fri Aug 29 17:58:45 CEST 2014


Hello Ron,

On Thu Aug 28 16:30, ron minnich wrote:
> Curt, this is super great news for me to hear, and if you can show me
> how to do the linux boot with linux as payload I need to see it. I
> screwed it up and it did not work for me :)

If this patch and idea are acceptable I will make a proper git patch
and send it along.

For Linux SeaBIOS payload, it was pretty easy, most of the directions
are on the coreboot and SeaBIOS wiki.  The only problem I had was for
the patch I sent.

Here are the steps I used -- I'll take for granted you know how to
build coreboot with SeaBIOS as the payload.  I did all this work using
the emulated i440 qemu machine with a 16Mbyte rom size.

1. once you have your coreboot.rom, use the cbfstool to add images to
   the rom.

2. For the Linux kernel and initramfs I built a small Linux OS from
   the Open Network Install Environment (ONIE) project.  It is a very
   simple OS that just runs from a ramdisk.

3. To add a Linux payload to SeaBIOS run the cbfstool like this:

   ONIE_IMAGE_DIR="$HOME/onie/build/images"
   KERNEL="${ONIE_IMAGE_DIR}/kvm_x86_64-r0.vmlinuz"
   INITRD="${ONIE_IMAGE_DIR}/kvm_x86_64-r0.initrd"
   CMDLINE="console=tty0 console=ttyS0,115200n8 seabios"
   $CBFSTOOL $COREBOOT_BUILDDIR/coreboot.rom add-payload -f $KERNEL -n img/LINUX -I $INITRD -C "$CMDLINE"

   The only real trick is the image needs to be in the "img" directory
   in the cbfs for SeaBIOS to find it.  See the "-n" argument above.

If you need more info I'm happy to send you the .config for both
coreboot and SeaBIOS.

> one thing I wonder: if you can boot linux as the payload, what's the
> reason to use seabios? I'm missing something.

Great question!  I am working on the Open Network Install Environment
(ONIE) project:

  http://www.opencompute.org/wiki/Networking/ONIE
  http://opencomputeproject.github.io/onie/docs

You can think of ONIE as a "Linux based PXE, with more features".
Currently ONIE runs on open, bare metal networking hardware, including
PowerPC and x86 machines.

For x86 platforms, I want to have ONIE available in the SeaBIOS boot
menu.  Having ONIE boot straight from coreboot is interesting (and
fast!), but that is not ONIE's sole purpose.  The systems and users we
are targeting still need a boot menu to select things like "boot from
USB", "boot from hard disk", etc.

At the end of the day the point of the networking hardware is to boot
the network operating system, not boot ONIE.  This is similar to the
server world, where the point is to boot the server OS, not PXE.

Cheers,
Curt



More information about the coreboot mailing list