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 <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91230
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
This commit is contained in:
Patrick Rudolph 2026-02-14 09:25:44 +01:00 committed by Matt DeVillier
commit dec409e9a4

View file

@ -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)" \