diff mbox

[edk2,PATCHv2,2/5] ArmPlatformPkg: Add conditional inclusion of Lan91x ethernet support

Message ID 1422557102-2921-3-git-send-email-fu.wei@linaro.org
State New
Headers show

Commit Message

Fu Wei Fu Jan. 29, 2015, 6:44 p.m. UTC
From: Leif Lindholm <leif.lindholm@linaro.org>

This patch adds support for including the SMSC LAN 91C111 driver support
(as provided by the ARM Ltd. software models) by specifying the
EDK2_ENABLE_SMSC_91X build variable.
If build with "-D EDK2_ENABLE_SMSC_91X=1" , the driver will be added.

A per-platform addition to the .fdf is also required to actually include
the driver, and network protocol support, in the produced image.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
[submitting patch upstream]
Signed-off-by: Fu Wei <fu.wei@linaro.org>
---
 .../ArmVExpressPkg/ArmVExpress-networking.fdf.inc  | 28 ++++++++++++++++++++++
 ArmPlatformPkg/ArmVExpressPkg/ArmVExpress.dsc.inc  |  9 +++++++
 2 files changed, 37 insertions(+)
diff mbox

Patch

diff --git a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-networking.fdf.inc b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-networking.fdf.inc
new file mode 100644
index 0000000..3b6d161
--- /dev/null
+++ b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-networking.fdf.inc
@@ -0,0 +1,28 @@ 
+#
+#  Copyright (c) 2012-2014, ARM Limited. All rights reserved.
+#
+#  This program and the accompanying materials
+#  are licensed and made available under the terms and conditions
+#  of the BSD License which accompanies this distribution.
+#  The full text of the license may be found at
+#  http://opensource.org/licenses/bsd-license.php
+#
+#  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+
+  #
+  # 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/Ip4ConfigDxe/Ip4ConfigDxe.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
diff --git a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress.dsc.inc b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress.dsc.inc
index ddc796d..e2e5d7d 100644
--- a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress.dsc.inc
+++ b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress.dsc.inc
@@ -377,6 +377,11 @@ 
   # Shell.
   gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
 
+!if $(EDK2_ENABLE_SMSC_91X) == 1
+  # Ethernet (SMSC 91C111)
+  gEmbeddedTokenSpaceGuid.PcdLan91xDxeBaseAddress|0x1A000000
+!endif
+
 [Components.common]
   # Versatile Express FileSystem
   ArmPlatformPkg/FileSystem/BootMonFs/BootMonFs.inf
@@ -396,6 +401,10 @@ 
   MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
   MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
   MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
+!if $(EDK2_ENABLE_SMSC_91X) == 1
+# SMSC LAN 91C111
+  EmbeddedPkg/Drivers/Lan91xDxe/Lan91xDxe.inf
+!endif
 
   # ISP1761 USB OTG Controller
   EmbeddedPkg/Drivers/Isp1761UsbDxe/Isp1761UsbDxe.inf