depthcharge: add CONFIG_MAINBOARD_DEPTHCHARGE

CONFIG_MAINBOARD_DEPTHCHARGE is used to override the Board
config for depthcharge which inherit from CONFIG_MAINBOARD_PART_NUMBER.
This is mainly to avoid depthcharge config duplication.

Signed-off-by: Selma BENSAID <selma.bensaid@intel.com>
Change-Id: I6cbc93ca38ad6deeca2c2fb7770024a24233b6f8
Reviewed-on: https://review.coreboot.org/c/coreboot/+/35510
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Mathew King <mathewk@chromium.org>
This commit is contained in:
Selma BENSAID 2019-09-20 17:38:59 -07:00 committed by Patrick Georgi
parent 0962b1fa5d
commit b458a4f745
2 changed files with 11 additions and 1 deletions

View File

@ -29,6 +29,11 @@ endif
ifeq ($(CONFIG_PAYLOAD_DEPTHCHARGE),y) ifeq ($(CONFIG_PAYLOAD_DEPTHCHARGE),y)
PAYLOAD_CONFIG=payloads/external/depthcharge/depthcharge/.config PAYLOAD_CONFIG=payloads/external/depthcharge/depthcharge/.config
$(PAYLOAD_CONFIG): payloads/external/depthcharge/depthcharge/build/depthcharge.elf $(PAYLOAD_CONFIG): payloads/external/depthcharge/depthcharge/build/depthcharge.elf
ifneq ($(CONFIG_MAINBOARD_DEPTHCHARGE),)
BOARD=$(CONFIG_MAINBOARD_DEPTHCHARGE)
else
BOARD=$(call ws_to_under,$(call strip_quotes,$(call tolower,$(CONFIG_MAINBOARD_PART_NUMBER))))
endif
#TODO: Figure out version #TODO: Figure out version
endif endif
@ -114,7 +119,7 @@ endif
payloads/external/depthcharge/depthcharge/build/depthcharge.elf depthcharge: $(DOTCONFIG) $(CBFSTOOL) payloads/external/depthcharge/depthcharge/build/depthcharge.elf depthcharge: $(DOTCONFIG) $(CBFSTOOL)
$(MAKE) -C payloads/external/depthcharge \ $(MAKE) -C payloads/external/depthcharge \
BOARD=$(call ws_to_under,$(call strip_quotes,$(call tolower,$(CONFIG_MAINBOARD_PART_NUMBER)))) \ BOARD=$(BOARD) \
MFLAGS= MAKEFLAGS= \ MFLAGS= MAKEFLAGS= \
DEPTHCHARGE_MASTER=$(CONFIG_DEPTHCHARGE_MASTER) \ DEPTHCHARGE_MASTER=$(CONFIG_DEPTHCHARGE_MASTER) \
DEPTHCHARGE_STABLE=$(CONFIG_DEPTHCHARGE_STABLE) \ DEPTHCHARGE_STABLE=$(CONFIG_DEPTHCHARGE_STABLE) \

View File

@ -35,6 +35,11 @@ config PAYLOAD_FILE
string string
default "payloads/external/depthcharge/depthcharge/build/depthcharge.elf" default "payloads/external/depthcharge/depthcharge/build/depthcharge.elf"
config MAINBOARD_DEPTHCHARGE
string ""
help
Override BOARD setting for depthcharge
config LP_DEFCONFIG_OVERRIDE config LP_DEFCONFIG_OVERRIDE
bool "Use default libpayload config" bool "Use default libpayload config"
help help