Index: packages/seabios/hardcode.diff
===================================================================
--- packages/seabios/hardcode.diff	(revision 210)
+++ packages/seabios/hardcode.diff	(working copy)
@@ -1,14 +1,17 @@
-diff --git a/src/config.h b/src/config.h
-index 4ae23dc..5ed9799 100644
---- a/src/config.h
-+++ b/src/config.h
-@@ -14,17 +14,17 @@
+--- a/src/config.h	2008-07-03 15:12:21.000000000 -0600
++++ b/src/config.h	2008-07-03 15:13:23.000000000 -0600
+@@ -14,31 +14,31 @@
  #endif
  
- // Configure as a payload coreboot payload.
+ // Configure as a coreboot payload.
 -#define CONFIG_COREBOOT 0
 +#define CONFIG_COREBOOT 1
  
+ // Control how verbose debug output is.
+-#define CONFIG_DEBUG_LEVEL 1
++#define CONFIG_DEBUG_LEVEL 6
+ 
+ // Send debugging information to serial port
 -#define CONFIG_DEBUG_SERIAL 0
 +#define CONFIG_DEBUG_SERIAL 1
  
@@ -19,21 +22,22 @@
  #define CONFIG_KBD_CALL_INT15_4F 1
  #define CONFIG_CDROM_BOOT 1
  #define CONFIG_CDROM_EMU 1
+ // Support generation of a PIR table in 0xf000 segment (for emulators)
+-#define CONFIG_PIRTABLE 1
++#define CONFIG_PIRTABLE 1
+ // Support generation of ACPI PIR tables (for emulators)
+-#define CONFIG_ACPI 1
++#define CONFIG_ACPI 1
+ // Support int 1a/b1 PCI BIOS calls
 -#define CONFIG_PCIBIOS 1
-+#define CONFIG_PCIBIOS 0
++#define CONFIG_PCIBIOS 1
+ // Support int 15/53 APM BIOS calls
+-#define CONFIG_APMBIOS 1
++#define CONFIG_APMBIOS 1
  
  /* define it if the (emulated) hardware supports SMM mode */
