Author: uwe Date: 2008-04-24 15:46:32 +0200 (Thu, 24 Apr 2008) New Revision: 157
Added: buildrom-devel/packages/coreboot-v2/patches/buildrom_qemu_size.patch buildrom-devel/packages/ofw/ofw_coreboot_qemu.patch Modified: buildrom-devel/config/payloads/Config.in buildrom-devel/config/payloads/ofw.conf buildrom-devel/config/payloads/payloads.conf buildrom-devel/packages/coreboot-v2/qemu.mk buildrom-devel/packages/ofw/ofw.mk Log: Initial experimental support for OpenFirmware as payload.
As the OFW image is quite big, increase QEMU's BIOS size to 512 KB.
Tested in QEMU only so far. There are some issues with screen display, you should test it with '-serial stdio' in QEMU.
Signed-off-by: Uwe Hermann uwe@hermann-uwe.de Acked-by: Stefan Reinauer stepan@coresystems.de
Modified: buildrom-devel/config/payloads/Config.in =================================================================== --- buildrom-devel/config/payloads/Config.in 2008-04-24 13:41:17 UTC (rev 156) +++ buildrom-devel/config/payloads/Config.in 2008-04-24 13:46:32 UTC (rev 157) @@ -41,10 +41,11 @@ bool "Linux As Bootloader" select PAYLOAD_64BIT
-#config PAYLOAD_OFW -# depends on !PLATFORM_M57SLI -# depends on !PLATFORM_TYAN_S2891 -# bool "OpenFirmware" +config PAYLOAD_OFW + depends on EXPERIMENTAL + depends on !PLATFORM_M57SLI + depends on !PLATFORM_TYAN_S2891 + bool "OpenFirmware"
config PAYLOAD_MEMTEST depends on !PLATFORM_M57SLI
Modified: buildrom-devel/config/payloads/ofw.conf =================================================================== --- buildrom-devel/config/payloads/ofw.conf 2008-04-24 13:41:17 UTC (rev 156) +++ buildrom-devel/config/payloads/ofw.conf 2008-04-24 13:46:32 UTC (rev 157) @@ -2,14 +2,13 @@
# Common configuration options
-PAYLOAD_BUILD=scripts/Makefile.ofw +PAYLOAD_BUILD=scripts/Makefile.generic
OFW_SVN_URL=svn://openbios.org/openfirmware -OFW_SVN_TAG=146 +OFW_SVN_TAG=720
PAYLOAD_ELF=$(OUTPUT_DIR)/ofw-payload.elf -# LZMA isn't allowed for OFW, so no need to defined a COMPRESSSED -# target +# LZMA isn't allowed for OFW, so no need to define a COMPRESSSED target
PAYLOAD-y=ofw #HOSTTOOLS-y=crc32sum
Modified: buildrom-devel/config/payloads/payloads.conf =================================================================== --- buildrom-devel/config/payloads/payloads.conf 2008-04-24 13:41:17 UTC (rev 156) +++ buildrom-devel/config/payloads/payloads.conf 2008-04-24 13:46:32 UTC (rev 157) @@ -20,7 +20,7 @@ PCONF-$(CONFIG_PAYLOAD_ETHERBOOT) = etherboot.conf PCONF-$(CONFIG_PAYLOAD_GPXE) = gpxe.conf PCONF-$(CONFIG_PAYLOAD_FILO) = filo.conf -#PCONF-$(CONFIG_PAYLOAD_OFW) = ofw.conf +PCONF-$(CONFIG_PAYLOAD_OFW) = ofw.conf PCONF-$(CONFIG_PAYLOAD_MEMTEST) = memtest.conf PCONF-$(CONFIG_PAYLOAD_KERNEL) = kernel.conf PCONF-$(CONFIG_PAYLOAD_CUSTOM) = custom.conf
Added: buildrom-devel/packages/coreboot-v2/patches/buildrom_qemu_size.patch =================================================================== --- buildrom-devel/packages/coreboot-v2/patches/buildrom_qemu_size.patch (rev 0) +++ buildrom-devel/packages/coreboot-v2/patches/buildrom_qemu_size.patch 2008-04-24 13:46:32 UTC (rev 157) @@ -0,0 +1,14 @@ +Index: targets/emulation/qemu-x86/Config.lb +=================================================================== +--- a/argets/emulation/qemu-x86/Config.lb (Revision 3244) ++++ a/targets/emulation/qemu-x86/Config.lb (Arbeitskopie) +@@ -3,7 +3,8 @@ + target qemu-x86 + mainboard emulation/qemu-x86 + +-option ROM_SIZE=256*1024 ++# option ROM_SIZE=256*1024 ++option ROM_SIZE=512*1024 + + option CC="gcc -m32" +
Modified: buildrom-devel/packages/coreboot-v2/qemu.mk =================================================================== --- buildrom-devel/packages/coreboot-v2/qemu.mk 2008-04-24 13:41:17 UTC (rev 156) +++ buildrom-devel/packages/coreboot-v2/qemu.mk 2008-04-24 13:46:32 UTC (rev 157) @@ -6,7 +6,7 @@ endif endif
-CBV2_PATCHES = +CBV2_PATCHES += $(PACKAGE_DIR)/coreboot-v2/patches/buildrom_qemu_size.patch
CBV2_BASE_DIR=svn TARGET_ROM = $(COREBOOT_VENDOR)-$(COREBOOT_BOARD).rom
Modified: buildrom-devel/packages/ofw/ofw.mk =================================================================== --- buildrom-devel/packages/ofw/ofw.mk 2008-04-24 13:41:17 UTC (rev 156) +++ buildrom-devel/packages/ofw/ofw.mk 2008-04-24 13:46:32 UTC (rev 157) @@ -1,13 +1,14 @@ -# Build the openfirmware payload +# Build the OpenFirmware payload
OFW_DIR=$(BUILD_DIR)/ofw OFW_SRC_DIR=$(OFW_DIR)/svn -OFW_BUILD_DIR=$(OFW_SRC_DIR)/cpu/x86/pc/olpc/build +OFW_BUILD_DIR=$(OFW_SRC_DIR)/cpu/x86/pc/biosload/build OFW_STAMP_DIR=$(OFW_DIR)/stamps OFW_LOG_DIR=$(OFW_DIR)/logs
OFW_TARBALL=openfirmware-svn-$(OFW_SVN_TAG).tar.gz -OFW_PATCHES=$(PACKAGE_DIR)/ofw/64bit-fix.patch +#OFW_PATCHES=$(PACKAGE_DIR)/ofw/64bit-fix.patch +OFW_PATCHES=$(PACKAGE_DIR)/ofw/ofw_coreboot_qemu.patch
ifeq ($(CONFIG_VERBOSE),y) OFW_FETCH_LOG=/dev/stdout @@ -34,32 +35,25 @@ @ touch $@
$(OFW_STAMP_DIR)/.patched: $(OFW_STAMP_DIR)/.unpacked - @ echo "Patching OFW..." + @ echo "Patching OpenFirmware..." @ $(BIN_DIR)/doquilt.sh $(OFW_SRC_DIR) $(OFW_PATCHES) @ touch $@
-$(OFW_BUILD_DIR)/ofw.elf: $(OFW_STAMP_DIR)/.patched +$(OFW_BUILD_DIR)/ofwlb.elf: $(OFW_STAMP_DIR)/.patched @ echo "Building OpenFirmware..." - @ (echo -n "svn: " ; cd $(OFW_SRC_DIR); svn info | grep Revision ) @ $(MAKE) -C $(OFW_BUILD_DIR) > $(OFW_BUILD_LOG) 2>&1
$(OFW_STAMP_DIR) $(OFW_LOG_DIR): @ mkdir -p $@
-ofw: $(OFW_STAMP_DIR) $(OFW_LOG_DIR) $(OFW_BUILD_DIR)/ofw.elf +ofw: $(OFW_STAMP_DIR) $(OFW_LOG_DIR) $(OFW_BUILD_DIR)/ofwlb.elf @ mkdir -p $(OUTPUT_DIR) - @ install -m 0644 $(OFW_BUILD_DIR)/ofw.elf $(OUTPUT_DIR)/ofw-payload.elf + @ install -m 0644 $(OFW_BUILD_DIR)/ofwlb.elf $(OUTPUT_DIR)/ofw-payload.elf
ofw-clean: - @ echo "Cleaning openfirmware..." + @ echo "Cleaning Openfirmware..." @ $(MAKE) -C $(OFW_BUILD_DIR) clean > /dev/null 2>&1
ofw-distclean: @ rm -rf $(OFW_DIR)/*
-ofw-bom: - @ echo "Package: linuxbios" - @ echo "Source: $(OFW_SVN_URL)" - @ echo "Revison: $(OFW_SVN_TAG)" - @ echo "Tarball: `basename $(OFW_TARBALL)" - @ echo ""
Added: buildrom-devel/packages/ofw/ofw_coreboot_qemu.patch =================================================================== --- buildrom-devel/packages/ofw/ofw_coreboot_qemu.patch (rev 0) +++ buildrom-devel/packages/ofw/ofw_coreboot_qemu.patch 2008-04-24 13:46:32 UTC (rev 157) @@ -0,0 +1,51 @@ +Index: cpu/x86/pc/biosload/config.fth +=================================================================== +--- a/cpu/x86/pc/biosload/config.fth (Revision 720) ++++ b/cpu/x86/pc/biosload/config.fth (Arbeitskopie) +@@ -2,14 +2,14 @@ + purpose: Establish configuration definitions + + create pc \ Demo version for generic PC +-\ create pc-linux \ Demo version for generic PC and Linux +-\ create pc-serial \ Demo version for generic PC ++create pc-linux \ Demo version for generic PC and Linux ++create pc-serial \ Demo version for generic PC + + \ --- The environment that "boots" OFW --- + \ - Image Format - Example Media - previous stage bootloader + + \ - (Syslinux) COM32 format - USB Key w/ FAT FS - Syslinux +-create syslinux-loaded ++\ create syslinux-loaded + + \ - Linux kernel format - USB Key w/ FAT FS - LinuxBIOS w/ stripped Linux payload + \ create bzimage-loaded +@@ -19,10 +19,10 @@ + \ create etherboot-variant \ Enable additional tweaks for Etherboot + + \ - ELF format (no pheader) - ROM - LinuxBIOS direct +-\ create linuxbios-loaded ++create linuxbios-loaded + + \ Load and run in qemu +-\ create qemu-loaded ++create qemu-loaded + + [ifdef] pc-serial + create serial-console +@@ -47,13 +47,13 @@ + \ the point where Linux starts using the MMU. It isn't strictly + \ necessary to use virtual mode if you just want to boot Linux + \ and then have OFW disappear. +-create virtual-mode ++\ create virtual-mode + create pc + create linux-support + [then] + + [ifdef] pc +-\ create pseudo-nvram ++create pseudo-nvram + create resident-packages + create addresses-assigned \ Don't reassign PCI addresses + \ create virtual-mode