audk/ArmPkg/Library/LinuxBootBootManagerLib/LinuxBootBootManagerLib.inf

59 lines
1.4 KiB
INI
Raw Normal View History

ArmPkg: Implement PlatformBootManagerLib for LinuxBoot LinuxBoot is a firmware that replaces specific firmware functionality like the UEFI DXE phase with a Linux kernel and runtime. It is built-in UEFI image like an application, which is executed at the end of DXE phase. To achieve the LinuxBoot boot flow "SEC->PEI->DXE->BDS->LinuxBoot", today we use the common well-known GUID of UEFI Shell for LinuxBoot payload, so LinuxBoot developers can effortlessly find the UEFI Shell Application and replace it with the LinuxBoot payload without recompiling platform EDK2 (There might be an issue with a few systems that don't have a UEFI Shell). Also, we have a hard requirement to force the BDS to boot into the LinuxBoot as it is essentially required that only the LinuxBoot boot option is permissible and UEFI is an intermediate bootstrap phase. Considering all the above, it is reasonable to just have a new GUID for LinuxBoot and require a LinuxBoot specific BDS implementation. In addition, with making the BDS implementation simpler, we can reduce many DXE drivers which we think it is not necessary for LinuxBoot booting. This patch adds a new PlatformBootManagerLib implementation which registers only the gArmTokenSpaceGuid.PcdLinuxBootFileGuid for LinuxBoot payload as an active boot option. It allows BDS to jump to the LinuxBoot quickly by skipping the UiApp and UEFI Shell. The PlatformBootManagerLib library derived from ArmPkg/Library/PlatformBootManagerLib. Cc: Leif Lindholm <leif@nuviainc.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Signed-off-by: Nhi Pham <nhi@os.amperecomputing.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Acked-by: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com> Acked-by: Moritz Fischer <moritzf@google.com>
2021-10-23 09:32:41 +02:00
## @file
# Implementation for PlatformBootManagerLib library class interfaces.
#
# Copyright (C) 2015-2016, Red Hat, Inc.
# Copyright (c) 2014, ARM Ltd. All rights reserved.<BR>
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
# Copyright (c) 2016, Linaro Ltd. All rights reserved.<BR>
# Copyright (c) 2020 - 2021, Ampere Computing LLC. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
##
[Defines]
INF_VERSION = 0x0001001B
BASE_NAME = LinuxBootBootManagerLib
FILE_GUID = 1FA91547-DB23-4F6A-8AF8-3B9782A7F917
MODULE_TYPE = DXE_DRIVER
VERSION_STRING = 1.0
LIBRARY_CLASS = PlatformBootManagerLib|DXE_DRIVER
#
# The following information is for reference only and not required by the build tools.
#
# VALID_ARCHITECTURES = ARM AARCH64
#
[Sources]
LinuxBootBm.c
[Packages]
ArmPkg/ArmPkg.dec
MdeModulePkg/MdeModulePkg.dec
MdePkg/MdePkg.dec
ShellPkg/ShellPkg.dec
[LibraryClasses]
BaseLib
BaseMemoryLib
DebugLib
MemoryAllocationLib
PcdLib
PrintLib
UefiBootManagerLib
UefiBootServicesTableLib
UefiLib
UefiRuntimeServicesTableLib
[Pcd]
gArmTokenSpaceGuid.PcdLinuxBootFileGuid
[Guids]
gEfiEndOfDxeEventGroupGuid
gUefiShellFileGuid
gZeroGuid
[Protocols]
gEfiLoadedImageProtocolGuid