[coreboot] legacybios tests on simnow and real hardware

Myles Watson mylesgw at gmail.com
Fri May 23 00:09:25 CEST 2008



> -----Original Message-----
> From: Uwe Hermann [mailto:uwe at 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





More information about the coreboot mailing list