summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended/efivar
diff options
context:
space:
mode:
authorKoen Kooi <koen.kooi@linaro.org>2016-05-10 12:19:35 -0400
committerMartin Jansa <Martin.Jansa@gmail.com>2016-05-19 12:02:38 +0200
commitfe4cb8b07265edc8de476f5e8ebb0a883323919b (patch)
tree7bbb3b6fab622406015a31c789e02a3a961b8c9e /meta-oe/recipes-extended/efivar
parentbee16ff1fb65522dd10ea225591a78c877bc57a4 (diff)
downloadmeta-openembedded-fe4cb8b07265edc8de476f5e8ebb0a883323919b.tar.gz
efivar: update to 0.23
Upstream removed the use of the nvme headers completely, so no more conflicts. Also drop gcc options patch, ubuntu 12.04 is too old to support in meta-oe/master. Signed-off-by: Koen Kooi <koen.kooi@linaro.org> Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-extended/efivar')
-rw-r--r--meta-oe/recipes-extended/efivar/efivar/0001-efivar-fix-for-cross-compile.patch28
-rw-r--r--meta-oe/recipes-extended/efivar/efivar/0002-disable-static-build.patch33
-rw-r--r--meta-oe/recipes-extended/efivar/efivar/efivar-drop-options-not-supported-by-lower-version-gcc.patch71
-rw-r--r--meta-oe/recipes-extended/efivar/efivar_0.21.bb39
-rw-r--r--meta-oe/recipes-extended/efivar/efivar_0.23.bb38
5 files changed, 87 insertions, 122 deletions
diff --git a/meta-oe/recipes-extended/efivar/efivar/0001-efivar-fix-for-cross-compile.patch b/meta-oe/recipes-extended/efivar/efivar/0001-efivar-fix-for-cross-compile.patch
index 4bd7d958a..6f6ca6475 100644
--- a/meta-oe/recipes-extended/efivar/efivar/0001-efivar-fix-for-cross-compile.patch
+++ b/meta-oe/recipes-extended/efivar/efivar/0001-efivar-fix-for-cross-compile.patch
@@ -1,31 +1,35 @@
1From 7036e8b0dca61432970789e5397b6fb02b362c2b Mon Sep 17 00:00:00 2001 1From 9a3c480af653b37e62d1be04d49fe7a60a80168f Mon Sep 17 00:00:00 2001
2From: Kai Kang <kai.kang@windriver.com> 2From: Kai Kang <kai.kang@windriver.com>
3Date: Fri, 25 Sep 2015 18:14:31 +0800 3Date: Fri, 25 Sep 2015 18:14:31 +0800
4Subject: [PATCH] efivar: fix for cross compile 4Subject: [PATCH 1/2] efivar: fix for cross compile
5 5
6It builds and calls elf file makeguids to generate a header file which 6It builds and calls elf file makeguids to generate a header file which
7doesn't work for cross compile. Fix it. 7doesn't work for cross compile. Fix it.
8 8
9Signed-off-by: Kai Kang <kai.kang@windriver.com> 9Signed-off-by: Kai Kang <kai.kang@windriver.com>
10
11Upstream-Status: Pending
12Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
13
10--- 14---
11 src/Makefile | 4 ++-- 15 src/Makefile | 4 ++--
12 1 file changed, 2 insertions(+), 2 deletions(-) 16 1 file changed, 2 insertions(+), 2 deletions(-)
13 17
14diff --git a/src/Makefile b/src/Makefile 18diff --git a/src/Makefile b/src/Makefile
15index 6eac858..ef4eb1d 100644 19index 5fc7887..1829d22 100644
16--- a/src/Makefile 20--- a/src/Makefile
17+++ b/src/Makefile 21+++ b/src/Makefile
18@@ -65,8 +65,8 @@ makeguids.o : makeguids.c 22@@ -29,8 +29,8 @@ all : deps $(TARGETS)
19 makeguids : makeguids.o fakeguid.o 23 ./guid-symbols.c : include/efivar/efivar-guids.h
20 $(CC) $(cflags) -o $@ $^ -ldl 24 ./guids.bin : include/efivar/efivar-guids.h
21 25 ./names.bin : include/efivar/efivar-guids.h
22-include/efivar/efivar-guids.h : makeguids guids.txt 26-include/efivar/efivar-guids.h : makeguids guids.txt
23- ./makeguids guids.txt guids.bin names.bin guid-symbols.S $@ 27- ./makeguids guids.txt guids.bin names.bin \
24+include/efivar/efivar-guids.h : guids.txt 28+include/efivar/efivar-guids.h : guids.txt
25+ makeguids guids.txt guids.bin names.bin guid-symbols.S $@ 29+ makeguids guids.txt guids.bin names.bin \
30 guid-symbols.c include/efivar/efivar-guids.h
26 31
27 guidlist.o : guids.S include/efivar/efivar-guids.h 32 makeguids : CPPFLAGS+=-DEFIVAR_BUILD_ENVIRONMENT
28 $(CC) $(cflags) -c -o guidlist.o guids.S
29-- 33--
302.6.0.rc2.10.gf4d9753 342.4.3
31 35
diff --git a/meta-oe/recipes-extended/efivar/efivar/0002-disable-static-build.patch b/meta-oe/recipes-extended/efivar/efivar/0002-disable-static-build.patch
new file mode 100644
index 000000000..951b15921
--- /dev/null
+++ b/meta-oe/recipes-extended/efivar/efivar/0002-disable-static-build.patch
@@ -0,0 +1,33 @@
1From 126e0d3c1ad74cf5b0abe9e98ec444bcc3c83159 Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen.kooi@linaro.org>
3Date: Fri, 4 Mar 2016 14:53:55 +0100
4Subject: [PATCH 2/2] disable static build
5
6Signed-off-by: Koen Kooi <koen.kooi@linaro.org>
7
8Upstream-Status: Inappropriate [meta-oe specific]
9Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
10
11---
12 src/Makefile | 4 ++--
13 1 file changed, 2 insertions(+), 2 deletions(-)
14
15diff --git a/src/Makefile b/src/Makefile
16index 1829d22..c7a0ca3 100644
17--- a/src/Makefile
18+++ b/src/Makefile
19@@ -8,9 +8,9 @@ include $(TOPDIR)/Make.defaults
20
21 LIBTARGETS=libefivar.so libefiboot.so
22 STATICLIBTARGETS=libefivar.a libefiboot.a
23-BINTARGETS=efivar efivar-static
24+BINTARGETS=efivar
25 PCTARGETS=efivar.pc efiboot.pc
26-TARGETS=$(LIBTARGETS) $(STATICLIBTARGETS) $(BINTARGETS) $(PCTARGETS)
27+TARGETS=$(LIBTARGETS) $(BINTARGETS) $(PCTARGETS)
28
29 LIBEFIBOOT_SOURCES = crc32.c creator.c disk.c gpt.c linux.c loadopt.c
30 LIBEFIBOOT_OBJECTS = $(patsubst %.c,%.o,$(LIBEFIBOOT_SOURCES))
31--
322.4.3
33
diff --git a/meta-oe/recipes-extended/efivar/efivar/efivar-drop-options-not-supported-by-lower-version-gcc.patch b/meta-oe/recipes-extended/efivar/efivar/efivar-drop-options-not-supported-by-lower-version-gcc.patch
deleted file mode 100644
index 7f04b1937..000000000
--- a/meta-oe/recipes-extended/efivar/efivar/efivar-drop-options-not-supported-by-lower-version-gcc.patch
+++ /dev/null
@@ -1,71 +0,0 @@
1gcc options '-Wmaybe-uninitialized' and '-std=gnu11' are not recognized by gcc
2whose version is lower than 4.6, such as on Ubuntu 12.04. Drop them for backward
3compatible.
4
5Upstream-Status: Pending
6
7Signed-off-by: Kai Kang <kai.kang@windriver.com>
8---
9diff --git a/Make.defaults b/Make.defaults
10index cc2baa9..118ae56 100644
11--- a/Make.defaults
12+++ b/Make.defaults
13@@ -10,10 +10,9 @@ CFLAGS ?= -O2 -g
14
15 ARCH = $(shell uname -m)
16 clang_cflags =
17-gcc_cflags = -Wmaybe-uninitialized
18 cflags := $(CFLAGS) \
19 -Werror -Wall -Wsign-compare -Wstrict-aliasing \
20- -std=gnu11 -fshort-wchar -fPIC \
21+ -fshort-wchar -fPIC \
22 -fvisibility=hidden \
23 -D_GNU_SOURCE -I${TOPDIR}/src/include/efivar/ \
24 $(if $(filter $(CC),clang),$(clang_cflags),) \
25diff --git a/src/guid.h b/src/guid.h
26index 9542ee1..0817991 100644
27--- a/src/guid.h
28+++ b/src/guid.h
29@@ -31,7 +31,8 @@ static inline int
30 real_isspace(char c)
31 {
32 char spaces[] = " \f\n\r\t\v";
33- for (int i = 0; spaces[i] != '\0'; i++)
34+ int i;
35+ for (i = 0; spaces[i] != '\0'; i++)
36 if (c == spaces[i])
37 return 1;
38 return 0;
39@@ -59,7 +60,8 @@ check_sanity(const char *text, size_t len)
40 static inline int
41 check_segment_sanity(const char *text, size_t len)
42 {
43- for(unsigned int i = 0; i < len; i++) {
44+ unsigned int i;
45+ for(i = 0; i < len; i++) {
46 if (text[i] >= '0' && text[i] <= '9')
47 continue;
48 /* "| 0x20" is tolower() without having to worry about
49diff --git a/src/makeguids.c b/src/makeguids.c
50index e9acf15..7e16cb2 100644
51--- a/src/makeguids.c
52+++ b/src/makeguids.c
53@@ -150,7 +150,8 @@ main(int argc, char *argv[])
54
55 fprintf(header, "#ifndef EFIVAR_GUIDS_H\n#define EFIVAR_GUIDS_H 1\n\n");
56
57- for (unsigned int i = 0; i < line-1; i++) {
58+ unsigned int i, j;
59+ for (i = 0; i < line-1; i++) {
60 if (!strcmp(outbuf[i].symbol, "efi_guid_zero"))
61 fprintf(symout, "\t.globl %s\n"
62 "\t.data\n"
63@@ -176,7 +177,7 @@ main(int argc, char *argv[])
64 fprintf(symout, "efi_guid_empty:\n");
65
66 uint8_t *guid_data = (uint8_t *) &outbuf[i].guid;
67- for (unsigned int j = 0; j < sizeof (efi_guid_t); j++)
68+ for (j = 0; j < sizeof (efi_guid_t); j++)
69 fprintf(symout,"\t.byte 0x%02x\n", guid_data[j]);
70
71 fprintf(symout, "%s_end:\n", outbuf[i].symbol);
diff --git a/meta-oe/recipes-extended/efivar/efivar_0.21.bb b/meta-oe/recipes-extended/efivar/efivar_0.21.bb
deleted file mode 100644
index f7a4d55a0..000000000
--- a/meta-oe/recipes-extended/efivar/efivar_0.21.bb
+++ /dev/null
@@ -1,39 +0,0 @@
1SUMMARY = "Tools to manipulate UEFI variables"
2DESCRIPTION = "efivar provides a simple command line interface to the UEFI variable facility"
3HOMEPAGE = "https://github.com/rhinstaller/efivar"
4
5LICENSE = "LGPLv2.1"
6LIC_FILES_CHKSUM = "file://COPYING;md5=6626bb1e20189cfa95f2c508ba286393"
7
8DEPENDS_class-target = "popt efivar-native"
9
10SRCREV = "aab6c2a64d90b6e5a63661fb5bd6be8d878b0784"
11SRC_URI = "git://github.com/rhinstaller/efivar.git"
12SRC_URI_append_class-target = " file://0001-efivar-fix-for-cross-compile.patch"
13SRC_URI_append_class-native = " file://efivar-drop-options-not-supported-by-lower-version-gcc.patch"
14
15S = "${WORKDIR}/git"
16
17do_install() {
18 oe_runmake install DESTDIR=${D}
19}
20
21do_compile_class-native() {
22 oe_runmake -C src makeguids
23}
24
25do_install_class-native() {
26 install -D -m 0755 ${B}/src/makeguids ${D}${bindir}/makeguids
27}
28
29BBCLASSEXTEND = "native"
30
31# See
32# http://lists.openembedded.org/pipermail/openembedded-core/2016-February/116564.html
33# http://lists.openembedded.org/pipermail/openembedded-core/2016-February/116571.html
34# http://lists.openembedded.org/pipermail/openembedded-devel/2016-February/105802.html
35# http://lists.openembedded.org/pipermail/openembedded-devel/2016-February/105786.html
36# but it's still broken:
37# http://lists.openembedded.org/pipermail/openembedded-devel/2016-February/105825.html
38# http://lists.openembedded.org/pipermail/openembedded-devel/2016-February/105830.html
39PNBLACKLIST[efivar] ?= "BROKEN: linux.c:27:30: fatal error: linux/nvme_ioctl.h: No such file or directory"
diff --git a/meta-oe/recipes-extended/efivar/efivar_0.23.bb b/meta-oe/recipes-extended/efivar/efivar_0.23.bb
new file mode 100644
index 000000000..b41be0335
--- /dev/null
+++ b/meta-oe/recipes-extended/efivar/efivar_0.23.bb
@@ -0,0 +1,38 @@
1SUMMARY = "Tools to manipulate UEFI variables"
2DESCRIPTION = "efivar provides a simple command line interface to the UEFI variable facility"
3HOMEPAGE = "https://github.com/rhinstaller/efivar"
4
5LICENSE = "LGPLv2.1"
6LIC_FILES_CHKSUM = "file://COPYING;md5=6626bb1e20189cfa95f2c508ba286393"
7
8DEPENDS_class-target = "popt efivar-native"
9
10SRCREV = "01abee43d6d6e755f56a4135ab5aa0bfad609ce2"
11SRC_URI = "git://github.com/rhinstaller/efivar.git"
12SRC_URI_append_class-target = " file://0001-efivar-fix-for-cross-compile.patch \
13 file://0002-disable-static-build.patch \
14 "
15
16S = "${WORKDIR}/git"
17
18# Setting CROSS_COMPILE breaks pkgconfig, so just set AR
19EXTRA_OEMAKE = "AR=${TARGET_PREFIX}gcc-ar"
20
21do_compile_prepend() {
22 sed -i -e s:-Werror::g ${S}/gcc.specs
23}
24
25do_compile_class-native() {
26 oe_runmake -C src makeguids
27}
28
29do_install() {
30 oe_runmake install DESTDIR=${D}
31}
32
33do_install_class-native() {
34 install -D -m 0755 ${B}/src/makeguids ${D}${bindir}/makeguids
35}
36
37BBCLASSEXTEND = "native"
38