The efivar package provides tools and libraries to manipulate EFI variables.
This package is known to build and work properly using an LFS-10.1 platform.
Download (HTTP): https://github.com/rhboot/efivar/releases/download/37/efivar-37.tar.bz2
Download MD5 sum: 9f067275c5f7aafdd75bfb364280ac9c
Download size: 108 KB
Estimated disk space required: 2.75 MB
Estimated build time: less than 0.1 SBU
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/efivar
First, apply a patch to fix an issue building with GCC 9 or later:
patch -Np1 -i ../efivar-37-gcc_9-1.patch
Build efivar with the following commands:
make CFLAGS="-O2 -Wno-stringop-truncation"
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 BINDIR=/bin
Move the shared libraries to /lib
,
and recreate the symlinks in /usr/lib
:
mv /usr/lib/libefi{boot,var}.so.* /lib && ln -sfv ../../lib/$(readlink /usr/lib/libefiboot.so) /usr/lib/libefiboot.so && ln -sfv ../../lib/$(readlink /usr/lib/libefivar.so) /usr/lib/libefivar.so
CFLAGS="-O2
-Wno-stringop-truncation"
: This option overrides the
default compiler flags to avoid a build failure.
LIBDIR=/usr/lib
: This
option overrides the default library directory of the package
(/usr/lib64
, which is not used by
LFS.)
BINDIR=/bin
: Make
efivar avaliable even
if /usr
is offline.
Last updated on 2021-02-21 03:35:58 +0800