The efivar package provides tools and libraries to manipulate EFI variables.
This package is known to build and work properly using an LFS-11.2 platform.
Download (HTTP): https://github.com/rhboot/efivar/releases/download/38/efivar-38.tar.bz2
Download MD5 sum: 243fdbc48440212695cb9c6e6fd0f44f
Download size: 316 KB
Estimated disk space required: 18 MB
Estimated build time: less than 0.1 SBU
Optional patch (Required for 32-bit systems): https://www.linuxfromscratch.org/patches/blfs/11.2/efivar-38-i686-1.patch
User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/efivar
First, fix an issue in Makefile causing the package to be rebuilt during installation:
sed '/prep :/a\\ttouch prep' -i src/Makefile
Now adapt this package for a change in glibc-2.36:
sed '/sys\/mount\.h/d' -i src/util.h sed '/unistd\.h/a#include <sys/mount.h>' -i src/gpt.c src/linux.c
This package cannot function properly on a 32-bit system with a 64-bit UEFI implementation. Don't install this package (or efibootmgr) on 32-bit system unless you are absolutely sure you have a 32-bit UEFI implementation, which is very rare in practice.
If building this package on a 32-bit system, apply a patch:
[ $(getconf LONG_BIT) = 64 ] || patch -Np1 -i ../efivar-38-i686-1.patch
Build efivar with the following commands:
make
The test suite of this package is dangerous. Running it may trigger firmware bugs and make your system unusable without using some special hardware to reprogram the firmware.
Now, as the root
user:
make install LIBDIR=/usr/lib
LIBDIR=/usr/lib
: This
option overrides the default library directory of the package
(/usr/lib64
, which is not used by
LFS.)