Hello EDK II community, Our team is new to uefi development. We are gradually exploring the EDK II project. We have already successfully built default UEFI pauload (UefiPayloadPkg) for SBL. We are currently trying to add support for saving variables to NVRAM (ARIABLE_SUPPORT = SPI). It also requires enabling SMM and UNIVERSAL_PAYLOAD support. `The building by build -a IA32 -a X64 -p UefiPayloadPkg/UefiPayloadPkg.dsc -b DEBUG -t GCC5 -D BOOTLOADER=SBL` fails with the following message (full log is available in attachments): Build environment: Linux-6.8.0-51-generic-x86_64-with-glibc2.35 Build start time: 13:55:06, Jan.20 2025 WORKSPACE = /home/user/edk2 EDK_TOOLS_PATH = /home/user/edk2/BaseTools CONF_PATH = /home/user/edk2/Conf PYTHON_COMMAND = python3 Processing meta-data . Architecture(s) = IA32 X64 Build target = DEBUG Toolchain = GCC5 Active Platform = /home/user/edk2/UefiPayloadPkg/UefiPayloadPkg.dsc build.py... /home/user/edk2/UefiPayloadPkg/UefiPayloadPkg.dsc(...): error 4000: Instance of library class [MmSaveStateLib] is not found in [/home/user/edk2/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf] [X64] consumed by module [/home/user/edk2/UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf] - Failed - Build end time: 11:55:19, Jan.20 2025 Build total time: 00:00:01 It seems that some kind of dependency is not included to this configuration. PiSmmCpuDxeSmm.inf is a part of UefiCpuPkg.dsc which has necessary inclusion: UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf { FILE_GUID = B7242C74-BD21-49EE-84B4-07162E8C080D SmmCpuFeaturesLib|UefiCpuPkg/Library/SmmCpuFeaturesLib/AmdSmmCpuFeaturesLib.inf MmSaveStateLib|UefiCpuPkg/Library/MmSaveStateLib/AmdMmSaveStateLib.inf } We are use 0f3867fa6ef0553e26c42f7d71ff6bdb98429742 (edk2-stable202411) and 1301e0b47eb3b4212da384a34f23b68edaf1911e commits. Full changes: --- UefiPayloadPkg/UefiPayloadPkg.dsc | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/UefiPayloadPkg/UefiPayloadPkg.dsc b/UefiPayloadPkg/UefiPayloadPkg.dsc index 9ff326a6cb..3af7be4a87 100644 --- a/UefiPayloadPkg/UefiPayloadPkg.dsc +++ b/UefiPayloadPkg/UefiPayloadPkg.dsc @@ -22,16 +22,16 @@ SUPPORTED_ARCHITECTURES = IA32|X64 BUILD_TARGETS = DEBUG|RELEASE|NOOPT SKUID_IDENTIFIER = DEFAULT - OUTPUT_DIRECTORY = Build/UefiPayloadPkg$(BUILD_ARCH) + OUTPUT_DIRECTORY = Build/UefiPayloadPkg FLASH_DEFINITION = UefiPayloadPkg/UefiPayloadPkg.fdf PCD_DYNAMIC_AS_DYNAMICEX = TRUE DEFINE SOURCE_DEBUG_ENABLE = FALSE - DEFINE PS2_KEYBOARD_ENABLE = FALSE + DEFINE PS2_KEYBOARD_ENABLE = TRUE DEFINE RAM_DISK_ENABLE = FALSE - DEFINE SIO_BUS_ENABLE = FALSE + DEFINE SIO_BUS_ENABLE = TRUE DEFINE SECURITY_STUB_ENABLE = TRUE - DEFINE SMM_SUPPORT = FALSE + DEFINE SMM_SUPPORT = TRUE DEFINE PLATFORM_BOOT_TIMEOUT = 3 DEFINE BOOT_MANAGER_ESCAPE = FALSE DEFINE ATA_ENABLE = TRUE @@ -56,7 +56,7 @@ # ELF: Build UniversalPayload file as UniversalPayload.elf # FIT: Build UniversalPayload file as UniversalPayload.fit # - DEFINE UNIVERSAL_PAYLOAD = FALSE + DEFINE UNIVERSAL_PAYLOAD = TRUE DEFINE UNIVERSAL_PAYLOAD_FORMAT = ELF # @@ -126,7 +126,8 @@ # SPI: UEFI payload with SPI NV variable support # NONE: UEFI payload with no variable modules # - DEFINE VARIABLE_SUPPORT = EMU + DEFINE VARIABLE_SUPPORT = SPI +# DEFINE VARIABLE_SUPPORT = EMU DEFINE DISABLE_RESET_SYSTEM = FALSE DEFINE NETWORK_DRIVER_ENABLE = FALSE -- -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#121058): https://edk2.groups.io/g/devel/message/121058 Mute This Topic: https://groups.io/mt/110868214/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-