summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorWang Quanyang <quanyang.wang@windriver.com>2019-09-23 10:26:52 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-09-27 13:02:17 +0100
commiteb27d1ab3ebb58d408a0cd68f5fdef2dd52ded57 (patch)
tree548cccc85c4065f604c7a7d951ebfd522adc3121 /meta
parentda00de395830850a52906f5999294eaeeca57fc7 (diff)
downloadpoky-eb27d1ab3ebb58d408a0cd68f5fdef2dd52ded57.tar.gz
kexec-tools: fix arm kexec failure for __NR_kexec_file_load
Once use kexec in arm arch, it will throw out the error info as below: Could not find a free area of memory of 0xc78e744 bytes... This is because that kexec use kexec_file_load to load image by default but arm doesn't support it. So add this patch to avoid use kexec_file_load in arm platforms. (From OE-Core rev: 952a3fa77c80f16cd6d97f35afdb474876a39483) Signed-off-by: Quanyang Wang <quanyang.wang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-kernel/kexec/kexec-tools/0006-kexec-arm-undefine-__NR_kexec_file_load-for-arm.patch40
-rw-r--r--meta/recipes-kernel/kexec/kexec-tools_2.0.19.bb1
2 files changed, 41 insertions, 0 deletions
diff --git a/meta/recipes-kernel/kexec/kexec-tools/0006-kexec-arm-undefine-__NR_kexec_file_load-for-arm.patch b/meta/recipes-kernel/kexec/kexec-tools/0006-kexec-arm-undefine-__NR_kexec_file_load-for-arm.patch
new file mode 100644
index 0000000000..6811dfa597
--- /dev/null
+++ b/meta/recipes-kernel/kexec/kexec-tools/0006-kexec-arm-undefine-__NR_kexec_file_load-for-arm.patch
@@ -0,0 +1,40 @@
1From b54816eff272324320c490d62dc36b27d2838732 Mon Sep 17 00:00:00 2001
2From: Quanyang Wang <quanyang.wang@windriver.com>
3Date: Mon, 16 Sep 2019 10:49:05 +0800
4Subject: [PATCH] kexec/arm: undefine __NR_kexec_file_load for arm
5
6In the kernel upstream commit 4ab65ba7a5cb
7("ARM: add kexec_file_load system call number"),
8__NR_kexec_file_load for arm has been defined to be 401.
9This results that even if kexec_file_load isn't implemented
10for arm but the function is_kexec_file_load_implemented()
11will still return true. So undef __NR_kexec_file_load for
12arm architecture.
13
14Upstream-Status: Backport
15[https://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git/commit/kexec/kexec-syscall.h?id=b54816eff272324320c490d62dc36b27d2838732]
16
17Signed-off-by: Quanyang Wang <quanyang.wang@windriver.com>
18Signed-off-by: Simon Horman <horms@verge.net.au>
19---
20 kexec/kexec-syscall.h | 4 ++++
21 1 file changed, 4 insertions(+)
22
23diff --git a/kexec/kexec-syscall.h b/kexec/kexec-syscall.h
24index dac1c1f..92d51d3 100644
25--- a/kexec/kexec-syscall.h
26+++ b/kexec/kexec-syscall.h
27@@ -56,6 +56,10 @@
28 #endif
29 #endif /*ifndef __NR_kexec_load*/
30
31+#ifdef __arm__
32+#undef __NR_kexec_file_load
33+#endif
34+
35 #ifndef __NR_kexec_file_load
36
37 #ifdef __x86_64__
38--
392.17.1
40
diff --git a/meta/recipes-kernel/kexec/kexec-tools_2.0.19.bb b/meta/recipes-kernel/kexec/kexec-tools_2.0.19.bb
index 3439899070..c3f74359f1 100644
--- a/meta/recipes-kernel/kexec/kexec-tools_2.0.19.bb
+++ b/meta/recipes-kernel/kexec/kexec-tools_2.0.19.bb
@@ -18,6 +18,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/kexec/kexec-tools-${PV}.tar.gz
18 file://0003-kexec-ARM-Fix-add_buffer_phys_virt-align-issue.patch \ 18 file://0003-kexec-ARM-Fix-add_buffer_phys_virt-align-issue.patch \
19 file://0004-x86_64-Add-support-to-build-kexec-tools-with-x32-ABI.patch \ 19 file://0004-x86_64-Add-support-to-build-kexec-tools-with-x32-ABI.patch \
20 file://0005-Disable-PIE-during-link.patch \ 20 file://0005-Disable-PIE-during-link.patch \
21 file://0006-kexec-arm-undefine-__NR_kexec_file_load-for-arm.patch \
21" 22"
22 23
23SRC_URI[md5sum] = "052458f0a35c2a3b0d2302caa3318e9f" 24SRC_URI[md5sum] = "052458f0a35c2a3b0d2302caa3318e9f"