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>
Reviewed-on: http://review.coreboot.org/2418
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martin.roth@se-eng.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Marc Jones <marcj303@gmail.com>
This commit is contained in:
Patrick Georgi 2013-02-16 01:06:57 +01:00
parent f57d0dce95
commit 70c85eab83
8 changed files with 18 additions and 19 deletions

View File

@ -232,6 +232,9 @@ evaluate_subdirs= \
# collect all object files eligible for building # collect all object files eligible for building
subdirs:=$(TOPLEVEL) subdirs:=$(TOPLEVEL)
$(eval $(call evaluate_subdirs)) $(eval $(call evaluate_subdirs))
ifeq ($(FAILBUILD),1)
$(error cannot continue build)
endif
# Eliminate duplicate mentions of source files in a class # Eliminate duplicate mentions of source files in a class
$(foreach class,$(classes),$(eval $(class)-srcs:=$(sort $($(class)-srcs)))) $(foreach class,$(classes),$(eval $(class)-srcs:=$(sort $($(class)-srcs))))

View File

@ -105,10 +105,6 @@ endif
ifeq ($(CONFIG_USE_BLOBS),y) ifeq ($(CONFIG_USE_BLOBS),y)
forgetthis:=$(shell git submodule update --init --checkout 3rdparty) 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 endif
bootblock-c-ccopts:=-D__BOOT_BLOCK__ -D__PRE_RAM__ bootblock-c-ccopts:=-D__BOOT_BLOCK__ -D__PRE_RAM__
@ -164,6 +160,11 @@ cbfs-files-handler= \
$(if $(wildcard $(1)$($(2)-file)), \ $(if $(wildcard $(1)$($(2)-file)), \
$(eval tmp-cbfs-file:= $(wildcard $(1)$($(2)-file))), \ $(eval tmp-cbfs-file:= $(wildcard $(1)$($(2)-file))), \
$(eval tmp-cbfs-file:= $($(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), \ $(if $(tmp-cbfs-method), \
$(eval tmp-old-cbfs-file:=$(tmp-cbfs-file)) \ $(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) \ $(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)-name:=) \
$(eval $(2)-type:=) \ $(eval $(2)-type:=) \
$(eval $(2)-compression:=) \ $(eval $(2)-compression:=) \
$(eval $(2)-position:=) $(eval $(2)-position:=) \
$(eval $(2)-required:=)
####################################################################### #######################################################################
# a variety of flags for our build # a variety of flags for our build

View File

@ -184,16 +184,6 @@ config USE_BLOBS
might be required for some chipsets or boards. might be required for some chipsets or boards.
This flag ensures that a "Free" option remains available for users. 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 config COVERAGE
bool "Code coverage support" bool "Code coverage support"
depends on COMPILER_GCC depends on COMPILER_GCC

View File

@ -11,3 +11,5 @@ cpu_incs += $(src)/cpu/amd/geode_gx2/cache_as_ram.inc
cbfs-files-$(CONFIG_GEODE_VSA_FILE) += vsa cbfs-files-$(CONFIG_GEODE_VSA_FILE) += vsa
vsa-file = $(call strip_quotes,$(CONFIG_VSA_FILENAME)):vsa vsa-file = $(call strip_quotes,$(CONFIG_VSA_FILENAME)):vsa
vsa-type = stage vsa-type = stage
vsa-required = VSA binary (binary and MASM source code available in coreboot/3rdparty repository)

View File

@ -19,7 +19,6 @@ config GEODE_VSA
bool bool
default y default y
select PCI_OPTION_ROM_RUN_REALMODE select PCI_OPTION_ROM_RUN_REALMODE
select REQUIRES_BLOB
config GEODE_VSA_FILE config GEODE_VSA_FILE
bool "Add a VSA image" bool "Add a VSA image"

View File

@ -11,3 +11,5 @@ cpu_incs += $(src)/cpu/amd/geode_lx/cache_as_ram.inc
cbfs-files-$(CONFIG_GEODE_VSA_FILE) += vsa cbfs-files-$(CONFIG_GEODE_VSA_FILE) += vsa
vsa-file = $(call strip_quotes,$(CONFIG_VSA_FILENAME)):vsa vsa-file = $(call strip_quotes,$(CONFIG_VSA_FILENAME)):vsa
vsa-type = stage vsa-type = stage
vsa-required = VSA binary (binary and MASM source code available in coreboot/3rdparty repository)

View File

@ -46,21 +46,18 @@ if SOUTHBRIDGE_AMD_AGESA_HUDSON
config HUDSON_XHCI_FWM config HUDSON_XHCI_FWM
bool "Add xhci firmware" bool "Add xhci firmware"
default y default y
select REQUIRES_BLOB
help help
Add Hudson 2/3/4 XHCI Firmware to support the onboard usb3.0 Add Hudson 2/3/4 XHCI Firmware to support the onboard usb3.0
config HUDSON_IMC_FWM config HUDSON_IMC_FWM
bool "Add imc firmware" bool "Add imc firmware"
default y default y
select REQUIRES_BLOB
help help
Add Hudson 2/3/4 IMC Firmware to support the onboard fan control Add Hudson 2/3/4 IMC Firmware to support the onboard fan control
config HUDSON_GEC_FWM config HUDSON_GEC_FWM
bool "Add gec firmware" bool "Add gec firmware"
default n default n
select REQUIRES_BLOB
help help
Add Hudson 2/3/4 GEC Firmware Add Hudson 2/3/4 GEC Firmware

View File

@ -74,6 +74,7 @@ cbfs-files-y += hudson/xhci
hudson/xhci-file := $(call strip_quotes, $(CONFIG_HUDSON_XHCI_FWM_FILE)) hudson/xhci-file := $(call strip_quotes, $(CONFIG_HUDSON_XHCI_FWM_FILE))
hudson/xhci-position := $(HUDSON_XHCI_POSITION) hudson/xhci-position := $(HUDSON_XHCI_POSITION)
hudson/xhci-type := raw hudson/xhci-type := raw
hudson/xhci-required := Hudson XHCI firmware (available in coreboot/3rdparty if enabled)
endif endif
ifeq ($(CONFIG_HUDSON_IMC_FWM), y) 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-file := $(call strip_quotes, $(CONFIG_HUDSON_IMC_FWM_FILE))
hudson/imc-position := $(HUDSON_IMC_POSITION) hudson/imc-position := $(HUDSON_IMC_POSITION)
hudson/imc-type := raw hudson/imc-type := raw
hudson/imc-required := Hudson IMC Firmware (available in coreboot/3rdparty if enabled)
endif endif
ifeq ($(CONFIG_HUDSON_GEC_FWM), y) 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-file := $(call strip_quotes, $(CONFIG_HUDSON_GEC_FWM_FILE))
hudson/gec-position := $(HUDSON_GEC_POSITION) hudson/gec-position := $(HUDSON_GEC_POSITION)
hudson/gec-type := raw hudson/gec-type := raw
hudson/gec-required := Hudson Gigabit Ethernet Controller Firmware (Contact your AMD representative)
endif endif
#ifeq ($(CONFIG_HUDSON_SATA_AHCI), y) #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 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-file := $(call strip_quotes,$(CONFIG_AHCI_ROM_FILE))
pci$(stripped_ahci_rom_id).rom-type := optionrom 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
endif endif