From 2b84d26f55dd5b2c45ca7508f1ce0e194b582f63 Mon Sep 17 00:00:00 2001 From: Sergii Dmytruk Date: Sat, 20 Jul 2024 20:43:52 +0300 Subject: [PATCH] payloads/edk2: configure capsule updates This requires version of EDK2 in use to understand those defines, but the build isn't affected negatively if they aren't handled. Upstream EDK2 has CAPSULE_SUPPORT for a while and modifications that make it enable FMP capsules are already merged to be part of the next stable release (the one after edk2-stable202508 which should be edk2-stable202511). The `sed` part is updated because GUID contains dashes just like option names, so need to take leading spaces into account to avoid processing dashes in values. This doesn't cover all possible cases, but should be good enough. Change-Id: I1c684cb8929842a5d3c4b06e8a9c0a748470ea41 Signed-off-by: Sergii Dmytruk Reviewed-on: https://review.coreboot.org/c/coreboot/+/83682 Tested-by: build bot (Jenkins) Reviewed-by: Benjamin Doron --- payloads/external/Makefile.mk | 2 ++ payloads/external/edk2/Makefile | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/payloads/external/Makefile.mk b/payloads/external/Makefile.mk index 655e14df03..4c93298fac 100644 --- a/payloads/external/Makefile.mk +++ b/payloads/external/Makefile.mk @@ -200,6 +200,8 @@ $(obj)/UEFIPAYLOAD.fd: $(DOTCONFIG) CONFIG_EDK2_PCO_MMIO_EMMC=$(CONFIG_EDK2_PCO_MMIO_EMMC) \ CONFIG_EDK2_USE_LAPIC_TIMER=$(CONFIG_EDK2_USE_LAPIC_TIMER) \ CONFIG_SOC_AMD_COMMON_BLOCK_PSP_GEN2=$(CONFIG_SOC_AMD_COMMON_BLOCK_PSP_GEN2) \ + CONFIG_DRIVERS_EFI_UPDATE_CAPSULES=$(CONFIG_DRIVERS_EFI_UPDATE_CAPSULES) \ + CONFIG_DRIVERS_EFI_MAIN_FW_GUID=$(CONFIG_DRIVERS_EFI_MAIN_FW_GUID) \ 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/edk2/Makefile b/payloads/external/edk2/Makefile index 7c87c3469e..168c511562 100644 --- a/payloads/external/edk2/Makefile +++ b/payloads/external/edk2/Makefile @@ -122,6 +122,12 @@ endif ifeq ($(CONFIG_SOC_AMD_COMMON_BLOCK_PSP_GEN2), y) BUILD_STR += --pcd gPcAtChipsetPkgTokenSpaceGuid.PcdInitialValueRtcRegisterD=0x80 endif +# CAPSULE_SUPPORT = FALSE +# CAPSULE_MAIN_FW_GUID = +ifeq ($(CONFIG_DRIVERS_EFI_UPDATE_CAPSULES),y) +BUILD_STR += -D CAPSULE_SUPPORT=TRUE +BUILD_STR += -D CAPSULE_MAIN_FW_GUID=$(CONFIG_DRIVERS_EFI_MAIN_FW_GUID) +endif # # The MrChromebox repository has the following addition options: @@ -276,7 +282,7 @@ print: echo " Branch: $(CONFIG_EDK2_TAG_OR_REV)" echo " Packages path: $(PACKAGES_PATH)" echo " $(BUILD_STR)" | \ - sed -e 's/--/-/g' -e 's/-/\n /g' | sort | sed \ + sed -e 's/ --/ -/g' -e 's/ -/ \n /g' | sort | sed \ -e 's/a /Architecture: /g' \ -e 's/b /Release: /g' \ -e 's/D /Option: /g' \