Skip to content

Commit

Permalink
ArmVirtPkg: Include no network components with -D NETWORK_ENABLE=0
Browse files Browse the repository at this point in the history
This issue showed up when addressing
https://bugzilla.tianocore.org/show_bug.cgi?id=4829
in tianocore#6087 .

Various OvmfPkg and ArmVirtPkg platforms include some residual NetworkPkg
components when compiled with -D NETWORK_ENABLE=0, even though they use
NetworkPkg includes intended to allow all NetworkPkg components to be
disabled on this flag.

For the OvmfPkg Intel platforms only, commit
d933ec1 started
the change of not including these residual NetworkPkg
component, and commit
7f17a15 completed it.

This commit rolls these changes out to the ArmVirtPkg platforms where
they make sense in the same way.

Signed-off-by: Mike Beaton <[email protected]>
  • Loading branch information
mikebeaton committed Sep 11, 2024
1 parent 36e9e2b commit 9e1614e
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 10 deletions.
6 changes: 6 additions & 0 deletions ArmVirtPkg/ArmVirt.dsc.inc
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,7 @@
#
MdeModulePkg/Universal/Disk/RamDiskDxe/RamDiskDxe.inf

!if $(NETWORK_ENABLE) == TRUE
ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf {
<PcdsFixedAtBuild>
gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
Expand All @@ -401,6 +402,7 @@
<PcdsFixedAtBuild>
gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
}
!endif
ShellPkg/DynamicCommand/VariablePolicyDynamicCommand/VariablePolicyDynamicCommand.inf {
<PcdsFixedAtBuild>
gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
Expand All @@ -421,9 +423,13 @@
NULL|ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLib.inf
!endif
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
Expand Down
2 changes: 2 additions & 0 deletions ArmVirtPkg/ArmVirtCloudHv.fdf
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,10 @@ READ_LOCK_STATUS = TRUE
# UEFI application (Shell Embedded Boot Loader)
#
INF ShellPkg/Application/Shell/Shell.inf
!if $(NETWORK_ENABLE) == TRUE
INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf
INF ShellPkg/DynamicCommand/HttpDynamicCommand/HttpDynamicCommand.inf
!endif
INF ShellPkg/DynamicCommand/VariablePolicyDynamicCommand/VariablePolicyDynamicCommand.inf
INF OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf

Expand Down
2 changes: 2 additions & 0 deletions ArmVirtPkg/ArmVirtKvmTool.fdf
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,9 @@ READ_LOCK_STATUS = TRUE
INF OvmfPkg/VirtioRngDxe/VirtioRng.inf

INF ShellPkg/Application/Shell/Shell.inf
!if $(NETWORK_ENABLE) == TRUE
INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf
!endif

#
# Bds
Expand Down
12 changes: 7 additions & 5 deletions ArmVirtPkg/ArmVirtQemu.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -502,16 +502,18 @@
#
!include NetworkPkg/NetworkComponents.dsc.inc

!if $(NETWORK_ENABLE) == TRUE
NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf {
<LibraryClasses>
NULL|OvmfPkg/Library/PxeBcPcdProducerLib/PxeBcPcdProducerLib.inf
}

!if $(NETWORK_TLS_ENABLE) == TRUE
NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf {
<LibraryClasses>
NULL|OvmfPkg/Library/TlsAuthConfigLib/TlsAuthConfigLib.inf
}
!if $(NETWORK_TLS_ENABLE) == TRUE
NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf {
<LibraryClasses>
NULL|OvmfPkg/Library/TlsAuthConfigLib/TlsAuthConfigLib.inf
}
!endif
!endif

#
Expand Down
2 changes: 2 additions & 0 deletions ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,10 @@ READ_LOCK_STATUS = TRUE
INF OvmfPkg/VirtioSerialDxe/VirtioSerial.inf

INF ShellPkg/Application/Shell/Shell.inf
!if $(NETWORK_ENABLE) == TRUE
INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf
INF ShellPkg/DynamicCommand/HttpDynamicCommand/HttpDynamicCommand.inf
!endif
INF ShellPkg/DynamicCommand/VariablePolicyDynamicCommand/VariablePolicyDynamicCommand.inf
INF OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf

Expand Down
12 changes: 7 additions & 5 deletions ArmVirtPkg/ArmVirtQemuKernel.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -410,16 +410,18 @@
#
!include NetworkPkg/NetworkComponents.dsc.inc

!if $(NETWORK_ENABLE) == TRUE
NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf {
<LibraryClasses>
NULL|OvmfPkg/Library/PxeBcPcdProducerLib/PxeBcPcdProducerLib.inf
}

!if $(NETWORK_TLS_ENABLE) == TRUE
NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf {
<LibraryClasses>
NULL|OvmfPkg/Library/TlsAuthConfigLib/TlsAuthConfigLib.inf
}
!if $(NETWORK_TLS_ENABLE) == TRUE
NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf {
<LibraryClasses>
NULL|OvmfPkg/Library/TlsAuthConfigLib/TlsAuthConfigLib.inf
}
!endif
!endif

#
Expand Down
2 changes: 2 additions & 0 deletions ArmVirtPkg/ArmVirtXen.fdf
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,10 @@ READ_LOCK_STATUS = TRUE
INF MdeModulePkg/Universal/Disk/UdfDxe/UdfDxe.inf

INF ShellPkg/Application/Shell/Shell.inf
!if $(NETWORK_ENABLE) == TRUE
INF ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf
INF ShellPkg/DynamicCommand/HttpDynamicCommand/HttpDynamicCommand.inf
!endif
INF ShellPkg/DynamicCommand/VariablePolicyDynamicCommand/VariablePolicyDynamicCommand.inf
INF OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.inf

Expand Down

0 comments on commit 9e1614e

Please sign in to comment.