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>
		
			
				
	
	
		
			59 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			INI
		
	
	
	
	
	
			
		
		
	
	
			59 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			INI
		
	
	
	
	
	
#/** @file
 | 
						|
#
 | 
						|
#  Copyright (c) 2013-2015, ARM Ltd. All rights reserved.<BR>
 | 
						|
#
 | 
						|
#  This program and the accompanying materials
 | 
						|
#  are licensed and made available under the terms and conditions of the BSD License
 | 
						|
#  which accompanies this distribution. The full text of the license may be found at
 | 
						|
#  http://opensource.org/licenses/bsd-license.php
 | 
						|
#  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
 | 
						|
#  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 | 
						|
#
 | 
						|
#
 | 
						|
#**/
 | 
						|
 | 
						|
[Defines]
 | 
						|
  INF_VERSION                    = 0x00010005
 | 
						|
  BASE_NAME                      = AndroidFastbootApp
 | 
						|
  FILE_GUID                      = 9588502a-5370-11e3-8631-d7c5951364c8
 | 
						|
  MODULE_TYPE                    = UEFI_APPLICATION
 | 
						|
  VERSION_STRING                 = 1.0
 | 
						|
  ENTRY_POINT                    = FastbootAppEntryPoint
 | 
						|
 | 
						|
[Sources.common]
 | 
						|
  AndroidFastbootApp.c
 | 
						|
  AndroidBootImg.c
 | 
						|
 | 
						|
[Sources.ARM, Sources.AARCH64]
 | 
						|
  Arm/BootAndroidBootImg.c
 | 
						|
 | 
						|
[LibraryClasses]
 | 
						|
  BaseLib
 | 
						|
  BaseMemoryLib
 | 
						|
  DebugLib
 | 
						|
  DevicePathLib
 | 
						|
  DxeServicesTableLib
 | 
						|
  MemoryAllocationLib
 | 
						|
  PcdLib
 | 
						|
  PrintLib
 | 
						|
  UefiApplicationEntryPoint
 | 
						|
  UefiBootServicesTableLib
 | 
						|
  UefiLib
 | 
						|
  UefiRuntimeServicesTableLib
 | 
						|
 | 
						|
[Protocols]
 | 
						|
  gAndroidFastbootTransportProtocolGuid
 | 
						|
  gAndroidFastbootPlatformProtocolGuid
 | 
						|
  gEfiLoadedImageProtocolGuid
 | 
						|
  gEfiSimpleTextOutProtocolGuid
 | 
						|
  gEfiSimpleTextInProtocolGuid
 | 
						|
 | 
						|
[Packages]
 | 
						|
  MdePkg/MdePkg.dec
 | 
						|
  MdeModulePkg/MdeModulePkg.dec
 | 
						|
  EmbeddedPkg/EmbeddedPkg.dec
 | 
						|
 | 
						|
[Packages.ARM, Packages.AARCH64]
 | 
						|
  ArmPkg/ArmPkg.dec
 | 
						|
  ArmPlatformPkg/ArmPlatformPkg.dec
 |