Author: uwe Date: 2008-04-30 20:51:33 +0200 (Wed, 30 Apr 2008) New Revision: 173
Added: buildrom-devel/config/payloads/openbios.conf buildrom-devel/packages/openbios/ buildrom-devel/packages/openbios/openbios.mk Modified: buildrom-devel/config/payloads/Config.in buildrom-devel/config/payloads/payloads.conf Log: Add OpenBIOS support to buildrom.
Currently it's limited to the x86 "target" of OpenBIOS, and also expects the user to have fcode-utils installed.
Signed-off-by: Uwe Hermann uwe@hermann-uwe.de Acked-by: Myles Watson mylesgw@gmail.com
Modified: buildrom-devel/config/payloads/Config.in =================================================================== --- buildrom-devel/config/payloads/Config.in 2008-04-29 12:03:17 UTC (rev 172) +++ buildrom-devel/config/payloads/Config.in 2008-04-30 18:51:33 UTC (rev 173) @@ -47,6 +47,10 @@ depends on !PLATFORM_TYAN_S2891 bool "OpenFirmware"
+config PAYLOAD_OPENBIOS + depends on EXPERIMENTAL + bool "OpenBIOS" + config PAYLOAD_MEMTEST depends on !PLATFORM_M57SLI depends on !PLATFORM_TYAN_S2891
Added: buildrom-devel/config/payloads/openbios.conf =================================================================== --- buildrom-devel/config/payloads/openbios.conf (rev 0) +++ buildrom-devel/config/payloads/openbios.conf 2008-04-30 18:51:33 UTC (rev 173) @@ -0,0 +1,17 @@ +# Configuration options for the OpenBIOS payload + +# Common configuration options + +PAYLOAD_BUILD=scripts/Makefile.generic + +PAYLOAD_ELF=$(OUTPUT_DIR)/openbios-payload.elf +PAYLOAD_COMPRESSED=$(OUTPUT_DIR)/openbios-payload.elf.lzma + +PAYLOAD-y=openbios +PAYLOAD=openbios + +# TODO: Build fcode-utils or expect user to install them? +# HOSTTOOLS-y=fcode-utils + +PAYLOAD_AND_DEP_MK=$(PACKAGE_DIR)/openbios/openbios.mk +
Modified: buildrom-devel/config/payloads/payloads.conf =================================================================== --- buildrom-devel/config/payloads/payloads.conf 2008-04-29 12:03:17 UTC (rev 172) +++ buildrom-devel/config/payloads/payloads.conf 2008-04-30 18:51:33 UTC (rev 173) @@ -21,6 +21,7 @@ PCONF-$(CONFIG_PAYLOAD_GPXE) = gpxe.conf PCONF-$(CONFIG_PAYLOAD_FILO) = filo.conf PCONF-$(CONFIG_PAYLOAD_OFW) = ofw.conf +PCONF-$(CONFIG_PAYLOAD_OPENBIOS) = openbios.conf PCONF-$(CONFIG_PAYLOAD_MEMTEST) = memtest.conf PCONF-$(CONFIG_PAYLOAD_KERNEL) = kernel.conf PCONF-$(CONFIG_PAYLOAD_CUSTOM) = custom.conf
Added: buildrom-devel/packages/openbios/openbios.mk =================================================================== --- buildrom-devel/packages/openbios/openbios.mk (rev 0) +++ buildrom-devel/packages/openbios/openbios.mk 2008-04-30 18:51:33 UTC (rev 173) @@ -0,0 +1,75 @@ +# Build the OpenBIOS payload + +OPENBIOS_SVN_URL=svn://openbios.org/openbios/openbios-devel +OPENBIOS_SVN_TAG=186 + +OPENBIOS_DIR=$(BUILD_DIR)/openbios +OPENBIOS_SRC_DIR=$(OPENBIOS_DIR)/svn +OPENBIOS_BUILD_DIR=$(OPENBIOS_DIR)/svn +OPENBIOS_STAMP_DIR=$(OPENBIOS_DIR)/stamps +OPENBIOS_LOG_DIR=$(OPENBIOS_DIR)/logs + +OPENBIOS_OUTPUT=$(OPENBIOS_SRC_DIR)/obj-x86/openbios-builtin.elf + +OPENBIOS_TARBALL=openbios-svn-$(OPENBIOS_SVN_TAG).tar.gz +OPENBIOS_PATCHES= + +ifeq ($(CONFIG_VERBOSE),y) +OPENBIOS_FETCH_LOG=/dev/stdout +OPENBIOS_BUILD_LOG=/dev/stdout +OPENBIOS_CONFIG_LOG=/dev/stdout +else +OPENBIOS_FETCH_LOG=$(OPENBIOS_LOG_DIR)/fetch.log +OPENBIOS_BUILD_LOG=$(OPENBIOS_LOG_DIR)/build.log +OPENBIOS_CONFIG_LOG=$(OPENBIOS_LOG_DIR)/config.log +endif + +# Check for fcode-utils. +HAVE_FCODE_UTILS:=$(call find-tool,detok) + +ifeq ($(HAVE_FCODE_UTILS),n) +$(error To build OpenBIOS, you need to install 'fcode-utils') +endif + +$(SOURCE_DIR)/$(OPENBIOS_TARBALL): + @ echo "Fetching OpenBIOS..." + @ echo "SVN Checkout rev $(OPENBIOS_SVN_TAG)" + @ $(BIN_DIR)/fetchsvn.sh $(OPENBIOS_SVN_URL) $(SOURCE_DIR)/openbios \ + $(OPENBIOS_SVN_TAG) $@ > $(OPENBIOS_FETCH_LOG) 2>&1 + +$(OPENBIOS_STAMP_DIR)/.unpacked: $(SOURCE_DIR)/$(OPENBIOS_TARBALL) + @ echo "Unpacking OpenBIOS..." + @ tar -C $(OPENBIOS_DIR) -xf $(SOURCE_DIR)/$(OPENBIOS_TARBALL) + @ touch $@ + +$(OPENBIOS_STAMP_DIR)/.patched: $(OPENBIOS_STAMP_DIR)/.unpacked + @ echo "Patching OpenBIOS..." + @ $(BIN_DIR)/doquilt.sh $(OPENBIOS_SRC_DIR) $(OPENBIOS_PATCHES) + @ touch $@ + +$(OPENBIOS_STAMP_DIR)/.configured: $(OPENBIOS_STAMP_DIR)/.patched + @ echo "Configuring OpenBIOS..." + @ (cd $(OPENBIOS_SRC_DIR); config/scripts/switch-arch x86 > $(OPENBIOS_CONFIG_LOG) 2>&1) + @ touch $@ + +$(OPENBIOS_OUTPUT): $(OPENBIOS_STAMP_DIR)/.configured + @ echo "Building OpenBIOS..." + @ (cd $(OPENBIOS_BUILD_DIR); make > $(OPENBIOS_BUILD_LOG) 2>&1) + +$(OPENBIOS_STAMP_DIR) $(OPENBIOS_LOG_DIR): + @ mkdir -p $@ + +openbios: $(OPENBIOS_STAMP_DIR) $(OPENBIOS_LOG_DIR) $(OPENBIOS_OUTPUT) + @ mkdir -p $(OUTPUT_DIR) + @ install -m 0644 $(OPENBIOS_OUTPUT) $(OUTPUT_DIR)/openbios-payload.elf + +openbios-clean: + @ echo "Cleaning OpenBIOS..." + @ rm -f $(OPENBIOS_STAMP_DIR)/.configured +ifneq ($(wildcard $(OPENBIOS_BUILD_DIR)/Makefile),) + @ $(MAKE) -C $(OPENBIOS_BUILD_DIR) clean > /dev/null 2>&1 +endif + +openbios-distclean: + @ rm -rf $(OPENBIOS_DIR)/* +