On 02/05/08 07:57 -0600, Myles Watson wrote:
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.
Signed-off-by: Myles Watson mylesgw@gmail.com
Acked-by: Jordan Crouse jordan.crouse@amd.com
Thanks, Myles
Index: Makefile
--- Makefile (revision 174) +++ Makefile (working copy) @@ -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) Index: packages/coreboot-v3/coreboot-v3.mk =================================================================== --- packages/coreboot-v3/coreboot-v3.mk (revision 174) +++ packages/coreboot-v3/coreboot-v3.mk (working copy) @@ -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
Index: packages/ofw/ofw.mk
--- packages/ofw/ofw.mk (revision 174) +++ packages/ofw/ofw.mk (working copy) @@ -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 Index: config/payloads/ofw.conf =================================================================== --- config/payloads/ofw.conf (revision 174) +++ config/payloads/ofw.conf (working copy) @@ -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 Index: config/payloads/payloads.conf =================================================================== --- config/payloads/payloads.conf (revision 174) +++ config/payloads/payloads.conf (working copy) @@ -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) Index: config/payloads/lab.conf =================================================================== --- config/payloads/lab.conf (revision 174) +++ config/payloads/lab.conf (working copy) @@ -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 Index: config/payloads/openbios.conf =================================================================== --- config/payloads/openbios.conf (revision 174) +++ config/payloads/openbios.conf (working copy) @@ -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
Index: config/payloads/kernel.conf
--- config/payloads/kernel.conf (revision 174) +++ config/payloads/kernel.conf (working copy) @@ -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 Index: config/payloads/Config.in =================================================================== --- config/payloads/Config.in (revision 174) +++ config/payloads/Config.in (working copy) @@ -77,17 +87,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 Index: config/payloads/custom.conf =================================================================== --- config/payloads/custom.conf (revision 174) +++ config/payloads/custom.conf (working copy) @@ -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
-- coreboot mailing list coreboot@coreboot.org http://www.coreboot.org/mailman/listinfo/coreboot