The design for Booting CapROS using Multiboot

At the suggestion of this email thread, CapROS now uses the Multiboot specification supported by the GRUB boot loader. Here are some notes on how that is done.

First, a Multiboot header is included near the beginning of the kernel image, in lostart.S. (Presumably GRUB locates the Multiboot header by searching for the magic number.)

GRUB likes to load from a filesystem, so as an interim measure, we put the things to be loaded into files located wherever GRUB is loading from (disk, floppy, net, etc.). For the following we assume we are loading from a hard disk. The disk should have a partition with a VFAT file system mounted at /boot. The system generation process puts the following files into /boot:

For reliability, there can be a primary config file (referring to the primary kernel and preloaded files) and a secondary config file referring to the secondary kernel and preloaded files. You keep one set consistent and unchanged while (non-atomically) updating the other set. Secodary files have the same names as the primary but with "2" at the end instead of "1".

GRUB and Multiboot are specified and implemented only for the IA-32 architecture. For ARM, the build process packs the three files into one file, which you write to your system's flash memory. When the kernel boots, just before main() is called, CapROS code initializes the system the way GRUB would have.


SourceForge.net Logo Authored by Charles Landau.
Copyright 2005, 2006 by Strawberry Development Group. All rights reserved. For terms of redistribution, see the GNU General Public License