public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH 0/2] Delete BdsLib dependency from Android loaders
@ 2017-11-25 13:27 Leif Lindholm
  2017-11-25 13:27 ` [PATCH 1/2] EmbeddedPkg: add UefiRuntimeLib resolution to package .dsc Leif Lindholm
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Leif Lindholm @ 2017-11-25 13:27 UTC (permalink / raw)
  To: edk2-devel; +Cc: ard.biesheuvel

AndroidBoot and AndroidFastboot (as well as their shared component
AndroidBootImgLib) have minor dependencies on BdsLib.

First fix up a missing mapping in EmbeddedPkg.dsc to let the modules
build standalone. Then get rid of the use of BdsLib.

Leif Lindholm (2):
  EmbeddedPkg: add UefiRuntimeLib resolution to package .dsc
  EmbeddedPkg: get rid of BdsLib dependency from Android*Boot

 EmbeddedPkg/Application/AndroidBoot/AndroidBootApp.c             | 4 ++--
 EmbeddedPkg/Application/AndroidBoot/AndroidBootApp.inf           | 1 -
 EmbeddedPkg/Application/AndroidFastboot/Arm/BootAndroidBootImg.c | 1 -
 EmbeddedPkg/EmbeddedPkg.dsc                                      | 7 ++-----
 EmbeddedPkg/Library/AndroidBootImgLib/AndroidBootImgLib.inf      | 1 +
 5 files changed, 5 insertions(+), 9 deletions(-)

-- 
2.11.0



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] EmbeddedPkg: add UefiRuntimeLib resolution to package .dsc
  2017-11-25 13:27 [PATCH 0/2] Delete BdsLib dependency from Android loaders Leif Lindholm
@ 2017-11-25 13:27 ` Leif Lindholm
  2017-11-25 13:27 ` [PATCH 2/2] EmbeddedPkg: get rid of BdsLib dependency from Android*Boot Leif Lindholm
  2017-11-25 15:25 ` [PATCH 0/2] Delete BdsLib dependency from Android loaders Ard Biesheuvel
  2 siblings, 0 replies; 5+ messages in thread
From: Leif Lindholm @ 2017-11-25 13:27 UTC (permalink / raw)
  To: edk2-devel; +Cc: ard.biesheuvel

Required to build Android*Boot standalone.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
---
 EmbeddedPkg/EmbeddedPkg.dsc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/EmbeddedPkg/EmbeddedPkg.dsc b/EmbeddedPkg/EmbeddedPkg.dsc
index d7ee6a3018..d0af235f99 100644
--- a/EmbeddedPkg/EmbeddedPkg.dsc
+++ b/EmbeddedPkg/EmbeddedPkg.dsc
@@ -83,6 +83,7 @@ [LibraryClasses.common]
   MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAllocationLib.inf
   UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
   HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
