This is what's needed to add legacybios to buildrom.
I've tried legacybios as a payload for v3 qemu and v2 qemu, tyan s2892, and amd serengeti_cheetah.
It works for v3 qemu and v2 qemu, but not tyan s2892 or amd serengeti_cheetah.
I don't get any serial output from legacybios on any platform, even though I enable it.
Any ideas?
Thanks, Myles
On Thu, May 22, 2008 at 3:19 PM, Myles Watson mylesgw@gmail.com wrote:
This is what's needed to add legacybios to buildrom.
I've tried legacybios as a payload for v3 qemu and v2 qemu, tyan s2892, and amd serengeti_cheetah.
It works for v3 qemu and v2 qemu, but not tyan s2892 or amd serengeti_cheetah.
I don't get any serial output from legacybios on any platform, even though I enable it.
Any ideas?
Turns out that the payload Kevin posted works fine.
I guess I messed something up with buildrom or it didn't compile correctly for me.
Thanks, Myles
Thanks, Myles
On Thu, May 22, 2008 at 03:19:48PM -0600, Myles Watson wrote:
This is what's needed to add legacybios to buildrom.
I've tried legacybios as a payload for v3 qemu and v2 qemu, tyan s2892, and amd serengeti_cheetah.
It works for v3 qemu and v2 qemu, but not tyan s2892 or amd serengeti_cheetah.
I don't get any serial output from legacybios on any platform, even though I enable it.
Strange, worked for me on actual hardware.
Patch looks good, but no ACK as there's no Signed-off-by.
Any ideas?
Thanks, Myles
Index: config/platforms/qemu.conf
--- config/platforms/qemu.conf (revision 198) +++ config/platforms/qemu.conf (working copy) @@ -19,7 +19,7 @@ ETHERBOOT_ARCH=i386
# coreboot-v2 configuration -CBV2_TAG=3281 +CBV2_TAG=3343 CBV2_TDIR=qemu-x86
# coreboot v3 configuration Index: config/platforms/serengeti_cheetah.conf =================================================================== --- config/platforms/serengeti_cheetah.conf (revision 198) +++ config/platforms/serengeti_cheetah.conf (working copy) @@ -44,11 +44,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 Index: config/payloads/payloads.conf =================================================================== --- config/payloads/payloads.conf (revision 198) +++ config/payloads/payloads.conf (working copy) @@ -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 Index: config/payloads/Config.in =================================================================== --- config/payloads/Config.in (revision 198) +++ config/payloads/Config.in (working copy) @@ -51,6 +51,9 @@ bool "Linux As Bootloader" select PAYLOAD_64BIT
+config PAYLOAD_LEGACYBIOS
- bool "Legacybios"
Maybe LegacyBIOS?
config PAYLOAD_OFW depends on EXPERIMENTAL depends on !PLATFORM_M57SLI Index: packages/legacybios/hardcode.diff =================================================================== --- packages/legacybios/hardcode.diff (revision 0) +++ packages/legacybios/hardcode.diff (revision 0) @@ -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
Huh? Why this? Am I missing something? Those lines look identical.
- #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;
Ditto?
} 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 0) +++ packages/legacybios/legacybios.mk (revision 0) @@ -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..."
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..."
Ditto.
- @ tar -C $(LEGACYBIOS_DIR) -xf $(SOURCE_DIR)/$(LEGACYBIOS_TARBALL)
- @ touch $@
+$(LEGACYBIOS_SRC_DIR)/out/bios.bin: $(LEGACYBIOS_STAMP_DIR)/.unpacked
- @ echo "Building legacybios..."
Ditto.
- @ 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..."
Ditto.
- @ 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)/*
Uwe.
-----Original Message----- From: Uwe Hermann [mailto:uwe@hermann-uwe.de] Sent: Thursday, May 22, 2008 4:01 PM To: Myles Watson Cc: Coreboot; Kevin O'Connor Subject: Re: [coreboot] legacybios tests on simnow and real hardware
On Thu, May 22, 2008 at 03:19:48PM -0600, Myles Watson wrote:
This is what's needed to add legacybios to buildrom.
I've tried legacybios as a payload for v3 qemu and v2 qemu, tyan s2892, and amd serengeti_cheetah.
It works for v3 qemu and v2 qemu, but not tyan s2892 or amd
serengeti_cheetah.
I don't get any serial output from legacybios on any platform, even though I enable it.
Strange, worked for me on actual hardware.
Patch looks good, but no ACK as there's no Signed-off-by.
I thought the name was going to change. This patch is just to help others try it out. When the name changes and we figure out how to pass parameters to it correctly, then I was planning to add it to buildrom.
Any ideas?
Thanks, Myles
Index: config/platforms/qemu.conf
--- config/platforms/qemu.conf (revision 198) +++ config/platforms/qemu.conf (working copy) @@ -19,7 +19,7 @@ ETHERBOOT_ARCH=i386
# coreboot-v2 configuration -CBV2_TAG=3281 +CBV2_TAG=3343 CBV2_TDIR=qemu-x86
# coreboot v3 configuration Index: config/platforms/serengeti_cheetah.conf =================================================================== --- config/platforms/serengeti_cheetah.conf (revision 198) +++ config/platforms/serengeti_cheetah.conf (working copy) @@ -44,11 +44,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 Index: config/payloads/payloads.conf =================================================================== --- config/payloads/payloads.conf (revision 198) +++ config/payloads/payloads.conf (working copy) @@ -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 Index: config/payloads/Config.in =================================================================== --- config/payloads/Config.in (revision 198) +++ config/payloads/Config.in (working copy) @@ -51,6 +51,9 @@ bool "Linux As Bootloader" select PAYLOAD_64BIT
+config PAYLOAD_LEGACYBIOS
- bool "Legacybios"
Maybe LegacyBIOS?
config PAYLOAD_OFW depends on EXPERIMENTAL depends on !PLATFORM_M57SLI Index: packages/legacybios/hardcode.diff =================================================================== --- packages/legacybios/hardcode.diff (revision 0) +++ packages/legacybios/hardcode.diff (revision 0) @@ -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
Huh? Why this? Am I missing something? Those lines look identical.
I don't have a floppy drive so I compile without this for some machines. I left it in the patch this way so it would be easy to configure.
- #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;
Ditto?
Same thing. For real hardware I wanted to be able to change the memory size in the same place.
} 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 0) +++ packages/legacybios/legacybios.mk (revision 0) @@ -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..."
LegacyBIOS
Thanks for the review. If we aren't going to change the name or create a wrapper for passing parameters, I'll post an updated patch with a signed-off-by line.
Thanks, Myles
On Thu, May 22, 2008 at 04:09:25PM -0600, Myles Watson wrote:
LegacyBIOS
Thanks for the review. If we aren't going to change the name or create a wrapper for passing parameters, I'll post an updated patch with a signed-off-by line.
Please post _all_ patched with Signed-off-by, no matter what. If you don't want the patch committed immediately say so in the mail, but _always_ add a Signed-off-by. You might get hit by a truck and we'll be stuck with a non-committable patch, you know ;)
FWIW, I'm fine with the name LegacyBIOS, no need to rename if you ask me. I'm also fine with committing this as is to buildrom.
Cheers, Uwe.
On Thu, May 22, 2008 at 5:02 PM, Uwe Hermann uwe@hermann-uwe.de wrote:
On Thu, May 22, 2008 at 04:09:25PM -0600, Myles Watson wrote:
LegacyBIOS
Thanks for the review. If we aren't going to change the name or create a wrapper for passing parameters, I'll post an updated patch with a signed-off-by line.
Please post _all_ patched with Signed-off-by, no matter what. If you don't want the patch committed immediately say so in the mail, but _always_ add a Signed-off-by. You might get hit by a truck and we'll be stuck with a non-committable patch, you know ;)
Signed-off-by: Myles Watson mylesgw@gmail.com
Luckily, no truck accidents yet.
I changed the name to LegacyBIOS everywhere.
Thanks, Myles
FWIW, I'm fine with the name LegacyBIOS, no need to rename if you ask me. I'm also fine with committing this as is to buildrom.
Cheers, Uwe.
-- http://www.hermann-uwe.de | http://www.holsham-traders.de http://www.crazy-hacks.org | http://www.unmaintained-free-software.org
On Fri, May 23, 2008 at 09:57:34AM -0600, Myles Watson wrote:
FWIW, I'm fine with the name LegacyBIOS, no need to rename if you ask me.
I changed the name to LegacyBIOS everywhere.
I think the name should be Kevin's decision. I like any capitalization of legacybios though I think the all-small-version looks nicer.
//Peter