aboutsummaryrefslogtreecommitdiff
path: root/libs/efivar
diff options
context:
space:
mode:
authorAnton Antonov <Anton.Antonov@arm.com>2023-10-03 12:56:39 +0100
committerTianling Shen <cnsztl@gmail.com>2023-10-31 13:48:59 +0800
commitc618100c8282867d8dc10a98472060c6b432dbc2 (patch)
treed3b6b0809535e97a12790ae701e29fb88fbf97b1 /libs/efivar
parentee47bf4a5202f610251c7192b219481ee2d84dfe (diff)
efivar: Add armsr target support
Backport up-stream patch: https://github.com/rhboot/efivar/commit/ca48d3964d26f5e3b38d73655f19b1836b16bd2d Signed-off-by: Anton Antonov <Anton.Antonov@arm.com>
Diffstat (limited to 'libs/efivar')
-rw-r--r--libs/efivar/Makefile4
-rw-r--r--libs/efivar/patches/006-build-util-c-separately-for-makeguids.patch32
2 files changed, 34 insertions, 2 deletions
diff --git a/libs/efivar/Makefile b/libs/efivar/Makefile
index f0563ba7b..fd5302ee4 100644
--- a/libs/efivar/Makefile
+++ b/libs/efivar/Makefile
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=efivar
PKG_VERSION:=38
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://github.com/rhboot/efivar/releases/download/$(PKG_VERSION)
@@ -25,7 +25,7 @@ define Package/efivar
SECTION:=libs
CATEGORY:=Libraries
TITLE:=Tools and libraries to work with EFI variables
- DEPENDS:=@TARGET_x86_64
+ DEPENDS:=@(TARGET_x86_64||TARGET_armsr_armv8)
URL:=https://github.com/rhboot/efibootmgr
endef
diff --git a/libs/efivar/patches/006-build-util-c-separately-for-makeguids.patch b/libs/efivar/patches/006-build-util-c-separately-for-makeguids.patch
new file mode 100644
index 000000000..2305ebbac
--- /dev/null
+++ b/libs/efivar/patches/006-build-util-c-separately-for-makeguids.patch
@@ -0,0 +1,32 @@
+From ca48d3964d26f5e3b38d73655f19b1836b16bd2d Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex@linutronix.de>
+Date: Tue, 18 Jan 2022 11:53:41 +0100
+Subject: [PATCH] src/Makefile: build util.c separately for makeguids
+
+util.c needs to be built twice when cross-compiling:
+for the build machine to be able to link with
+makeguids which then runs during the same build,
+and then for the actual target.
+
+Signed-off-by: Alexander Kanavin <alex@linutronix.de>
+---
+ src/Makefile | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -28,10 +28,13 @@ EFIVAR_OBJECTS = $(patsubst %.S,%.o,$(pa
+ EFISECDB_SOURCES = efisecdb.c guid-symbols.c secdb-dump.c util.c
+ EFISECDB_OBJECTS = $(patsubst %.S,%.o,$(patsubst %.c,%.o,$(EFISECDB_SOURCES)))
+ GENERATED_SOURCES = include/efivar/efivar-guids.h guid-symbols.c
+-MAKEGUIDS_SOURCES = makeguids.c util.c
++MAKEGUIDS_SOURCES = makeguids.c util-makeguids.c
+ MAKEGUIDS_OBJECTS = $(patsubst %.S,%.o,$(patsubst %.c,%.o,$(MAKEGUIDS_SOURCES)))
+ MAKEGUIDS_OUTPUT = $(GENERATED_SOURCES) guids.lds
+
++util-makeguids.c : util.c
++ cp util.c util-makeguids.c
++
+ ALL_SOURCES=$(LIBEFISEC_SOURCES) $(LIBEFIBOOT_SOURCES) $(LIBEFIVAR_SOURCES) \
+ $(MAKEGUIDS_SOURCES) $(GENERATED_SOURCES) $(EFIVAR_SOURCES) \
+ $(sort $(wildcard include/efivar/*.h))