]> git.proxmox.com Git - mirror_edk2.git/commitdiff
EmbeddedPkg: get rid of BdsLib dependency from Android*Boot
authorLeif Lindholm <leif.lindholm@linaro.org>
Sat, 25 Nov 2017 13:16:20 +0000 (13:16 +0000)
committerLeif Lindholm <leif.lindholm@linaro.org>
Sat, 25 Nov 2017 19:01:09 +0000 (19:01 +0000)
The sum use these applications made of BdsLib was one invocation of the
IS_DEVICE_PATH_NODE macro, and (incorrectly) being able to leave out a
dependency on gEfiLoadedImageProtocolGuid.

So expand the macro in place and add the missing dependency.
Then clean up the .dsc, .inf and #includes accordingly.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
EmbeddedPkg/Application/AndroidBoot/AndroidBootApp.c
EmbeddedPkg/Application/AndroidBoot/AndroidBootApp.inf
EmbeddedPkg/Application/AndroidFastboot/Arm/BootAndroidBootImg.c
EmbeddedPkg/EmbeddedPkg.dsc
EmbeddedPkg/Library/AndroidBootImgLib/AndroidBootImgLib.inf

index 977167da4093aeeda6fe9706da65643bd825fb39..e1e45e8146014f39efc615f48ba3204bf0f95aa2 100644 (file)
@@ -15,7 +15,6 @@
 \r
 #include <Library/AndroidBootImgLib.h>\r
 #include <Library/BaseMemoryLib.h>\r
-#include <Library/BdsLib.h>\r
 #include <Library/DebugLib.h>\r
 #include <Library/DevicePathLib.h>\r
 #include <Library/MemoryAllocationLib.h>\r
@@ -35,7 +34,8 @@ ValidateAndroidMediaDevicePath (
   NextNode = DevicePath;\r
   while (NextNode != NULL) {\r
     Node = NextNode;\r
-    if (IS_DEVICE_PATH_NODE (Node, MEDIA_DEVICE_PATH, MEDIA_HARDDRIVE_DP)) {\r
+    if (Node->Type == MEDIA_DEVICE_PATH &&\r
+        Node->SubType == MEDIA_HARDDRIVE_DP) {\r
       return EFI_SUCCESS;\r
     }\r
     NextNode = NextDevicePathNode (Node);\r
index f1ee0bdc82e27172d5607f24eecfd08a3ad5ac27..c2bc68e733df2e410a65daeb22ab25d5a49795cd 100644 (file)
@@ -28,7 +28,6 @@
   AndroidBootImgLib\r
   BaseLib\r
   BaseMemoryLib\r
-  BdsLib\r
   DebugLib\r
   DevicePathLib\r
   DxeServicesTableLib\r
index 1d9024b1ce9ea335050eeec395ab641df2020d1a..404aa68a05dfccd722e32031aefcc31250ef191e 100644 (file)
@@ -17,7 +17,6 @@
 #include <Protocol/DevicePath.h>\r
 #include <Protocol/LoadedImage.h>\r
 \r
-#include <Library/BdsLib.h>\r
 #include <Library/DevicePathLib.h>\r
 #include <Library/UefiBootServicesTableLib.h>\r
 #include <Library/UefiLib.h>\r
index d0af235f9902e04e582896c795075228e75c3bb4..5b20176eedb066852e812a99eceb4164b5d519d3 100644 (file)
 \r
 [Components.ARM, Components.AARCH64]\r
   EmbeddedPkg/Application/AndroidBoot/AndroidBootApp.inf\r
-  EmbeddedPkg/Application/AndroidFastboot/AndroidFastbootApp.inf {\r
-    <LibraryClasses>\r
-      # It depends on BdsLib that depends on TimerLib\r
-      TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate.inf\r
-  }\r
+  EmbeddedPkg/Application/AndroidFastboot/AndroidFastbootApp.inf\r
   EmbeddedPkg/Drivers/AndroidFastbootTransportUsbDxe/FastbootTransportUsbDxe.inf\r
   EmbeddedPkg/Drivers/AndroidFastbootTransportTcpDxe/FastbootTransportTcpDxe.inf\r
 \r
index c92bac04f2ebf7d6afaea415a1e9892d21c457a6..226b8b232471c0f0a15fe9b3504ce9aaae7b6a99 100644 (file)
@@ -43,6 +43,7 @@
 \r
 [Protocols]\r
   gAndroidBootImgProtocolGuid\r
+  gEfiLoadedImageProtocolGuid\r
 \r
 [Guids]\r
   gFdtTableGuid\r