Author: myles Date: 2008-05-02 18:18:00 +0200 (Fri, 02 May 2008) New Revision: 175
Added: buildrom-devel/config/payloads/generic.conf buildrom-devel/config/payloads/libpayload-dep.conf Removed: buildrom-devel/config/payloads/coreinfo.conf buildrom-devel/config/payloads/etherboot.conf buildrom-devel/config/payloads/filo.conf buildrom-devel/config/payloads/gpxe.conf buildrom-devel/config/payloads/grub2.conf buildrom-devel/config/payloads/memtest.conf buildrom-devel/config/payloads/tint.conf Modified: buildrom-devel/Makefile buildrom-devel/config/payloads/Config.in buildrom-devel/config/payloads/custom.conf buildrom-devel/config/payloads/kernel.conf buildrom-devel/config/payloads/lab.conf buildrom-devel/config/payloads/ofw.conf buildrom-devel/config/payloads/openbios.conf buildrom-devel/config/payloads/payloads.conf buildrom-devel/packages/coreboot-v3/coreboot-v3.mk buildrom-devel/packages/ofw/ofw.mk Log: This patch consolidates the payload .conf files to eliminate redundancy. A couple of them were not consolidated because it appeared that they will be more specialized in the future.
follow the patch with: svn rm config/payloads/etherboot.conf svn rm config/payloads/memtest.conf svn rm config/payloads/tint.conf svn rm config/payloads/grub2.conf svn rm config/payloads/gpxe.conf svn rm config/payloads/coreinfo.conf svn rm config/payloads/filo.conf
since they are no longer needed.
file by file changes:
Makefile: Eliminated a payload copy to simplify build. Added empty targets for custom and custom-clean.
packages/coreboot-v3/coreboot-v3.mk: Same payload copy change as Makefile.
packages/ofw/ofw.mk: Moved the SVN information here from ofw.conf because it is here for every other payload.
config/payloads/ofw.conf: The only thing keeping this file here is a comment about crc32sum.
config/payloads/payloads.conf: Change the way PAYLOAD and PAYLOAD-y are set. Both are needed for lab since lab is the name of the payload, but isn't an actual payload.
config/payloads/lab.conf: Removed redundant PAYLOAD assignment.
config/payloads/openbios.conf: Include the generic and leave this file for possible fcode-utils dependency.
config/payloads/kernel.conf: Removed redundant PAYLOAD and PAYLOAD-y assignment.
config/payloads/Config.in: Removed extra menu for Custom Payload with only one option in it.
config/payloads/custom.conf: Simplified this file since there was no CUSTOM_PAYLOAD variable set anywhere. Included Makefile.generic so that lzma compression would just work.
config/payloads/generic.conf: The commonalities from all the other .conf files
config/payloads/libpayload-dep.conf: A .conf file for payloads that would have been generic, but they add a dependency on libpayload (tint, coreinfo).
Signed-off-by: Myles Watson mylesgw@gmail.com
Modified: buildrom-devel/Makefile =================================================================== --- buildrom-devel/Makefile 2008-04-30 21:38:00 UTC (rev 174) +++ buildrom-devel/Makefile 2008-05-02 16:18:00 UTC (rev 175) @@ -89,7 +89,7 @@
rom: $(HOSTTOOLS-y) payload $(COREBOOT-y) @ cp $(CBV3_OUTPUT) $(TARGET_ROM_FILE) - @ $(STAGING_DIR)/bin/lar $(LAR_PAYLOAD_FLAGS-y) $(TARGET_ROM_FILE) $(CBV3_PAYLOAD_TARGET):normal/payload + @ $(STAGING_DIR)/bin/lar $(LAR_PAYLOAD_FLAGS-y) $(TARGET_ROM_FILE) $(PAYLOAD_TARGET):normal/payload ifeq ($(CONFIG_VSA_LEGACY),y) @ $(STAGING_DIR)/bin/lar $(LAR_PAYLOAD_FLAGS-y) $(TARGET_ROM_FILE) $(SOURCE_DIR)/amd_vsa_lx_1.01.bin:blob/vsa endif @@ -102,6 +102,10 @@ @ $(STAGING_DIR)/bin/lar -z $(TARGET_ROM_FILE) endif
+# These empty dependencies are for the custom payload. +custom: +custom-clean: + payload: $(DEPENDS-y) $(PAYLOAD_TARGET)
extract: $(PKG_extract)
Modified: buildrom-devel/config/payloads/Config.in =================================================================== --- buildrom-devel/config/payloads/Config.in 2008-04-30 21:38:00 UTC (rev 174) +++ buildrom-devel/config/payloads/Config.in 2008-05-02 16:18:00 UTC (rev 175) @@ -77,17 +77,14 @@
endchoice
-menu "Custom Payload" -depends on PAYLOAD_CUSTOM config CUSTOM_PAYLOAD string "Custom payload filename" + depends on PAYLOAD_CUSTOM default "" help Specify a filename for the custom ELF payload you wish to attach to the ROM. You can also specify the custom payload with the CUSTOM_PAYLOAD environment variable. - -endmenu
menu "Kernel Configuration" depends on PAYLOAD_KERNEL
Deleted: buildrom-devel/config/payloads/coreinfo.conf =================================================================== --- buildrom-devel/config/payloads/coreinfo.conf 2008-04-30 21:38:00 UTC (rev 174) +++ buildrom-devel/config/payloads/coreinfo.conf 2008-05-02 16:18:00 UTC (rev 175) @@ -1,15 +0,0 @@ -# Configuration file for the coreinfo payload - -# Common configuration options - -PAYLOAD_BUILD=scripts/Makefile.generic - -PAYLOAD_ELF=$(OUTPUT_DIR)/coreinfo-payload.elf -PAYLOAD_COMPRESSED=$(OUTPUT_DIR)/coreinfo-payload.elf.lzma - -PAYLOAD-y=coreinfo -PAYLOAD=coreinfo - -# Add libpayload as a dependency -PAYLOAD_AND_DEP_MK=$(PACKAGE_DIR)/coreinfo/coreinfo.mk $(PACKAGE_DIR)/libpayload/libpayload.mk -DEPENDS-y=libpayload
Modified: buildrom-devel/config/payloads/custom.conf =================================================================== --- buildrom-devel/config/payloads/custom.conf 2008-04-30 21:38:00 UTC (rev 174) +++ buildrom-devel/config/payloads/custom.conf 2008-05-02 16:18:00 UTC (rev 175) @@ -1,9 +1,6 @@ -# Common configuration options +# Include Makefile.generic for lzma compression
-PAYLOAD_BUILD= +PAYLOAD_BUILD=scripts/Makefile.generic
-ifneq ($(CUSTOM_PAYLOAD),) -PAYLOAD_ELF=$(CUSTOM_PAYLOAD) -else PAYLOAD_ELF=$(subst ",,$(CONFIG_CUSTOM_PAYLOAD)) -endif +PAYLOAD_COMPRESSED=$(PAYLOAD_ELF).lzma
Deleted: buildrom-devel/config/payloads/etherboot.conf =================================================================== --- buildrom-devel/config/payloads/etherboot.conf 2008-04-30 21:38:00 UTC (rev 174) +++ buildrom-devel/config/payloads/etherboot.conf 2008-05-02 16:18:00 UTC (rev 175) @@ -1,11 +0,0 @@ -# Configuration file for the etherboot payload - -# Common configuration options - -PAYLOAD_BUILD=scripts/Makefile.generic - -PAYLOAD_ELF=$(OUTPUT_DIR)/etherboot-payload.elf -PAYLOAD_COMPRESSED=$(OUTPUT_DIR)/etherboot-payload.elf.lzma - -PAYLOAD-y=etherboot -PAYLOAD_AND_DEP_MK=$(PACKAGE_DIR)/etherboot/etherboot.mk
Deleted: buildrom-devel/config/payloads/filo.conf =================================================================== --- buildrom-devel/config/payloads/filo.conf 2008-04-30 21:38:00 UTC (rev 174) +++ buildrom-devel/config/payloads/filo.conf 2008-05-02 16:18:00 UTC (rev 175) @@ -1,14 +0,0 @@ -# Configuration file for the etherboot payload - -# Common configuration options - -PAYLOAD_BUILD=scripts/Makefile.generic - -PAYLOAD_ELF=$(OUTPUT_DIR)/filo-payload.elf -PAYLOAD_COMPRESSED=$(OUTPUT_DIR)/filo-payload.elf.lzma - -PAYLOAD-y=filo -PAYLOAD_AND_DEP_MK=$(PACKAGE_DIR)/filo/filo.mk - -PAYLOAD=filo -
Added: buildrom-devel/config/payloads/generic.conf =================================================================== --- buildrom-devel/config/payloads/generic.conf (rev 0) +++ buildrom-devel/config/payloads/generic.conf 2008-05-02 16:18:00 UTC (rev 175) @@ -0,0 +1,8 @@ +# Configuration file for most payloads without dependencies + +PAYLOAD_BUILD=scripts/Makefile.generic + +PAYLOAD_ELF=$(OUTPUT_DIR)/$(PAYLOAD-y)-payload.elf +PAYLOAD_COMPRESSED=$(PAYLOAD_ELF).lzma + +PAYLOAD_AND_DEP_MK=$(PACKAGE_DIR)/$(PAYLOAD-y)/$(PAYLOAD-y).mk
Deleted: buildrom-devel/config/payloads/gpxe.conf =================================================================== --- buildrom-devel/config/payloads/gpxe.conf 2008-04-30 21:38:00 UTC (rev 174) +++ buildrom-devel/config/payloads/gpxe.conf 2008-05-02 16:18:00 UTC (rev 175) @@ -1,13 +0,0 @@ -# Configuration file for the GPXE payload - -# Common configuration options - -PAYLOAD_BUILD=scripts/Makefile.generic - -PAYLOAD_ELF=$(OUTPUT_DIR)/gpxe-payload.elf -PAYLOAD_COMPRESSED=$(OUTPUT_DIR)/gpxe-payload.elf.lzma - -PAYLOAD=gpxe -PAYLOAD-y=gpxe - -PAYLOAD_AND_DEP_MK=$(PACKAGE_DIR)/gpxe/gpxe.mk
Deleted: buildrom-devel/config/payloads/grub2.conf =================================================================== --- buildrom-devel/config/payloads/grub2.conf 2008-04-30 21:38:00 UTC (rev 174) +++ buildrom-devel/config/payloads/grub2.conf 2008-05-02 16:18:00 UTC (rev 175) @@ -1,13 +0,0 @@ -# Configuration file for the GRUB2 payload - -# Common configuration options - -PAYLOAD_BUILD=scripts/Makefile.generic - -PAYLOAD_ELF=$(OUTPUT_DIR)/grub2-payload.elf -PAYLOAD_COMPRESSED=$(OUTPUT_DIR)/grub2-payload.elf.lzma - -PAYLOAD-y=grub2 -PAYLOAD=grub2 - -PAYLOAD_AND_DEP_MK=$(PACKAGE_DIR)/grub2/grub2.mk
Modified: buildrom-devel/config/payloads/kernel.conf =================================================================== --- buildrom-devel/config/payloads/kernel.conf 2008-04-30 21:38:00 UTC (rev 174) +++ buildrom-devel/config/payloads/kernel.conf 2008-05-02 16:18:00 UTC (rev 175) @@ -15,8 +15,5 @@ PAYLOAD_ELF=$(OUTPUT_DIR)/kernel-payload.elf PAYLOAD_COMPRESSED=$(OUTPUT_DIR)/kernel-payload.elf.lzma
-PAYLOAD-y= kernel -PAYLOAD=kernel - HOSTTOOLS-y = mkelfimage PAYLOAD_AND_DEP_MK=$(PACKAGE_DIR)/mkelfimage/mkelfimage.mk
Modified: buildrom-devel/config/payloads/lab.conf =================================================================== --- buildrom-devel/config/payloads/lab.conf 2008-04-30 21:38:00 UTC (rev 174) +++ buildrom-devel/config/payloads/lab.conf 2008-05-02 16:18:00 UTC (rev 175) @@ -30,8 +30,6 @@ PAYLOAD-$(CONFIG_BOOTMENU) += bootmenu PAYLOAD-$(CONFIG_OLPCFLASH) += olpcflash
-PAYLOAD=lab - HOSTTOOLS-y = mkelfimage unifdef PAYLOAD_AND_DEP_MK=$(PACKAGE_DIR)/mkelfimage/mkelfimage.mk PAYLOAD_AND_DEP_MK+=$(PACKAGE_DIR)/uclibc/uclibc.mk
Added: buildrom-devel/config/payloads/libpayload-dep.conf =================================================================== --- buildrom-devel/config/payloads/libpayload-dep.conf (rev 0) +++ buildrom-devel/config/payloads/libpayload-dep.conf 2008-05-02 16:18:00 UTC (rev 175) @@ -0,0 +1,7 @@ +# Configuration file for the coreinfo payload + +include $(CONFIG_DIR)/payloads/generic.conf + +# Add libpayload as a dependency +PAYLOAD_AND_DEP_MK+= $(PACKAGE_DIR)/libpayload/libpayload.mk +DEPENDS-y=libpayload
Deleted: buildrom-devel/config/payloads/memtest.conf =================================================================== --- buildrom-devel/config/payloads/memtest.conf 2008-04-30 21:38:00 UTC (rev 174) +++ buildrom-devel/config/payloads/memtest.conf 2008-05-02 16:18:00 UTC (rev 175) @@ -1,12 +0,0 @@ -# Configuration file for the memtest payload - -# Common configuration options - -PAYLOAD_BUILD=scripts/Makefile.generic - -PAYLOAD_ELF=$(OUTPUT_DIR)/memtest-payload.elf -PAYLOAD_COMPRESSED=$(OUTPUT_DIR)/memtest-payload.elf.lzma - -PAYLOAD-y=memtest - -PAYLOAD_AND_DEP_MK=$(PACKAGE_DIR)/memtest/memtest.mk
Modified: buildrom-devel/config/payloads/ofw.conf =================================================================== --- buildrom-devel/config/payloads/ofw.conf 2008-04-30 21:38:00 UTC (rev 174) +++ buildrom-devel/config/payloads/ofw.conf 2008-05-02 16:18:00 UTC (rev 175) @@ -1,15 +1,5 @@ # Configuration options for the OpenFirmware payload
-# Common configuration options +include $(CONFIG_DIR)/payloads/generic.conf
-PAYLOAD_BUILD=scripts/Makefile.generic - -OFW_SVN_URL=svn://openbios.org/openfirmware -OFW_SVN_TAG=720 - -PAYLOAD_ELF=$(OUTPUT_DIR)/ofw-payload.elf -# LZMA isn't allowed for OFW, so no need to define a COMPRESSSED target - -PAYLOAD-y=ofw #HOSTTOOLS-y=crc32sum -PAYLOAD_AND_DEP_MK=$(PACKAGE_DIR)/ofw/ofw.mk
Modified: buildrom-devel/config/payloads/openbios.conf =================================================================== --- buildrom-devel/config/payloads/openbios.conf 2008-04-30 21:38:00 UTC (rev 174) +++ buildrom-devel/config/payloads/openbios.conf 2008-05-02 16:18:00 UTC (rev 175) @@ -1,17 +1,7 @@ # Configuration options for the OpenBIOS payload
-# Common configuration options +include $(CONFIG_DIR)/payloads/generic.conf
-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-30 21:38:00 UTC (rev 174) +++ buildrom-devel/config/payloads/payloads.conf 2008-05-02 16:18:00 UTC (rev 175) @@ -15,19 +15,31 @@
### Include the correct payload configuration
-PCONF-y= +PAYLOAD-y= +PAYLOAD-$(CONFIG_PAYLOAD_LAB) = lab +PAYLOAD-$(CONFIG_PAYLOAD_ETHERBOOT) = etherboot +PAYLOAD-$(CONFIG_PAYLOAD_GPXE) = gpxe +PAYLOAD-$(CONFIG_PAYLOAD_FILO) = filo +PAYLOAD-$(CONFIG_PAYLOAD_OFW) = ofw +PAYLOAD-$(CONFIG_PAYLOAD_OPENBIOS) = openbios +PAYLOAD-$(CONFIG_PAYLOAD_MEMTEST) = memtest +PAYLOAD-$(CONFIG_PAYLOAD_KERNEL) = kernel +PAYLOAD-$(CONFIG_PAYLOAD_CUSTOM) = custom +PAYLOAD-$(CONFIG_PAYLOAD_COREINFO) = coreinfo +PAYLOAD-$(CONFIG_PAYLOAD_TINT) = tint +PAYLOAD-$(CONFIG_PAYLOAD_GRUB2) = grub2 + +# This is for custom configuration strings +PAYLOAD=PAYLOAD-y + +PCONF-y= generic.conf +PCONF-$(CONFIG_PAYLOAD_COREINFO) = libpayload-dep.conf +PCONF-$(CONFIG_PAYLOAD_CUSTOM) = custom.conf +PCONF-$(CONFIG_PAYLOAD_KERNEL) = kernel.conf PCONF-$(CONFIG_PAYLOAD_LAB) = lab.conf -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_OPENBIOS) = openbios.conf -PCONF-$(CONFIG_PAYLOAD_MEMTEST) = memtest.conf -PCONF-$(CONFIG_PAYLOAD_KERNEL) = kernel.conf -PCONF-$(CONFIG_PAYLOAD_CUSTOM) = custom.conf -PCONF-$(CONFIG_PAYLOAD_COREINFO) = coreinfo.conf -PCONF-$(CONFIG_PAYLOAD_TINT) = tint.conf -PCONF-$(CONFIG_PAYLOAD_GRUB2) = grub2.conf +PCONF-$(CONFIG_PAYLOAD_TINT) = libpayload-dep.conf
DEPENDS-y= include $(CONFIG_DIR)/payloads/$(PCONF-y)
Deleted: buildrom-devel/config/payloads/tint.conf =================================================================== --- buildrom-devel/config/payloads/tint.conf 2008-04-30 21:38:00 UTC (rev 174) +++ buildrom-devel/config/payloads/tint.conf 2008-05-02 16:18:00 UTC (rev 175) @@ -1,16 +0,0 @@ -# Configuration file for the tint payload - -# Common configuration options - -PAYLOAD_BUILD=scripts/Makefile.generic - -PAYLOAD_ELF=$(OUTPUT_DIR)/tint-payload.elf -PAYLOAD_COMPRESSED=$(OUTPUT_DIR)/tint-payload.elf.lzma - -PAYLOAD-y=tint -PAYLOAD=tint - -PAYLOAD_AND_DEP_MK=$(PACKAGE_DIR)/libpayload/libpayload.mk $(PACKAGE_DIR)/tint/tint.mk - -# Add libpayload as a dependency -DEPENDS-y=libpayload
Modified: buildrom-devel/packages/coreboot-v3/coreboot-v3.mk =================================================================== --- buildrom-devel/packages/coreboot-v3/coreboot-v3.mk 2008-04-30 21:38:00 UTC (rev 174) +++ buildrom-devel/packages/coreboot-v3/coreboot-v3.mk 2008-05-02 16:18:00 UTC (rev 175) @@ -37,11 +37,6 @@
CBV3_PATCHES ?=
-CBV3_PAYLOAD_TARGET=$(CBV3_DIR)/payload.elf - -$(CBV3_PAYLOAD_TARGET): $(PAYLOAD_TARGET) - @ cp $< $@ - $(SOURCE_DIR)/$(CBV3_TARBALL): @ mkdir -p $(SOURCE_DIR)/coreboot-v3 @ $(BIN_DIR)/fetchsvn.sh $(CBV3_URL) \ @@ -72,7 +67,7 @@ endif @ touch $@
-$(CBV3_OUTPUT): $(CBV3_STAMP_DIR)/.configured $(CBV3_PAYLOAD_TARGET) +$(CBV3_OUTPUT): $(CBV3_STAMP_DIR)/.configured $(PAYLOAD_TARGET) @ echo "Building coreboot v3..." @ $(MAKE) -C $(CBV3_SRC_DIR) $(CBV3_ROM_SIZE) > $(CBV3_BUILD_LOG) 2>&1
Modified: buildrom-devel/packages/ofw/ofw.mk =================================================================== --- buildrom-devel/packages/ofw/ofw.mk 2008-04-30 21:38:00 UTC (rev 174) +++ buildrom-devel/packages/ofw/ofw.mk 2008-05-02 16:18:00 UTC (rev 175) @@ -1,5 +1,8 @@ # Build the OpenFirmware payload
+OFW_SVN_URL=svn://openbios.org/openfirmware +OFW_SVN_TAG=720 + OFW_DIR=$(BUILD_DIR)/ofw OFW_SRC_DIR=$(OFW_DIR)/svn OFW_BUILD_DIR=$(OFW_SRC_DIR)/cpu/x86/pc/biosload/build