payloads/edk2: Guard MrChromebox's build options

Several of the build commands passed by the Makefile only exist
in MrChromebox's fork of edk2. Guard these, and the corresponding
Kconfig options, against the selection of the MrChromebox repository.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: I41d8d54e5b91990dd9fb88967fcd549a86cf6fe9
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78036
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Sean Rhodes
2023-09-20 21:24:24 +01:00
committed by Martin L Roth
parent 1a0c99f55d
commit 9031877866
2 changed files with 24 additions and 10 deletions

View File

@@ -207,6 +207,7 @@ config EDK2_CPU_TIMER_LIB
config EDK2_FOLLOW_BGRT_SPEC config EDK2_FOLLOW_BGRT_SPEC
bool "Center logo 38.2% from the top of screen" bool "Center logo 38.2% from the top of screen"
depends on EDK2_REPO_MRCHROMEBOX
default n default n
help help
Follow the BGRT Specification implemented by Microsoft and Follow the BGRT Specification implemented by Microsoft and
@@ -229,6 +230,7 @@ config EDK2_HAVE_EFI_SHELL
config EDK2_PRIORITIZE_INTERNAL config EDK2_PRIORITIZE_INTERNAL
bool "Prioritize internal boot devices" bool "Prioritize internal boot devices"
depends on EDK2_REPO_MRCHROMEBOX
default y default y
help help
Prioritize internal boot devices over external devices Prioritize internal boot devices over external devices
@@ -264,7 +266,7 @@ config EDK2_SECURE_BOOT_SUPPORT
config EDK2_GOP_DRIVER config EDK2_GOP_DRIVER
bool "Add a GOP driver to the Tianocore build" bool "Add a GOP driver to the Tianocore build"
depends on INTEL_GMA_ADD_VBT && NO_GFX_INIT && (EDK2_REPO_MRCHROMEBOX || EDK2_REPO_CUSTOM) depends on INTEL_GMA_ADD_VBT && NO_GFX_INIT && EDK2_REPO_MRCHROMEBOX
default y if INTEL_GMA_ADD_VBT && NO_GFX_INIT && EDK2_REPO_MRCHROMEBOX default y if INTEL_GMA_ADD_VBT && NO_GFX_INIT && EDK2_REPO_MRCHROMEBOX
help help
Select this option to have edk2 use an external GOP driver for display init. Select this option to have edk2 use an external GOP driver for display init.

View File

@@ -38,7 +38,7 @@ endif
endif endif
# #
# EDK II has the following build options relevant to coreboot: # EDK II (edk2/master) has the following build options relevant to coreboot:
# #
# #
# OPTION = DEFAULT_VALUE # OPTION = DEFAULT_VALUE
@@ -67,10 +67,6 @@ endif
ifneq ($(CONFIG_EDK2_SERIAL_SUPPORT),y) ifneq ($(CONFIG_EDK2_SERIAL_SUPPORT),y)
BUILD_STR += -D DISABLE_SERIAL_TERMINAL=TRUE BUILD_STR += -D DISABLE_SERIAL_TERMINAL=TRUE
endif endif
# FOLLOW_BGRT_SPEC = FALSE
ifeq ($(CONFIG_EDK2_FOLLOW_BGRT_SPEC),y)
BUILD_STR += -D FOLLOW_BGRT_SPEC=TRUE
endif
# MAX_VARIABLE_SIZE = 0x10000 # MAX_VARIABLE_SIZE = 0x10000
ifeq ($(CONFIG_SMMSTORE_V2),y) ifeq ($(CONFIG_SMMSTORE_V2),y)
BUILD_STR += --pcd gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize=0x8000 BUILD_STR += --pcd gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize=0x8000
@@ -119,9 +115,29 @@ endif
ifeq ($(CONFIG_PCIEXP_SUPPORT_RESIZABLE_BARS), y) ifeq ($(CONFIG_PCIEXP_SUPPORT_RESIZABLE_BARS), y)
BUILD_STR += --pcd gEfiMdeModulePkgTokenSpaceGuid.PcdPcieResizableBarSupport=TRUE BUILD_STR += --pcd gEfiMdeModulePkgTokenSpaceGuid.PcdPcieResizableBarSupport=TRUE
endif endif
#
# The MrChromebox repository has the following addition options:
#
ifeq ($(CONFIG_EDK2_REPO_MRCHROMEBOX),y)
# FOLLOW_BGRT_SPEC = FALSE
ifeq ($(CONFIG_EDK2_FOLLOW_BGRT_SPEC),y)
BUILD_STR += -D FOLLOW_BGRT_SPEC=TRUE
endif
# GOP_DRIVER = FALSE # GOP_DRIVER = FALSE
ifeq ($(CONFIG_EDK2_GOP_DRIVER), y) ifeq ($(CONFIG_EDK2_GOP_DRIVER), y)
BUILD_STR += -D USE_PLATFORM_GOP=TRUE BUILD_STR += -D USE_PLATFORM_GOP=TRUE
endif
# PRIORITIZE_INTERNAL = FALSE
ifeq ($(CONFIG_EDK2_PRIORITIZE_INTERNAL),y)
BUILD_STR += -D PRIORITIZE_INTERNAL=TRUE
endif
# TPM_ENABLE = TRUE
ifeq ($(CONFIG_TPM_GOOGLE_CR50),y)
BUILD_STR += -D TPM_ENABLE=FALSE
endif
endif endif
# #
@@ -135,10 +151,6 @@ BUILD_STR += --pcd gEfiMdeModulePkgTokenSpaceGuid.PcdSetupConOutRow=0
BUILD_STR += --pcd gEfiMdeModulePkgTokenSpaceGuid.PcdSetupConOutColumn=0 BUILD_STR += --pcd gEfiMdeModulePkgTokenSpaceGuid.PcdSetupConOutColumn=0
endif endif
ifeq ($(CONFIG_TPM_GOOGLE_CR50)$(CONFIG_EDK2_REPO_MRCHROMEBOX),yy)
BUILD_STR += -D TPM_ENABLE=FALSE
endif
bootloader = $(word 8,$(subst /, ,$(BUILD_STR))) bootloader = $(word 8,$(subst /, ,$(BUILD_STR)))
ifneq ($(CONFIG_EDK2_CUSTOM_BUILD_PARAMS),) ifneq ($(CONFIG_EDK2_CUSTOM_BUILD_PARAMS),)