+  UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf
   UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
   DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
   UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] EmbeddedPkg: get rid of BdsLib dependency from Android*Boot
  2017-11-25 13:27 [PATCH 0/2] Delete BdsLib dependency from Android loaders Leif Lindholm
  2017-11-25 13:27 ` [PATCH 1/2] EmbeddedPkg: add UefiRuntimeLib resolution to package .dsc Leif Lindholm
@ 2017-11-25 13:27 ` Leif Lindholm
  2017-11-25 15:25 ` [PATCH 0/2] Delete BdsLib dependency from Android loaders Ard Biesheuvel
  2 siblings, 0 replies; 5+ messages in thread
From: Leif Lindholm @ 2017-11-25 13:27 UTC (permalink / raw)
  To: edk2-devel; +Cc: ard.biesheuvel

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>
---
 EmbeddedPkg/Application/AndroidBoot/AndroidBootApp.c             | 4 ++--
 EmbeddedPkg/Application/AndroidBoot/AndroidBootApp.inf           | 1 -
 EmbeddedPkg/Application/AndroidFastboot/Arm/BootAndroidBootImg.c | 1 -
 EmbeddedPkg/EmbeddedPkg.dsc                                      | 6 +-----
 EmbeddedPkg/Library/AndroidBootImgLib/AndroidBootImgLib.inf      | 1 +
 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 @@ [LibraryClasses]
   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.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 @@ [Packages]
 
 [Protocols]
   gAndroidBootImgProtocolGuid
+  gEfiLoadedImageProtocolGuid
 
 [Guids]
   gFdtTableGuid
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/2] Delete BdsLib dependency from Android loaders
  2017-11-25 13:27 [PATCH 0/2] Delete BdsLib dependency from Android loaders Leif Lindholm
  2017-11-25 13:27 ` [PATCH 1/2] EmbeddedPkg: add UefiRuntimeLib resolution to package .dsc Leif Lindholm
  2017-11-25 13:27 ` [PATCH 2/2] EmbeddedPkg: get rid of BdsLib dependency from Android*Boot Leif Lindholm
@ 2017-11-25 15:25 ` Ard Biesheuvel
  2017-11-25 19:02   ` Leif Lindholm
  2 siblings, 1 reply; 5+ messages in thread
From: Ard Biesheuvel @ 2017-11-25 15:25 UTC (permalink / raw)
  To: Leif Lindholm; +Cc: edk2-devel@lists.01.org

On 25 November 2017 at 13:27, Leif Lindholm <leif.lindholm@linaro.org> wrote:
> AndroidBoot and AndroidFastboot (as well as their shared component
> AndroidBootImgLib) have minor dependencies on BdsLib.
>
> First fix up a missing mapping in EmbeddedPkg.dsc to let the modules
> build standalone. Then get rid of the use of BdsLib.
>
> Leif Lindholm (2):
>   EmbeddedPkg: add UefiRuntimeLib resolution to package .dsc
>   EmbeddedPkg: get rid of BdsLib dependency from Android*Boot
>

Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

>  EmbeddedPkg/Application/AndroidBoot/AndroidBootApp.c             | 4 ++--
>  EmbeddedPkg/Application/AndroidBoot/AndroidBootApp.inf           | 1 -
>  EmbeddedPkg/Application/AndroidFastboot/Arm/BootAndroidBootImg.c | 1 -
>  EmbeddedPkg/EmbeddedPkg.dsc                                      | 7 ++-----
>  EmbeddedPkg/Library/AndroidBootImgLib/AndroidBootImgLib.inf      | 1 +
>  5 files changed, 5 insertions(+), 9 deletions(-)
>
> --
> 2.11.0
>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/2] Delete BdsLib dependency from Android loaders
  2017-11-25 15:25 ` [PATCH 0/2] Delete BdsLib dependency from Android loaders Ard Biesheuvel
@ 2017-11-25 19:02   ` Leif Lindholm
  0 siblings, 0 replies; 5+ messages in thread
From: Leif Lindholm @ 2017-11-25 19:02 UTC (permalink / raw)
  To: Ard Biesheuvel; +Cc: edk2-devel@lists.01.org

On Sat, Nov 25, 2017 at 03:25:21PM +0000, Ard Biesheuvel wrote:
> On 25 November 2017 at 13:27, Leif Lindholm <leif.lindholm@linaro.org> wrote:
> > AndroidBoot and AndroidFastboot (as well as their shared component
> > AndroidBootImgLib) have minor dependencies on BdsLib.
> >
> > First fix up a missing mapping in EmbeddedPkg.dsc to let the modules
> > build standalone. Then get rid of the use of BdsLib.
> >
> > Leif Lindholm (2):
> >   EmbeddedPkg: add UefiRuntimeLib resolution to package .dsc
> >   EmbeddedPkg: get rid of BdsLib dependency from Android*Boot
> >
> 
> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

Thanks!
Pushed as 108ff4a04b..a64d587294.

/
    Leif


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-11-25 18:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-25 13:27 [PATCH 0/2] Delete BdsLib dependency from Android loaders Leif Lindholm
2017-11-25 13:27 ` [PATCH 1/2] EmbeddedPkg: add UefiRuntimeLib resolution to package .dsc Leif Lindholm
2017-11-25 13:27 ` [PATCH 2/2] EmbeddedPkg: get rid of BdsLib dependency from Android*Boot Leif Lindholm
2017-11-25 15:25 ` [PATCH 0/2] Delete BdsLib dependency from Android loaders Ard Biesheuvel
2017-11-25 19:02   ` Leif Lindholm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox