From 2641f982940658e04a6046b5def784aa434f097c Mon Sep 17 00:00:00 2001 From: "Paddy Deng (AMI US Holdings Inc)" Date: Mon, 7 Sep 2026 12:37:57 +0800 Subject: [PATCH] [Cherry-Pick] MinPlatformPkg: Align VariableRuntimeDxe DSC condition Guard VariableRuntimeDxe in CoreDxeInclude.dsc with PcdBootToShellOnly, matching CoreUefiBootInclude.fdf. This keeps the DSC component list aligned with the modules included in the firmware volume. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Signed-off-by: Paddy Deng (AMI US Holdings Inc) (cherry picked from commit ee6aaabed93b46ec3361e981961ca4c5d6d15b6b) --- MinPlatformPkg/Include/Dsc/CoreDxeInclude.dsc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/MinPlatformPkg/Include/Dsc/CoreDxeInclude.dsc b/MinPlatformPkg/Include/Dsc/CoreDxeInclude.dsc index dd32b7bb0f..885ffa9c85 100644 --- a/MinPlatformPkg/Include/Dsc/CoreDxeInclude.dsc +++ b/MinPlatformPkg/Include/Dsc/CoreDxeInclude.dsc @@ -32,10 +32,12 @@ # # Emulated variables for stages 1-4 # - MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf { - - gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvModeEnable|TRUE - } + !if gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly == TRUE + MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf { + + gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvModeEnable|TRUE + } + !endif # # Real variables for stages 5+