[coreboot] legacybios tests on simnow and real hardware

Uwe Hermann uwe at hermann-uwe.de
Fri May 23 00:00:30 CEST 2008


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.
-- 
http://www.hermann-uwe.de  | http://www.holsham-traders.de
http://www.crazy-hacks.org | http://www.unmaintained-free-software.org




More information about the coreboot mailing list