diff options
-rw-r--r-- | meta/recipes-bsp/efibootmgr/efibootmgr/0001-remove-extra-decl.patch | 31 | ||||
-rw-r--r-- | meta/recipes-bsp/efibootmgr/efibootmgr/0001-src-make-compatible-with-efivar-38.patch | 47 | ||||
-rw-r--r-- | meta/recipes-bsp/efibootmgr/efibootmgr/97668ae0bce776a36ea2001dea63d376be8274ac.patch | 83 | ||||
-rw-r--r-- | meta/recipes-bsp/efibootmgr/efibootmgr_18.bb (renamed from meta/recipes-bsp/efibootmgr/efibootmgr_17.bb) | 8 |
4 files changed, 2 insertions, 167 deletions
diff --git a/meta/recipes-bsp/efibootmgr/efibootmgr/0001-remove-extra-decl.patch b/meta/recipes-bsp/efibootmgr/efibootmgr/0001-remove-extra-decl.patch deleted file mode 100644 index 42f3a8182d..0000000000 --- a/meta/recipes-bsp/efibootmgr/efibootmgr/0001-remove-extra-decl.patch +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | From 99b578501643377e0b1994b2a068b790d189d5ad Mon Sep 17 00:00:00 2001 | ||
2 | From: Peter Jones <pjones@redhat.com> | ||
3 | Date: Wed, 13 Jun 2018 09:41:01 -0400 | ||
4 | Subject: [PATCH] remove extra decl | ||
5 | |||
6 | Signed-off-by: Peter Jones <pjones@redhat.com> | ||
7 | |||
8 | Upstream-Status: Backport [git://github.com/rhinstaller/efibootmgr.git] | ||
9 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
10 | |||
11 | --- | ||
12 | src/efibootmgr.c | 3 --- | ||
13 | 1 file changed, 3 deletions(-) | ||
14 | |||
15 | diff --git a/src/efibootmgr.c b/src/efibootmgr.c | ||
16 | index de38f01..4e1a680 100644 | ||
17 | --- a/src/efibootmgr.c | ||
18 | +++ b/src/efibootmgr.c | ||
19 | @@ -1536,9 +1536,6 @@ parse_opts(int argc, char **argv) | ||
20 | "invalid numeric value %s\n", | ||
21 | optarg); | ||
22 | } | ||
23 | - /* XXX efivar-36 accidentally doesn't have a public | ||
24 | - * header for this */ | ||
25 | - extern int efi_set_verbose(int verbosity, FILE *errlog); | ||
26 | efi_set_verbose(opts.verbose - 2, stderr); | ||
27 | break; | ||
28 | case 'V': | ||
29 | -- | ||
30 | 2.7.4 | ||
31 | |||
diff --git a/meta/recipes-bsp/efibootmgr/efibootmgr/0001-src-make-compatible-with-efivar-38.patch b/meta/recipes-bsp/efibootmgr/efibootmgr/0001-src-make-compatible-with-efivar-38.patch deleted file mode 100644 index f8d912391e..0000000000 --- a/meta/recipes-bsp/efibootmgr/efibootmgr/0001-src-make-compatible-with-efivar-38.patch +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | From 07f080184d067c1ebc3fec1b53dd4a06d1a2566a Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex@linutronix.de> | ||
3 | Date: Mon, 17 Jan 2022 23:24:34 +0100 | ||
4 | Subject: [PATCH] src: make compatible with efivar 38 | ||
5 | |||
6 | Upstream-Status: Backport | ||
7 | Signed-off-by: Alexander Kanavin <alex@linutronix.de> | ||
8 | --- | ||
9 | src/efibootdump.c | 2 +- | ||
10 | src/efibootmgr.c | 4 ++-- | ||
11 | 2 files changed, 3 insertions(+), 3 deletions(-) | ||
12 | |||
13 | diff --git a/src/efibootdump.c b/src/efibootdump.c | ||
14 | index eceffd6..09bd76e 100644 | ||
15 | --- a/src/efibootdump.c | ||
16 | +++ b/src/efibootdump.c | ||
17 | @@ -69,7 +69,7 @@ print_boot_entry(efi_load_option *loadopt, size_t data_size) | ||
18 | text_path = alloca(text_path_len); | ||
19 | if (!text_path) | ||
20 | error(100, "Couldn't allocate memory"); | ||
21 | - rc = efidp_format_device_path(text_path, text_path_len, | ||
22 | + rc = efidp_format_device_path((unsigned char *)text_path, text_path_len, | ||
23 | dp, pathlen); | ||
24 | if (rc < 0) { | ||
25 | printf("<bad device path>"); | ||
26 | diff --git a/src/efibootmgr.c b/src/efibootmgr.c | ||
27 | index 4e1a680..b77b1fb 100644 | ||
28 | --- a/src/efibootmgr.c | ||
29 | +++ b/src/efibootmgr.c | ||
30 | @@ -949,7 +949,7 @@ show_vars(const char *prefix) | ||
31 | pathlen = efi_loadopt_pathlen(load_option, | ||
32 | boot->data_size); | ||
33 | dp = efi_loadopt_path(load_option, boot->data_size); | ||
34 | - rc = efidp_format_device_path(text_path, text_path_len, | ||
35 | + rc = efidp_format_device_path((unsigned char *)text_path, text_path_len, | ||
36 | dp, pathlen); | ||
37 | if (rc < 0) | ||
38 | error(18, "Could not parse device path"); | ||
39 | @@ -960,7 +960,7 @@ show_vars(const char *prefix) | ||
40 | if (!text_path) | ||
41 | error(19, "Could not parse device path"); | ||
42 | |||
43 | - rc = efidp_format_device_path(text_path, text_path_len, | ||
44 | + rc = efidp_format_device_path((unsigned char *)text_path, text_path_len, | ||
45 | dp, pathlen); | ||
46 | if (rc < 0) | ||
47 | error(20, "Could not parse device path"); | ||
diff --git a/meta/recipes-bsp/efibootmgr/efibootmgr/97668ae0bce776a36ea2001dea63d376be8274ac.patch b/meta/recipes-bsp/efibootmgr/efibootmgr/97668ae0bce776a36ea2001dea63d376be8274ac.patch deleted file mode 100644 index 9525ed8c54..0000000000 --- a/meta/recipes-bsp/efibootmgr/efibootmgr/97668ae0bce776a36ea2001dea63d376be8274ac.patch +++ /dev/null | |||
@@ -1,83 +0,0 @@ | |||
1 | From 97668ae0bce776a36ea2001dea63d376be8274ac Mon Sep 17 00:00:00 2001 | ||
2 | From: Peter Jones <pjones@redhat.com> | ||
3 | Date: Wed, 6 Mar 2019 13:08:33 -0500 | ||
4 | Subject: [PATCH] Make sure PKGS= is propogated into the submake for "make | ||
5 | deps" | ||
6 | |||
7 | When we're doing make deps with "$(CC) -MF", gcc and clang have different | ||
8 | behavior, both broken in different ways, which we're hitting because of a | ||
9 | missing -I argument for libefivar's includes. On clang, when a header can't | ||
10 | be found, it emits a rule with the header as a prerequisite without a path, | ||
11 | such as efivar.h here: | ||
12 | |||
13 | efibootmgr.o: efibootmgr.c fix_coverity.h efivar.h efiboot.h \ | ||
14 | /home/pjones/devel/github.com/efibootmgr/master/src/include/list.h \ | ||
15 | /home/pjones/devel/github.com/efibootmgr/master/src/include/efi.h \ | ||
16 | /home/pjones/devel/github.com/efibootmgr/master/src/include/unparse_path.h \ | ||
17 | /home/pjones/devel/github.com/efibootmgr/master/src/include/efibootmgr.h \ | ||
18 | error.h | ||
19 | |||
20 | Then the build that utilizes that rule will fail to find the | ||
21 | prerequisite and tell you something like: | ||
22 | |||
23 | make[1]: *** No rule to make target 'efivar.h', needed by 'efibootmgr.o'. Stop. | ||
24 | make[1]: Leaving directory '/home/pjones/devel/github.com/efibootmgr/master/src' | ||
25 | |||
26 | With gcc, when a header can't be found, it emits a rule without that header | ||
27 | as a prerequisite, as such (again with efivar.h): | ||
28 | |||
29 | efibootmgr.o: efibootmgr.c fix_coverity.h \ | ||
30 | /home/pjones/devel/github.com/efibootmgr/master/src/include/list.h \ | ||
31 | /home/pjones/devel/github.com/efibootmgr/master/src/include/efi.h \ | ||
32 | /home/pjones/devel/github.com/efibootmgr/master/src/include/unparse_path.h \ | ||
33 | /home/pjones/devel/github.com/efibootmgr/master/src/include/efi.h \ | ||
34 | /home/pjones/devel/github.com/efibootmgr/master/src/include/efibootmgr.h \ | ||
35 | error.h | ||
36 | |||
37 | And then your build will fail if you haven't adjusted CFLAGS to tell it | ||
38 | where to find the header. | ||
39 | |||
40 | Both of these would be better just erroring, but at least gcc's doesn't | ||
41 | insert a *wrong* dependency. | ||
42 | |||
43 | This patch adds "PKGS=efivar efibootmgr popt" for all deps under src/. | ||
44 | Technically that's overkill, as efibootmgr itself doesn't need popt, but it | ||
45 | doesn't hurt anything to have the extra part there. The resulting | ||
46 | .efibootmgr.d file has the prerequisites expressed correctly: | ||
47 | |||
48 | efibootmgr.o: efibootmgr.c fix_coverity.h /usr/include/efivar/efivar.h \ | ||
49 | /usr/include/efivar/efiboot.h \ | ||
50 | /home/pjones/devel/github.com/efibootmgr/master/src/include/list.h \ | ||
51 | /home/pjones/devel/github.com/efibootmgr/master/src/include/efi.h \ | ||
52 | /home/pjones/devel/github.com/efibootmgr/master/src/include/unparse_path.h \ | ||
53 | /home/pjones/devel/github.com/efibootmgr/master/src/include/efi.h \ | ||
54 | /home/pjones/devel/github.com/efibootmgr/master/src/include/efibootmgr.h \ | ||
55 | error.h | ||
56 | |||
57 | This fixes the issue described in github PR #96 | ||
58 | |||
59 | Signed-off-by: Peter Jones <pjones@redhat.com> | ||
60 | Upstream-Status: Backport [https://github.com/rhboot/efibootmgr/commit/97668ae0bce776a36ea2001dea63d376be8274ac] | ||
61 | --- | ||
62 | src/Makefile | 7 ++++++- | ||
63 | 1 file changed, 6 insertions(+), 1 deletion(-) | ||
64 | |||
65 | diff --git a/src/Makefile b/src/Makefile | ||
66 | index 258bac1..32fa188 100644 | ||
67 | --- a/src/Makefile | ||
68 | +++ b/src/Makefile | ||
69 | @@ -31,8 +31,13 @@ efibootdump : PKGS=efivar efiboot popt | ||
70 | efibootnext : $(call objects-of,$(EFIBOOTNEXT_SOURCES)) | ||
71 | efibootnext : PKGS=efivar efiboot popt | ||
72 | |||
73 | +deps : PKGS=efivar efiboot popt | ||
74 | deps : $(ALL_SOURCES) | ||
75 | - $(MAKE) -f $(TOPDIR)/Make.deps deps SOURCES="$(ALL_SOURCES)" SUBDIR_CFLAGS="$(SUBDIR_CFLAGS)" | ||
76 | + $(MAKE) -f $(TOPDIR)/Make.deps \ | ||
77 | + SOURCES="$(ALL_SOURCES)" \ | ||
78 | + SUBDIR_CFLAGS="$(SUBDIR_CFLAGS)" \ | ||
79 | + PKGS="$(PKGS)" \ | ||
80 | + deps | ||
81 | |||
82 | clean : | ||
83 | @rm -rfv *.o *.a *.so $(TARGETS) | ||
diff --git a/meta/recipes-bsp/efibootmgr/efibootmgr_17.bb b/meta/recipes-bsp/efibootmgr/efibootmgr_18.bb index 11d8b9061d..cbcaac1e97 100644 --- a/meta/recipes-bsp/efibootmgr/efibootmgr_17.bb +++ b/meta/recipes-bsp/efibootmgr/efibootmgr_18.bb | |||
@@ -10,12 +10,8 @@ DEPENDS = "efivar popt" | |||
10 | 10 | ||
11 | COMPATIBLE_HOST = "(i.86|x86_64|arm|aarch64).*-linux" | 11 | COMPATIBLE_HOST = "(i.86|x86_64|arm|aarch64).*-linux" |
12 | 12 | ||
13 | SRC_URI = "git://github.com/rhinstaller/efibootmgr.git;protocol=https;branch=master \ | 13 | SRC_URI = "git://github.com/rhinstaller/efibootmgr.git;protocol=https;branch=main" |
14 | file://0001-remove-extra-decl.patch \ | 14 | SRCREV = "c3f9f0534e32158f62c43564036878b93b9e0fd6" |
15 | file://97668ae0bce776a36ea2001dea63d376be8274ac.patch \ | ||
16 | file://0001-src-make-compatible-with-efivar-38.patch \ | ||
17 | " | ||
18 | SRCREV = "e067160ecef8208e1944002e5d50b275733211fb" | ||
19 | 15 | ||
20 | S = "${WORKDIR}/git" | 16 | S = "${WORKDIR}/git" |
21 | 17 | ||