- #define CONFIG_USE_SMM 1
-diff --git a/src/post.c b/src/post.c
-index a6f7c3d..7890d65 100644
---- a/src/post.c
-+++ b/src/post.c
-@@ -83,7 +83,7 @@ ram_probe(void)
-     u32 rs;
-     if (CONFIG_COREBOOT) {
-         // XXX - just hardcode for now.
--        rs = 128*1024*1024;
-+        rs = 128*1024*1024;
-     } else {
-         // On emulators, get memory size from nvram.
-         rs = (inb_cmos(CMOS_MEM_EXTMEM2_LOW)
+-#define CONFIG_USE_SMM 1
++#define CONFIG_USE_SMM 1
+ 
+ /* if true, put the MP float table and ACPI RSDT in EBDA and the MP
+    table in RAM. Unfortunately, Linux has bugs with that, so we prefer
Index: packages/seabios/seabios.mk
===================================================================
--- packages/seabios/seabios.mk	(revision 210)
+++ packages/seabios/seabios.mk	(working copy)
@@ -1,59 +1,64 @@
-LEGACYBIOS_URL=git://git.linuxtogo.org/home/kevin/legacybios/
-LEGACYBIOS_TAG=master
+SEABIOS_URL=git://git.linuxtogo.org/home/kevin/legacybios/
+SEABIOS_TAG=master
 
-LEGACYBIOS_DIR=$(BUILD_DIR)/legacybios
-LEGACYBIOS_SRC_DIR=$(LEGACYBIOS_DIR)/legacybios-$(LEGACYBIOS_TAG)
-LEGACYBIOS_STAMP_DIR=$(LEGACYBIOS_DIR)/stamps
-LEGACYBIOS_LOG_DIR=$(LEGACYBIOS_DIR)/logs
+SEABIOS_DIR=$(BUILD_DIR)/seabios
+SEABIOS_SRC_DIR=$(SEABIOS_DIR)/seabios-$(SEABIOS_TAG)
+SEABIOS_STAMP_DIR=$(SEABIOS_DIR)/stamps
+SEABIOS_LOG_DIR=$(SEABIOS_DIR)/logs
 
-LEGACYBIOS_PATCHES=hardcode.diff
+SEABIOS_PATCHES=$(PACKAGE_DIR)/seabios/hardcode.diff
 
 ifeq ($(CONFIG_VERBOSE),y)
-LEGACYBIOS_FETCH_LOG=/dev/stdout
-LEGACYBIOS_BUILD_LOG=/dev/stdout
+SEABIOS_FETCH_LOG=/dev/stdout
+SEABIOS_BUILD_LOG=/dev/stdout
 else
-LEGACYBIOS_BUILD_LOG=$(LEGACYBIOS_LOG_DIR)/build.log
-LEGACYBIOS_FETCH_LOG=$(LEGACYBIOS_LOG_DIR)/fetch.log
+SEABIOS_BUILD_LOG=$(SEABIOS_LOG_DIR)/build.log
+SEABIOS_FETCH_LOG=$(SEABIOS_LOG_DIR)/fetch.log
 endif
 
-LEGACYBIOS_TARBALL=legacybios.tar
+SEABIOS_TARBALL=seabios.tar
 
-ifeq ($(shell if [ -f $(PACKAGE_DIR)/legacybios/conf/customconfig--$(PAYLOAD)--$(COREBOOT_VENDOR)-$(COREBOOT_BOARD) ]; then echo 1; fi),1)
-	LEGACYBIOS_CONFIG = customconfig--$(PAYLOAD)--$(COREBOOT_VENDOR)-$(COREBOOT_BOARD)
+ifeq ($(shell if [ -f $(PACKAGE_DIR)/seabios/conf/customconfig--$(PAYLOAD)--$(COREBOOT_VENDOR)-$(COREBOOT_BOARD) ]; then echo 1; fi),1)
+	SEABIOS_CONFIG = customconfig--$(PAYLOAD)--$(COREBOOT_VENDOR)-$(COREBOOT_BOARD)
 endif
 
-$(SOURCE_DIR)/$(LEGACYBIOS_TARBALL): | $(LEGACYBIOS_STAMP_DIR) $(LEGACYBIOS_LOG_DIR)
-	@ echo "Fetching LegacyBIOS..."
+$(SOURCE_DIR)/$(SEABIOS_TARBALL): | $(SEABIOS_STAMP_DIR) $(SEABIOS_LOG_DIR)
+	@ echo "Fetching SeaBIOS..."
 	@ mkdir -p $(SOURCE_DIR)
-	@ $(BIN_DIR)/fetchgit.sh $(LEGACYBIOS_URL) $(SOURCE_DIR)/legacybios $(LEGACYBIOS_TAG) $(SOURCE_DIR)/$(LEGACYBIOS_TARBALL) legacybios > $(LEGACYBIOS_FETCH_LOG) 2>&1
+	@ $(BIN_DIR)/fetchgit.sh $(SEABIOS_URL) $(SOURCE_DIR)/seabios $(SEABIOS_TAG) $(SOURCE_DIR)/$(SEABIOS_TARBALL) seabios > $(SEABIOS_FETCH_LOG) 2>&1
 
-$(LEGACYBIOS_STAMP_DIR)/.unpacked: $(SOURCE_DIR)/$(LEGACYBIOS_TARBALL) | $(LEGACYBIOS_STAMP_DIR) $(LEGACYBIOS_DIR) $(LEGACYBIOS_LOG_DIR)
-	@ echo "Unpacking LegacyBIOS..."
-	@ tar -C $(LEGACYBIOS_DIR) -xf $(SOURCE_DIR)/$(LEGACYBIOS_TARBALL)
+$(SEABIOS_STAMP_DIR)/.unpacked: $(SOURCE_DIR)/$(SEABIOS_TARBALL) | $(SEABIOS_STAMP_DIR) $(SEABIOS_DIR) $(SEABIOS_LOG_DIR)
+	@ echo "Unpacking SeaBIOS..."
+	@ tar -C $(SEABIOS_DIR) -xf $(SOURCE_DIR)/$(SEABIOS_TARBALL)
 	@ touch $@      
 
-$(LEGACYBIOS_SRC_DIR)/out/bios.bin: $(LEGACYBIOS_STAMP_DIR)/.unpacked
-	@ echo "Building LegacyBIOS..."
-	@ make -C $(LEGACYBIOS_SRC_DIR) > $(LEGACYBIOS_BUILD_LOG) 2>&1
+$(SEABIOS_STAMP_DIR)/.patched: $(SEABIOS_STAMP_DIR)/.unpacked
+	@ echo "Patching mkelfimage..."
+	@ $(BIN_DIR)/doquilt.sh $(SEABIOS_SRC_DIR) $(SEABIOS_PATCHES)
+	@ touch $@
 
-$(LEGACYBIOS_STAMP_DIR) $(LEGACYBIOS_LOG_DIR):
+$(SEABIOS_SRC_DIR)/out/bios.bin: $(SEABIOS_STAMP_DIR)/.patched
+	@ echo "Building SeaBIOS..."
+	@ make -C $(SEABIOS_SRC_DIR) > $(SEABIOS_BUILD_LOG) 2>&1
+
+$(SEABIOS_STAMP_DIR) $(SEABIOS_LOG_DIR):
 	@ mkdir -p $@
 
-$(LEGACYBIOS_STAMP_DIR)/.copied:  $(LEGACYBIOS_SRC_DIR)/out/bios.bin
+$(SEABIOS_STAMP_DIR)/.copied:  $(SEABIOS_SRC_DIR)/out/bios.bin
 	@ mkdir -p $(shell dirname $(PAYLOAD_ELF))
-	@ cp $(LEGACYBIOS_SRC_DIR)/out/bios.bin.elf $(PAYLOAD_ELF)
+	@ cp $(SEABIOS_SRC_DIR)/out/bios.bin.elf $(PAYLOAD_ELF)
 	@ touch $@
 
-legacybios: $(LEGACYBIOS_STAMP_DIR)/.copied
-	@ cp $(LEGACYBIOS_SRC_DIR)/out/bios.bin.elf $(LEGACYBIOS_SRC_DIR)/legacybios.elf
+seabios: $(SEABIOS_STAMP_DIR)/.copied
+	@ cp $(SEABIOS_SRC_DIR)/out/bios.bin.elf $(SEABIOS_SRC_DIR)/seabios.elf
 
-legacybios-clean:
-	@ echo "Cleaning LegacyBIOS..."
-	@ rm -f $(LEGACYBIOS_STAMP_DIR)/.copied
-ifneq ($(wildcard $(LEGACYBIOS_SRC_DIR)/Makefile),)
-	@ $(MAKE) -C $(LEGACYBIOS_SRC_DIR) clean > /dev/null 2>&1
+seabios-clean:
+	@ echo "Cleaning SeaBIOS..."
+	@ rm -f $(SEABIOS_STAMP_DIR)/.copied
+ifneq ($(wildcard $(SEABIOS_SRC_DIR)/Makefile),)
+	@ $(MAKE) -C $(SEABIOS_SRC_DIR) clean > /dev/null 2>&1
 endif
 
-legacybios-distclean:
-	@ rm -rf $(LEGACYBIOS_DIR)/*
+seabios-distclean:
+	@ rm -rf $(SEABIOS_DIR)/*
 
Index: packages/legacybios/hardcode.diff
===================================================================
--- packages/legacybios/hardcode.diff	(revision 210)
+++ packages/legacybios/hardcode.diff	(working copy)
@@ -1,39 +0,0 @@
-diff --git a/src/config.h b/src/config.h
-index 4ae23dc..5ed9799 100644
---- a/src/config.h
-+++ b/src/config.h
-@@ -14,17 +14,17 @@
- #endif
- 
- // Configure as a payload coreboot payload.
--#define CONFIG_COREBOOT 0
-+#define CONFIG_COREBOOT 1
- 
--#define CONFIG_DEBUG_SERIAL 0
-+#define CONFIG_DEBUG_SERIAL 1
- 
--#define CONFIG_FLOPPY_SUPPORT 1
-+#define CONFIG_FLOPPY_SUPPORT 1
- #define CONFIG_PS2_MOUSE 1
- #define CONFIG_ATA 1
- #define CONFIG_KBD_CALL_INT15_4F 1
- #define CONFIG_CDROM_BOOT 1
- #define CONFIG_CDROM_EMU 1
--#define CONFIG_PCIBIOS 1
-+#define CONFIG_PCIBIOS 0
- 
- /* define it if the (emulated) hardware supports SMM mode */
- #define CONFIG_USE_SMM 1
-diff --git a/src/post.c b/src/post.c
-index a6f7c3d..7890d65 100644
---- a/src/post.c
-+++ b/src/post.c
-@@ -83,7 +83,7 @@ ram_probe(void)
-     u32 rs;
-     if (CONFIG_COREBOOT) {
-         // XXX - just hardcode for now.
--        rs = 128*1024*1024;
-+        rs = 128*1024*1024;
-     } else {
-         // On emulators, get memory size from nvram.
-         rs = (inb_cmos(CMOS_MEM_EXTMEM2_LOW)
Index: packages/legacybios/legacybios.mk
===================================================================
--- packages/legacybios/legacybios.mk	(revision 210)
+++ packages/legacybios/legacybios.mk	(working copy)
@@ -1,59 +0,0 @@
-LEGACYBIOS_URL=git://git.linuxtogo.org/home/kevin/legacybios/
-LEGACYBIOS_TAG=master
-
-LEGACYBIOS_DIR=$(BUILD_DIR)/legacybios
-LEGACYBIOS_SRC_DIR=$(LEGACYBIOS_DIR)/legacybios-$(LEGACYBIOS_TAG)
-LEGACYBIOS_STAMP_DIR=$(LEGACYBIOS_DIR)/stamps
-LEGACYBIOS_LOG_DIR=$(LEGACYBIOS_DIR)/logs
-
-LEGACYBIOS_PATCHES=hardcode.diff
-
-ifeq ($(CONFIG_VERBOSE),y)
-LEGACYBIOS_FETCH_LOG=/dev/stdout
-LEGACYBIOS_BUILD_LOG=/dev/stdout
-else
-LEGACYBIOS_BUILD_LOG=$(LEGACYBIOS_LOG_DIR)/build.log
-LEGACYBIOS_FETCH_LOG=$(LEGACYBIOS_LOG_DIR)/fetch.log
-endif
-
-LEGACYBIOS_TARBALL=legacybios.tar
-
-ifeq ($(shell if [ -f $(PACKAGE_DIR)/legacybios/conf/customconfig--$(PAYLOAD)--$(COREBOOT_VENDOR)-$(COREBOOT_BOARD) ]; then echo 1; fi),1)
-	LEGACYBIOS_CONFIG = customconfig--$(PAYLOAD)--$(COREBOOT_VENDOR)-$(COREBOOT_BOARD)
-endif
-
-$(SOURCE_DIR)/$(LEGACYBIOS_TARBALL): | $(LEGACYBIOS_STAMP_DIR) $(LEGACYBIOS_LOG_DIR)
-	@ echo "Fetching LegacyBIOS..."
-	@ mkdir -p $(SOURCE_DIR)
-	@ $(BIN_DIR)/fetchgit.sh $(LEGACYBIOS_URL) $(SOURCE_DIR)/legacybios $(LEGACYBIOS_TAG) $(SOURCE_DIR)/$(LEGACYBIOS_TARBALL) legacybios > $(LEGACYBIOS_FETCH_LOG) 2>&1
-
-$(LEGACYBIOS_STAMP_DIR)/.unpacked: $(SOURCE_DIR)/$(LEGACYBIOS_TARBALL) | $(LEGACYBIOS_STAMP_DIR) $(LEGACYBIOS_DIR) $(LEGACYBIOS_LOG_DIR)
-	@ echo "Unpacking LegacyBIOS..."
-	@ tar -C $(LEGACYBIOS_DIR) -xf $(SOURCE_DIR)/$(LEGACYBIOS_TARBALL)
-	@ touch $@      
-
-$(LEGACYBIOS_SRC_DIR)/out/bios.bin: $(LEGACYBIOS_STAMP_DIR)/.unpacked
-	@ echo "Building LegacyBIOS..."
-	@ make -C $(LEGACYBIOS_SRC_DIR) > $(LEGACYBIOS_BUILD_LOG) 2>&1
-
-$(LEGACYBIOS_STAMP_DIR) $(LEGACYBIOS_LOG_DIR):
-	@ mkdir -p $@
-
-$(LEGACYBIOS_STAMP_DIR)/.copied:  $(LEGACYBIOS_SRC_DIR)/out/bios.bin
-	@ mkdir -p $(shell dirname $(PAYLOAD_ELF))
-	@ cp $(LEGACYBIOS_SRC_DIR)/out/bios.bin.elf $(PAYLOAD_ELF)
-	@ touch $@
-
-legacybios: $(LEGACYBIOS_STAMP_DIR)/.copied
-	@ cp $(LEGACYBIOS_SRC_DIR)/out/bios.bin.elf $(LEGACYBIOS_SRC_DIR)/legacybios.elf
-
-legacybios-clean:
-	@ echo "Cleaning LegacyBIOS..."
-	@ rm -f $(LEGACYBIOS_STAMP_DIR)/.copied
-ifneq ($(wildcard $(LEGACYBIOS_SRC_DIR)/Makefile),)
-	@ $(MAKE) -C $(LEGACYBIOS_SRC_DIR) clean > /dev/null 2>&1
-endif
-
-legacybios-distclean:
-	@ rm -rf $(LEGACYBIOS_DIR)/*
-
Index: config/payloads/Config.in
===================================================================
--- config/payloads/Config.in	(revision 210)
+++ config/payloads/Config.in	(working copy)
@@ -52,8 +52,8 @@
 	bool "Linux As Bootloader"
 	select PAYLOAD_64BIT
 
-config PAYLOAD_LEGACYBIOS
-	bool "LegacyBIOS"
+config PAYLOAD_SEABIOS
+	bool "SeaBIOS"
 
 config PAYLOAD_OFW
 	depends on EXPERIMENTAL
Index: config/payloads/payloads.conf
===================================================================
--- config/payloads/payloads.conf	(revision 210)
+++ config/payloads/payloads.conf	(working copy)
@@ -16,7 +16,7 @@
 ### Include the correct payload configuration
 
 PAYLOAD-y=
-PAYLOAD-$(CONFIG_PAYLOAD_LEGACYBIOS) = legacybios
+PAYLOAD-$(CONFIG_PAYLOAD_SEABIOS) = seabios
 PAYLOAD-$(CONFIG_PAYLOAD_LAB) = lab
 PAYLOAD-$(CONFIG_PAYLOAD_ETHERBOOT) = etherboot
 PAYLOAD-$(CONFIG_PAYLOAD_GPXE) = gpxe
