From ba08c4904da084aac5042de6c22f7792d7023b10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20=C5=BBygowski?= Date: Wed, 23 Feb 2022 16:55:24 +0100 Subject: [PATCH] payloads/tianocore: Allow custom build parameters MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently, custom TianoCore builds are allowed, but those may need different parameters. Add a Kconfig option to specify additional parameters to be appended to build command. Signed-off-by: Michał Żygowski Signed-off-by: Michał Kopeć Change-Id: I025459ae94592103b4be0c68b422100b7c649d34 Reviewed-on: https://review.coreboot.org/c/coreboot/+/62497 Tested-by: build bot (Jenkins) Reviewed-by: Matt DeVillier --- payloads/external/Makefile.inc | 2 ++ payloads/external/tianocore/Kconfig | 11 +++++++++++ payloads/external/tianocore/Makefile | 6 ++++++ 3 files changed, 19 insertions(+) diff --git a/payloads/external/Makefile.inc b/payloads/external/Makefile.inc index 99fb0ef483..38e7dad0c6 100644 --- a/payloads/external/Makefile.inc +++ b/payloads/external/Makefile.inc @@ -162,6 +162,7 @@ $(obj)/UEFIPAYLOAD.fd tianocore: $(DOTCONFIG) CONFIG_TIANOCORE_TAG_OR_REV=$(CONFIG_TIANOCORE_TAG_OR_REV) \ CONFIG_TIANOCORE_UEFIPAYLOAD=$(CONFIG_TIANOCORE_UEFIPAYLOAD) \ CONFIG_TIANOCORE_UPSTREAM=$(CONFIG_TIANOCORE_UPSTREAM) \ + CONFIG_TIANOCORE_CUSTOM=$(CONFIG_TIANOCORE_CUSTOM) \ CONFIG_TIANOCORE_COREBOOTPAYLOAD=$(CONFIG_TIANOCORE_COREBOOTPAYLOAD) \ CONFIG_TIANOCORE_DEBUG=$(CONFIG_TIANOCORE_DEBUG) \ CONFIG_TIANOCORE_RELEASE=$(CONFIG_TIANOCORE_RELEASE) \ @@ -177,6 +178,7 @@ $(obj)/UEFIPAYLOAD.fd tianocore: $(DOTCONFIG) CONFIG_TIANOCORE_SD_MMC_TIMEOUT=$(CONFIG_TIANOCORE_SD_MMC_TIMEOUT) \ CONFIG_TIANOCORE_USE_8254_TIMER=$(CONFIG_TIANOCORE_USE_8254_TIMER) \ CONFIG_ECAM_MMCONF_BASE_ADDRESS=$(CONFIG_ECAM_MMCONF_BASE_ADDRESS) \ + CONFIG_TIANOCORE_CUSTOM_BUILD_PARAMS=$(CONFIG_TIANOCORE_CUSTOM_BUILD_PARAMS) \ GCC_CC_x86_32=$(GCC_CC_x86_32) \ GCC_CC_x86_64=$(GCC_CC_x86_64) \ GCC_CC_arm=$(GCC_CC_arm) \ diff --git a/payloads/external/tianocore/Kconfig b/payloads/external/tianocore/Kconfig index 2cfe9ce4f3..98ed6a89d0 100644 --- a/payloads/external/tianocore/Kconfig +++ b/payloads/external/tianocore/Kconfig @@ -186,4 +186,15 @@ config TIANOCORE_USE_8254_TIMER endif +if TIANOCORE_CUSTOM + +config TIANOCORE_CUSTOM_BUILD_PARAMS + string "TianoCore additional custom build parameters" + help + Custom TianoCore forks may have different sets of parameters passed + to build command. You may specify additional parameters to the custom + TianoCore build + +endif + endif diff --git a/payloads/external/tianocore/Makefile b/payloads/external/tianocore/Makefile index e60a27938a..da61470a17 100644 --- a/payloads/external/tianocore/Makefile +++ b/payloads/external/tianocore/Makefile @@ -82,6 +82,12 @@ endif bootloader = $(word 8,$(subst /, ,$(BUILD_STR))) +ifeq ($(CONFIG_TIANOCORE_CUSTOM),y) +ifneq ($(CONFIG_TIANOCORE_CUSTOM_BUILD_PARAMS),) +BUILD_STR += $(CONFIG_TIANOCORE_CUSTOM_BUILD_PARAMS) +endif +endif + all: clean build $(project_dir):