From dec409e9a4b1dce0088e9d7702e50ac2081cd067 Mon Sep 17 00:00:00 2001 From: Patrick Rudolph Date: Sat, 14 Feb 2026 09:25:44 +0100 Subject: [PATCH] payloads/external/edk2: Warn user about missing Kconfig option Add a build time warning in case the DRIVERS_EFI_VARIABLE_STORE is not selected, but UefiPayload will have a working firmware menu and will write non-volatile variables into flash. Without DRIVERS_EFI_VARIABLE_STORE coreboot will be fully functional, but the settings made in the firmware menu have no effect at all. Change-Id: Ib8872297d5d3451834f8ccfdaaee32f23727c178 Signed-off-by: Patrick Rudolph Reviewed-on: https://review.coreboot.org/c/coreboot/+/91230 Tested-by: build bot (Jenkins) Reviewed-by: Matt DeVillier --- payloads/external/Makefile.mk | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/payloads/external/Makefile.mk b/payloads/external/Makefile.mk index a15ec2f378..429c0b2a85 100644 --- a/payloads/external/Makefile.mk +++ b/payloads/external/Makefile.mk @@ -161,6 +161,21 @@ ifeq ($(CONFIG_EDK2_ENABLE_IPXE),y) IPXE_EFI := payloads/external/iPXE/ipxe/ipxe.rom endif +ifeq ($(CONFIG_PAYLOAD_EDK2)$(CONFIG_SMMSTORE_V2)$(CONFIG_DRIVERS_OPTION_CFR),yyy) +ifeq ($(CONFIG_DRIVERS_EFI_VARIABLE_STORE),) +show_notices:: warn_no_option_cfr_enabled + +PHONY+=warn_no_option_cfr_enabled +warn_no_option_cfr_enabled: + printf "\n\t** WARNING **\n" + printf "edk2 has been configured to store non-volatile variables in the 'SMMSTORE'\n" + printf "flash area, and to show coreboot's setup option menu, but coreboot is not\n" + printf "configured to use variables stored by edk2 in the 'SMMSTORE' flash area.\n" + printf "coreboot-related changes made in edk2's setup menu will have no effect.\n" + printf "To fix this, select CONFIG_DRIVERS_EFI_VARIABLE_STORE.\n\n" +endif +endif + $(obj)/UEFIPAYLOAD.fd: $(DOTCONFIG) $(IPXE_EFI) $(MAKE) -C payloads/external/edk2 UefiPayloadPkg \ HOSTCC="$(HOSTCC)" \