From: Leif Lindholm <leif.lindholm@linaro.org>
To: edk2-devel@lists.01.org
Cc: Andrew Fish <afish@apple.com>,
Michael D Kinney <michael.d.kinney@intel.com>,
Ard Biesheuvel <ard.biesheuvel@linaro.org>,
Laszlo Ersek <lersek@redhat.com>,
Jordan Justen <jordan.l.justen@intel.com>
Subject: [RFC 2/6] ArmVirtPkg: use ConfigPkg for common network items
Date: Wed, 20 Sep 2017 18:27:51 +0100 [thread overview]
Message-ID: <20170920172755.22767-3-leif.lindholm@linaro.org> (raw)
In-Reply-To: <20170920172755.22767-1-leif.lindholm@linaro.org>
Remove boilerplate from the QEMU platforms by including
ConfigPkg/Network/Network.{dsc|fdf}.inc.
As a side effect, this enables support for building in IPv6 support,
by specifying -D CONFIG_NETWORK_IP6_ENABLE=TRUE.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
---
ArmVirtPkg/ArmVirt.dsc.inc | 6 ------
ArmVirtPkg/ArmVirtQemu.dsc | 34 ++++------------------------------
ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc | 23 ++---------------------
ArmVirtPkg/ArmVirtQemuKernel.dsc | 34 ++++------------------------------
4 files changed, 10 insertions(+), 87 deletions(-)
diff --git a/ArmVirtPkg/ArmVirt.dsc.inc b/ArmVirtPkg/ArmVirt.dsc.inc
index c92a69281a..a9fdddcd6c 100644
--- a/ArmVirtPkg/ArmVirt.dsc.inc
+++ b/ArmVirtPkg/ArmVirt.dsc.inc
@@ -71,12 +71,6 @@
# use the accelerated BaseMemoryLibOptDxe by default, overrides for SEC/PEI below
BaseMemoryLib|MdePkg/Library/BaseMemoryLibOptDxe/BaseMemoryLibOptDxe.inf
- # Networking Requirements
- NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
- DpcLib|MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf
- UdpIoLib|MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf
- IpIoLib|MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf
-
#
# It is not possible to prevent the ARM compiler from inserting calls to intrinsic functions.
# This library provides the instrinsic functions such a compiler may generate calls to.
diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc
index 8a60b61f2a..71d3fb252f 100644
--- a/ArmVirtPkg/ArmVirtQemu.dsc
+++ b/ArmVirtPkg/ArmVirtQemu.dsc
@@ -33,10 +33,13 @@
# Defines for default states. These can be changed on the command line.
# -D FLAG=VALUE
#
+ DEFINE CONFIG_HTTP_BOOT_ENABLE = FALSE
+ DEFINE CONFIG_NETWORK_IP6_ENABLE = FALSE
+ DEFINE CONFIG_TLS_ENABLE = FALSE
DEFINE SECURE_BOOT_ENABLE = FALSE
- DEFINE HTTP_BOOT_ENABLE = FALSE
!include ArmVirtPkg/ArmVirt.dsc.inc
+!include ConfigPkg/Network/Network.dsc.inc
[LibraryClasses.common]
ArmLib|ArmPkg/Library/ArmLib/ArmBaseLib.inf
@@ -64,10 +67,6 @@
PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf
PciHostBridgeLib|ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf
-!if $(HTTP_BOOT_ENABLE) == TRUE
- HttpLib|MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.inf
-!endif
-
[LibraryClasses.common.UEFI_DRIVER]
UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf
@@ -129,10 +128,6 @@
#
gArmTokenSpaceGuid.PcdArmArchTimerFreqInHz|0
-!if $(HTTP_BOOT_ENABLE) == TRUE
- gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections|TRUE
-!endif
-
# System Memory Base -- fixed at 0x4000_0000
gArmTokenSpaceGuid.PcdSystemMemoryBase|0x40000000
@@ -334,27 +329,6 @@
}
#
- # Networking stack
- #
- MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf
- MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf
- MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf
- MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
- MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf
- MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
- MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
- MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
- MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
- MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
- MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
-!if $(HTTP_BOOT_ENABLE) == TRUE
- NetworkPkg/DnsDxe/DnsDxe.inf
- NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.inf
- NetworkPkg/HttpDxe/HttpDxe.inf
- NetworkPkg/HttpBootDxe/HttpBootDxe.inf
-!endif
-
- #
# SCSI Bus and Disk Driver
#
MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf
diff --git a/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc b/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc
index 744006d13c..504fdf5fa9 100644
--- a/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc
+++ b/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc
@@ -44,6 +44,8 @@ READ_STATUS = TRUE
READ_LOCK_CAP = TRUE
READ_LOCK_STATUS = TRUE
+!include ConfigPkg/Network/Network.fdf.inc
+
INF MdeModulePkg/Core/Dxe/DxeMain.inf
INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
INF ArmVirtPkg/VirtioFdtDxe/VirtioFdtDxe.inf
@@ -115,27 +117,6 @@ READ_LOCK_STATUS = TRUE
INF MdeModulePkg/Application/UiApp/UiApp.inf
#
- # Networking stack
- #
- INF MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf
- INF MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf
- INF MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf
- INF MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
- INF MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf
- INF MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
- INF MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
- INF MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
- INF MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
- INF MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
- INF MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
-!if $(HTTP_BOOT_ENABLE) == TRUE
- INF NetworkPkg/DnsDxe/DnsDxe.inf
- INF NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.inf
- INF NetworkPkg/HttpDxe/HttpDxe.inf
- INF NetworkPkg/HttpBootDxe/HttpBootDxe.inf
-!endif
-
- #
# SCSI Bus and Disk Driver
#
INF MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf
diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKernel.dsc
index 9a31ec93ca..db62c1d611 100644
--- a/ArmVirtPkg/ArmVirtQemuKernel.dsc
+++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc
@@ -33,10 +33,13 @@
# Defines for default states. These can be changed on the command line.
# -D FLAG=VALUE
#
+ DEFINE CONFIG_HTTP_BOOT_ENABLE = FALSE
+ DEFINE CONFIG_NETWORK_IP6_ENABLE = FALSE
+ DEFINE CONFIG_TLS_ENABLE = FALSE
DEFINE SECURE_BOOT_ENABLE = FALSE
- DEFINE HTTP_BOOT_ENABLE = FALSE
!include ArmVirtPkg/ArmVirt.dsc.inc
+!include ConfigPkg/Network/Network.dsc.inc
[LibraryClasses.common]
ArmLib|ArmPkg/Library/ArmLib/ArmBaseLib.inf
@@ -64,10 +67,6 @@
PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf
PciHostBridgeLib|ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf
-!if $(HTTP_BOOT_ENABLE) == TRUE
- HttpLib|MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.inf
-!endif
-
[LibraryClasses.common.UEFI_DRIVER]
UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf
@@ -134,10 +133,6 @@
#
gArmTokenSpaceGuid.PcdArmArchTimerFreqInHz|0
-!if $(HTTP_BOOT_ENABLE) == TRUE
- gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections|TRUE
-!endif
-
[PcdsPatchableInModule.common]
#
# This will be overridden in the code
@@ -325,27 +320,6 @@
}
#
- # Networking stack
- #
- MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf
- MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf
- MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf
- MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
- MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf
- MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
- MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
- MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
- MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
- MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
- MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
-!if $(HTTP_BOOT_ENABLE) == TRUE
- NetworkPkg/DnsDxe/DnsDxe.inf
- NetworkPkg/HttpUtilitiesDxe/HttpUtilitiesDxe.inf
- NetworkPkg/HttpDxe/HttpDxe.inf
- NetworkPkg/HttpBootDxe/HttpBootDxe.inf
-!endif
-
- #
# SCSI Bus and Disk Driver
#
MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf
--
2.11.0
next prev parent reply other threads:[~2017-09-20 17:24 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-20 17:27 [RFC 0/6] Create central repository for boilerplate configuration Leif Lindholm
2017-09-20 17:27 ` [RFC 1/6] ConfigPkg: add new package for holding common config fragments Leif Lindholm
2017-09-21 0:05 ` Ard Biesheuvel
2017-09-22 11:22 ` Laszlo Ersek
2017-09-20 17:27 ` Leif Lindholm [this message]
2017-09-20 17:27 ` [RFC 3/6] OvmfPkg: use ConfigPkg for common network items Leif Lindholm
2017-09-20 17:27 ` [RFC 4/6] ConfigPkg: add common Security settings Leif Lindholm
2017-09-20 17:27 ` [RFC 5/6] ArmVirtPkg: use ConfigPkg for common security items Leif Lindholm
2017-09-20 17:27 ` [RFC 6/6] OvmfPkg: " Leif Lindholm
2017-09-20 18:14 ` [RFC 0/6] Create central repository for boilerplate configuration Laszlo Ersek
2017-09-20 21:09 ` Leif Lindholm
2017-09-22 11:20 ` Laszlo Ersek
2017-09-23 16:58 ` Leif Lindholm
2017-09-25 5:27 ` Gao, Liming
2017-09-21 12:47 ` Yao, Jiewen
2017-09-21 13:21 ` Kirkendall, Garrett
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170920172755.22767-3-leif.lindholm@linaro.org \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox