diff options
author | Khem Raj <raj.khem@gmail.com> | 2017-08-18 09:49:49 -0700 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2017-08-31 10:12:51 +0200 |
commit | 90e08ddc2b1e3b7af0c871fb012aab8a89eee826 (patch) | |
tree | 4b43a90c3452d47eeac3c676c27a1926a7abba8c /meta-oe/recipes-extended | |
parent | af7c6e5754b2d99f729ea5c9623d196f91d29e0c (diff) | |
download | meta-openembedded-90e08ddc2b1e3b7af0c871fb012aab8a89eee826.tar.gz |
efivar: Upgrade to 0.31
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-extended')
-rw-r--r-- | meta-oe/recipes-extended/efivar/efivar/0001-Remove-some-extra-const-that-gcc-complains-about.patch | 44 | ||||
-rw-r--r-- | meta-oe/recipes-extended/efivar/efivar/0001-makeguids-Do-not-use-__bswap_constant_-16-32-macros.patch | 37 | ||||
-rw-r--r-- | meta-oe/recipes-extended/efivar/efivar/0002-New-gcc-version-new-way-symbol-versioning-breaks.patch | 66 | ||||
-rw-r--r-- | meta-oe/recipes-extended/efivar/efivar/0002-disable-static-build.patch | 33 | ||||
-rw-r--r-- | meta-oe/recipes-extended/efivar/efivar/0004-fix-unknow-option-for-gold-linker.patch | 15 | ||||
-rw-r--r-- | meta-oe/recipes-extended/efivar/efivar/fix-compile-failure-with-host-gcc-4.6.patch | 13 | ||||
-rw-r--r-- | meta-oe/recipes-extended/efivar/efivar/musl-strndupa.patch | 17 | ||||
-rw-r--r-- | meta-oe/recipes-extended/efivar/efivar_0.31.bb (renamed from meta-oe/recipes-extended/efivar/efivar_0.24.bb) | 9 |
8 files changed, 69 insertions, 165 deletions
diff --git a/meta-oe/recipes-extended/efivar/efivar/0001-Remove-some-extra-const-that-gcc-complains-about.patch b/meta-oe/recipes-extended/efivar/efivar/0001-Remove-some-extra-const-that-gcc-complains-about.patch deleted file mode 100644 index 4ae8cb90f..000000000 --- a/meta-oe/recipes-extended/efivar/efivar/0001-Remove-some-extra-const-that-gcc-complains-about.patch +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | From 29a2dea16113b5a8e51de46437c6a9f7426c5867 Mon Sep 17 00:00:00 2001 | ||
2 | From: Peter Jones <pjones@redhat.com> | ||
3 | Date: Mon, 6 Feb 2017 14:28:19 -0500 | ||
4 | Subject: [PATCH 1/2] Remove some extra "const" that gcc complains about. | ||
5 | |||
6 | One of these days I'll get these right. | ||
7 | |||
8 | Signed-off-by: Peter Jones <pjones@redhat.com> | ||
9 | --- | ||
10 | src/include/efivar/efiboot-loadopt.h | 4 ++-- | ||
11 | src/loadopt.c | 2 +- | ||
12 | 2 files changed, 3 insertions(+), 3 deletions(-) | ||
13 | |||
14 | diff --git a/src/include/efivar/efiboot-loadopt.h b/src/include/efivar/efiboot-loadopt.h | ||
15 | index 07db5c4..efc29c6 100644 | ||
16 | --- a/src/include/efivar/efiboot-loadopt.h | ||
17 | +++ b/src/include/efivar/efiboot-loadopt.h | ||
18 | @@ -32,8 +32,8 @@ extern ssize_t efi_loadopt_create(uint8_t *buf, ssize_t size, | ||
19 | |||
20 | extern efidp efi_loadopt_path(efi_load_option *opt, ssize_t limit) | ||
21 | __attribute__((__nonnull__ (1))); | ||
22 | -extern const unsigned char const * efi_loadopt_desc(efi_load_option *opt, | ||
23 | - ssize_t limit) | ||
24 | +extern const unsigned char * efi_loadopt_desc(efi_load_option *opt, | ||
25 | + ssize_t limit) | ||
26 | __attribute__((__visibility__ ("default"))) | ||
27 | __attribute__((__nonnull__ (1))); | ||
28 | extern uint32_t efi_loadopt_attrs(efi_load_option *opt) | ||
29 | diff --git a/src/loadopt.c b/src/loadopt.c | ||
30 | index 64e333f..ec50722 100644 | ||
31 | --- a/src/loadopt.c | ||
32 | +++ b/src/loadopt.c | ||
33 | @@ -336,7 +336,7 @@ teardown(void) | ||
34 | |||
35 | __attribute__((__nonnull__ (1))) | ||
36 | __attribute__((__visibility__ ("default"))) | ||
37 | -const unsigned char const * | ||
38 | +const unsigned char * | ||
39 | efi_loadopt_desc(efi_load_option *opt, ssize_t limit) | ||
40 | { | ||
41 | if (last_desc) { | ||
42 | -- | ||
43 | 2.12.2 | ||
44 | |||
diff --git a/meta-oe/recipes-extended/efivar/efivar/0001-makeguids-Do-not-use-__bswap_constant_-16-32-macros.patch b/meta-oe/recipes-extended/efivar/efivar/0001-makeguids-Do-not-use-__bswap_constant_-16-32-macros.patch new file mode 100644 index 000000000..73a772186 --- /dev/null +++ b/meta-oe/recipes-extended/efivar/efivar/0001-makeguids-Do-not-use-__bswap_constant_-16-32-macros.patch | |||
@@ -0,0 +1,37 @@ | |||
1 | From 98b33d4193998687aa3a78c097f7bd4c393e0c85 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sat, 15 Jul 2017 00:29:42 -0700 | ||
4 | Subject: [PATCH] makeguids: Do not use __bswap_constant_{16|32} macros | ||
5 | |||
6 | not available on musl | ||
7 | |||
8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
9 | --- | ||
10 | src/makeguids.c | 8 ++++---- | ||
11 | 1 file changed, 4 insertions(+), 4 deletions(-) | ||
12 | |||
13 | diff --git a/src/makeguids.c b/src/makeguids.c | ||
14 | index da2f5f7..daf821a 100644 | ||
15 | --- a/src/makeguids.c | ||
16 | +++ b/src/makeguids.c | ||
17 | @@ -155,13 +155,13 @@ main(int argc, char *argv[]) | ||
18 | #if BYTE_ORDER == BIG_ENDIAN\n\ | ||
19 | #define cpu_to_be32(n) (n)\n\ | ||
20 | #define cpu_to_be16(n) (n)\n\ | ||
21 | -#define cpu_to_le32(n) (__bswap_constant_32(n))\n\ | ||
22 | -#define cpu_to_le16(n) (__bswap_constant_16(n))\n\ | ||
23 | +#define cpu_to_le32(n) ((uint32_t) ((n)>>24 | (n)>>8&0xff00 | (n)<<8&0xff0000 | (n)<<24))\n\ | ||
24 | +#define cpu_to_le16(n) ((uint16_t) ((n)<<8 | (n)>>8))\n\ | ||
25 | #else\n\ | ||
26 | #define cpu_to_le32(n) (n)\n\ | ||
27 | #define cpu_to_le16(n) (n)\n\ | ||
28 | -#define cpu_to_be32(n) (__bswap_constant_32(n))\n\ | ||
29 | -#define cpu_to_be16(n) (__bswap_constant_16(n))\n\ | ||
30 | +#define cpu_to_be32(n) ((uint32_t) ((n)>>24 | (n)>>8&0xff00 | (n)<<8&0xff0000 | (n)<<24))\n\ | ||
31 | +#define cpu_to_be16(n) ((uint16_t) ((n)<<8 | (n)>>8))\n\ | ||
32 | #endif\n\ | ||
33 | """); | ||
34 | |||
35 | -- | ||
36 | 2.13.3 | ||
37 | |||
diff --git a/meta-oe/recipes-extended/efivar/efivar/0002-New-gcc-version-new-way-symbol-versioning-breaks.patch b/meta-oe/recipes-extended/efivar/efivar/0002-New-gcc-version-new-way-symbol-versioning-breaks.patch deleted file mode 100644 index 737b78b01..000000000 --- a/meta-oe/recipes-extended/efivar/efivar/0002-New-gcc-version-new-way-symbol-versioning-breaks.patch +++ /dev/null | |||
@@ -1,66 +0,0 @@ | |||
1 | From 31e655d2b5f66e772d9714422b7332bbaa60d2e6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Peter Jones <pjones@redhat.com> | ||
3 | Date: Mon, 6 Feb 2017 14:41:58 -0500 | ||
4 | Subject: [PATCH 2/2] New gcc version, new way symbol versioning breaks. | ||
5 | |||
6 | Apparently I get to redo this every time there's a compiler release. | ||
7 | Yaaaaaay. | ||
8 | |||
9 | Anyway, the current method is to define the two compat things from the | ||
10 | land before time as @libefivar.so.0 symbols and list them there in the | ||
11 | link map. Then we have the real one defined with another name, and set | ||
12 | as efi_set_variable@@LIBEFIVAR_0.24. Then to make there actually be a | ||
13 | efi_set_variable symbol to link against, we create it as a weak alias. | ||
14 | |||
15 | This is all completely absurd. | ||
16 | |||
17 | Signed-off-by: Peter Jones <pjones@redhat.com> | ||
18 | --- | ||
19 | src/lib.c | 17 ++++++++++++----- | ||
20 | 1 file changed, 12 insertions(+), 5 deletions(-) | ||
21 | |||
22 | diff --git a/src/lib.c b/src/lib.c | ||
23 | index 6a9b392..afa7d94 100644 | ||
24 | --- a/src/lib.c | ||
25 | +++ b/src/lib.c | ||
26 | @@ -49,7 +49,7 @@ _efi_set_variable(efi_guid_t guid, const char *name, uint8_t *data, | ||
27 | { | ||
28 | return ops->set_variable(guid, name, data, data_size, attributes, 0600); | ||
29 | } | ||
30 | -__asm__(".symver _efi_set_variable,_efi_set_variable@"); | ||
31 | +__asm__(".symver _efi_set_variable,_efi_set_variable@libefivar.so.0"); | ||
32 | |||
33 | int | ||
34 | __attribute__((__nonnull__ (2, 3))) | ||
35 | @@ -59,17 +59,24 @@ _efi_set_variable_variadic(efi_guid_t guid, const char *name, uint8_t *data, | ||
36 | { | ||
37 | return ops->set_variable(guid, name, data, data_size, attributes, 0600); | ||
38 | } | ||
39 | -__asm__(".symver _efi_set_variable_variadic,efi_set_variable@"); | ||
40 | +__asm__(".symver _efi_set_variable_variadic,efi_set_variable@libefivar.so.0"); | ||
41 | |||
42 | int | ||
43 | __attribute__((__nonnull__ (2, 3))) | ||
44 | __attribute__((__visibility__ ("default"))) | ||
45 | -efi_set_variable(efi_guid_t guid, const char *name, uint8_t *data, | ||
46 | - size_t data_size, uint32_t attributes, mode_t mode) | ||
47 | +_efi_set_variable_mode(efi_guid_t guid, const char *name, uint8_t *data, | ||
48 | + size_t data_size, uint32_t attributes, mode_t mode) | ||
49 | { | ||
50 | return ops->set_variable(guid, name, data, data_size, attributes, mode); | ||
51 | } | ||
52 | -__asm__(".symver efi_set_variable,efi_set_variable@@LIBEFIVAR_0.24"); | ||
53 | +__asm__(".symver _efi_set_variable_mode,efi_set_variable@@LIBEFIVAR_0.24"); | ||
54 | + | ||
55 | +int | ||
56 | +__attribute__((__nonnull__ (2, 3))) | ||
57 | +__attribute__((__visibility__ ("default"))) | ||
58 | +efi_set_variable(efi_guid_t guid, const char *name, uint8_t *data, | ||
59 | + size_t data_size, uint32_t attributes, mode_t mode) | ||
60 | + __attribute((weak, alias ("_efi_set_variable_mode"))); | ||
61 | |||
62 | int | ||
63 | __attribute__((__nonnull__ (2, 3))) | ||
64 | -- | ||
65 | 2.12.2 | ||
66 | |||
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 deleted file mode 100644 index 951b15921..000000000 --- a/meta-oe/recipes-extended/efivar/efivar/0002-disable-static-build.patch +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | From 126e0d3c1ad74cf5b0abe9e98ec444bcc3c83159 Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen.kooi@linaro.org> | ||
3 | Date: Fri, 4 Mar 2016 14:53:55 +0100 | ||
4 | Subject: [PATCH 2/2] disable static build | ||
5 | |||
6 | Signed-off-by: Koen Kooi <koen.kooi@linaro.org> | ||
7 | |||
8 | Upstream-Status: Inappropriate [meta-oe specific] | ||
9 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
10 | |||
11 | --- | ||
12 | src/Makefile | 4 ++-- | ||
13 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
14 | |||
15 | diff --git a/src/Makefile b/src/Makefile | ||
16 | index 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 | -- | ||
32 | 2.4.3 | ||
33 | |||
diff --git a/meta-oe/recipes-extended/efivar/efivar/0004-fix-unknow-option-for-gold-linker.patch b/meta-oe/recipes-extended/efivar/efivar/0004-fix-unknow-option-for-gold-linker.patch index 5d50c1906..96d0c6b3b 100644 --- a/meta-oe/recipes-extended/efivar/efivar/0004-fix-unknow-option-for-gold-linker.patch +++ b/meta-oe/recipes-extended/efivar/efivar/0004-fix-unknow-option-for-gold-linker.patch | |||
@@ -23,16 +23,13 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | |||
23 | gcc.specs | 2 +- | 23 | gcc.specs | 2 +- |
24 | 1 file changed, 1 insertion(+), 1 deletion(-) | 24 | 1 file changed, 1 insertion(+), 1 deletion(-) |
25 | 25 | ||
26 | diff --git a/gcc.specs b/gcc.specs | 26 | Index: git/gcc.specs |
27 | index 24fabc2..5b0fdef 100644 | 27 | =================================================================== |
28 | --- a/gcc.specs | 28 | --- git.orig/gcc.specs |
29 | +++ b/gcc.specs | 29 | +++ git/gcc.specs |
30 | @@ -14,4 +14,4 @@ | 30 | @@ -14,4 +14,4 @@ |
31 | + %{!shared:%{!static:%{!r:-pie}}} %{static:-Wl,-no-fatal-warnings -Wl,-static -static -Wl,-z,relro,-z,now} | 31 | + %{!shared:%{!static:%{!r:-pie}}} %{static:-Wl,-no-fatal-warnings -Wl,-static -static -Wl,-z,relro,-z,now} |
32 | 32 | ||
33 | *link: | 33 | *link: |
34 | -+ %{!static:--fatal-warnings} --no-undefined-version --no-allow-shlib-undefined --add-needed -z now --build-id %{!static:%{!shared:-PIE}} %{shared:-z relro -PIC} %{static:%<pie} | 34 | -+ %{!static:--fatal-warnings} --no-undefined-version --no-allow-shlib-undefined --add-needed -z now --build-id %{!static:%{!shared:-pie}} %{shared:-z relro} %{static:%<pie} |
35 | ++ %{!static:--fatal-warnings} --no-undefined-version --no-allow-shlib-undefined -z now --build-id %{!static:%{!shared:-pie}} %{shared:-z relro -fPIC} %{static:%<pie} | 35 | ++ %{!static:--fatal-warnings} --no-undefined-version --no-allow-shlib-undefined -z now --build-id %{!static:%{!shared:-pie}} %{shared:-z relro} %{static:%<pie} |
36 | -- | ||
37 | 2.8.1 | ||
38 | |||
diff --git a/meta-oe/recipes-extended/efivar/efivar/fix-compile-failure-with-host-gcc-4.6.patch b/meta-oe/recipes-extended/efivar/efivar/fix-compile-failure-with-host-gcc-4.6.patch index 1c68a2934..e3fa2e1c1 100644 --- a/meta-oe/recipes-extended/efivar/efivar/fix-compile-failure-with-host-gcc-4.6.patch +++ b/meta-oe/recipes-extended/efivar/efivar/fix-compile-failure-with-host-gcc-4.6.patch | |||
@@ -20,10 +20,10 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | |||
20 | gcc.specs | 4 ++-- | 20 | gcc.specs | 4 ++-- |
21 | 1 file changed, 2 insertions(+), 2 deletions(-) | 21 | 1 file changed, 2 insertions(+), 2 deletions(-) |
22 | 22 | ||
23 | diff --git a/gcc.specs b/gcc.specs | 23 | Index: git/gcc.specs |
24 | index 0d4bbda..3802ca6 100644 | 24 | =================================================================== |
25 | --- a/gcc.specs | 25 | --- git.orig/gcc.specs |
26 | +++ b/gcc.specs | 26 | +++ git/gcc.specs |
27 | @@ -2,13 +2,13 @@ | 27 | @@ -2,13 +2,13 @@ |
28 | + -D_GNU_SOURCE | 28 | + -D_GNU_SOURCE |
29 | 29 | ||
@@ -35,11 +35,8 @@ index 0d4bbda..3802ca6 100644 | |||
35 | + %(efivar_cpp_options) | 35 | + %(efivar_cpp_options) |
36 | 36 | ||
37 | *cc1_options: | 37 | *cc1_options: |
38 | -+ %(efivar_cpp_options) -Wmaybe-uninitialized -fno-merge-constants -flto -fvisibility=hidden %{!r:%{!fpie:%{!fPIE:%{!fpic:%{!fPIC:%{!fno-pic:-fPIE}}}}}} | 38 | -+ %(efivar_cpp_options) -Wmaybe-uninitialized -fno-merge-constants -fvisibility=hidden %{!r:%{!fpie:%{!fPIE:%{!fpic:%{!fPIC:%{!fno-pic:-fPIE}}}}}} |
39 | ++ %(efivar_cpp_options) -fno-merge-constants -fvisibility=hidden %{!r:%{!fpie:%{!fPIE:%{!fpic:%{!fPIC:%{!fno-pic:-fPIE}}}}}} | 39 | ++ %(efivar_cpp_options) -fno-merge-constants -fvisibility=hidden %{!r:%{!fpie:%{!fPIE:%{!fpic:%{!fPIC:%{!fno-pic:-fPIE}}}}}} |
40 | 40 | ||
41 | *self_spec: | 41 | *self_spec: |
42 | + %{!shared:%{!static:%{!r:-pie}}} %{static:-Wl,-no-fatal-warnings -Wl,-static -static -Wl,-z,relro,-z,now} | 42 | + %{!shared:%{!static:%{!r:-pie}}} %{static:-Wl,-no-fatal-warnings -Wl,-static -static -Wl,-z,relro,-z,now} |
43 | -- | ||
44 | 2.8.1 | ||
45 | |||
diff --git a/meta-oe/recipes-extended/efivar/efivar/musl-strndupa.patch b/meta-oe/recipes-extended/efivar/efivar/musl-strndupa.patch new file mode 100644 index 000000000..fc8f8c8b2 --- /dev/null +++ b/meta-oe/recipes-extended/efivar/efivar/musl-strndupa.patch | |||
@@ -0,0 +1,17 @@ | |||
1 | Taken from void linux | ||
2 | |||
3 | Index: git/src/linux.c | ||
4 | =================================================================== | ||
5 | --- git.orig/src/linux.c | ||
6 | +++ git/src/linux.c | ||
7 | @@ -40,6 +40,10 @@ | ||
8 | #include <efivar.h> | ||
9 | #include <efiboot.h> | ||
10 | |||
11 | +#if !defined(__GLIBC__) | ||
12 | +#define strndupa(x,s) strncpy(alloca(strlen(x)+1),x,s) | ||
13 | +#endif | ||
14 | + | ||
15 | #include "dp.h" | ||
16 | #include "linux.h" | ||
17 | #include "util.h" | ||
diff --git a/meta-oe/recipes-extended/efivar/efivar_0.24.bb b/meta-oe/recipes-extended/efivar/efivar_0.31.bb index 877ca9045..10dde896e 100644 --- a/meta-oe/recipes-extended/efivar/efivar_0.24.bb +++ b/meta-oe/recipes-extended/efivar/efivar_0.31.bb | |||
@@ -12,13 +12,12 @@ inherit pkgconfig | |||
12 | 12 | ||
13 | COMPATIBLE_HOST = "(i.86|x86_64|arm|aarch64).*-linux" | 13 | COMPATIBLE_HOST = "(i.86|x86_64|arm|aarch64).*-linux" |
14 | 14 | ||
15 | SRCREV = "963cb2e5adc145fe00717f94e382f2973f80e753" | 15 | SRCREV = "11324799c68193116e1dd5f94b416591bd324f90" |
16 | SRC_URI = "git://github.com/rhinstaller/efivar.git \ | 16 | SRC_URI = "git://github.com/rhinstaller/efivar.git \ |
17 | file://0002-disable-static-build.patch \ | ||
18 | file://allow-multi-definitions-for-native.patch \ | 17 | file://allow-multi-definitions-for-native.patch \ |
19 | file://0001-Remove-some-extra-const-that-gcc-complains-about.patch \ | 18 | file://0001-makeguids-Do-not-use-__bswap_constant_-16-32-macros.patch \ |
20 | file://0002-New-gcc-version-new-way-symbol-versioning-breaks.patch \ | 19 | file://musl-strndupa.patch \ |
21 | " | 20 | " |
22 | SRC_URI_append_class-target = " file://0001-efivar-fix-for-cross-compile.patch \ | 21 | SRC_URI_append_class-target = " file://0001-efivar-fix-for-cross-compile.patch \ |
23 | file://0003-efivar-fix-for-cross-compile.patch \ | 22 | file://0003-efivar-fix-for-cross-compile.patch \ |
24 | ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', 'file://0004-fix-unknow-option-for-gold-linker.patch', '', d)} \ | 23 | ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', 'file://0004-fix-unknow-option-for-gold-linker.patch', '', d)} \ |