summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/kexec/kexec-tools
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-kernel/kexec/kexec-tools')
-rw-r--r--meta/recipes-kernel/kexec/kexec-tools/0001-arm64-kexec-disabled-check-if-kaslr-seed-dtb-propert.patch19
-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/0002-purgatory-Pass-r-directly-to-linker.patch7
-rw-r--r--meta/recipes-kernel/kexec/kexec-tools/0003-kexec-ARM-Fix-add_buffer_phys_virt-align-issue.patch11
-rw-r--r--meta/recipes-kernel/kexec/kexec-tools/0005-Disable-PIE-during-link.patch7
-rw-r--r--meta/recipes-kernel/kexec/kexec-tools/0007-kexec-un-break-the-build-on-32-bit-x86.patch43
-rw-r--r--meta/recipes-kernel/kexec/kexec-tools/Fix-building-on-x86_64-with-binutils-2.41.patch95
7 files changed, 120 insertions, 85 deletions
diff --git a/meta/recipes-kernel/kexec/kexec-tools/0001-arm64-kexec-disabled-check-if-kaslr-seed-dtb-propert.patch b/meta/recipes-kernel/kexec/kexec-tools/0001-arm64-kexec-disabled-check-if-kaslr-seed-dtb-propert.patch
index c2301e711d..ddc1519126 100644
--- a/meta/recipes-kernel/kexec/kexec-tools/0001-arm64-kexec-disabled-check-if-kaslr-seed-dtb-propert.patch
+++ b/meta/recipes-kernel/kexec/kexec-tools/0001-arm64-kexec-disabled-check-if-kaslr-seed-dtb-propert.patch
@@ -33,20 +33,20 @@ Upstream-Status: Submitted [http://lists.infradead.org/pipermail/kexec/2020-Nove
33 kexec/arch/arm64/kexec-arm64.c | 14 +------------- 33 kexec/arch/arm64/kexec-arm64.c | 14 +-------------
34 1 file changed, 1 insertion(+), 13 deletions(-) 34 1 file changed, 1 insertion(+), 13 deletions(-)
35 35
36Index: kexec-tools-2.0.20/kexec/arch/arm64/kexec-arm64.c 36diff --git a/kexec/arch/arm64/kexec-arm64.c b/kexec/arch/arm64/kexec-arm64.c
37=================================================================== 37index ec6df4b..10238d9 100644
38--- kexec-tools-2.0.20.orig/kexec/arch/arm64/kexec-arm64.c 38--- a/kexec/arch/arm64/kexec-arm64.c
39+++ kexec-tools-2.0.20/kexec/arch/arm64/kexec-arm64.c 39+++ b/kexec/arch/arm64/kexec-arm64.c
40@@ -428,7 +428,7 @@ static int setup_2nd_dtb(struct dtb *dtb 40@@ -503,7 +503,7 @@ static int setup_2nd_dtb(struct dtb *dtb, char *command_line, int on_crash)
41 int len, range_len; 41 int len, range_len;
42 int nodeoffset; 42 int nodeoffset;
43 int new_size; 43 int new_size;
44- int result, kaslr_seed; 44- int i, result, kaslr_seed;
45+ int result; 45+ int i, result;
46 46
47 result = fdt_check_header(dtb->buf); 47 result = fdt_check_header(dtb->buf);
48 48
49@@ -499,18 +499,6 @@ static int setup_2nd_dtb(struct dtb *dtb 49@@ -576,18 +576,6 @@ static int setup_2nd_dtb(struct dtb *dtb, char *command_line, int on_crash)
50 return result; 50 return result;
51 } 51 }
52 } else { 52 } else {
@@ -65,3 +65,6 @@ Index: kexec-tools-2.0.20/kexec/arch/arm64/kexec-arm64.c
65 /* 65 /*
66 * Invoke the getrandom system call with 66 * Invoke the getrandom system call with
67 * GRND_NONBLOCK, to make sure we 67 * GRND_NONBLOCK, to make sure we
68--
692.25.1
70
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
deleted file mode 100644
index 6aeebc3939..0000000000
--- a/meta/recipes-kernel/kexec/kexec-tools/0001-kexec-arch-ppc-kexec-ppc.c-correct-double-definition.patch
+++ /dev/null
@@ -1,23 +0,0 @@
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/0002-purgatory-Pass-r-directly-to-linker.patch b/meta/recipes-kernel/kexec/kexec-tools/0002-purgatory-Pass-r-directly-to-linker.patch
index 363d5da4ae..a537ac2f0b 100644
--- a/meta/recipes-kernel/kexec/kexec-tools/0002-purgatory-Pass-r-directly-to-linker.patch
+++ b/meta/recipes-kernel/kexec/kexec-tools/0002-purgatory-Pass-r-directly-to-linker.patch
@@ -1,4 +1,4 @@
1From a04bcf8f683c1a5a7d015920124457ad56fb7cf0 Mon Sep 17 00:00:00 2001 1From e5bc9fbd6029057a4e3815a5326af5bd83a450e6 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 7 Sep 2015 07:59:45 +0000 3Date: Mon, 7 Sep 2015 07:59:45 +0000
4Subject: [PATCH] purgatory: Pass -r directly to linker 4Subject: [PATCH] purgatory: Pass -r directly to linker
@@ -10,15 +10,16 @@ unfiltered
10Signed-off-by: Khem Raj <raj.khem@gmail.com> 10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11 11
12Upstream-Status: Pending 12Upstream-Status: Pending
13
13--- 14---
14 purgatory/Makefile | 2 +- 15 purgatory/Makefile | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-) 16 1 file changed, 1 insertion(+), 1 deletion(-)
16 17
17diff --git a/purgatory/Makefile b/purgatory/Makefile 18diff --git a/purgatory/Makefile b/purgatory/Makefile
18index 2dd6c47..416e6b9 100644 19index 4d2d071..6673423 100644
19--- a/purgatory/Makefile 20--- a/purgatory/Makefile
20+++ b/purgatory/Makefile 21+++ b/purgatory/Makefile
21@@ -60,7 +60,7 @@ $(PURGATORY): CPPFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS) \ 22@@ -61,7 +61,7 @@ $(PURGATORY): CPPFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS) \
22 -I$(shell $(CC) -print-file-name=include) 23 -I$(shell $(CC) -print-file-name=include)
23 $(PURGATORY): LDFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS)\ 24 $(PURGATORY): LDFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS)\
24 -Wl,--no-undefined -nostartfiles -nostdlib \ 25 -Wl,--no-undefined -nostartfiles -nostdlib \
diff --git a/meta/recipes-kernel/kexec/kexec-tools/0003-kexec-ARM-Fix-add_buffer_phys_virt-align-issue.patch b/meta/recipes-kernel/kexec/kexec-tools/0003-kexec-ARM-Fix-add_buffer_phys_virt-align-issue.patch
index 832fe67716..e874a8b4f1 100644
--- a/meta/recipes-kernel/kexec/kexec-tools/0003-kexec-ARM-Fix-add_buffer_phys_virt-align-issue.patch
+++ b/meta/recipes-kernel/kexec/kexec-tools/0003-kexec-ARM-Fix-add_buffer_phys_virt-align-issue.patch
@@ -1,4 +1,4 @@
1From 55e583d20651e829afbbc8dba0f8ec3017cda2d5 Mon Sep 17 00:00:00 2001 1From b62c1da8f8e641397add10367ee9c4cfdedb1cc0 Mon Sep 17 00:00:00 2001
2From: Haiqing Bai <Haiqing.Bai@windriver.com> 2From: Haiqing Bai <Haiqing.Bai@windriver.com>
3Date: Mon, 9 Jan 2017 15:26:29 +0800 3Date: Mon, 9 Jan 2017 15:26:29 +0800
4Subject: [PATCH] kexec: ARM: Fix add_buffer_phys_virt() align issue 4Subject: [PATCH] kexec: ARM: Fix add_buffer_phys_virt() align issue
@@ -12,15 +12,16 @@ Upstream-Status: Pending
12 12
13Suggested-By:fredrik.markstrom@gmail.com 13Suggested-By:fredrik.markstrom@gmail.com
14Signed-off-by: Haiqing Bai <Haiqing.Bai@windriver.com> 14Signed-off-by: Haiqing Bai <Haiqing.Bai@windriver.com>
15
15--- 16---
16 kexec/arch/arm/crashdump-arm.c | 5 ++++- 17 kexec/arch/arm/crashdump-arm.c | 5 ++++-
17 1 file changed, 4 insertions(+), 1 deletion(-) 18 1 file changed, 4 insertions(+), 1 deletion(-)
18 19
19diff --git a/kexec/arch/arm/crashdump-arm.c b/kexec/arch/arm/crashdump-arm.c 20diff --git a/kexec/arch/arm/crashdump-arm.c b/kexec/arch/arm/crashdump-arm.c
20index daa4788..3f72b38 100644 21index 1ec1826..cc20f63 100644
21--- a/kexec/arch/arm/crashdump-arm.c 22--- a/kexec/arch/arm/crashdump-arm.c
22+++ b/kexec/arch/arm/crashdump-arm.c 23+++ b/kexec/arch/arm/crashdump-arm.c
23@@ -240,6 +240,7 @@ int load_crashdump_segments(struct kexec_info *info, char *mod_cmdline) 24@@ -242,6 +242,7 @@ int load_crashdump_segments(struct kexec_info *info, char *mod_cmdline)
24 void *buf; 25 void *buf;
25 int err; 26 int err;
26 int last_ranges; 27 int last_ranges;
@@ -28,7 +29,7 @@ index daa4788..3f72b38 100644
28 29
29 /* 30 /*
30 * First fetch all the memory (RAM) ranges that we are going to pass to 31 * First fetch all the memory (RAM) ranges that we are going to pass to
31@@ -281,6 +282,7 @@ int load_crashdump_segments(struct kexec_info *info, char *mod_cmdline) 32@@ -283,6 +284,7 @@ int load_crashdump_segments(struct kexec_info *info, char *mod_cmdline)
32 33
33 /* for support LPAE enabled kernel*/ 34 /* for support LPAE enabled kernel*/
34 elf_info.class = ELFCLASS64; 35 elf_info.class = ELFCLASS64;
@@ -36,7 +37,7 @@ index daa4788..3f72b38 100644
36 37
37 err = crash_create_elf64_headers(info, &elf_info, 38 err = crash_create_elf64_headers(info, &elf_info,
38 usablemem_rgns.ranges, 39 usablemem_rgns.ranges,
39@@ -302,8 +304,9 @@ int load_crashdump_segments(struct kexec_info *info, char *mod_cmdline) 40@@ -304,8 +306,9 @@ int load_crashdump_segments(struct kexec_info *info, char *mod_cmdline)
40 * 1MB) so that available memory passed in kernel command line will be 41 * 1MB) so that available memory passed in kernel command line will be
41 * aligned to 1MB. This is because kernel create_mapping() wants memory 42 * aligned to 1MB. This is because kernel create_mapping() wants memory
42 * regions to be aligned to SECTION_SIZE. 43 * regions to be aligned to SECTION_SIZE.
diff --git a/meta/recipes-kernel/kexec/kexec-tools/0005-Disable-PIE-during-link.patch b/meta/recipes-kernel/kexec/kexec-tools/0005-Disable-PIE-during-link.patch
index 7a4b8548ca..6a21744ac1 100644
--- a/meta/recipes-kernel/kexec/kexec-tools/0005-Disable-PIE-during-link.patch
+++ b/meta/recipes-kernel/kexec/kexec-tools/0005-Disable-PIE-during-link.patch
@@ -1,4 +1,4 @@
1From c54488ad5fd657e0f154d76d7456d9080be24836 Mon Sep 17 00:00:00 2001 1From 494888bcc3bbf070dfce1b2686ee34c8619aa33d Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 10 Jun 2017 11:18:49 -0700 3Date: Sat, 10 Jun 2017 11:18:49 -0700
4Subject: [PATCH] Disable PIE during link 4Subject: [PATCH] Disable PIE during link
@@ -9,15 +9,16 @@ just need to match it with linker flags
9Upstream-Status: Pending 9Upstream-Status: Pending
10 10
11Signed-off-by: Khem Raj <raj.khem@gmail.com> 11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12
12--- 13---
13 purgatory/Makefile | 2 +- 14 purgatory/Makefile | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-) 15 1 file changed, 1 insertion(+), 1 deletion(-)
15 16
16diff --git a/purgatory/Makefile b/purgatory/Makefile 17diff --git a/purgatory/Makefile b/purgatory/Makefile
17index 416e6b9..f00edb4 100644 18index 6673423..a7405ea 100644
18--- a/purgatory/Makefile 19--- a/purgatory/Makefile
19+++ b/purgatory/Makefile 20+++ b/purgatory/Makefile
20@@ -59,7 +59,7 @@ $(PURGATORY): CPPFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS) \ 21@@ -60,7 +60,7 @@ $(PURGATORY): CPPFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS) \
21 -Iinclude \ 22 -Iinclude \
22 -I$(shell $(CC) -print-file-name=include) 23 -I$(shell $(CC) -print-file-name=include)
23 $(PURGATORY): LDFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS)\ 24 $(PURGATORY): LDFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS)\
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
deleted file mode 100644
index 36b0845f4a..0000000000
--- a/meta/recipes-kernel/kexec/kexec-tools/0007-kexec-un-break-the-build-on-32-bit-x86.patch
+++ /dev/null
@@ -1,43 +0,0 @@
1From bb6a26371d15473b380459ac4404bf330634b585 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Fri, 20 Dec 2019 17:21:08 +0100
4Subject: [PATCH] kexec: un-break the build on 32 bit x86
5
6Upstream-Status: Pending
7Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
8
9---
10 kexec/arch/i386/Makefile | 1 +
11 kexec/arch/i386/kexec-x86.h | 4 ++++
12 2 files changed, 5 insertions(+)
13
14diff --git a/kexec/arch/i386/Makefile b/kexec/arch/i386/Makefile
15index f486103..5d560be 100644
16--- a/kexec/arch/i386/Makefile
17+++ b/kexec/arch/i386/Makefile
18@@ -12,6 +12,7 @@ i386_KEXEC_SRCS += kexec/arch/i386/kexec-beoboot-x86.c
19 i386_KEXEC_SRCS += kexec/arch/i386/kexec-nbi.c
20 i386_KEXEC_SRCS += kexec/arch/i386/x86-linux-setup.c
21 i386_KEXEC_SRCS += kexec/arch/i386/crashdump-x86.c
22+i386_KEXEC_SRCS += kexec/arch/i386/kexec-mb2-x86.c
23
24 dist += kexec/arch/i386/Makefile $(i386_KEXEC_SRCS) \
25 kexec/arch/i386/crashdump-x86.h \
26diff --git a/kexec/arch/i386/kexec-x86.h b/kexec/arch/i386/kexec-x86.h
27index 0f941df..c423171 100644
28--- a/kexec/arch/i386/kexec-x86.h
29+++ b/kexec/arch/i386/kexec-x86.h
30@@ -56,9 +56,13 @@ struct arch_options_t {
31 };
32
33 int multiboot_x86_probe(const char *buf, off_t len);
34+int multiboot2_x86_probe(const char *buf, off_t len);
35 int multiboot_x86_load(int argc, char **argv, const char *buf, off_t len,
36 struct kexec_info *info);
37+int multiboot2_x86_load(int argc, char **argv, const char *buf, off_t len,
38+ struct kexec_info *info);
39 void multiboot_x86_usage(void);
40+void multiboot2_x86_usage(void);
41
42 int multiboot2_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/Fix-building-on-x86_64-with-binutils-2.41.patch b/meta/recipes-kernel/kexec/kexec-tools/Fix-building-on-x86_64-with-binutils-2.41.patch
new file mode 100644
index 0000000000..4894f044fc
--- /dev/null
+++ b/meta/recipes-kernel/kexec/kexec-tools/Fix-building-on-x86_64-with-binutils-2.41.patch
@@ -0,0 +1,95 @@
1From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2From: Michel Lind <salimma@fedoraproject.org>
3Date: Tue, 30 Jan 2024 04:14:31 -0600
4Subject: [PATCH] Fix building on x86_64 with binutils 2.41
5
6Newer versions of the GNU assembler (observed with binutils 2.41) will
7complain about the ".arch i386" in files assembled with "as --64",
8with the message "Error: 64bit mode not supported on 'i386'".
9
10Fix by moving ".arch i386" below the relevant ".code32" directive, so
11that the assembler is no longer expecting 64-bit instructions to be used
12by the time that the ".arch i386" directive is encountered.
13
14Based on similar iPXE fix:
15https://github.com/ipxe/ipxe/commit/6ca597eee
16
17Signed-off-by: Michel Lind <michel@michel-slm.name>
18Signed-off-by: Simon Horman <horms@kernel.org>
19
20Upstream-Status: Backport [https://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git/commit/?h=main&id=328de8e00e298f00d7ba6b25dc3950147e9642e6]
21Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
22---
23 purgatory/arch/i386/entry32-16-debug.S | 2 +-
24 purgatory/arch/i386/entry32-16.S | 2 +-
25 purgatory/arch/i386/entry32.S | 2 +-
26 purgatory/arch/i386/setup-x86.S | 2 +-
27 4 files changed, 4 insertions(+), 4 deletions(-)
28
29diff --git a/purgatory/arch/i386/entry32-16-debug.S b/purgatory/arch/i386/entry32-16-debug.S
30index 5167944..12e1164 100644
31--- a/purgatory/arch/i386/entry32-16-debug.S
32+++ b/purgatory/arch/i386/entry32-16-debug.S
33@@ -25,10 +25,10 @@
34 .globl entry16_debug_pre32
35 .globl entry16_debug_first32
36 .globl entry16_debug_old_first32
37- .arch i386
38 .balign 16
39 entry16_debug:
40 .code32
41+ .arch i386
42 /* Compute where I am running at (assumes esp valid) */
43 call 1f
44 1: popl %ebx
45diff --git a/purgatory/arch/i386/entry32-16.S b/purgatory/arch/i386/entry32-16.S
46index c051aab..eace095 100644
47--- a/purgatory/arch/i386/entry32-16.S
48+++ b/purgatory/arch/i386/entry32-16.S
49@@ -20,10 +20,10 @@
50 #undef i386
51 .text
52 .globl entry16, entry16_regs
53- .arch i386
54 .balign 16
55 entry16:
56 .code32
57+ .arch i386
58 /* Compute where I am running at (assumes esp valid) */
59 call 1f
60 1: popl %ebx
61diff --git a/purgatory/arch/i386/entry32.S b/purgatory/arch/i386/entry32.S
62index f7a494f..8ce9e31 100644
63--- a/purgatory/arch/i386/entry32.S
64+++ b/purgatory/arch/i386/entry32.S
65@@ -20,10 +20,10 @@
66 #undef i386
67
68 .text
69- .arch i386
70 .globl entry32, entry32_regs
71 entry32:
72 .code32
73+ .arch i386
74
75 /* Setup a gdt that should that is generally usefully */
76 lgdt %cs:gdt
77diff --git a/purgatory/arch/i386/setup-x86.S b/purgatory/arch/i386/setup-x86.S
78index 201bb2c..a212eed 100644
79--- a/purgatory/arch/i386/setup-x86.S
80+++ b/purgatory/arch/i386/setup-x86.S
81@@ -21,10 +21,10 @@
82 #undef i386
83
84 .text
85- .arch i386
86 .globl purgatory_start
87 purgatory_start:
88 .code32
89+ .arch i386
90
91 /* Load a gdt so I know what the segment registers are */
92 lgdt %cs:gdt
93--
942.39.2
95