ArmVirtPkg/ArmVirtQemu: enable the IPv6 stack
authorLaszlo Ersek <lersek@redhat.com>
Thu, 12 Jul 2018 23:41:12 +0000 (01:41 +0200)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Fri, 13 Jul 2018 06:40:32 +0000 (08:40 +0200)
Add the IPv6 stack to ArmVirtQemu with a cumulative port of the following
OvmfPkg commits:

36c6413f76e5 "OvmfPkg: enable the IPv6 support", 2014-12-19

96302b80d90e "OvmfPkg: Enable Network2 Shell Commands for IPv6",
               2016-03-08

6d0f8941bdc2 "OvmfPkg: always resolve OpenSslLib, IntrinsicLib and
               BaseCryptLib", 2017-01-17

32e22f20c985 "OvmfPkg: correct the IScsiDxe module included for the IPv6
               stack", 2017-01-17

The IPv6-enabled IScsiDxe driver depends on BaseCryptLib, and the
"CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf" instance depends on
IntrinsicLib and OpensslLib. This is why commit 6d0f8941bdc2 is relevant.

However, unlike in OvmfPkg, in ArmVirtPkg we'll precisely track the
firmware features that require these library classes. (The OvmfPkg
discussion was quite complex, and the OvmfPkg solution was a compromise:
<http://mid.mail-archive.com/1484569332-13440-1-git-send-email-jiaxin.wu@intel.com>.)

The ArmVirtXen platform is not extended with the relevant drivers because
currently it doesn't include any networking support.

Cc: Julien Grall <julien.grall@linaro.org>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1007
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
ArmVirtPkg/ArmVirt.dsc.inc
ArmVirtPkg/ArmVirtQemu.dsc
ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc
ArmVirtPkg/ArmVirtQemuKernel.dsc

index 76c400a..8bb54c5 100644 (file)
@@ -80,6 +80,9 @@
   DpcLib|MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf\r
   UdpIoLib|MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf\r
   IpIoLib|MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf\r
+!if $(NETWORK_IP6_ENABLE) == TRUE\r
+  TcpIoLib|MdeModulePkg/Library/DxeTcpIoLib/DxeTcpIoLib.inf\r
+!endif\r
 !if $(HTTP_BOOT_ENABLE) == TRUE\r
   HttpLib|MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.inf\r
 !endif\r
   XenIoMmioLib|OvmfPkg/Library/XenIoMmioLib/XenIoMmioLib.inf\r
 \r
   #\r
-  # Secure Boot dependencies\r
+  # CryptoPkg libraries needed by multiple firmware features\r
   #\r
-!if $(SECURE_BOOT_ENABLE) == TRUE\r
+!if ($(SECURE_BOOT_ENABLE) == TRUE) || ($(NETWORK_IP6_ENABLE) == TRUE)\r
   IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf\r
   OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf\r
+  BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf\r
+!endif\r
+\r
+  #\r
+  # Secure Boot dependencies\r
+  #\r
+!if $(SECURE_BOOT_ENABLE) == TRUE\r
   TpmMeasurementLib|SecurityPkg/Library/DxeTpmMeasurementLib/DxeTpmMeasurementLib.inf\r
   AuthVariableLib|SecurityPkg/Library/AuthVariableLib/AuthVariableLib.inf\r
-  BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf\r
 \r
   # re-use the UserPhysicalPresent() dummy implementation from the ovmf tree\r
   PlatformSecureLib|OvmfPkg/Library/PlatformSecureLib/PlatformSecureLib.inf\r
       NULL|ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf\r
       NULL|ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf\r
       NULL|ShellPkg/Library/UefiShellNetwork1CommandsLib/UefiShellNetwork1CommandsLib.inf\r
+!if $(NETWORK_IP6_ENABLE) == TRUE\r
+      NULL|ShellPkg/Library/UefiShellNetwork2CommandsLib/UefiShellNetwork2CommandsLib.inf\r
+!endif\r
       HandleParsingLib|ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf\r
       PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf\r
       BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.inf\r
index 742df36..885c6b1 100644 (file)
@@ -34,6 +34,7 @@
   # -D FLAG=VALUE\r
   #\r
   DEFINE SECURE_BOOT_ENABLE      = FALSE\r
+  DEFINE NETWORK_IP6_ENABLE      = FALSE\r
   DEFINE HTTP_BOOT_ENABLE        = FALSE\r
 \r
 !include ArmVirtPkg/ArmVirt.dsc.inc\r
   MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf\r
   MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf\r
   MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf\r
-  MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf\r
   MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf\r
+!if $(NETWORK_IP6_ENABLE) == TRUE\r
+  NetworkPkg/Ip6Dxe/Ip6Dxe.inf\r
+  NetworkPkg/TcpDxe/TcpDxe.inf\r
+  NetworkPkg/Udp6Dxe/Udp6Dxe.inf\r
+  NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf\r
+  NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf\r
+  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf\r
+  NetworkPkg/IScsiDxe/IScsiDxe.inf\r
+!else\r
+  MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf\r
   MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf\r
   MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf\r
+!endif\r
 !if $(HTTP_BOOT_ENABLE) == TRUE\r
   NetworkPkg/DnsDxe/DnsDxe.inf\r
   NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.inf\r
index 63a202c..a6390bd 100644 (file)
@@ -125,10 +125,20 @@ READ_LOCK_STATUS   = TRUE
   INF MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf\r
   INF MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf\r
   INF MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf\r
-  INF MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf\r
   INF MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf\r
+!if $(NETWORK_IP6_ENABLE) == TRUE\r
+  INF NetworkPkg/Ip6Dxe/Ip6Dxe.inf\r
+  INF NetworkPkg/TcpDxe/TcpDxe.inf\r
+  INF NetworkPkg/Udp6Dxe/Udp6Dxe.inf\r
+  INF NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf\r
+  INF NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf\r
+  INF NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf\r
+  INF NetworkPkg/IScsiDxe/IScsiDxe.inf\r
+!else\r
+  INF MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf\r
   INF MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf\r
   INF MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf\r
+!endif\r
 !if $(HTTP_BOOT_ENABLE) == TRUE\r
   INF NetworkPkg/DnsDxe/DnsDxe.inf\r
   INF NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.inf\r
index 4ae61ec..434d686 100644 (file)
@@ -34,6 +34,7 @@
   # -D FLAG=VALUE\r
   #\r
   DEFINE SECURE_BOOT_ENABLE      = FALSE\r
+  DEFINE NETWORK_IP6_ENABLE      = FALSE\r
   DEFINE HTTP_BOOT_ENABLE        = FALSE\r
 \r
 !include ArmVirtPkg/ArmVirt.dsc.inc\r
   MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf\r
   MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf\r
   MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf\r
-  MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf\r
   MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf\r
+!if $(NETWORK_IP6_ENABLE) == TRUE\r
+  NetworkPkg/Ip6Dxe/Ip6Dxe.inf\r
+  NetworkPkg/TcpDxe/TcpDxe.inf\r
+  NetworkPkg/Udp6Dxe/Udp6Dxe.inf\r
+  NetworkPkg/Dhcp6Dxe/Dhcp6Dxe.inf\r
+  NetworkPkg/Mtftp6Dxe/Mtftp6Dxe.inf\r
+  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf\r
+  NetworkPkg/IScsiDxe/IScsiDxe.inf\r
+!else\r
+  MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf\r
   MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf\r
   MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf\r
+!endif\r
 !if $(HTTP_BOOT_ENABLE) == TRUE\r
   NetworkPkg/DnsDxe/DnsDxe.inf\r
   NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.inf\r