summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-kernel/kexec/kexec-tools/0001-kexec-Fix-build-with-fno-common.patch78
-rw-r--r--meta/recipes-kernel/kexec/kexec-tools/0001-kexec-arch-ppc-kexec-ppc.c-correct-double-definition.patch23
-rw-r--r--meta/recipes-kernel/kexec/kexec-tools/0004-x86_64-Add-support-to-build-kexec-tools-with-x32-ABI.patch93
-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/0007-kexec-un-break-the-build-on-32-bit-x86.patch13
-rw-r--r--meta/recipes-kernel/kexec/kexec-tools_2.0.21.bb (renamed from meta/recipes-kernel/kexec/kexec-tools_2.0.20.bb)7
6 files changed, 32 insertions, 222 deletions
diff --git a/meta/recipes-kernel/kexec/kexec-tools/0001-kexec-Fix-build-with-fno-common.patch b/meta/recipes-kernel/kexec/kexec-tools/0001-kexec-Fix-build-with-fno-common.patch
deleted file mode 100644
index 31f4d00b53..0000000000
--- a/meta/recipes-kernel/kexec/kexec-tools/0001-kexec-Fix-build-with-fno-common.patch
+++ /dev/null
@@ -1,78 +0,0 @@
1From c5fec6d6368b4103557deb710150119dca438544 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 5 Aug 2020 10:46:39 -0700
4Subject: [PATCH] kexec: Fix build with -fno-common
5
6Ensure that my_debug is not doubly defined
7
8Upstream-Status: Pending
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11 kexec/arch/ppc64/kexec-elf-ppc64.c | 2 --
12 kexec/fs2dt.h | 2 +-
13 2 files changed, 1 insertion(+), 3 deletions(-)
14
15--- a/kexec/arch/ppc64/kexec-elf-ppc64.c
16+++ b/kexec/arch/ppc64/kexec-elf-ppc64.c
17@@ -44,8 +44,6 @@
18 uint64_t initrd_base, initrd_size;
19 unsigned char reuse_initrd = 0;
20 const char *ramdisk;
21-/* Used for enabling printing message from purgatory code */
22-int my_debug = 0;
23
24 int elf_ppc64_probe(const char *buf, off_t len)
25 {
26--- a/kexec/fs2dt.h
27+++ b/kexec/fs2dt.h
28@@ -30,7 +30,7 @@ extern struct bootblock bb[1];
29
30 /* Used for enabling printing message from purgatory code
31 * Only has implemented for PPC64 */
32-int my_debug;
33+extern int my_debug;
34 extern int dt_no_old_root;
35
36 void reserve(unsigned long long where, unsigned long long length);
37--- a/kexec/arch/arm64/kexec-arm64.h
38+++ b/kexec/arch/arm64/kexec-arm64.h
39@@ -50,8 +50,8 @@ int zImage_arm64_load(int argc, char **a
40 void zImage_arm64_usage(void);
41
42
43-off_t initrd_base;
44-off_t initrd_size;
45+extern off_t initrd_base;
46+extern off_t initrd_size;
47
48 /**
49 * struct arm64_mem - Memory layout info.
50@@ -65,7 +65,7 @@ struct arm64_mem {
51 };
52
53 #define arm64_mem_ngv UINT64_MAX
54-struct arm64_mem arm64_mem;
55+extern struct arm64_mem arm64_mem;
56
57 uint64_t get_phys_offset(void);
58 uint64_t get_vp_offset(void);
59--- a/kexec/arch/x86_64/kexec-bzImage64.c
60+++ b/kexec/arch/x86_64/kexec-bzImage64.c
61@@ -42,7 +42,6 @@
62 #include <arch/options.h>
63
64 static const int probe_debug = 0;
65-int bzImage_support_efi_boot;
66
67 int bzImage64_probe(const char *buf, off_t len)
68 {
69--- a/kexec/arch/ppc/kexec-elf-ppc.c
70+++ b/kexec/arch/ppc/kexec-elf-ppc.c
71@@ -33,7 +33,6 @@
72 static const int probe_debug = 0;
73
74 unsigned char reuse_initrd;
75-const char *ramdisk;
76 int create_flatten_tree(struct kexec_info *, unsigned char **, unsigned long *,
77 char *);
78
diff --git a/meta/recipes-kernel/kexec/kexec-tools/0001-kexec-arch-ppc-kexec-ppc.c-correct-double-definition.patch b/meta/recipes-kernel/kexec/kexec-tools/0001-kexec-arch-ppc-kexec-ppc.c-correct-double-definition.patch
new file mode 100644
index 0000000000..6aeebc3939
--- /dev/null
+++ b/meta/recipes-kernel/kexec/kexec-tools/0001-kexec-arch-ppc-kexec-ppc.c-correct-double-definition.patch
@@ -0,0 +1,23 @@
1From ba2fb5baf6b0a8c882ac32301dd7a8d16de0dcf6 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Sun, 27 Dec 2020 23:39:29 +0100
4Subject: [PATCH] kexec/arch/ppc/kexec-ppc.c: correct double definition error
5
6Upstream-Status: Pending
7Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
8---
9 kexec/arch/ppc/kexec-ppc.c | 1 -
10 1 file changed, 1 deletion(-)
11
12diff --git a/kexec/arch/ppc/kexec-ppc.c b/kexec/arch/ppc/kexec-ppc.c
13index 03bec36..5b3e244 100644
14--- a/kexec/arch/ppc/kexec-ppc.c
15+++ b/kexec/arch/ppc/kexec-ppc.c
16@@ -35,7 +35,6 @@ unsigned long long initrd_base = 0, initrd_size = 0;
17 unsigned long long ramdisk_base = 0, ramdisk_size = 0;
18 unsigned int rtas_base, rtas_size;
19 int max_memory_ranges;
20-const char *ramdisk;
21
22 /*
23 * Reads the #address-cells and #size-cells on this platform.
diff --git a/meta/recipes-kernel/kexec/kexec-tools/0004-x86_64-Add-support-to-build-kexec-tools-with-x32-ABI.patch b/meta/recipes-kernel/kexec/kexec-tools/0004-x86_64-Add-support-to-build-kexec-tools-with-x32-ABI.patch
deleted file mode 100644
index a809d5ba8e..0000000000
--- a/meta/recipes-kernel/kexec/kexec-tools/0004-x86_64-Add-support-to-build-kexec-tools-with-x32-ABI.patch
+++ /dev/null
@@ -1,93 +0,0 @@
1From 8c9a5076543eb3d497e016b3d7707e93d6311883 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= <anibal.limon@linux.intel.com>
3Date: Mon, 15 Jul 2013 23:32:36 -0700
4Subject: [PATCH] x86_64: Add support to build kexec-tools with x32 ABI
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Summary of changes,
10
11configure.ac: Add test for detect x32 ABI.
12purgatory/arch/x86_64/Makefile: Not use mcmodel large when
13 x32 ABI is set.
14kexec/arch/x86_64/kexec-elf-rel-x86_64.c: When x32 ABI is set
15 use ELFCLASS32 instead of ELFCLASS64.
16kexec/kexec-syscall.h: Add correct syscall number for x32 ABI.
17
18Upstream-Status: Submitted
19
20Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
21Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
22---
23 configure.ac | 9 +++++++++
24 kexec/arch/x86_64/kexec-elf-rel-x86_64.c | 4 ++++
25 kexec/kexec-syscall.h | 4 ++++
26 purgatory/arch/x86_64/Makefile | 4 +++-
27 4 files changed, 20 insertions(+), 1 deletion(-)
28
29diff --git a/configure.ac b/configure.ac
30index c2b0c68..60882b8 100644
31--- a/configure.ac
32+++ b/configure.ac
33@@ -54,6 +54,15 @@ case $target_cpu in
34 ;;
35 ia64|x86_64|alpha|m68k )
36 ARCH="$target_cpu"
37+
38+ dnl ---Test for x32 ABI in x86_64
39+ if test "x$ARCH" = "xx86_64" ; then
40+ AC_EGREP_CPP(x32_test,
41+ [#if defined(__x86_64__) && defined (__ILP32__)
42+ x32_test
43+ #endif
44+ ], SUBARCH='x32', SUBARCH='64')
45+ fi
46 ;;
47 * )
48 AC_MSG_ERROR([unsupported architecture $target_cpu])
49diff --git a/kexec/arch/x86_64/kexec-elf-rel-x86_64.c b/kexec/arch/x86_64/kexec-elf-rel-x86_64.c
50index db85b44..0ce1172 100644
51--- a/kexec/arch/x86_64/kexec-elf-rel-x86_64.c
52+++ b/kexec/arch/x86_64/kexec-elf-rel-x86_64.c
53@@ -8,7 +8,11 @@ int machine_verify_elf_rel(struct mem_ehdr *ehdr)
54 if (ehdr->ei_data != ELFDATA2LSB) {
55 return 0;
56 }
57+#ifdef __ILP32__
58+ if (ehdr->ei_class != ELFCLASS32) {
59+#else
60 if (ehdr->ei_class != ELFCLASS64) {
61+#endif
62 return 0;
63 }
64 if (ehdr->e_machine != EM_X86_64) {
65diff --git a/kexec/kexec-syscall.h b/kexec/kexec-syscall.h
66index dac1c1f..e9479b7 100644
67--- a/kexec/kexec-syscall.h
68+++ b/kexec/kexec-syscall.h
69@@ -31,8 +31,12 @@
70 #define __NR_kexec_load 268
71 #endif
72 #ifdef __x86_64__
73+#ifdef __ILP32__
74+#define __NR_kexec_load 528
75+#else
76 #define __NR_kexec_load 246
77 #endif
78+#endif
79 #ifdef __s390x__
80 #define __NR_kexec_load 277
81 #endif
82diff --git a/purgatory/arch/x86_64/Makefile b/purgatory/arch/x86_64/Makefile
83index 7300937..4af11e4 100644
84--- a/purgatory/arch/x86_64/Makefile
85+++ b/purgatory/arch/x86_64/Makefile
86@@ -23,4 +23,6 @@ x86_64_PURGATORY_SRCS += purgatory/arch/i386/console-x86.c
87 x86_64_PURGATORY_SRCS += purgatory/arch/i386/vga.c
88 x86_64_PURGATORY_SRCS += purgatory/arch/i386/pic.c
89
90-x86_64_PURGATORY_EXTRA_CFLAGS = -mcmodel=large
91+ifeq ($(SUBARCH),64)
92+ x86_64_PURGATORY_EXTRA_CFLAGS = -mcmodel=large
93+endif
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
deleted file mode 100644
index 6811dfa597..0000000000
--- a/meta/recipes-kernel/kexec/kexec-tools/0006-kexec-arm-undefine-__NR_kexec_file_load-for-arm.patch
+++ /dev/null
@@ -1,40 +0,0 @@
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/0007-kexec-un-break-the-build-on-32-bit-x86.patch b/meta/recipes-kernel/kexec/kexec-tools/0007-kexec-un-break-the-build-on-32-bit-x86.patch
index b91608e52b..36b0845f4a 100644
--- a/meta/recipes-kernel/kexec/kexec-tools/0007-kexec-un-break-the-build-on-32-bit-x86.patch
+++ b/meta/recipes-kernel/kexec/kexec-tools/0007-kexec-un-break-the-build-on-32-bit-x86.patch
@@ -1,20 +1,21 @@
1From d294c5039753a36506949ba5dc782a4c0b307b74 Mon Sep 17 00:00:00 2001 1From bb6a26371d15473b380459ac4404bf330634b585 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com> 2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Fri, 20 Dec 2019 17:21:08 +0100 3Date: Fri, 20 Dec 2019 17:21:08 +0100
4Subject: [PATCH] kexec: un-break the build on 32 bit x86 4Subject: [PATCH] kexec: un-break the build on 32 bit x86
5 5
6Upstream-Status: Pending 6Upstream-Status: Pending
7Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> 7Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
8
8--- 9---
9 kexec/arch/i386/Makefile | 1 + 10 kexec/arch/i386/Makefile | 1 +
10 kexec/arch/i386/kexec-x86.h | 4 ++++ 11 kexec/arch/i386/kexec-x86.h | 4 ++++
11 2 files changed, 5 insertions(+) 12 2 files changed, 5 insertions(+)
12 13
13diff --git a/kexec/arch/i386/Makefile b/kexec/arch/i386/Makefile 14diff --git a/kexec/arch/i386/Makefile b/kexec/arch/i386/Makefile
14index 105cefd..25df57a 100644 15index f486103..5d560be 100644
15--- a/kexec/arch/i386/Makefile 16--- a/kexec/arch/i386/Makefile
16+++ b/kexec/arch/i386/Makefile 17+++ b/kexec/arch/i386/Makefile
17@@ -11,6 +11,7 @@ i386_KEXEC_SRCS += kexec/arch/i386/kexec-beoboot-x86.c 18@@ -12,6 +12,7 @@ i386_KEXEC_SRCS += kexec/arch/i386/kexec-beoboot-x86.c
18 i386_KEXEC_SRCS += kexec/arch/i386/kexec-nbi.c 19 i386_KEXEC_SRCS += kexec/arch/i386/kexec-nbi.c
19 i386_KEXEC_SRCS += kexec/arch/i386/x86-linux-setup.c 20 i386_KEXEC_SRCS += kexec/arch/i386/x86-linux-setup.c
20 i386_KEXEC_SRCS += kexec/arch/i386/crashdump-x86.c 21 i386_KEXEC_SRCS += kexec/arch/i386/crashdump-x86.c
@@ -23,7 +24,7 @@ index 105cefd..25df57a 100644
23 dist += kexec/arch/i386/Makefile $(i386_KEXEC_SRCS) \ 24 dist += kexec/arch/i386/Makefile $(i386_KEXEC_SRCS) \
24 kexec/arch/i386/crashdump-x86.h \ 25 kexec/arch/i386/crashdump-x86.h \
25diff --git a/kexec/arch/i386/kexec-x86.h b/kexec/arch/i386/kexec-x86.h 26diff --git a/kexec/arch/i386/kexec-x86.h b/kexec/arch/i386/kexec-x86.h
26index 1b58c3b..d6b10c0 100644 27index 0f941df..c423171 100644
27--- a/kexec/arch/i386/kexec-x86.h 28--- a/kexec/arch/i386/kexec-x86.h
28+++ b/kexec/arch/i386/kexec-x86.h 29+++ b/kexec/arch/i386/kexec-x86.h
29@@ -56,9 +56,13 @@ struct arch_options_t { 30@@ -56,9 +56,13 @@ struct arch_options_t {
@@ -38,5 +39,5 @@ index 1b58c3b..d6b10c0 100644
38 void multiboot_x86_usage(void); 39 void multiboot_x86_usage(void);
39+void multiboot2_x86_usage(void); 40+void multiboot2_x86_usage(void);
40 41
41 int elf_x86_probe(const char *buf, off_t len); 42 int multiboot2_x86_load(int argc, char **argv, const char *buf, off_t len,
42 int elf_x86_load(int argc, char **argv, const char *buf, off_t len, 43 struct kexec_info *info);
diff --git a/meta/recipes-kernel/kexec/kexec-tools_2.0.20.bb b/meta/recipes-kernel/kexec/kexec-tools_2.0.21.bb
index 69d2e9bfba..069e8f4d05 100644
--- a/meta/recipes-kernel/kexec/kexec-tools_2.0.20.bb
+++ b/meta/recipes-kernel/kexec/kexec-tools_2.0.21.bb
@@ -16,16 +16,13 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/kexec/kexec-tools-${PV}.tar.gz
16 file://0001-powerpc-change-the-memory-size-limit.patch \ 16 file://0001-powerpc-change-the-memory-size-limit.patch \
17 file://0002-purgatory-Pass-r-directly-to-linker.patch \ 17 file://0002-purgatory-Pass-r-directly-to-linker.patch \
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 \
20 file://0005-Disable-PIE-during-link.patch \ 19 file://0005-Disable-PIE-during-link.patch \
21 file://0006-kexec-arm-undefine-__NR_kexec_file_load-for-arm.patch \
22 file://0007-kexec-un-break-the-build-on-32-bit-x86.patch \ 20 file://0007-kexec-un-break-the-build-on-32-bit-x86.patch \
23 file://0001-kexec-Fix-build-with-fno-common.patch \
24 file://0001-arm64-kexec-disabled-check-if-kaslr-seed-dtb-propert.patch \ 21 file://0001-arm64-kexec-disabled-check-if-kaslr-seed-dtb-propert.patch \
22 file://0001-kexec-arch-ppc-kexec-ppc.c-correct-double-definition.patch \
25 " 23 "
26 24
27SRC_URI[md5sum] = "46724b67f32501c5d3e778161347cad9" 25SRC_URI[sha256sum] = "b3d4cfd2ba10d68ce341ea3b8ca414d00a0b6183b95686172154f94bce834f94"
28SRC_URI[sha256sum] = "cb16d79818e0c9de3bb3e33ede5677c34a1d28c646379c7ab44e0faa3eb57a16"
29 26
30inherit autotools update-rc.d systemd 27inherit autotools update-rc.d systemd
31 28