Add multiboot support.

I've been successfully using SeaBIOS as secondary bootloader. In more details
I have GRUB2-as-payload in flash together with coreboot. SeaBIOS binary is on
the HDD and loaded by GRUB when needed. This has an unfortunate consequence
that I have to keep vga oprom in flash even if usually I boot without it. This
patches makes bios.bin.elf multiboot executable with files passed as modules.

menuentry "SeaBIOS (mb)" --unrestricted {
   multiboot /bios.bin.elf
   module /vgabios_x230.rom name=pci8086,0166.rom

the parameter name= specifies under which name SeaBIOS will see it.

Signed-off-by: Vladimir Serbinenko <>
Signed-off-by: Kevin O'Connor <>
diff --git a/Makefile b/Makefile
index 01cadda..96aec48 100644
--- a/Makefile
+++ b/Makefile
@@ -40,7 +40,7 @@
 SRC32FLAT=$(SRCBOTH) post.c memmap.c malloc.c romfile.c x86.c optionroms.c \
     pmm.c font.c boot.c bootsplash.c jpeg.c bmp.c tcgbios.c sha1.c \
     hw/ahci.c hw/pvscsi.c hw/usb-xhci.c hw/usb-hub.c hw/sdcard.c \
-    fw/coreboot.c fw/lzmadecode.c fw/csm.c fw/biostables.c \
+    fw/coreboot.c fw/lzmadecode.c fw/multiboot.c fw/csm.c fw/biostables.c \
     fw/paravirt.c fw/shadow.c fw/pciinit.c fw/smm.c fw/smp.c fw/mtrr.c fw/xen.c \
     fw/acpi.c fw/mptable.c fw/pirtable.c fw/smbios.c fw/romfile_loader.c \