efibootmgr: update to 17 and update efivars

This commit is contained in:
mglae 2018-12-27 15:53:05 +01:00
parent 519a36ea19
commit f3989a87c1
5 changed files with 29 additions and 60 deletions

View File

@ -2,22 +2,21 @@
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="efivar"
PKG_VERSION="70e63d4"
# 0.15 # Todo: later versions with buildproblems
PKG_SHA256="2638f1faa22e67bf99b4c537f7c21c336a5851a8c91c8dc09555da946a1b84c9"
PKG_VERSION="3e687d8072f3ed53ae727ec2cb99ae56dbcdf02b"
PKG_SHA256="810d386c9f4dafc160c721ef73e491c933c311e3df768e27eec50c28ac0f4d97"
PKG_ARCH="x86_64"
PKG_LICENSE="LGPL"
PKG_SITE="https://github.com/vathpela/efivar"
PKG_URL="https://github.com/vathpela/efivar-devel/archive/$PKG_VERSION.tar.gz"
PKG_SITE="https://github.com/rhboot/efivar"
PKG_URL="https://github.com/rhboot/efivar/archive/$PKG_VERSION.tar.gz"
PKG_DEPENDS_TARGET="toolchain efivar:host"
PKG_LONGDESC="Tools and library to manipulate EFI variables."
make_host() {
make -C src/ makeguids
make -C src/ include/efivar/efivar-guids.h
}
make_target() {
make -C src/ libefivar.a efivar-guids.h efivar.h
make -C src/ libefivar.a libefiboot.a efivar.h efivar
}
makeinstall_host() {
@ -26,9 +25,8 @@ makeinstall_host() {
makeinstall_target() {
mkdir -p $SYSROOT_PREFIX/usr/lib
cp -P src/libefivar.a $SYSROOT_PREFIX/usr/lib/
cp -P src/libefivar.a src/libefiboot.a $SYSROOT_PREFIX/usr/lib/
mkdir -p $SYSROOT_PREFIX/usr/include/efivar
cp -P src/efivar.h $SYSROOT_PREFIX/usr/include/efivar
cp -P src/efivar-guids.h $SYSROOT_PREFIX/usr/include/efivar
cp -P src/include/efivar/*.h $SYSROOT_PREFIX/usr/include/efivar
}

View File

@ -0,0 +1,11 @@
--- a/src/Makefile 2018-10-01 21:30:06.000000000 +0200
+++ b/src/Makefile 2018-10-17 14:16:46.000000000 +0200
@@ -69,7 +69,7 @@ libefivar.so : | $(GENERATED_SOURCES) li
libefivar.so : LIBS=dl
libefivar.so : MAP=libefivar.map
-efivar : efivar.c | libefivar.so
+efivar : efivar.c | libefivar.a
efivar : LIBS=efivar dl
efivar-static : efivar.c $(patsubst %.o,%.static.o,$(LIBEFIVAR_OBJECTS))

View File

@ -1,32 +0,0 @@
fix for
./makeguids guids.txt guids.bin names.bin guid-symbols.S efivar-guids.h
makeguids: malloc.c:2395: sysmalloc: Assertion `(old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)' failed.
--- a/src/makeguids.c 2014-10-15 06:48:49.000000000 -0700
+++ b/src/makeguids.c 2016-05-05 05:40:35.964612900 -0700
@@ -99,10 +99,8 @@
if (rc < 0)
err(1, "makeguids: could not read \"%s\"", argv[1]);
- /* strictly speaking, this *has* to be too large. */
- struct guidname *outbuf = calloc(inlen, sizeof (char));
- if (!outbuf)
- err(1, "makeguids");
+ /* reallocate later to required size */
+ struct guidname *outbuf = NULL;
char *guidstr = inbuf;
unsigned int line;
@@ -133,6 +131,11 @@
err(1, "makeguids: \"%s\": 4 invalid data on line %d",
argv[1], line);
+ outbuf = realloc(outbuf, line * sizeof (struct guidname));
+ if (!outbuf)
+ err(1, "makeguids");
+
+ bzero(&outbuf[line-1], sizeof (struct guidname));
memcpy(&outbuf[line-1].guid, &guid, sizeof(guid));
strcpy(outbuf[line-1].symbol, "efi_guid_");
strncat(outbuf[line-1].symbol, symbol,

View File

@ -2,18 +2,22 @@
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="efibootmgr"
PKG_VERSION="95f7a63"
PKG_SHA256="a6f936508c5b50b6fb5693dd2f0db911da298da0f72ffc0e2e74b09b22592fd1"
PKG_VERSION="99b578501643377e0b1994b2a068b790d189d5ad"
PKG_SHA256="04bc45dc8a841985d78d8df87b3475eb6e1122f993fae975197bf3adbc6e3341"
PKG_ARCH="x86_64"
PKG_LICENSE="GPL"
PKG_SITE="https://github.com/vathpela/efibootmgr"
PKG_URL="https://github.com/vathpela/efibootmgr-devel/archive/$PKG_VERSION.tar.gz"
PKG_SITE="https://github.com/rhboot/efibootmgr"
PKG_URL="https://github.com/rhboot/efibootmgr/archive/$PKG_VERSION.tar.gz"
PKG_DEPENDS_TARGET="toolchain efivar pciutils zlib"
PKG_LONGDESC="Tool to modify UEFI Firmware Boot Manager Variables."
pre_make_target() {
export EXTRA_CFLAGS="$CFLAGS -I$SYSROOT_PREFIX/usr/include -I$SYSROOT_PREFIX/usr/include/efivar -fgnu89-inline"
make_target() {
export CFLAGS="$CFLAGS -I$SYSROOT_PREFIX/usr/include -I$SYSROOT_PREFIX/usr/include/efivar -fgnu89-inline"
export LDFLAGS="$LDFLAGS -L$SYSROOT_PREFIX/usr/lib -ludev -ldl"
make EFIDIR=BOOT EFI_LOADER=bootx64.efi PKG_CONFIG=true \
LDLIBS="-lefiboot -lefivar" \
efibootmgr
}
makeinstall_target() {

View File

@ -1,12 +0,0 @@
diff -Naur efibootmgr-ceb177a/src/lib/scsi_ioctls.c efibootmgr-ceb177a.patch/src/lib/scsi_ioctls.c
--- efibootmgr-ceb177a/src/lib/scsi_ioctls.c 2014-10-21 22:17:27.000000000 +0200
+++ efibootmgr-ceb177a.patch/src/lib/scsi_ioctls.c 2016-03-26 13:49:59.119669675 +0100
@@ -24,7 +24,7 @@
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/ioctl.h>
-#include <linux/nvme.h>
+#include <linux/nvme_ioctl.h>
#include "scsi_ioctls.h"
int