4
votes

I'm new to x86. My recent task is to port linux to Intel Atom C2000 platform from bare metal. I've found the opensource firmware/bios coreboot and seabios, but there are lots of thing unclear to me.

(1) What's the sequence of firmware/software get called from x86 system bootstrap?

x86 power on reset-->coreboot-->SeaBIOS->GRUB->Linux kernel?

(2) If we use mini-sata as non-volatile storage, how should the grub binary and configuration file be stored on mSATA, in the MBR or something?

(3) How should linux kernel initrd be stored, in filesystem or on a raw disk? I recall from PowerPC development that there are no constraint on where kernel and ramdisk stored in flash, u-boot just need the address to bring kernel up.

1

1 Answers

2
votes

It depends.

Your proposed flow with seabios and grub is certainly possible, but grub2 can act as a coreboot payload, too - in that case it's coreboot->grub->Linux.

Or if you don't estimate changing the kernel all the time, or if you go for kexec(), you can do coreboot->Linux, with Linux in flash.

Assuming you're going for a boot flow involving grub2, let's look at the other questions: With seabios, grub2 would be stored in MBR and some spare sectors, like with PCBIOS. With grub2 as payload, it's stored in flash.

No matter where grub2 resides, its configuration file, Linux kernel and initrd are best stored in a filesystem. grub2 provides drivers for nearly every modern filesystem, and it's the easiest way to maintain them from within the OS.