Author: myles
Date: 2008-07-01 22:57:47 +0200 (Tue, 01 Jul 2008)
New Revision: 208
Added:
buildrom-devel/packages/legacybios/
buildrom-devel/packages/legacybios/hardcode.diff
buildrom-devel/packages/legacybios/legacybios.mk
Modified:
buildrom-devel/config/payloads/Config.in
buildrom-devel/config/payloads/payloads.conf
buildrom-devel/config/platforms/qemu.conf
buildrom-devel/config/platforms/serengeti_cheetah.conf
Log:
This patch adds legacybios to buildrom. It has some options hardcoded in
hardcode.diff because it seems like the easiest way to keep the configuration
in one place.
As soon as the URL changes to SeaBIOS, I'll change the name in buildrom.
Signed-off-by: Myles Watson <mylesgw(a)gmail.com>
Acked-by: Uwe Hermann <uwe(a)hermann-uwe.de>
Modified: buildrom-devel/config/payloads/Config.in
===================================================================
--- buildrom-devel/config/payloads/Config.in 2008-06-23 15:28:22 UTC (rev 207)
+++ buildrom-devel/config/payloads/Config.in 2008-07-01 20:57:47 UTC (rev 208)
@@ -52,6 +52,9 @@
bool "Linux As Bootloader"
select PAYLOAD_64BIT
+config PAYLOAD_LEGACYBIOS
+ bool "LegacyBIOS"
+
config PAYLOAD_OFW
depends on EXPERIMENTAL
depends on !PLATFORM_M57SLI
Modified: buildrom-devel/config/payloads/payloads.conf
===================================================================
--- buildrom-devel/config/payloads/payloads.conf 2008-06-23 15:28:22 UTC (rev 207)
+++ buildrom-devel/config/payloads/payloads.conf 2008-07-01 20:57:47 UTC (rev 208)
@@ -16,6 +16,7 @@
### Include the correct payload configuration
PAYLOAD-y=
+PAYLOAD-$(CONFIG_PAYLOAD_LEGACYBIOS) = legacybios
PAYLOAD-$(CONFIG_PAYLOAD_LAB) = lab
PAYLOAD-$(CONFIG_PAYLOAD_ETHERBOOT) = etherboot
PAYLOAD-$(CONFIG_PAYLOAD_GPXE) = gpxe
Modified: buildrom-devel/config/platforms/qemu.conf
===================================================================
--- buildrom-devel/config/platforms/qemu.conf 2008-06-23 15:28:22 UTC (rev 207)
+++ buildrom-devel/config/platforms/qemu.conf 2008-07-01 20:57:47 UTC (rev 208)
@@ -15,7 +15,7 @@
ETHERBOOT_ARCH=i386
# coreboot-v2 configuration
-CBV2_TAG=3281
+CBV2_TAG=3343
CBV2_TDIR=qemu-x86
# coreboot v3 configuration
Modified: buildrom-devel/config/platforms/serengeti_cheetah.conf
===================================================================
--- buildrom-devel/config/platforms/serengeti_cheetah.conf 2008-06-23 15:28:22 UTC (rev 207)
+++ buildrom-devel/config/platforms/serengeti_cheetah.conf 2008-07-01 20:57:47 UTC (rev 208)
@@ -40,11 +40,11 @@
ifeq ($(CONFIG_PLATFORM_CHEETAH_FAM10),y)
COREBOOT_BOARD=serengeti_cheetah_fam10
CBV2_TDIR=serengeti_cheetah_fam10
-CBV2_TAG=3335
+CBV2_TAG=3343
else
COREBOOT_BOARD=serengeti_cheetah
CBV2_TDIR=serengeti_cheetah
-CBV2_TAG=3335
+CBV2_TAG=3343
endif
# FILO configuration
Added: buildrom-devel/packages/legacybios/hardcode.diff
===================================================================
--- buildrom-devel/packages/legacybios/hardcode.diff (rev 0)
+++ buildrom-devel/packages/legacybios/hardcode.diff 2008-07-01 20:57:47 UTC (rev 208)
@@ -0,0 +1,39 @@
+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)
Added: buildrom-devel/packages/legacybios/legacybios.mk
===================================================================
--- buildrom-devel/packages/legacybios/legacybios.mk (rev 0)
+++ buildrom-devel/packages/legacybios/legacybios.mk 2008-07-01 20:57:47 UTC (rev 208)
@@ -0,0 +1,59 @@
+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)/*
+