[edk2,v2,1/5] ARM: conditionalise inclusion of LinuxLoader/AndroidFastboot

Message ID 1421342508-13347-2-git-send-email-leif.lindholm@linaro.org
State New
Headers show

Commit Message

Leif Lindholm Jan. 15, 2015, 5:21 p.m.
When booting Linux using the UEFI stub loader, there is no need for the
built-in LinuxLoader. So make its inclusion conditional. This requires
also conditionalising the AndroidFastBoot support, which on ARM depends
on the LinuxLoader.

Since conditionalising something currently always included, invert the
logic and use a NO_LINUX_LOADER option to remove these components.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
---
 ArmPkg/ArmPkg.dsc                                 | 4 ++++
 ArmPlatformPkg/ArmVExpressPkg/ArmVExpress.dsc.inc | 4 ++++
 EmbeddedPkg/EmbeddedPkg.dsc                       | 2 ++
 3 files changed, 10 insertions(+)

Patch

diff --git a/ArmPkg/ArmPkg.dsc b/ArmPkg/ArmPkg.dsc
index be5126c..ec70a3d 100644
--- a/ArmPkg/ArmPkg.dsc
+++ b/ArmPkg/ArmPkg.dsc
@@ -138,7 +138,9 @@ 
 
   ArmPkg/Filesystem/SemihostFs/SemihostFs.inf
 
+!ifndef NO_LINUX_LOADER
   ArmPkg/Application/LinuxLoader/LinuxFdtLoader.inf
+!endif
 
 [Components.ARM]
   ArmPkg/Library/BaseMemoryLibVstm/BaseMemoryLibVstm.inf
@@ -154,7 +156,9 @@ 
   ArmPkg/Library/ArmLib/ArmV7/ArmV7LibSec.inf
   ArmPkg/Library/ArmLib/ArmV7/ArmV7LibPrePi.inf
 
+!ifndef NO_LINUX_LOADER
   ArmPkg/Application/LinuxLoader/LinuxAtagLoader.inf
+!endif
 
 [Components.AARCH64]
   ArmPkg/Drivers/ArmCpuLib/ArmCortexAEMv8Lib/ArmCortexAEMv8Lib.inf
diff --git a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress.dsc.inc b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress.dsc.inc
index f8b7511..a17aab9 100644
--- a/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress.dsc.inc
+++ b/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress.dsc.inc
@@ -336,9 +336,11 @@ 
   gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiLoaderCode|20
   gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiLoaderData|0
 
+!ifndef NO_LINUX_LOADER
   # Device path of block device on which Android Fastboot should flash
   # partitions. We just use the SD card on VExpress.
   gArmVExpressTokenSpaceGuid.PcdAndroidFastbootNvmDevicePath|L"VenHw(09831032-6FA3-4484-AF4F-0A000A8D3A82)"
+!endif
 
   #
   # ARM Pcds
@@ -399,9 +401,11 @@ 
   # ISP1761 USB OTG Controller
   EmbeddedPkg/Drivers/Isp1761UsbDxe/Isp1761UsbDxe.inf
 
+!ifndef NO_LINUX_LOADER
   #
   # Android Fastboot
   #
   EmbeddedPkg/Application/AndroidFastboot/AndroidFastbootApp.inf
   EmbeddedPkg/Drivers/AndroidFastbootTransportUsbDxe/FastbootTransportUsbDxe.inf
   ArmPlatformPkg/ArmVExpressPkg/ArmVExpressFastBootDxe/ArmVExpressFastBootDxe.inf
+!endif
diff --git a/EmbeddedPkg/EmbeddedPkg.dsc b/EmbeddedPkg/EmbeddedPkg.dsc
index b13693c..c69c4d7 100644
--- a/EmbeddedPkg/EmbeddedPkg.dsc
+++ b/EmbeddedPkg/EmbeddedPkg.dsc
@@ -266,9 +266,11 @@ 
   # FDT Support
   EmbeddedPkg/Library/FdtLoadLib/FdtLoadLib.inf
 
+!ifndef NO_LINUX_LOADER
   EmbeddedPkg/Application/AndroidFastboot/AndroidFastbootApp.inf
   EmbeddedPkg/Drivers/AndroidFastbootTransportUsbDxe/FastbootTransportUsbDxe.inf
   EmbeddedPkg/Drivers/AndroidFastbootTransportTcpDxe/FastbootTransportTcpDxe.inf
+!endif
 
   # Drivers
   EmbeddedPkg/Drivers/Isp1761UsbDxe/Isp1761UsbDxe.inf