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 <[email protected]>
---
 ArmPkg/ArmPkg.dsc                                 | 4 ++++
 ArmPlatformPkg/ArmVExpressPkg/ArmVExpress.dsc.inc | 4 ++++
 EmbeddedPkg/EmbeddedPkg.dsc                       | 2 ++
 3 files changed, 10 insertions(+)

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
-- 
2.1.3


------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to