summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeif Lindholm <leif.lindholm@linaro.org>2017-11-25 13:16:20 +0000
committerLeif Lindholm <leif.lindholm@linaro.org>2017-11-25 19:01:09 +0000
commita64d5872940b63ec8d1dfd89a1d0e48ed57346b6 (patch)
tree8fdfba6631616fa4cd0aa879d7276fac6014413d
parent1abf9f05de2c53fddce14d4cd973d3d8d1e5b00c (diff)
downloadedk2-a64d5872940b63ec8d1dfd89a1d0e48ed57346b6.tar.gz
edk2-a64d5872940b63ec8d1dfd89a1d0e48ed57346b6.tar.bz2
edk2-a64d5872940b63ec8d1dfd89a1d0e48ed57346b6.zip
EmbeddedPkg: get rid of BdsLib dependency from Android*Boot
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>
-rw-r--r--EmbeddedPkg/Application/AndroidBoot/AndroidBootApp.c4
-rw-r--r--EmbeddedPkg/Application/AndroidBoot/AndroidBootApp.inf1
-rw-r--r--EmbeddedPkg/Application/AndroidFastboot/Arm/BootAndroidBootImg.c1
-rw-r--r--EmbeddedPkg/EmbeddedPkg.dsc6
-rw-r--r--EmbeddedPkg/Library/AndroidBootImgLib/AndroidBootImgLib.inf1
5 files changed, 4 insertions, 9 deletions
diff --git a/EmbeddedPkg/Application/AndroidBoot/AndroidBootApp.c b/EmbeddedPkg/Application/AndroidBoot/AndroidBootApp.c
index 977167da40..e1e45e8146 100644
--- a/EmbeddedPkg/Application/AndroidBoot/AndroidBootApp.c
+++ b/EmbeddedPkg/Application/AndroidBoot/AndroidBootApp.c
@@ -15,7 +15,6 @@
#include <Library/AndroidBootImgLib.h>
#include <Library/BaseMemoryLib.h>
-#include <Library/BdsLib.h>
#include <Library/DebugLib.h>
#include <Library/DevicePathLib.h>
#include <Library/MemoryAllocationLib.h>
@@ -35,7 +34,8 @@ ValidateAndroidMediaDevicePath (
NextNode = DevicePath;
while (NextNode != NULL) {
Node = NextNode;
- if (IS_DEVICE_PATH_NODE (Node, MEDIA_DEVICE_PATH, MEDIA_HARDDRIVE_DP)) {
+ if (Node->Type == MEDIA_DEVICE_PATH &&
+ Node->SubType == MEDIA_HARDDRIVE_DP) {
return EFI_SUCCESS;
}
NextNode = NextDevicePathNode (Node);
diff --git a/EmbeddedPkg/Application/AndroidBoot/AndroidBootApp.inf b/EmbeddedPkg/Application/AndroidBoot/AndroidBootApp.inf
index f1ee0bdc82..c2bc68e733 100644
--- a/EmbeddedPkg/Application/AndroidBoot/AndroidBootApp.inf
+++ b/EmbeddedPkg/Application/AndroidBoot/AndroidBootApp.inf
@@ -28,7 +28,6 @@
AndroidBootImgLib
BaseLib
BaseMemoryLib
- BdsLib
DebugLib
DevicePathLib
DxeServicesTableLib
diff --git a/EmbeddedPkg/Application/AndroidFastboot/Arm/BootAndroidBootImg.c b/EmbeddedPkg/Application/AndroidFastboot/Arm/BootAndroidBootImg.c
index 1d9024b1ce..404aa68a05 100644
--- a/EmbeddedPkg/Application/AndroidFastboot/Arm/BootAndroidBootImg.c
+++ b/EmbeddedPkg/Application/AndroidFastboot/Arm/BootAndroidBootImg.c
@@ -17,7 +17,6 @@
#include <Protocol/DevicePath.h>
#include <Protocol/LoadedImage.h>
-#include <Library/BdsLib.h>
#include <Library/DevicePathLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiLib.h>
diff --git a/EmbeddedPkg/EmbeddedPkg.dsc b/EmbeddedPkg/EmbeddedPkg.dsc
index d0af235f99..5b20176eed 100644
--- a/EmbeddedPkg/EmbeddedPkg.dsc
+++ b/EmbeddedPkg/EmbeddedPkg.dsc
@@ -288,11 +288,7 @@
[Components.ARM, Components.AARCH64]
EmbeddedPkg/Application/AndroidBoot/AndroidBootApp.inf
- EmbeddedPkg/Application/AndroidFastboot/AndroidFastbootApp.inf {
- <LibraryClasses>
- # It depends on BdsLib that depends on TimerLib
- TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate.inf
- }
+ EmbeddedPkg/Application/AndroidFastboot/AndroidFastbootApp.inf
EmbeddedPkg/Drivers/AndroidFastbootTransportUsbDxe/FastbootTransportUsbDxe.inf
EmbeddedPkg/Drivers/AndroidFastbootTransportTcpDxe/FastbootTransportTcpDxe.inf
diff --git a/EmbeddedPkg/Library/AndroidBootImgLib/AndroidBootImgLib.inf b/EmbeddedPkg/Library/AndroidBootImgLib/AndroidBootImgLib.inf
index c92bac04f2..226b8b2324 100644
--- a/EmbeddedPkg/Library/AndroidBootImgLib/AndroidBootImgLib.inf
+++ b/EmbeddedPkg/Library/AndroidBootImgLib/AndroidBootImgLib.inf
@@ -43,6 +43,7 @@
[Protocols]
gAndroidBootImgProtocolGuid
+ gEfiLoadedImageProtocolGuid
[Guids]
gFdtTableGuid