mirror of https://github.com/acidanthera/audk.git
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>
This commit is contained in:
parent
1abf9f05de
commit
a64d587294
|
@ -15,7 +15,6 @@
|
||||||
|
|
||||||
#include <Library/AndroidBootImgLib.h>
|
#include <Library/AndroidBootImgLib.h>
|
||||||
#include <Library/BaseMemoryLib.h>
|
#include <Library/BaseMemoryLib.h>
|
||||||
#include <Library/BdsLib.h>
|
|
||||||
#include <Library/DebugLib.h>
|
#include <Library/DebugLib.h>
|
||||||
#include <Library/DevicePathLib.h>
|
#include <Library/DevicePathLib.h>
|
||||||
#include <Library/MemoryAllocationLib.h>
|
#include <Library/MemoryAllocationLib.h>
|
||||||
|
@ -35,7 +34,8 @@ ValidateAndroidMediaDevicePath (
|
||||||
NextNode = DevicePath;
|
NextNode = DevicePath;
|
||||||
while (NextNode != NULL) {
|
while (NextNode != NULL) {
|
||||||
Node = NextNode;
|
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;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
NextNode = NextDevicePathNode (Node);
|
NextNode = NextDevicePathNode (Node);
|
||||||
|
|
|
@ -28,7 +28,6 @@
|
||||||
AndroidBootImgLib
|
AndroidBootImgLib
|
||||||
BaseLib
|
BaseLib
|
||||||
BaseMemoryLib
|
BaseMemoryLib
|
||||||
BdsLib
|
|
||||||
DebugLib
|
DebugLib
|
||||||
DevicePathLib
|
DevicePathLib
|
||||||
DxeServicesTableLib
|
DxeServicesTableLib
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
#include <Protocol/DevicePath.h>
|
#include <Protocol/DevicePath.h>
|
||||||
#include <Protocol/LoadedImage.h>
|
#include <Protocol/LoadedImage.h>
|
||||||
|
|
||||||
#include <Library/BdsLib.h>
|
|
||||||
#include <Library/DevicePathLib.h>
|
#include <Library/DevicePathLib.h>
|
||||||
#include <Library/UefiBootServicesTableLib.h>
|
#include <Library/UefiBootServicesTableLib.h>
|
||||||
#include <Library/UefiLib.h>
|
#include <Library/UefiLib.h>
|
||||||
|
|
|
@ -288,11 +288,7 @@
|
||||||
|
|
||||||
[Components.ARM, Components.AARCH64]
|
[Components.ARM, Components.AARCH64]
|
||||||
EmbeddedPkg/Application/AndroidBoot/AndroidBootApp.inf
|
EmbeddedPkg/Application/AndroidBoot/AndroidBootApp.inf
|
||||||
EmbeddedPkg/Application/AndroidFastboot/AndroidFastbootApp.inf {
|
EmbeddedPkg/Application/AndroidFastboot/AndroidFastbootApp.inf
|
||||||
<LibraryClasses>
|
|
||||||
# It depends on BdsLib that depends on TimerLib
|
|
||||||
TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate.inf
|
|
||||||
}
|
|
||||||
EmbeddedPkg/Drivers/AndroidFastbootTransportUsbDxe/FastbootTransportUsbDxe.inf
|
EmbeddedPkg/Drivers/AndroidFastbootTransportUsbDxe/FastbootTransportUsbDxe.inf
|
||||||
EmbeddedPkg/Drivers/AndroidFastbootTransportTcpDxe/FastbootTransportTcpDxe.inf
|
EmbeddedPkg/Drivers/AndroidFastbootTransportTcpDxe/FastbootTransportTcpDxe.inf
|
||||||
|
|
||||||
|
|
|
@ -43,6 +43,7 @@
|
||||||
|
|
||||||
[Protocols]
|
[Protocols]
|
||||||
gAndroidBootImgProtocolGuid
|
gAndroidBootImgProtocolGuid
|
||||||
|
gEfiLoadedImageProtocolGuid
|
||||||
|
|
||||||
[Guids]
|
[Guids]
|
||||||
gFdtTableGuid
|
gFdtTableGuid
|
||||||
|
|
Loading…
Reference in New Issue