tce-load -i compiletc gnu-efi-dev sbsigntool help2man https://github.com/vathpela/efitools/archive/v1.9.2.tar.gz git clone https://git.kernel.org/pub/scm/linux/kernel/git/jejb/efitools.git install File::Slurp with cpan patch -Np1 -i ../Add-static-keyword-for-IsValidVariableHeader.patch cd efitools-1.9.2 make CC="gcc -mtune=generic -Os -pipe" sudo make install [-flto fails] cc -I/usr/src/efitools-1.9.2/include/ -I/usr/local/include/efi -I/usr/local/include/efi/x86_64 -I/usr/include/efi/protocol -fpic -Wall -fshort-wchar -fno-strict-aliasing -fno-merge-constants -fno-stack-protector -ffreestanding -fno-stack-check -DGNU_EFI_USE_MS_ABI -DEFI_FUNCTION_WRAPPER -mno-red-zone -DCONFIG_x86_64 -c flash-var.c -o flash-var.o flash-var.c:13: warning: "__STDC_VERSION__" redefined #define __STDC_VERSION__ 199901L : note: this is the location of the previous definition flash-var.c: In function 'main': flash-var.c:109:3: warning: implicit declaration of function 'strptime'; did you mean 'strftime'? [-Wimplicit-function-declaration] strptime(timestampstr, "%Y-%m-%d %H:%M:%S", &tms); ^~~~~~~~ strftime cc -o flash-var flash-var.o lib/lib.a /usr/local/bin/ld: flash-var.o: in function `main': flash-var.c:(.text+0x7d3): undefined reference to `IsValidVariableHeader' collect2: error: ld returned 1 exit status make: *** [Makefile:115: flash-var] Error 1 rm UpdateVars.o SetNull.so ReadVars.o HelloWorld.o Loader.o HashTool.o ShimReplace.o SetNull.o KeyTool.o