]> git.ipfire.org Git - thirdparty/grub.git/commit
bli: Add a module for the Boot Loader Interface
authorOliver Steffen <osteffen@redhat.com>
Fri, 26 May 2023 11:35:51 +0000 (13:35 +0200)
committerDaniel Kiper <daniel.kiper@oracle.com>
Thu, 1 Jun 2023 09:45:00 +0000 (11:45 +0200)
commite0fa7dc84c03c7089b458137531a2913aa9e92b0
tree304b8c62d43acbc350677b1be86de0746343b326
parentd09387287b7bbd7770bc9d172cc0e06181183e02
bli: Add a module for the Boot Loader Interface

Add a new module named bli. It implements a small but quite useful part
of the Boot Loader Interface [0]. This interface uses EFI variables for
communication between the boot loader and the operating system.

When loaded, this module sets two EFI variables under the vendor GUID
4a67b082-0a4c-41cf-b6c7-440b29bb8c4f:

- LoaderInfo: contains GRUB + <version number>.
  This allows the running operating system to identify the boot loader
  used during boot.

- LoaderDevicePartUUID: contains the partition UUID of the EFI System
  Partition (ESP). This is used by systemd-gpt-auto-generator [1] to
  find the root partitions (and others too), via partition type IDs [2].

This module is available on EFI platforms only. The bli module relies on
the part_gpt module which has to be loaded beforehand to make the GPT
partitions discoverable.

Update the documentation, add a new chapter "Modules" and describe the
bli module there.

[0] https://systemd.io/BOOT_LOADER_INTERFACE/
[1] https://www.freedesktop.org/software/systemd/man/systemd-gpt-auto-generator.html
[2] https://uapi-group.org/specifications/specs/discoverable_partitions_specification/

Signed-off-by: Oliver Steffen <osteffen@redhat.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
docs/grub.texi
grub-core/Makefile.core.def
grub-core/commands/bli.c [new file with mode: 0644]
include/grub/efi/api.h