mirror of
https://github.com/acidanthera/audk.git
synced 2025-04-08 17:05:09 +02:00
This is used to package up the grub bootloader into a firmware volume where it can be executed as a shell like the UEFI Shell. Grub itself is built as a minimal entity into a Fv and then added as a boot option. By default the UEFI shell isn't built but for debugging purposes it can be enabled and will then be presented as a boot option (This should never be allowed for secure boot in an external data centre but may be useful for local debugging). Finally all other boot options except grub and possibly the shell are stripped and the boot timeout forced to 0 so the system will not enter a setup menu and will only boot to grub. This is done by copying the Library/PlatformBootManagerLib into Library/PlatformBootManagerLibGrub and then customizing it. Boot failure is fatal to try to prevent secret theft. Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3077 Signed-off-by: James Bottomley <jejb@linux.ibm.com> Message-Id: <20201130202819.3910-4-jejb@linux.ibm.com> Acked-by: Ard Biesheuvel <ard.biesheuvel@arm.com> [lersek@redhat.com: replace local variable initialization with assignment] Reviewed-by: Laszlo Ersek <lersek@redhat.com> [lersek@redhat.com: squash 'OvmfPkg: add "gGrubFileGuid=Grub" to GuidCheck.IgnoreDuplicates', reviewed stand-alone by Phil (msgid <e6eae551-8563-ccfb-5547-7a97da6d46e5@redhat.com>) and Ard (msgid <10aeda37-def6-d9a4-6e02-4c66c1492f57@arm.com>)]
40 lines
1.1 KiB
INI
40 lines
1.1 KiB
INI
## @file
|
|
# Create a Firmware Volume based Grub Bootloader
|
|
#
|
|
# Copyright (C) 2020 James Bottomley, IBM Corporation.
|
|
#
|
|
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
#
|
|
##
|
|
|
|
[Defines]
|
|
INF_VERSION = 0x00010006
|
|
BASE_NAME = Grub
|
|
# This is gGrubFileGuid
|
|
FILE_GUID = b5ae312c-bc8a-43b1-9c62-ebb826dd5d07
|
|
MODULE_TYPE = UEFI_APPLICATION
|
|
VERSION_STRING = 1.0
|
|
ENTRY_POINT = UefiMain
|
|
|
|
[Packages]
|
|
OvmfPkg/OvmfPkg.dec
|
|
|
|
#
|
|
# The following information is for reference only and not required by
|
|
# the build tools.
|
|
#
|
|
# VALID_ARCHITECTURES = X64
|
|
#
|
|
|
|
##
|
|
# Note: The version of grub.efi this picks up can be generated by
|
|
# grub.sh which must be specified as a PREBUILD in the .dsc file. If
|
|
# grub.efi is newer than either grub.sh or grub.cfg then grub.sh will
|
|
# exit with success meaning that if you move your own version of grub
|
|
# in here (after checking out grub.sh and grub.cfg), PREBUILD won't
|
|
# overwrite it.
|
|
##
|
|
[Binaries]
|
|
PE32|grub.efi|*
|
|
|