Patrick Georgi (patrick@georgi-clan.de) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2418
-gerrit
commit d23410bd2647e34a033cfa9dd5acfd48aaa17365 Author: Patrick Georgi patrick@georgi-clan.de Date: Sat Feb 16 01:06:57 2013 +0100
build system: Retire REQUIRES_BLOB
REQUIRES_BLOB assumes that all blob files come from the 3rdparty directory, builds failed when all files were configured to point to other sources.
This change modifies the blob mechanism so that cbfs-files can be tagged as "required" with some specification what is missing.
If the configured files can't be found (wrong path, missing file), the build system returns a list of descriptions, then aborts.
Change-Id: Icc128e3afcee8acf49bff9409b93af7769db3517 Signed-off-by: Patrick Georgi patrick@georgi-clan.de --- Makefile | 3 +++ Makefile.inc | 12 +++++++----- src/Kconfig | 10 ---------- src/cpu/amd/geode_gx2/Makefile.inc | 2 ++ src/cpu/amd/geode_lx/Kconfig | 1 - src/cpu/amd/geode_lx/Makefile.inc | 2 ++ src/southbridge/amd/agesa/hudson/Kconfig | 3 --- src/southbridge/amd/agesa/hudson/Makefile.inc | 4 ++++ 8 files changed, 18 insertions(+), 19 deletions(-)
diff --git a/Makefile b/Makefile index 92b4d0b..9aafe7c 100644 --- a/Makefile +++ b/Makefile @@ -232,6 +232,9 @@ evaluate_subdirs= \ # collect all object files eligible for building subdirs:=$(TOPLEVEL) $(eval $(call evaluate_subdirs)) +ifeq ($(FAILBUILD),1) +$(error cannot continue build) +endif
# Eliminate duplicate mentions of source files in a class $(foreach class,$(classes),$(eval $(class)-srcs:=$(sort $($(class)-srcs)))) diff --git a/Makefile.inc b/Makefile.inc index 069bdfe..ad97363 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -105,10 +105,6 @@ endif
ifeq ($(CONFIG_USE_BLOBS),y) forgetthis:=$(shell git submodule update --init --checkout 3rdparty) -else -ifeq ($(CONFIG_REQUIRES_BLOB),y) -$(error Your current configuration requires binary-only components, but you did not choose to use them) -endif endif
bootblock-c-ccopts:=-D__BOOT_BLOCK__ -D__PRE_RAM__ @@ -164,6 +160,11 @@ cbfs-files-handler= \ $(if $(wildcard $(1)$($(2)-file)), \ $(eval tmp-cbfs-file:= $(wildcard $(1)$($(2)-file))), \ $(eval tmp-cbfs-file:= $($(2)-file))) \ + $(if $(strip $($(2)-required)), \ + $(if $(wildcard $(tmp-cbfs-file)),, \ + $(info This build configuration requires $($(2)-required)) \ + $(eval FAILBUILD:=1) \ + )) \ $(if $(tmp-cbfs-method), \ $(eval tmp-old-cbfs-file:=$(tmp-cbfs-file)) \ $(eval tmp-cbfs-file:=$(shell mkdir -p $(obj)/mainboard/$(MAINBOARDDIR); mktemp $(obj)/mainboard/$(MAINBOARDDIR)/cbfs-file.XXXXXX).out) \ @@ -172,7 +173,8 @@ cbfs-files-handler= \ $(eval $(2)-name:=) \ $(eval $(2)-type:=) \ $(eval $(2)-compression:=) \ - $(eval $(2)-position:=) + $(eval $(2)-position:=) \ + $(eval $(2)-required:=)
####################################################################### # a variety of flags for our build diff --git a/src/Kconfig b/src/Kconfig index 4e7957e..2dc251d 100644 --- a/src/Kconfig +++ b/src/Kconfig @@ -184,16 +184,6 @@ config USE_BLOBS might be required for some chipsets or boards. This flag ensures that a "Free" option remains available for users.
-config REQUIRES_BLOB - bool - default n - help - This option can be configured by boards that require the blobs - repository for the default configuration. It will make the build - fail if USE_BLOBS is disabled. Users that still desire to do a - coreboot build for such a board can override this manually, but - this option serves as warning that it might fail. - config COVERAGE bool "Code coverage support" depends on COMPILER_GCC diff --git a/src/cpu/amd/geode_gx2/Makefile.inc b/src/cpu/amd/geode_gx2/Makefile.inc index b3f3de9..f42f1bd 100644 --- a/src/cpu/amd/geode_gx2/Makefile.inc +++ b/src/cpu/amd/geode_gx2/Makefile.inc @@ -11,3 +11,5 @@ cpu_incs += $(src)/cpu/amd/geode_gx2/cache_as_ram.inc cbfs-files-$(CONFIG_GEODE_VSA_FILE) += vsa vsa-file = $(call strip_quotes,$(CONFIG_VSA_FILENAME)):vsa vsa-type = stage +vsa-required = VSA binary + diff --git a/src/cpu/amd/geode_lx/Kconfig b/src/cpu/amd/geode_lx/Kconfig index 777dc94..7deb100 100644 --- a/src/cpu/amd/geode_lx/Kconfig +++ b/src/cpu/amd/geode_lx/Kconfig @@ -19,7 +19,6 @@ config GEODE_VSA bool default y select PCI_OPTION_ROM_RUN_REALMODE - select REQUIRES_BLOB
config GEODE_VSA_FILE bool "Add a VSA image" diff --git a/src/cpu/amd/geode_lx/Makefile.inc b/src/cpu/amd/geode_lx/Makefile.inc index c9df888..29fe0aa 100644 --- a/src/cpu/amd/geode_lx/Makefile.inc +++ b/src/cpu/amd/geode_lx/Makefile.inc @@ -11,3 +11,5 @@ cpu_incs += $(src)/cpu/amd/geode_lx/cache_as_ram.inc cbfs-files-$(CONFIG_GEODE_VSA_FILE) += vsa vsa-file = $(call strip_quotes,$(CONFIG_VSA_FILENAME)):vsa vsa-type = stage +vsa-required = VSA binary + diff --git a/src/southbridge/amd/agesa/hudson/Kconfig b/src/southbridge/amd/agesa/hudson/Kconfig index 92e5960..6cbed53 100644 --- a/src/southbridge/amd/agesa/hudson/Kconfig +++ b/src/southbridge/amd/agesa/hudson/Kconfig @@ -46,21 +46,18 @@ if SOUTHBRIDGE_AMD_AGESA_HUDSON config HUDSON_XHCI_FWM bool "Add xhci firmware" default y - select REQUIRES_BLOB help Add Hudson 2/3/4 XHCI Firmware to support the onboard usb3.0
config HUDSON_IMC_FWM bool "Add imc firmware" default y - select REQUIRES_BLOB help Add Hudson 2/3/4 IMC Firmware to support the onboard fan control
config HUDSON_GEC_FWM bool "Add gec firmware" default n - select REQUIRES_BLOB help Add Hudson 2/3/4 GEC Firmware
diff --git a/src/southbridge/amd/agesa/hudson/Makefile.inc b/src/southbridge/amd/agesa/hudson/Makefile.inc index c9a1731..a5b1231 100644 --- a/src/southbridge/amd/agesa/hudson/Makefile.inc +++ b/src/southbridge/amd/agesa/hudson/Makefile.inc @@ -74,6 +74,7 @@ cbfs-files-y += hudson/xhci hudson/xhci-file := $(call strip_quotes, $(CONFIG_HUDSON_XHCI_FWM_FILE)) hudson/xhci-position := $(HUDSON_XHCI_POSITION) hudson/xhci-type := raw +hudson/xhci-required := Hudson XHCI firmware endif
ifeq ($(CONFIG_HUDSON_IMC_FWM), y) @@ -81,6 +82,7 @@ cbfs-files-y += hudson/imc hudson/imc-file := $(call strip_quotes, $(CONFIG_HUDSON_IMC_FWM_FILE)) hudson/imc-position := $(HUDSON_IMC_POSITION) hudson/imc-type := raw +hudson/imc-required := Hudson IMC Firmware endif
ifeq ($(CONFIG_HUDSON_GEC_FWM), y) @@ -88,6 +90,7 @@ cbfs-files-y += hudson/gec hudson/gec-file := $(call strip_quotes, $(CONFIG_HUDSON_GEC_FWM_FILE)) hudson/gec-position := $(HUDSON_GEC_POSITION) hudson/gec-type := raw +hudson/gec-required := Hudson Gigabit Ethernet Controller Firmware (Contact your AMD representative) endif
#ifeq ($(CONFIG_HUDSON_SATA_AHCI), y) @@ -96,5 +99,6 @@ stripped_ahci_rom_id = $(call strip_quotes,$(CONFIG_AHCI_ROM_ID)) cbfs-files-y += pci$(stripped_ahci_rom_id).rom pci$(stripped_ahci_rom_id).rom-file := $(call strip_quotes,$(CONFIG_AHCI_ROM_FILE)) pci$(stripped_ahci_rom_id).rom-type := optionrom +pci$(stripped_ahci_rom_id).rom-required := Hudson AHCI Option ROM (Contact your AMD representative) #endif endif