Debian Patches

Status for efivar/38-3.1+deb13u1

Patch Description Author Forwarded Bugs Origin Last update
0001-linux-handle-non-ACPI-systems-in-device_get.patch linux: handle non-ACPI systems in device_get()
/sys/devices/pci0000:00/firmware_node/hid does not exist on all systems.
Kernel parameter acpi=off has been reported as one possible reason in
https://github.com/rhboot/efivar/issues/120
But this is not the only case. On systems using device trees you may also
not find this file.

We have multiple parsers in dev_probes[]. It is sufficient that one of
these parsers succeeds to provide the device information.

If for instance pci_root_parser and pci_parser fails, we may still get
information from nvme_parser.

If a parser fails, only write a debug information and continue.
Heinrich Schuchardt <heinrich.schuchardt@canonical.com> invalid https://github.com/rhboot/efivar/pull/246/commits/b1209a10c55836fcd63dfcbe7e84ac6a7d4a2238 2023-08-02
0002_no_host_march.patch Don't use -march=native *ever*, stick to the defined compiler
defaults.

diff --git a/src/include/defaults.mk b/src/include/defaults.mk
index 632b155..9024a3a 100644
no
0003-efivarfs-Update-a-file-variable-store-On-SetVariable.patch efivarfs: Update a file variable store On SetVariable RT
Embedded boards have hardware limitations when storing and managing EFI
variables. Some hardware comes with an eMMC & an RPMB partition which they
use to store the EFI variables securely. However, the vast majority of
boards (using U-Boot), stores the EFI variables in a file in the ESP.

This has a few limitations
- UEFI secure boot cannot be enabled as it can be very easily
overridden
- SetVariable at runtime is impossible to support

Distros and capsule updates on-disk do rely on the that service though
and U-Boot does implement a workaround.

U-Boot enables SetVariableRT in the RTPROP table and creates a memory backend,
so the linux kernel can naturally read and write variables via the efivarfs
filesystem. Those reads and writes end up in memory though. So they are visible
while the OS is live and are lost in the event of a reboot.

At the same time it also creates two EFI RO variables.
RTStorageVolatile -- Holds the filename the variables are stored relative to
the ESP
VarToFile -- Holds a binary dump of all the EFI variables that should be
preserved (BS, NV, RT).

By using these two variables we can persist the changes after reboots by
doing
dd if=/sys/firmware/efi/efivars/VarToFile-b2ac5fc9-92b7-4acd-aeac-11e818c3130c of=/boot/efi/ubootefi.var skip=4 bs=1

So let's plug this functionality into the efivafs backend and enable it
automatically if those variables are detected.
Ilias Apalodimas <ilias.apalodimas@linaro.org> no 2025-06-18

All known versions for source package 'efivar'

Links