* [edk2-devel] [PATCH v3 01/12] OvmfPkg: add ShellComponents.dsc.inc
2024-02-22 10:13 [edk2-devel] [PATCH v3 00/12] OvmfPkg: tweak shell builds Gerd Hoffmann
@ 2024-02-22 10:13 ` Gerd Hoffmann
2024-02-22 10:13 ` [edk2-devel] [PATCH v3 02/12] OvmfPkg: add ShellLibs.dsc.inc Gerd Hoffmann
` (11 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Gerd Hoffmann @ 2024-02-22 10:13 UTC (permalink / raw)
To: devel
Cc: Michael Roth, Laszlo Ersek, Tom Lendacky, Min Xu, Jiewen Yao,
Gerd Hoffmann, Ard Biesheuvel, Erdem Aktas, Oliver Steffen,
Jiewen Yao
Move EFI Shell components from OvmfPkgX64.dsc to
the new ShellComponents.dsc.inc include file.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
---
OvmfPkg/Include/Dsc/ShellComponents.dsc.inc | 49 +++++++++++++++++++++
OvmfPkg/OvmfPkgX64.dsc | 43 +-----------------
2 files changed, 50 insertions(+), 42 deletions(-)
create mode 100644 OvmfPkg/Include/Dsc/ShellComponents.dsc.inc
diff --git a/OvmfPkg/Include/Dsc/ShellComponents.dsc.inc b/OvmfPkg/Include/Dsc/ShellComponents.dsc.inc
new file mode 100644
index 000000000000..1a3a349a9de5
--- /dev/null
+++ b/OvmfPkg/Include/Dsc/ShellComponents.dsc.inc
@@ -0,0 +1,49 @@
+##
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+##
+
+!if $(BUILD_SHELL) == TRUE
+
+!if $(TOOL_CHAIN_TAG) != "XCODE5"
+ ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf {
+ <PcdsFixedAtBuild>
+ gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
+ }
+ ShellPkg/DynamicCommand/HttpDynamicCommand/HttpDynamicCommand.inf {
+ <PcdsFixedAtBuild>
+ gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
+ }
+ ShellPkg/DynamicCommand/VariablePolicyDynamicCommand/VariablePolicyDynamicCommand.inf {
+ <PcdsFixedAtBuild>
+ gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
+ }
+ OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf {
+ <PcdsFixedAtBuild>
+ gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
+ }
+!endif
+
+ ShellPkg/Application/Shell/Shell.inf {
+ <LibraryClasses>
+ ShellCommandLib|ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.inf
+ NULL|ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.inf
+ NULL|ShellPkg/Library/UefiShellLevel1CommandsLib/UefiShellLevel1CommandsLib.inf
+ NULL|ShellPkg/Library/UefiShellLevel3CommandsLib/UefiShellLevel3CommandsLib.inf
+ NULL|ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.inf
+ NULL|ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf
+ NULL|ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf
+ NULL|ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.inf
+!if $(NETWORK_IP6_ENABLE) == TRUE
+ NULL|ShellPkg/Library/UefiShellNetwork2CommandsLib/UefiShellNetwork2CommandsLib.inf
+!endif
+ HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
+ PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
+ BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.inf
+
+ <PcdsFixedAtBuild>
+ gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0xFF
+ gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
+ gEfiMdePkgTokenSpaceGuid.PcdUefiLibMaxPrintBufferSize|8000
+ }
+
+!endif
diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc
index bf4c7906c460..043b0a7a67e0 100644
--- a/OvmfPkg/OvmfPkgX64.dsc
+++ b/OvmfPkg/OvmfPkgX64.dsc
@@ -956,48 +956,7 @@ [Components]
MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf
MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf
-!if $(TOOL_CHAIN_TAG) != "XCODE5" && $(BUILD_SHELL) == TRUE
- ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf {
- <PcdsFixedAtBuild>
- gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
- }
- ShellPkg/DynamicCommand/HttpDynamicCommand/HttpDynamicCommand.inf {
- <PcdsFixedAtBuild>
- gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
- }
- ShellPkg/DynamicCommand/VariablePolicyDynamicCommand/VariablePolicyDynamicCommand.inf {
- <PcdsFixedAtBuild>
- gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
- }
- OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf {
- <PcdsFixedAtBuild>
- gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
- }
-!endif
-!if $(BUILD_SHELL) == TRUE
- ShellPkg/Application/Shell/Shell.inf {
- <LibraryClasses>
- ShellCommandLib|ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.inf
- NULL|ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.inf
- NULL|ShellPkg/Library/UefiShellLevel1CommandsLib/UefiShellLevel1CommandsLib.inf
- NULL|ShellPkg/Library/UefiShellLevel3CommandsLib/UefiShellLevel3CommandsLib.inf
- NULL|ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.inf
- NULL|ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf
- NULL|ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf
- NULL|ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.inf
-!if $(NETWORK_IP6_ENABLE) == TRUE
- NULL|ShellPkg/Library/UefiShellNetwork2CommandsLib/UefiShellNetwork2CommandsLib.inf
-!endif
- HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
- PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
- BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.inf
-
- <PcdsFixedAtBuild>
- gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0xFF
- gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
- gEfiMdePkgTokenSpaceGuid.PcdUefiLibMaxPrintBufferSize|8000
- }
-!endif
+!include OvmfPkg/Include/Dsc/ShellComponents.dsc.inc
!if $(SECURE_BOOT_ENABLE) == TRUE
SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf
--
2.43.2
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#115783): https://edk2.groups.io/g/devel/message/115783
Mute This Topic: https://groups.io/mt/104505804/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [edk2-devel] [PATCH v3 02/12] OvmfPkg: add ShellLibs.dsc.inc
2024-02-22 10:13 [edk2-devel] [PATCH v3 00/12] OvmfPkg: tweak shell builds Gerd Hoffmann
2024-02-22 10:13 ` [edk2-devel] [PATCH v3 01/12] OvmfPkg: add ShellComponents.dsc.inc Gerd Hoffmann
@ 2024-02-22 10:13 ` Gerd Hoffmann
2024-02-22 10:13 ` [edk2-devel] [PATCH v3 03/12] OvmfPkg: add ShellDxe.fdf.inc Gerd Hoffmann
` (10 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Gerd Hoffmann @ 2024-02-22 10:13 UTC (permalink / raw)
To: devel
Cc: Michael Roth, Laszlo Ersek, Tom Lendacky, Min Xu, Jiewen Yao,
Gerd Hoffmann, Ard Biesheuvel, Erdem Aktas, Oliver Steffen,
Jiewen Yao
Move EFI Shell libraries from OvmfPkgX64.dsc to
the new ShellComponents.dsc.inc include file.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
---
OvmfPkg/Include/Dsc/ShellLibs.dsc.inc | 10 ++++++++++
OvmfPkg/OvmfPkgX64.dsc | 4 +---
2 files changed, 11 insertions(+), 3 deletions(-)
create mode 100644 OvmfPkg/Include/Dsc/ShellLibs.dsc.inc
diff --git a/OvmfPkg/Include/Dsc/ShellLibs.dsc.inc b/OvmfPkg/Include/Dsc/ShellLibs.dsc.inc
new file mode 100644
index 000000000000..f4551ec84aeb
--- /dev/null
+++ b/OvmfPkg/Include/Dsc/ShellLibs.dsc.inc
@@ -0,0 +1,10 @@
+##
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+##
+
+!if $(BUILD_SHELL) == TRUE
+
+[LibraryClasses]
+ ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
+
+!endif
diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc
index 043b0a7a67e0..56c920168d25 100644
--- a/OvmfPkg/OvmfPkgX64.dsc
+++ b/OvmfPkg/OvmfPkgX64.dsc
@@ -258,9 +258,6 @@ [LibraryClasses]
TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf
!endif
-!if $(BUILD_SHELL) == TRUE
- ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
-!endif
ShellCEntryLib|ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.inf
S3BootScriptLib|MdeModulePkg/Library/PiDxeS3BootScriptLib/DxeS3BootScriptLib.inf
@@ -268,6 +265,7 @@ [LibraryClasses]
OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.inf
!include OvmfPkg/Include/Dsc/OvmfTpmLibs.dsc.inc
+!include OvmfPkg/Include/Dsc/ShellLibs.dsc.inc
[LibraryClasses.common]
BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
--
2.43.2
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#115784): https://edk2.groups.io/g/devel/message/115784
Mute This Topic: https://groups.io/mt/104505805/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [edk2-devel] [PATCH v3 03/12] OvmfPkg: add ShellDxe.fdf.inc
2024-02-22 10:13 [edk2-devel] [PATCH v3 00/12] OvmfPkg: tweak shell builds Gerd Hoffmann
2024-02-22 10:13 ` [edk2-devel] [PATCH v3 01/12] OvmfPkg: add ShellComponents.dsc.inc Gerd Hoffmann
2024-02-22 10:13 ` [edk2-devel] [PATCH v3 02/12] OvmfPkg: add ShellLibs.dsc.inc Gerd Hoffmann
@ 2024-02-22 10:13 ` Gerd Hoffmann
2024-02-22 10:13 ` [edk2-devel] [PATCH v3 04/12] OvmfPkg: Shell*.inc: allow building without network support Gerd Hoffmann
` (9 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Gerd Hoffmann @ 2024-02-22 10:13 UTC (permalink / raw)
To: devel
Cc: Michael Roth, Laszlo Ersek, Tom Lendacky, Min Xu, Jiewen Yao,
Gerd Hoffmann, Ard Biesheuvel, Erdem Aktas, Oliver Steffen,
Jiewen Yao
Move EFI Shell firmware volume files to
the new ShellDxe.fdf.inc file.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
---
OvmfPkg/OvmfPkgX64.fdf | 11 ++---------
OvmfPkg/Include/Fdf/ShellDxe.fdf.inc | 14 ++++++++++++++
2 files changed, 16 insertions(+), 9 deletions(-)
create mode 100644 OvmfPkg/Include/Fdf/ShellDxe.fdf.inc
diff --git a/OvmfPkg/OvmfPkgX64.fdf b/OvmfPkg/OvmfPkgX64.fdf
index f47ab1727e4c..eb3fb90cb8b6 100644
--- a/OvmfPkg/OvmfPkgX64.fdf
+++ b/OvmfPkg/OvmfPkgX64.fdf
@@ -319,15 +319,6 @@ [FV.DXEFV]
INF MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf
INF OvmfPkg/VirtioFsDxe/VirtioFsDxe.inf
-!if $(BUILD_SHELL) == TRUE && $(TOOL_CHAIN_TAG) != "XCODE5"
-INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf
-INF ShellPkg/DynamicCommand/HttpDynamicCommand/HttpDynamicCommand.inf
-INF OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf
-!endif
-!if $(BUILD_SHELL) == TRUE
-INF ShellPkg/Application/Shell/Shell.inf
-!endif
-
INF MdeModulePkg/Logo/LogoDxe.inf
INF OvmfPkg/TdxDxe/TdxDxe.inf
@@ -402,6 +393,8 @@ [FV.DXEFV]
#
!include OvmfPkg/Include/Fdf/OvmfTpmDxe.fdf.inc
+!include OvmfPkg/Include/Fdf/ShellDxe.fdf.inc
+
################################################################################
[FV.FVMAIN_COMPACT]
diff --git a/OvmfPkg/Include/Fdf/ShellDxe.fdf.inc b/OvmfPkg/Include/Fdf/ShellDxe.fdf.inc
new file mode 100644
index 000000000000..0935f06fa368
--- /dev/null
+++ b/OvmfPkg/Include/Fdf/ShellDxe.fdf.inc
@@ -0,0 +1,14 @@
+##
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+##
+
+!if $(BUILD_SHELL) == TRUE
+
+!if $(TOOL_CHAIN_TAG) != "XCODE5"
+INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf
+INF ShellPkg/DynamicCommand/HttpDynamicCommand/HttpDynamicCommand.inf
+INF OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf
+!endif
+
+INF ShellPkg/Application/Shell/Shell.inf
+!endif
--
2.43.2
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#115786): https://edk2.groups.io/g/devel/message/115786
Mute This Topic: https://groups.io/mt/104505807/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [edk2-devel] [PATCH v3 04/12] OvmfPkg: Shell*.inc: allow building without network support
2024-02-22 10:13 [edk2-devel] [PATCH v3 00/12] OvmfPkg: tweak shell builds Gerd Hoffmann
` (2 preceding siblings ...)
2024-02-22 10:13 ` [edk2-devel] [PATCH v3 03/12] OvmfPkg: add ShellDxe.fdf.inc Gerd Hoffmann
@ 2024-02-22 10:13 ` Gerd Hoffmann
2024-02-22 10:13 ` [edk2-devel] [PATCH v3 05/12] OvmfPkg: ShellDxe.fdf.inc: add VariablePolicyDynamicCommand to FV Gerd Hoffmann
` (8 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Gerd Hoffmann @ 2024-02-22 10:13 UTC (permalink / raw)
To: devel
Cc: Michael Roth, Laszlo Ersek, Tom Lendacky, Min Xu, Jiewen Yao,
Gerd Hoffmann, Ard Biesheuvel, Erdem Aktas, Oliver Steffen,
Jiewen Yao
Add NETWORK_ENABLE conditionals for the components
which need network support.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
---
OvmfPkg/Include/Dsc/ShellComponents.dsc.inc | 6 ++++++
OvmfPkg/Include/Fdf/ShellDxe.fdf.inc | 2 ++
2 files changed, 8 insertions(+)
diff --git a/OvmfPkg/Include/Dsc/ShellComponents.dsc.inc b/OvmfPkg/Include/Dsc/ShellComponents.dsc.inc
index 1a3a349a9de5..4075688e416d 100644
--- a/OvmfPkg/Include/Dsc/ShellComponents.dsc.inc
+++ b/OvmfPkg/Include/Dsc/ShellComponents.dsc.inc
@@ -5,6 +5,7 @@
!if $(BUILD_SHELL) == TRUE
!if $(TOOL_CHAIN_TAG) != "XCODE5"
+!if $(NETWORK_ENABLE) == TRUE
ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf {
<PcdsFixedAtBuild>
gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
@@ -13,6 +14,7 @@
<PcdsFixedAtBuild>
gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
}
+!endif
ShellPkg/DynamicCommand/VariablePolicyDynamicCommand/VariablePolicyDynamicCommand.inf {
<PcdsFixedAtBuild>
gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
@@ -32,9 +34,13 @@
NULL|ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.inf
NULL|ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf
NULL|ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf
+!if $(NETWORK_ENABLE) == TRUE
+!if $(NETWORK_IP4_ENABLE) == TRUE
NULL|ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.inf
+!endif
!if $(NETWORK_IP6_ENABLE) == TRUE
NULL|ShellPkg/Library/UefiShellNetwork2CommandsLib/UefiShellNetwork2CommandsLib.inf
+!endif
!endif
HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
diff --git a/OvmfPkg/Include/Fdf/ShellDxe.fdf.inc b/OvmfPkg/Include/Fdf/ShellDxe.fdf.inc
index 0935f06fa368..6536c30c5413 100644
--- a/OvmfPkg/Include/Fdf/ShellDxe.fdf.inc
+++ b/OvmfPkg/Include/Fdf/ShellDxe.fdf.inc
@@ -5,8 +5,10 @@
!if $(BUILD_SHELL) == TRUE
!if $(TOOL_CHAIN_TAG) != "XCODE5"
+!if $(NETWORK_ENABLE) == TRUE
INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf
INF ShellPkg/DynamicCommand/HttpDynamicCommand/HttpDynamicCommand.inf
+!endif
INF OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf
!endif
--
2.43.2
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#115785): https://edk2.groups.io/g/devel/message/115785
Mute This Topic: https://groups.io/mt/104505806/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [edk2-devel] [PATCH v3 05/12] OvmfPkg: ShellDxe.fdf.inc: add VariablePolicyDynamicCommand to FV
2024-02-22 10:13 [edk2-devel] [PATCH v3 00/12] OvmfPkg: tweak shell builds Gerd Hoffmann
` (3 preceding siblings ...)
2024-02-22 10:13 ` [edk2-devel] [PATCH v3 04/12] OvmfPkg: Shell*.inc: allow building without network support Gerd Hoffmann
@ 2024-02-22 10:13 ` Gerd Hoffmann
2024-02-22 10:13 ` [edk2-devel] [PATCH v3 06/12] OvmfPkg: switch OvmfPkgIa32 to new shell include files Gerd Hoffmann
` (7 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Gerd Hoffmann @ 2024-02-22 10:13 UTC (permalink / raw)
To: devel
Cc: Michael Roth, Laszlo Ersek, Tom Lendacky, Min Xu, Jiewen Yao,
Gerd Hoffmann, Ard Biesheuvel, Erdem Aktas, Oliver Steffen,
Jiewen Yao
Needed to make the new 'varpolicy' EFI shell command
actually available in the OVMF firmware builds.
Fixes: fe6cd1c18721 ("OvmfPkg: Add varpolicy shell command")
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
---
OvmfPkg/Include/Fdf/ShellDxe.fdf.inc | 1 +
1 file changed, 1 insertion(+)
diff --git a/OvmfPkg/Include/Fdf/ShellDxe.fdf.inc b/OvmfPkg/Include/Fdf/ShellDxe.fdf.inc
index 6536c30c5413..3081ac41780a 100644
--- a/OvmfPkg/Include/Fdf/ShellDxe.fdf.inc
+++ b/OvmfPkg/Include/Fdf/ShellDxe.fdf.inc
@@ -9,6 +9,7 @@
INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf
INF ShellPkg/DynamicCommand/HttpDynamicCommand/HttpDynamicCommand.inf
!endif
+INF ShellPkg/DynamicCommand/VariablePolicyDynamicCommand/VariablePolicyDynamicCommand.inf
INF OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf
!endif
--
2.43.2
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#115788): https://edk2.groups.io/g/devel/message/115788
Mute This Topic: https://groups.io/mt/104505810/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [edk2-devel] [PATCH v3 06/12] OvmfPkg: switch OvmfPkgIa32 to new shell include files
2024-02-22 10:13 [edk2-devel] [PATCH v3 00/12] OvmfPkg: tweak shell builds Gerd Hoffmann
` (4 preceding siblings ...)
2024-02-22 10:13 ` [edk2-devel] [PATCH v3 05/12] OvmfPkg: ShellDxe.fdf.inc: add VariablePolicyDynamicCommand to FV Gerd Hoffmann
@ 2024-02-22 10:13 ` Gerd Hoffmann
2024-02-22 10:13 ` [edk2-devel] [PATCH v3 07/12] OvmfPkg: switch OvmfPkgIa32X64 " Gerd Hoffmann
` (6 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Gerd Hoffmann @ 2024-02-22 10:13 UTC (permalink / raw)
To: devel
Cc: Michael Roth, Laszlo Ersek, Tom Lendacky, Min Xu, Jiewen Yao,
Gerd Hoffmann, Ard Biesheuvel, Erdem Aktas, Oliver Steffen,
Jiewen Yao
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
---
OvmfPkg/OvmfPkgIa32.dsc | 47 ++---------------------------------------
OvmfPkg/OvmfPkgIa32.fdf | 11 ++--------
2 files changed, 4 insertions(+), 54 deletions(-)
diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc
index 28379961a78e..713f08764b07 100644
--- a/OvmfPkg/OvmfPkgIa32.dsc
+++ b/OvmfPkg/OvmfPkgIa32.dsc
@@ -237,9 +237,6 @@ [LibraryClasses]
TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf
!endif
-!if $(BUILD_SHELL) == TRUE
- ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
-!endif
ShellCEntryLib|ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.inf
S3BootScriptLib|MdeModulePkg/Library/PiDxeS3BootScriptLib/DxeS3BootScriptLib.inf
@@ -247,6 +244,7 @@ [LibraryClasses]
OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.inf
!include OvmfPkg/Include/Dsc/OvmfTpmLibs.dsc.inc
+!include OvmfPkg/Include/Dsc/ShellLibs.dsc.inc
[LibraryClasses.common]
BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
@@ -874,48 +872,7 @@ [Components]
MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf
MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf
-!if $(TOOL_CHAIN_TAG) != "XCODE5" && $(BUILD_SHELL) == TRUE
- ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf {
- <PcdsFixedAtBuild>
- gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
- }
- ShellPkg/DynamicCommand/HttpDynamicCommand/HttpDynamicCommand.inf {
- <PcdsFixedAtBuild>
- gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
- }
- ShellPkg/DynamicCommand/VariablePolicyDynamicCommand/VariablePolicyDynamicCommand.inf {
- <PcdsFixedAtBuild>
- gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
- }
- OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf {
- <PcdsFixedAtBuild>
- gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
- }
-!endif
-!if $(BUILD_SHELL) == TRUE
- ShellPkg/Application/Shell/Shell.inf {
- <LibraryClasses>
- ShellCommandLib|ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.inf
- NULL|ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.inf
- NULL|ShellPkg/Library/UefiShellLevel1CommandsLib/UefiShellLevel1CommandsLib.inf
- NULL|ShellPkg/Library/UefiShellLevel3CommandsLib/UefiShellLevel3CommandsLib.inf
- NULL|ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.inf
- NULL|ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf
- NULL|ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf
- NULL|ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.inf
-!if $(NETWORK_IP6_ENABLE) == TRUE
- NULL|ShellPkg/Library/UefiShellNetwork2CommandsLib/UefiShellNetwork2CommandsLib.inf
-!endif
- HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
- PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
- BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.inf
-
- <PcdsFixedAtBuild>
- gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0xFF
- gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
- gEfiMdePkgTokenSpaceGuid.PcdUefiLibMaxPrintBufferSize|8000
- }
-!endif
+!include OvmfPkg/Include/Dsc/ShellComponents.dsc.inc
!if $(SECURE_BOOT_ENABLE) == TRUE
SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf
diff --git a/OvmfPkg/OvmfPkgIa32.fdf b/OvmfPkg/OvmfPkgIa32.fdf
index 501b4de4695e..6c56c5e53f21 100644
--- a/OvmfPkg/OvmfPkgIa32.fdf
+++ b/OvmfPkg/OvmfPkgIa32.fdf
@@ -293,15 +293,6 @@ [FV.DXEFV]
INF MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf
INF OvmfPkg/VirtioFsDxe/VirtioFsDxe.inf
-!if $(BUILD_SHELL) == TRUE && $(TOOL_CHAIN_TAG) != "XCODE5"
-INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf
-INF ShellPkg/DynamicCommand/HttpDynamicCommand/HttpDynamicCommand.inf
-INF OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf
-!endif
-!if $(BUILD_SHELL) == TRUE
-INF ShellPkg/Application/Shell/Shell.inf
-!endif
-
INF MdeModulePkg/Logo/LogoDxe.inf
#
@@ -361,6 +352,8 @@ [FV.DXEFV]
#
!include OvmfPkg/Include/Fdf/OvmfTpmDxe.fdf.inc
+!include OvmfPkg/Include/Fdf/ShellDxe.fdf.inc
+
!if $(LOAD_X64_ON_IA32_ENABLE) == TRUE
INF OvmfPkg/CompatImageLoaderDxe/CompatImageLoaderDxe.inf
!endif
--
2.43.2
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#115787): https://edk2.groups.io/g/devel/message/115787
Mute This Topic: https://groups.io/mt/104505809/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [edk2-devel] [PATCH v3 07/12] OvmfPkg: switch OvmfPkgIa32X64 to new shell include files
2024-02-22 10:13 [edk2-devel] [PATCH v3 00/12] OvmfPkg: tweak shell builds Gerd Hoffmann
` (5 preceding siblings ...)
2024-02-22 10:13 ` [edk2-devel] [PATCH v3 06/12] OvmfPkg: switch OvmfPkgIa32 to new shell include files Gerd Hoffmann
@ 2024-02-22 10:13 ` Gerd Hoffmann
2024-02-22 10:13 ` [edk2-devel] [PATCH v3 08/12] OvmfPkg: switch AmdSevX64 " Gerd Hoffmann
` (5 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Gerd Hoffmann @ 2024-02-22 10:13 UTC (permalink / raw)
To: devel
Cc: Michael Roth, Laszlo Ersek, Tom Lendacky, Min Xu, Jiewen Yao,
Gerd Hoffmann, Ard Biesheuvel, Erdem Aktas, Oliver Steffen,
Jiewen Yao
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
---
OvmfPkg/OvmfPkgIa32X64.dsc | 47 ++------------------------------------
OvmfPkg/OvmfPkgIa32X64.fdf | 11 ++-------
2 files changed, 4 insertions(+), 54 deletions(-)
diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc
index 5e9eee628aea..90b15dc27097 100644
--- a/OvmfPkg/OvmfPkgIa32X64.dsc
+++ b/OvmfPkg/OvmfPkgIa32X64.dsc
@@ -242,9 +242,6 @@ [LibraryClasses]
TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf
!endif
-!if $(BUILD_SHELL) == TRUE
- ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
-!endif
ShellCEntryLib|ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.inf
S3BootScriptLib|MdeModulePkg/Library/PiDxeS3BootScriptLib/DxeS3BootScriptLib.inf
@@ -252,6 +249,7 @@ [LibraryClasses]
OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.inf
!include OvmfPkg/Include/Dsc/OvmfTpmLibs.dsc.inc
+!include OvmfPkg/Include/Dsc/ShellLibs.dsc.inc
[LibraryClasses.common]
BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
@@ -888,48 +886,7 @@ [Components.X64]
MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf
MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf
-!if $(TOOL_CHAIN_TAG) != "XCODE5" && $(BUILD_SHELL) == TRUE
- ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf {
- <PcdsFixedAtBuild>
- gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
- }
- ShellPkg/DynamicCommand/HttpDynamicCommand/HttpDynamicCommand.inf {
- <PcdsFixedAtBuild>
- gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
- }
- ShellPkg/DynamicCommand/VariablePolicyDynamicCommand/VariablePolicyDynamicCommand.inf {
- <PcdsFixedAtBuild>
- gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
- }
- OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf {
- <PcdsFixedAtBuild>
- gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
- }
-!endif
-!if $(BUILD_SHELL) == TRUE
- ShellPkg/Application/Shell/Shell.inf {
- <LibraryClasses>
- ShellCommandLib|ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.inf
- NULL|ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.inf
- NULL|ShellPkg/Library/UefiShellLevel1CommandsLib/UefiShellLevel1CommandsLib.inf
- NULL|ShellPkg/Library/UefiShellLevel3CommandsLib/UefiShellLevel3CommandsLib.inf
- NULL|ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.inf
- NULL|ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf
- NULL|ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf
- NULL|ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.inf
-!if $(NETWORK_IP6_ENABLE) == TRUE
- NULL|ShellPkg/Library/UefiShellNetwork2CommandsLib/UefiShellNetwork2CommandsLib.inf
-!endif
- HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
- PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
- BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.inf
-
- <PcdsFixedAtBuild>
- gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0xFF
- gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
- gEfiMdePkgTokenSpaceGuid.PcdUefiLibMaxPrintBufferSize|8000
- }
-!endif
+!include OvmfPkg/Include/Dsc/ShellComponents.dsc.inc
!if $(SECURE_BOOT_ENABLE) == TRUE
SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf
diff --git a/OvmfPkg/OvmfPkgIa32X64.fdf b/OvmfPkg/OvmfPkgIa32X64.fdf
index 74cfb58f06cd..ee8068ad55dc 100644
--- a/OvmfPkg/OvmfPkgIa32X64.fdf
+++ b/OvmfPkg/OvmfPkgIa32X64.fdf
@@ -294,15 +294,6 @@ [FV.DXEFV]
INF MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf
INF OvmfPkg/VirtioFsDxe/VirtioFsDxe.inf
-!if $(BUILD_SHELL) == TRUE && $(TOOL_CHAIN_TAG) != "XCODE5"
-INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf
-INF ShellPkg/DynamicCommand/HttpDynamicCommand/HttpDynamicCommand.inf
-INF OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf
-!endif
-!if $(BUILD_SHELL) == TRUE
-INF ShellPkg/Application/Shell/Shell.inf
-!endif
-
INF MdeModulePkg/Logo/LogoDxe.inf
#
@@ -368,6 +359,8 @@ [FV.DXEFV]
#
!include OvmfPkg/Include/Fdf/OvmfTpmDxe.fdf.inc
+!include OvmfPkg/Include/Fdf/ShellDxe.fdf.inc
+
################################################################################
[FV.FVMAIN_COMPACT]
--
2.43.2
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#115789): https://edk2.groups.io/g/devel/message/115789
Mute This Topic: https://groups.io/mt/104505811/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [edk2-devel] [PATCH v3 08/12] OvmfPkg: switch AmdSevX64 to new shell include files
2024-02-22 10:13 [edk2-devel] [PATCH v3 00/12] OvmfPkg: tweak shell builds Gerd Hoffmann
` (6 preceding siblings ...)
2024-02-22 10:13 ` [edk2-devel] [PATCH v3 07/12] OvmfPkg: switch OvmfPkgIa32X64 " Gerd Hoffmann
@ 2024-02-22 10:13 ` Gerd Hoffmann
2024-02-22 10:13 ` [edk2-devel] [PATCH v3 09/12] OvmfPkg: switch IntelTdxX64 " Gerd Hoffmann
` (4 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Gerd Hoffmann @ 2024-02-22 10:13 UTC (permalink / raw)
To: devel
Cc: Michael Roth, Laszlo Ersek, Tom Lendacky, Min Xu, Jiewen Yao,
Gerd Hoffmann, Ard Biesheuvel, Erdem Aktas, Oliver Steffen,
Jiewen Yao
Note that AmdSevX64 is compiled without network support, so thanks to
the network conditionals in the include files the build result (network
shell commands excluded) should be identical before and after the patch.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
---
OvmfPkg/AmdSev/AmdSevX64.dsc | 30 ++----------------------------
OvmfPkg/AmdSev/AmdSevX64.fdf | 8 ++------
2 files changed, 4 insertions(+), 34 deletions(-)
diff --git a/OvmfPkg/AmdSev/AmdSevX64.dsc b/OvmfPkg/AmdSev/AmdSevX64.dsc
index a31a89344a60..60e916b4fd18 100644
--- a/OvmfPkg/AmdSev/AmdSevX64.dsc
+++ b/OvmfPkg/AmdSev/AmdSevX64.dsc
@@ -194,16 +194,14 @@ [LibraryClasses]
VariablePolicyHelperLib|MdeModulePkg/Library/VariablePolicyHelperLib/VariablePolicyHelperLib.inf
VariableFlashInfoLib|MdeModulePkg/Library/BaseVariableFlashInfoLib/BaseVariableFlashInfoLib.inf
-!if $(BUILD_SHELL) == TRUE
- ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
ShellCEntryLib|ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.inf
-!endif
SmbusLib|MdePkg/Library/BaseSmbusLibNull/BaseSmbusLibNull.inf
OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.inf
S3BootScriptLib|MdeModulePkg/Library/PiDxeS3BootScriptLib/DxeS3BootScriptLib.inf
!include OvmfPkg/Include/Dsc/OvmfTpmLibs.dsc.inc
+!include OvmfPkg/Include/Dsc/ShellLibs.dsc.inc
[LibraryClasses.common]
BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
@@ -729,34 +727,10 @@ [Components]
MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf
MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf
-!if $(TOOL_CHAIN_TAG) != "XCODE5" && $(BUILD_SHELL) == TRUE
- OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf {
- <PcdsFixedAtBuild>
- gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
- }
-!endif
OvmfPkg/AmdSev/SecretDxe/SecretDxe.inf
OvmfPkg/AmdSev/Grub/Grub.inf
-!if $(BUILD_SHELL) == TRUE
- ShellPkg/Application/Shell/Shell.inf {
- <LibraryClasses>
- ShellCommandLib|ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.inf
- NULL|ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.inf
- NULL|ShellPkg/Library/UefiShellLevel1CommandsLib/UefiShellLevel1CommandsLib.inf
- NULL|ShellPkg/Library/UefiShellLevel3CommandsLib/UefiShellLevel3CommandsLib.inf
- NULL|ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.inf
- NULL|ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf
- NULL|ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf
- HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
- PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
- BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.inf
- <PcdsFixedAtBuild>
- gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0xFF
- gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
- gEfiMdePkgTokenSpaceGuid.PcdUefiLibMaxPrintBufferSize|8000
- }
-!endif
+!include OvmfPkg/Include/Dsc/ShellComponents.dsc.inc
OvmfPkg/PlatformDxe/Platform.inf
OvmfPkg/AmdSevDxe/AmdSevDxe.inf {
diff --git a/OvmfPkg/AmdSev/AmdSevX64.fdf b/OvmfPkg/AmdSev/AmdSevX64.fdf
index 9dd409596780..b84981e7ba04 100644
--- a/OvmfPkg/AmdSev/AmdSevX64.fdf
+++ b/OvmfPkg/AmdSev/AmdSevX64.fdf
@@ -277,14 +277,8 @@ [FV.DXEFV]
INF FatPkg/EnhancedFatDxe/Fat.inf
INF MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf
-!if $(TOOL_CHAIN_TAG) != "XCODE5" && $(BUILD_SHELL) == TRUE
-INF OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf
-!endif
INF OvmfPkg/AmdSev/SecretDxe/SecretDxe.inf
INF OvmfPkg/AmdSev/Grub/Grub.inf
-!if $(BUILD_SHELL) == TRUE
-INF ShellPkg/Application/Shell/Shell.inf
-!endif
INF MdeModulePkg/Logo/LogoDxe.inf
@@ -320,6 +314,8 @@ [FV.DXEFV]
#
!include OvmfPkg/Include/Fdf/OvmfTpmDxe.fdf.inc
+!include OvmfPkg/Include/Fdf/ShellDxe.fdf.inc
+
################################################################################
[FV.FVMAIN_COMPACT]
--
2.43.2
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#115791): https://edk2.groups.io/g/devel/message/115791
Mute This Topic: https://groups.io/mt/104505813/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [edk2-devel] [PATCH v3 09/12] OvmfPkg: switch IntelTdxX64 to new shell include files
2024-02-22 10:13 [edk2-devel] [PATCH v3 00/12] OvmfPkg: tweak shell builds Gerd Hoffmann
` (7 preceding siblings ...)
2024-02-22 10:13 ` [edk2-devel] [PATCH v3 08/12] OvmfPkg: switch AmdSevX64 " Gerd Hoffmann
@ 2024-02-22 10:13 ` Gerd Hoffmann
2024-02-22 10:13 ` [edk2-devel] [PATCH v3 10/12] OvmfPkg: switch MicrovmX64 " Gerd Hoffmann
` (3 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Gerd Hoffmann @ 2024-02-22 10:13 UTC (permalink / raw)
To: devel
Cc: Michael Roth, Laszlo Ersek, Tom Lendacky, Min Xu, Jiewen Yao,
Gerd Hoffmann, Ard Biesheuvel, Erdem Aktas, Oliver Steffen,
Jiewen Yao
Note that IntelTdxX64 is compiled without network support, so thanks to
the network conditionals in the include files the build result (network
shell commands excluded) should be identical before and after the patch.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
---
OvmfPkg/IntelTdx/IntelTdxX64.dsc | 32 +++-----------------------------
OvmfPkg/IntelTdx/IntelTdxX64.fdf | 9 ++-------
2 files changed, 5 insertions(+), 36 deletions(-)
diff --git a/OvmfPkg/IntelTdx/IntelTdxX64.dsc b/OvmfPkg/IntelTdx/IntelTdxX64.dsc
index 82e3e41cfc57..7a767324ffda 100644
--- a/OvmfPkg/IntelTdx/IntelTdxX64.dsc
+++ b/OvmfPkg/IntelTdx/IntelTdxX64.dsc
@@ -201,9 +201,6 @@ [LibraryClasses]
VariablePolicyHelperLib|MdeModulePkg/Library/VariablePolicyHelperLib/VariablePolicyHelperLib.inf
VariableFlashInfoLib|MdeModulePkg/Library/BaseVariableFlashInfoLib/BaseVariableFlashInfoLib.inf
-!if $(BUILD_SHELL) == TRUE
- ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
-!endif
ShellCEntryLib|ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.inf
S3BootScriptLib|MdeModulePkg/Library/PiDxeS3BootScriptLib/DxeS3BootScriptLib.inf
SmbusLib|MdePkg/Library/BaseSmbusLibNull/BaseSmbusLibNull.inf
@@ -212,6 +209,8 @@ [LibraryClasses]
Tcg2PhysicalPresenceLib|OvmfPkg/Library/Tcg2PhysicalPresenceLibNull/DxeTcg2PhysicalPresenceLib.inf
TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.inf
+!include OvmfPkg/Include/Dsc/ShellLibs.dsc.inc
+
[LibraryClasses.common]
BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
CcExitLib|OvmfPkg/Library/CcExitLib/CcExitLib.inf
@@ -717,32 +716,7 @@ [Components]
MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf
MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf
-!if $(TOOL_CHAIN_TAG) != "XCODE5" && $(BUILD_SHELL) == TRUE
- OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf {
- <PcdsFixedAtBuild>
- gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
- }
-!endif
-!if $(BUILD_SHELL) == TRUE
- ShellPkg/Application/Shell/Shell.inf {
- <LibraryClasses>
- ShellCommandLib|ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.inf
- NULL|ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.inf
- NULL|ShellPkg/Library/UefiShellLevel1CommandsLib/UefiShellLevel1CommandsLib.inf
- NULL|ShellPkg/Library/UefiShellLevel3CommandsLib/UefiShellLevel3CommandsLib.inf
- NULL|ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.inf
- NULL|ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf
- NULL|ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf
- HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
- PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
- BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.inf
-
- <PcdsFixedAtBuild>
- gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0xFF
- gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
- gEfiMdePkgTokenSpaceGuid.PcdUefiLibMaxPrintBufferSize|8000
- }
-!endif
+!include OvmfPkg/Include/Dsc/ShellComponents.dsc.inc
!if $(SECURE_BOOT_ENABLE) == TRUE
SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf
diff --git a/OvmfPkg/IntelTdx/IntelTdxX64.fdf b/OvmfPkg/IntelTdx/IntelTdxX64.fdf
index e844a0988d68..f3b5126254c6 100644
--- a/OvmfPkg/IntelTdx/IntelTdxX64.fdf
+++ b/OvmfPkg/IntelTdx/IntelTdxX64.fdf
@@ -307,13 +307,6 @@ [FV.NCCFV]
INF MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf
INF OvmfPkg/VirtioFsDxe/VirtioFsDxe.inf
-!if $(BUILD_SHELL) == TRUE && $(TOOL_CHAIN_TAG) != "XCODE5"
-INF OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf
-!endif
-!if $(BUILD_SHELL) == TRUE
-INF ShellPkg/Application/Shell/Shell.inf
-!endif
-
INF MdeModulePkg/Logo/LogoDxe.inf
#
@@ -332,6 +325,8 @@ [FV.NCCFV]
INF OvmfPkg/VirtioGpuDxe/VirtioGpu.inf
INF OvmfPkg/PlatformDxe/Platform.inf
+!include OvmfPkg/Include/Fdf/ShellDxe.fdf.inc
+
################################################################################
[FV.FVMAIN_COMPACT]
--
2.43.2
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#115793): https://edk2.groups.io/g/devel/message/115793
Mute This Topic: https://groups.io/mt/104505815/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [edk2-devel] [PATCH v3 10/12] OvmfPkg: switch MicrovmX64 to new shell include files
2024-02-22 10:13 [edk2-devel] [PATCH v3 00/12] OvmfPkg: tweak shell builds Gerd Hoffmann
` (8 preceding siblings ...)
2024-02-22 10:13 ` [edk2-devel] [PATCH v3 09/12] OvmfPkg: switch IntelTdxX64 " Gerd Hoffmann
@ 2024-02-22 10:13 ` Gerd Hoffmann
2024-02-22 10:13 ` [edk2-devel] [PATCH v3 11/12] OvmfPkg/CI: copy shell to virtual drive Gerd Hoffmann
` (2 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Gerd Hoffmann @ 2024-02-22 10:13 UTC (permalink / raw)
To: devel
Cc: Michael Roth, Laszlo Ersek, Tom Lendacky, Min Xu, Jiewen Yao,
Gerd Hoffmann, Ard Biesheuvel, Erdem Aktas, Oliver Steffen,
Jiewen Yao
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
---
OvmfPkg/Microvm/MicrovmX64.dsc | 49 ++++++----------------------------
OvmfPkg/Microvm/MicrovmX64.fdf | 9 ++-----
2 files changed, 10 insertions(+), 48 deletions(-)
diff --git a/OvmfPkg/Microvm/MicrovmX64.dsc b/OvmfPkg/Microvm/MicrovmX64.dsc
index 063324cd0572..2c6bb83beb85 100644
--- a/OvmfPkg/Microvm/MicrovmX64.dsc
+++ b/OvmfPkg/Microvm/MicrovmX64.dsc
@@ -33,6 +33,11 @@ [Defines]
DEFINE SMM_REQUIRE = FALSE
DEFINE SOURCE_DEBUG_ENABLE = FALSE
+ #
+ # Shell can be useful for debugging but should not be enabled for production
+ #
+ DEFINE BUILD_SHELL = TRUE
+
#
# Network definition
#
@@ -230,7 +235,6 @@ [LibraryClasses]
TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf
!endif
- ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
ShellCEntryLib|ShellPkg/Library/UefiShellCEntryLib/UefiShellCEntryLib.inf
S3BootScriptLib|MdeModulePkg/Library/PiDxeS3BootScriptLib/DxeS3BootScriptLib.inf
SmbusLib|MdePkg/Library/BaseSmbusLibNull/BaseSmbusLibNull.inf
@@ -239,6 +243,8 @@ [LibraryClasses]
Tcg2PhysicalPresenceLib|OvmfPkg/Library/Tcg2PhysicalPresenceLibNull/DxeTcg2PhysicalPresenceLib.inf
TpmMeasurementLib|MdeModulePkg/Library/TpmMeasurementLibNull/TpmMeasurementLibNull.inf
+!include OvmfPkg/Include/Dsc/ShellLibs.dsc.inc
+
[LibraryClasses.common]
BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
CcExitLib|OvmfPkg/Library/CcExitLib/CcExitLib.inf
@@ -837,46 +843,7 @@ [Components]
MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf
MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf
-!if $(TOOL_CHAIN_TAG) != "XCODE5"
- ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf {
- <PcdsFixedAtBuild>
- gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
- }
- ShellPkg/DynamicCommand/HttpDynamicCommand/HttpDynamicCommand.inf {
- <PcdsFixedAtBuild>
- gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
- }
- ShellPkg/DynamicCommand/VariablePolicyDynamicCommand/VariablePolicyDynamicCommand.inf {
- <PcdsFixedAtBuild>
- gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
- }
- OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf {
- <PcdsFixedAtBuild>
- gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
- }
-!endif
- ShellPkg/Application/Shell/Shell.inf {
- <LibraryClasses>
- ShellCommandLib|ShellPkg/Library/UefiShellCommandLib/UefiShellCommandLib.inf
- NULL|ShellPkg/Library/UefiShellLevel2CommandsLib/UefiShellLevel2CommandsLib.inf
- NULL|ShellPkg/Library/UefiShellLevel1CommandsLib/UefiShellLevel1CommandsLib.inf
- NULL|ShellPkg/Library/UefiShellLevel3CommandsLib/UefiShellLevel3CommandsLib.inf
- NULL|ShellPkg/Library/UefiShellDriver1CommandsLib/UefiShellDriver1CommandsLib.inf
- NULL|ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf
- NULL|ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf
- NULL|ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.inf
-!if $(NETWORK_IP6_ENABLE) == TRUE
- NULL|ShellPkg/Library/UefiShellNetwork2CommandsLib/UefiShellNetwork2CommandsLib.inf
-!endif
- HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf
- PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
- BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.inf
-
- <PcdsFixedAtBuild>
- gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0xFF
- gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
- gEfiMdePkgTokenSpaceGuid.PcdUefiLibMaxPrintBufferSize|8000
- }
+!include OvmfPkg/Include/Dsc/ShellComponents.dsc.inc
!if $(SECURE_BOOT_ENABLE) == TRUE
SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf
diff --git a/OvmfPkg/Microvm/MicrovmX64.fdf b/OvmfPkg/Microvm/MicrovmX64.fdf
index c877b3f088f9..825bf9f5e41f 100644
--- a/OvmfPkg/Microvm/MicrovmX64.fdf
+++ b/OvmfPkg/Microvm/MicrovmX64.fdf
@@ -257,13 +257,6 @@ [FV.DXEFV]
INF EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.inf
INF OvmfPkg/Fdt/VirtioFdtDxe/VirtioFdtDxe.inf
-!if $(TOOL_CHAIN_TAG) != "XCODE5"
-INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf
-INF ShellPkg/DynamicCommand/HttpDynamicCommand/HttpDynamicCommand.inf
-INF OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf
-!endif
-INF ShellPkg/Application/Shell/Shell.inf
-
INF MdeModulePkg/Logo/LogoDxe.inf
#
@@ -302,6 +295,8 @@ [FV.DXEFV]
INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf
INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
+!include OvmfPkg/Include/Fdf/ShellDxe.fdf.inc
+
################################################################################
[FV.FVMAIN_COMPACT]
--
2.43.2
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#115790): https://edk2.groups.io/g/devel/message/115790
Mute This Topic: https://groups.io/mt/104505812/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [edk2-devel] [PATCH v3 11/12] OvmfPkg/CI: copy shell to virtual drive
2024-02-22 10:13 [edk2-devel] [PATCH v3 00/12] OvmfPkg: tweak shell builds Gerd Hoffmann
` (9 preceding siblings ...)
2024-02-22 10:13 ` [edk2-devel] [PATCH v3 10/12] OvmfPkg: switch MicrovmX64 " Gerd Hoffmann
@ 2024-02-22 10:13 ` Gerd Hoffmann
2024-02-22 10:13 ` [edk2-devel] [PATCH v3 12/12] OvmfPkg: only add shell to FV in case secure boot is disabled Gerd Hoffmann
2024-02-25 17:50 ` [edk2-devel] [PATCH v3 00/12] OvmfPkg: tweak shell builds Laszlo Ersek
12 siblings, 0 replies; 14+ messages in thread
From: Gerd Hoffmann @ 2024-02-22 10:13 UTC (permalink / raw)
To: devel
Cc: Michael Roth, Laszlo Ersek, Tom Lendacky, Min Xu, Jiewen Yao,
Gerd Hoffmann, Ard Biesheuvel, Erdem Aktas, Oliver Steffen,
Jiewen Yao
Place the EFI shell as EFI/BOOT/BOOT{ARCH}.EFI on the virtual drive.
This allows the "run to shell" CI test case to work even in case the
shell is not included in the firmware image.
This is needed because an followup patch will exclude the shell from
secure boot enabled firmware images.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
---
OvmfPkg/PlatformCI/PlatformBuildLib.py | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/OvmfPkg/PlatformCI/PlatformBuildLib.py b/OvmfPkg/PlatformCI/PlatformBuildLib.py
index f829738cdda4..00d454954bff 100644
--- a/OvmfPkg/PlatformCI/PlatformBuildLib.py
+++ b/OvmfPkg/PlatformCI/PlatformBuildLib.py
@@ -5,6 +5,7 @@
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
import os
+import shutil
import logging
import io
@@ -181,7 +182,8 @@ class PlatformBuilder( UefiBuilder, BuildSettingsManager):
def FlashRomImage(self):
VirtualDrive = os.path.join(self.env.GetValue("BUILD_OUTPUT_BASE"), "VirtualDrive")
- os.makedirs(VirtualDrive, exist_ok=True)
+ VirtualDriveBoot = os.path.join(VirtualDrive, "EFI", "BOOT")
+ os.makedirs(VirtualDriveBoot, exist_ok=True)
OutputPath_FV = os.path.join(self.env.GetValue("BUILD_OUTPUT_BASE"), "FV")
if (self.env.GetValue("QEMU_SKIP") and
@@ -189,6 +191,14 @@ class PlatformBuilder( UefiBuilder, BuildSettingsManager):
logging.info("skipping qemu boot test")
return 0
+ # copy shell to VirtualDrive
+ for arch in self.env.GetValue("TARGET_ARCH").split():
+ src = os.path.join(self.env.GetValue("BUILD_OUTPUT_BASE"), arch, "Shell.efi")
+ dst = os.path.join(VirtualDriveBoot, f'BOOT{arch}.EFI')
+ if os.path.exists(src):
+ logging.info("copy %s -> %s", src, dst)
+ shutil.copyfile(src, dst)
+
#
# QEMU must be on the path
#
--
2.43.2
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#115792): https://edk2.groups.io/g/devel/message/115792
Mute This Topic: https://groups.io/mt/104505814/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [edk2-devel] [PATCH v3 12/12] OvmfPkg: only add shell to FV in case secure boot is disabled
2024-02-22 10:13 [edk2-devel] [PATCH v3 00/12] OvmfPkg: tweak shell builds Gerd Hoffmann
` (10 preceding siblings ...)
2024-02-22 10:13 ` [edk2-devel] [PATCH v3 11/12] OvmfPkg/CI: copy shell to virtual drive Gerd Hoffmann
@ 2024-02-22 10:13 ` Gerd Hoffmann
2024-02-25 17:50 ` [edk2-devel] [PATCH v3 00/12] OvmfPkg: tweak shell builds Laszlo Ersek
12 siblings, 0 replies; 14+ messages in thread
From: Gerd Hoffmann @ 2024-02-22 10:13 UTC (permalink / raw)
To: devel
Cc: Michael Roth, Laszlo Ersek, Tom Lendacky, Min Xu, Jiewen Yao,
Gerd Hoffmann, Ard Biesheuvel, Erdem Aktas, Oliver Steffen,
Jiewen Yao
The EFI Shell allows to bypass secure boot, do not allow
to include the shell in the firmware images of secure boot
enabled builds.
This prevents misconfigured downstream builds.
Ref: https://bugs.launchpad.net/ubuntu/+source/edk2/+bug/2040137
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4641
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
---
OvmfPkg/Include/Fdf/ShellDxe.fdf.inc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/OvmfPkg/Include/Fdf/ShellDxe.fdf.inc b/OvmfPkg/Include/Fdf/ShellDxe.fdf.inc
index 3081ac41780a..38f69747b02c 100644
--- a/OvmfPkg/Include/Fdf/ShellDxe.fdf.inc
+++ b/OvmfPkg/Include/Fdf/ShellDxe.fdf.inc
@@ -2,7 +2,7 @@
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
-!if $(BUILD_SHELL) == TRUE
+!if $(BUILD_SHELL) == TRUE && $(SECURE_BOOT_ENABLE) == FALSE
!if $(TOOL_CHAIN_TAG) != "XCODE5"
!if $(NETWORK_ENABLE) == TRUE
--
2.43.2
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#115794): https://edk2.groups.io/g/devel/message/115794
Mute This Topic: https://groups.io/mt/104505816/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [edk2-devel] [PATCH v3 00/12] OvmfPkg: tweak shell builds
2024-02-22 10:13 [edk2-devel] [PATCH v3 00/12] OvmfPkg: tweak shell builds Gerd Hoffmann
` (11 preceding siblings ...)
2024-02-22 10:13 ` [edk2-devel] [PATCH v3 12/12] OvmfPkg: only add shell to FV in case secure boot is disabled Gerd Hoffmann
@ 2024-02-25 17:50 ` Laszlo Ersek
12 siblings, 0 replies; 14+ messages in thread
From: Laszlo Ersek @ 2024-02-25 17:50 UTC (permalink / raw)
To: devel, kraxel
Cc: Michael Roth, Tom Lendacky, Min Xu, Jiewen Yao, Ard Biesheuvel,
Erdem Aktas, Oliver Steffen
On 2/22/24 11:13, Gerd Hoffmann wrote:
> - Create include files to reduce duplication.
> - Fix varpolicy command.
> - Little CI tweak.
>
> v3:
> - pick up review and ack tags.
> - no functional changes.
> v2:
> - do not move ShellCEntryLib to include file.
> - refine network config conditionals.
> - improve some commit messages.
> - add patch to drop the shell from secure boot builds.
>
> Gerd Hoffmann (12):
> OvmfPkg: add ShellComponents.dsc.inc
> OvmfPkg: add ShellLibs.dsc.inc
> OvmfPkg: add ShellDxe.fdf.inc
> OvmfPkg: Shell*.inc: allow building without network support
> OvmfPkg: ShellDxe.fdf.inc: add VariablePolicyDynamicCommand to FV
> OvmfPkg: switch OvmfPkgIa32 to new shell include files
> OvmfPkg: switch OvmfPkgIa32X64 to new shell include files
> OvmfPkg: switch AmdSevX64 to new shell include files
> OvmfPkg: switch IntelTdxX64 to new shell include files
> OvmfPkg: switch MicrovmX64 to new shell include files
> OvmfPkg/CI: copy shell to virtual drive
> OvmfPkg: only add shell to FV in case secure boot is disabled
>
> OvmfPkg/Include/Dsc/ShellComponents.dsc.inc | 55 +++++++++++++++++++++
> OvmfPkg/Include/Dsc/ShellLibs.dsc.inc | 10 ++++
> OvmfPkg/AmdSev/AmdSevX64.dsc | 30 +----------
> OvmfPkg/IntelTdx/IntelTdxX64.dsc | 32 ++----------
> OvmfPkg/Microvm/MicrovmX64.dsc | 49 +++---------------
> OvmfPkg/OvmfPkgIa32.dsc | 47 +-----------------
> OvmfPkg/OvmfPkgIa32X64.dsc | 47 +-----------------
> OvmfPkg/OvmfPkgX64.dsc | 47 +-----------------
> OvmfPkg/AmdSev/AmdSevX64.fdf | 8 +--
> OvmfPkg/IntelTdx/IntelTdxX64.fdf | 9 +---
> OvmfPkg/Microvm/MicrovmX64.fdf | 9 +---
> OvmfPkg/OvmfPkgIa32.fdf | 11 +----
> OvmfPkg/OvmfPkgIa32X64.fdf | 11 +----
> OvmfPkg/OvmfPkgX64.fdf | 11 +----
> OvmfPkg/Include/Fdf/ShellDxe.fdf.inc | 17 +++++++
> OvmfPkg/PlatformCI/PlatformBuildLib.py | 12 ++++-
> 16 files changed, 124 insertions(+), 281 deletions(-)
> create mode 100644 OvmfPkg/Include/Dsc/ShellComponents.dsc.inc
> create mode 100644 OvmfPkg/Include/Dsc/ShellLibs.dsc.inc
> create mode 100644 OvmfPkg/Include/Fdf/ShellDxe.fdf.inc
>
Merged as commit range 7fa4a984c438..f881b4d12960, via
<https://github.com/tianocore/edk2/pull/5406>.
Thanks!
Laszlo
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#115934): https://edk2.groups.io/g/devel/message/115934
Mute This Topic: https://groups.io/mt/104505803/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 14+ messages in thread