summaryrefslogtreecommitdiffstats
path: root/meta-initramfs
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2019-03-15 00:22:40 -0700
committerKhem Raj <raj.khem@gmail.com>2019-03-15 09:17:11 -0700
commit60f872278dde6156fcf73c19cce3fea295938a06 (patch)
tree8f4df4f52c7428ba00e9ec4583b5dbaf84ad8872 /meta-initramfs
parent3189c0dc8f9978ab8f9a4c4f40eead440a07df91 (diff)
downloadmeta-openembedded-60f872278dde6156fcf73c19cce3fea295938a06.tar.gz
kexec-tools,kexec: Fix build with latest klibc
klibc has changed its signature of reboot() API adapt the use here Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-initramfs')
-rw-r--r--meta-initramfs/recipes-bsp/kexecboot/files/0001-kexecboot-Use-new-reboot-API-with-klibc.patch42
-rw-r--r--meta-initramfs/recipes-bsp/kexecboot/kexecboot_git.bb2
-rw-r--r--meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/klibc-reboot.patch11
-rw-r--r--meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc_git.bb3
4 files changed, 57 insertions, 1 deletions
diff --git a/meta-initramfs/recipes-bsp/kexecboot/files/0001-kexecboot-Use-new-reboot-API-with-klibc.patch b/meta-initramfs/recipes-bsp/kexecboot/files/0001-kexecboot-Use-new-reboot-API-with-klibc.patch
new file mode 100644
index 000000000..52d622a2f
--- /dev/null
+++ b/meta-initramfs/recipes-bsp/kexecboot/files/0001-kexecboot-Use-new-reboot-API-with-klibc.patch
@@ -0,0 +1,42 @@
1From a6d1678379df6142a68cc9bb76dae540a31b8fdb Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 14 Mar 2019 23:47:50 -0700
4Subject: [PATCH] kexecboot: Use new reboot() API with klibc
5
6Klibc has changed this API in
7https://git.kernel.org/pub/scm/libs/klibc/klibc.git/commit/?id=6b621b8705ce5901dcf49607c8a3523c9e521901
8
9therefore adopt the code
10
11Upstream-Status: Pending
12
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14---
15 src/kexecboot.c | 4 ++--
16 1 file changed, 2 insertions(+), 2 deletions(-)
17
18diff --git a/src/kexecboot.c b/src/kexecboot.c
19index cf49b40..c785fce 100644
20--- a/src/kexecboot.c
21+++ b/src/kexecboot.c
22@@ -857,7 +857,7 @@ int process_ctx_menu(struct params_t *params, int action) {
23 #else
24 sync();
25 /* if ( -1 == reboot(LINUX_REBOOT_CMD_RESTART) ) { */
26- if ( -1 == reboot(RB_AUTOBOOT) ) {
27+ if ( -1 == reboot(RB_AUTOBOOT, NULL) ) {
28 log_msg(lg, "Can't initiate reboot: %s", ERRMSG);
29 }
30 #endif
31@@ -874,7 +874,7 @@ int process_ctx_menu(struct params_t *params, int action) {
32 #else
33 sync();
34 /* if ( -1 == reboot(LINUX_REBOOT_CMD_POWER_OFF) ) { */
35- if ( -1 == reboot(RB_POWER_OFF) ) {
36+ if ( -1 == reboot(RB_POWER_OFF, NULL) ) {
37 log_msg(lg, "Can't initiate shutdown: %s", ERRMSG);
38 }
39 #endif
40--
412.21.0
42
diff --git a/meta-initramfs/recipes-bsp/kexecboot/kexecboot_git.bb b/meta-initramfs/recipes-bsp/kexecboot/kexecboot_git.bb
index 61210e768..4b20e1ed9 100644
--- a/meta-initramfs/recipes-bsp/kexecboot/kexecboot_git.bb
+++ b/meta-initramfs/recipes-bsp/kexecboot/kexecboot_git.bb
@@ -6,6 +6,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
6PV = "0.6+git${SRCPV}" 6PV = "0.6+git${SRCPV}"
7S = "${WORKDIR}/git" 7S = "${WORKDIR}/git"
8SRC_URI = "git://github.com/kexecboot/kexecboot.git" 8SRC_URI = "git://github.com/kexecboot/kexecboot.git"
9SRC_URI_append_libc-klibc = " file://0001-kexecboot-Use-new-reboot-API-with-klibc.patch "
10
9SRCREV = "7409a1e0aaea61af87c4eca0149cec18a9f58ab6" 11SRCREV = "7409a1e0aaea61af87c4eca0149cec18a9f58ab6"
10inherit autotools 12inherit autotools
11 13
diff --git a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/klibc-reboot.patch b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/klibc-reboot.patch
new file mode 100644
index 000000000..be1301df6
--- /dev/null
+++ b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc/klibc-reboot.patch
@@ -0,0 +1,11 @@
1--- a/kexec/kexec.c
2+++ b/kexec/kexec.c
3@@ -901,7 +901,7 @@ static int my_exec(void)
4 if (xen_present())
5 xen_kexec_exec();
6 else
7- reboot(LINUX_REBOOT_CMD_KEXEC);
8+ reboot(LINUX_REBOOT_CMD_KEXEC, NULL);
9 /* I have failed if I make it here */
10 fprintf(stderr, "kexec failed: %s\n",
11 strerror(errno));
diff --git a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc_git.bb b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc_git.bb
index ebf5ff5ae..7ad55d8b8 100644
--- a/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc_git.bb
+++ b/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc_git.bb
@@ -31,7 +31,8 @@ KLIBC_PATCHES += " \
31 file://0012-purgatory-string.c-avoid-inclusion-of-string.h.patch \ 31 file://0012-purgatory-string.c-avoid-inclusion-of-string.h.patch \
32 file://0013-sha256.h-avoid-inclusion-of-sys-types.h.patch \ 32 file://0013-sha256.h-avoid-inclusion-of-sys-types.h.patch \
33 file://0014-add-if_nameindex-from-musl.patch \ 33 file://0014-add-if_nameindex-from-musl.patch \
34 file://0015-vmcore-dmesg-fix-warning.patch" 34 file://0015-vmcore-dmesg-fix-warning.patch \
35 file://klibc-reboot.patch"
35 36
36WARNING_FIXES = "" 37WARNING_FIXES = ""
37FROM_OE_CORE = "file://arm_crashdump-fix-buffer-align.patch \ 38FROM_OE_CORE = "file://arm_crashdump-fix-buffer-align.patch \