]> git.proxmox.com Git - mirror_edk2.git/commit
EmbeddedPkg/AndroidFastbootApp: remove dependency on deprecated BdsLib
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Mon, 10 Apr 2017 16:55:34 +0000 (17:55 +0100)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Wed, 19 Apr 2017 06:57:51 +0000 (07:57 +0100)
commitfcf41edf2f5383f3caca257fdcbb7d3992ff7a48
tree6abc6516b4448d5b556b64a6da0ecd6014930cf1
parent170a3c1e0fff7de43501ef851b4ad5cbe355e220
EmbeddedPkg/AndroidFastbootApp: remove dependency on deprecated BdsLib

One of the last remaining modules with a dependency on the deprecated
BdsLib implementation from ArmPkg is the Android fastboot application.

Its only dependency on BdsLib is BdsStartEfiApplication(), which is
used in the most peculiar way: the fastboot app loads the kernel image
into memory, and creates a MemoryMapped() device path for it. It then
proceeds and calls BdsStartEfiApplication(), which explicitly loads the
contents of the devicepath into memory, creating a second in-memory copy
of the kernel image, after which it invokes gBS->LoadImage() with a
buffer address and size (while it is perfectly capable of loading from
a devicepath directly)

Since we know the device path is fully qualified and connected, and does
not require any of the additional processing that BdsStartEfiApplication()
does when dereferencing a device path, we should be able to pass this
devicepath into LoadImage() directly.

So create a simplified local clone of BdsStartEfiApplication(), and drop
the dependency on BdsLib.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
EmbeddedPkg/Application/AndroidFastboot/AndroidFastbootApp.inf
EmbeddedPkg/Application/AndroidFastboot/Arm/BootAndroidBootImg.c