diff options
Diffstat (limited to 'meta/recipes-kernel/kexec/kexec-tools')
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 kexec/arch/arm64/kexec-arm64.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) -Index: kexec-tools-2.0.20/kexec/arch/arm64/kexec-arm64.c -=================================================================== ---- kexec-tools-2.0.20.orig/kexec/arch/arm64/kexec-arm64.c -+++ kexec-tools-2.0.20/kexec/arch/arm64/kexec-arm64.c -@@ -428,7 +428,7 @@ static int setup_2nd_dtb(struct dtb *dtb +diff --git a/kexec/arch/arm64/kexec-arm64.c b/kexec/arch/arm64/kexec-arm64.c +index ec6df4b..10238d9 100644 +--- a/kexec/arch/arm64/kexec-arm64.c ++++ b/kexec/arch/arm64/kexec-arm64.c +@@ -503,7 +503,7 @@ static int setup_2nd_dtb(struct dtb *dtb, char *command_line, int on_crash) int len, range_len; int nodeoffset; int new_size; -- int result, kaslr_seed; -+ int result; +- int i, result, kaslr_seed; ++ int i, result; result = fdt_check_header(dtb->buf); -@@ -499,18 +499,6 @@ static int setup_2nd_dtb(struct dtb *dtb +@@ -576,18 +576,6 @@ static int setup_2nd_dtb(struct dtb *dtb, char *command_line, int on_crash) return result; } } else { @@ -65,3 +65,6 @@ Index: kexec-tools-2.0.20/kexec/arch/arm64/kexec-arm64.c /* * Invoke the getrandom system call with * GRND_NONBLOCK, to make sure we +-- +2.25.1 + 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 @@ -From ba2fb5baf6b0a8c882ac32301dd7a8d16de0dcf6 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex.kanavin@gmail.com> -Date: Sun, 27 Dec 2020 23:39:29 +0100 -Subject: [PATCH] kexec/arch/ppc/kexec-ppc.c: correct double definition error - -Upstream-Status: Pending -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> ---- - kexec/arch/ppc/kexec-ppc.c | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/kexec/arch/ppc/kexec-ppc.c b/kexec/arch/ppc/kexec-ppc.c -index 03bec36..5b3e244 100644 ---- a/kexec/arch/ppc/kexec-ppc.c -+++ b/kexec/arch/ppc/kexec-ppc.c -@@ -35,7 +35,6 @@ unsigned long long initrd_base = 0, initrd_size = 0; - unsigned long long ramdisk_base = 0, ramdisk_size = 0; - unsigned int rtas_base, rtas_size; - int max_memory_ranges; --const char *ramdisk; - - /* - * 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 @@ -From a04bcf8f683c1a5a7d015920124457ad56fb7cf0 Mon Sep 17 00:00:00 2001 +From e5bc9fbd6029057a4e3815a5326af5bd83a450e6 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Mon, 7 Sep 2015 07:59:45 +0000 Subject: [PATCH] purgatory: Pass -r directly to linker @@ -10,15 +10,16 @@ unfiltered Signed-off-by: Khem Raj <raj.khem@gmail.com> Upstream-Status: Pending + --- purgatory/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/purgatory/Makefile b/purgatory/Makefile -index 2dd6c47..416e6b9 100644 +index 4d2d071..6673423 100644 --- a/purgatory/Makefile +++ b/purgatory/Makefile -@@ -60,7 +60,7 @@ $(PURGATORY): CPPFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS) \ +@@ -61,7 +61,7 @@ $(PURGATORY): CPPFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS) \ -I$(shell $(CC) -print-file-name=include) $(PURGATORY): LDFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS)\ -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 @@ -From 55e583d20651e829afbbc8dba0f8ec3017cda2d5 Mon Sep 17 00:00:00 2001 +From b62c1da8f8e641397add10367ee9c4cfdedb1cc0 Mon Sep 17 00:00:00 2001 From: Haiqing Bai <Haiqing.Bai@windriver.com> Date: Mon, 9 Jan 2017 15:26:29 +0800 Subject: [PATCH] kexec: ARM: Fix add_buffer_phys_virt() align issue @@ -12,15 +12,16 @@ Upstream-Status: Pending Suggested-By:fredrik.markstrom@gmail.com Signed-off-by: Haiqing Bai <Haiqing.Bai@windriver.com> + --- kexec/arch/arm/crashdump-arm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kexec/arch/arm/crashdump-arm.c b/kexec/arch/arm/crashdump-arm.c -index daa4788..3f72b38 100644 +index 1ec1826..cc20f63 100644 --- a/kexec/arch/arm/crashdump-arm.c +++ b/kexec/arch/arm/crashdump-arm.c -@@ -240,6 +240,7 @@ int load_crashdump_segments(struct kexec_info *info, char *mod_cmdline) +@@ -242,6 +242,7 @@ int load_crashdump_segments(struct kexec_info *info, char *mod_cmdline) void *buf; int err; int last_ranges; @@ -28,7 +29,7 @@ index daa4788..3f72b38 100644 /* * First fetch all the memory (RAM) ranges that we are going to pass to -@@ -281,6 +282,7 @@ int load_crashdump_segments(struct kexec_info *info, char *mod_cmdline) +@@ -283,6 +284,7 @@ int load_crashdump_segments(struct kexec_info *info, char *mod_cmdline) /* for support LPAE enabled kernel*/ elf_info.class = ELFCLASS64; @@ -36,7 +37,7 @@ index daa4788..3f72b38 100644 err = crash_create_elf64_headers(info, &elf_info, usablemem_rgns.ranges, -@@ -302,8 +304,9 @@ int load_crashdump_segments(struct kexec_info *info, char *mod_cmdline) +@@ -304,8 +306,9 @@ int load_crashdump_segments(struct kexec_info *info, char *mod_cmdline) * 1MB) so that available memory passed in kernel command line will be * aligned to 1MB. This is because kernel create_mapping() wants memory * 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 @@ -From c54488ad5fd657e0f154d76d7456d9080be24836 Mon Sep 17 00:00:00 2001 +From 494888bcc3bbf070dfce1b2686ee34c8619aa33d Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Sat, 10 Jun 2017 11:18:49 -0700 Subject: [PATCH] Disable PIE during link @@ -9,15 +9,16 @@ just need to match it with linker flags Upstream-Status: Pending Signed-off-by: Khem Raj <raj.khem@gmail.com> + --- purgatory/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/purgatory/Makefile b/purgatory/Makefile -index 416e6b9..f00edb4 100644 +index 6673423..a7405ea 100644 --- a/purgatory/Makefile +++ b/purgatory/Makefile -@@ -59,7 +59,7 @@ $(PURGATORY): CPPFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS) \ +@@ -60,7 +60,7 @@ $(PURGATORY): CPPFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS) \ -Iinclude \ -I$(shell $(CC) -print-file-name=include) $(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 @@ -From bb6a26371d15473b380459ac4404bf330634b585 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex.kanavin@gmail.com> -Date: Fri, 20 Dec 2019 17:21:08 +0100 -Subject: [PATCH] kexec: un-break the build on 32 bit x86 - -Upstream-Status: Pending -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> - ---- - kexec/arch/i386/Makefile | 1 + - kexec/arch/i386/kexec-x86.h | 4 ++++ - 2 files changed, 5 insertions(+) - -diff --git a/kexec/arch/i386/Makefile b/kexec/arch/i386/Makefile -index f486103..5d560be 100644 ---- a/kexec/arch/i386/Makefile -+++ b/kexec/arch/i386/Makefile -@@ -12,6 +12,7 @@ i386_KEXEC_SRCS += kexec/arch/i386/kexec-beoboot-x86.c - i386_KEXEC_SRCS += kexec/arch/i386/kexec-nbi.c - i386_KEXEC_SRCS += kexec/arch/i386/x86-linux-setup.c - i386_KEXEC_SRCS += kexec/arch/i386/crashdump-x86.c -+i386_KEXEC_SRCS += kexec/arch/i386/kexec-mb2-x86.c - - dist += kexec/arch/i386/Makefile $(i386_KEXEC_SRCS) \ - kexec/arch/i386/crashdump-x86.h \ -diff --git a/kexec/arch/i386/kexec-x86.h b/kexec/arch/i386/kexec-x86.h -index 0f941df..c423171 100644 ---- a/kexec/arch/i386/kexec-x86.h -+++ b/kexec/arch/i386/kexec-x86.h -@@ -56,9 +56,13 @@ struct arch_options_t { - }; - - int multiboot_x86_probe(const char *buf, off_t len); -+int multiboot2_x86_probe(const char *buf, off_t len); - int multiboot_x86_load(int argc, char **argv, const char *buf, off_t len, - struct kexec_info *info); -+int multiboot2_x86_load(int argc, char **argv, const char *buf, off_t len, -+ struct kexec_info *info); - void multiboot_x86_usage(void); -+void multiboot2_x86_usage(void); - - int multiboot2_x86_load(int argc, char **argv, const char *buf, off_t len, - 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 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Michel Lind <salimma@fedoraproject.org> +Date: Tue, 30 Jan 2024 04:14:31 -0600 +Subject: [PATCH] Fix building on x86_64 with binutils 2.41 + +Newer versions of the GNU assembler (observed with binutils 2.41) will +complain about the ".arch i386" in files assembled with "as --64", +with the message "Error: 64bit mode not supported on 'i386'". + +Fix by moving ".arch i386" below the relevant ".code32" directive, so +that the assembler is no longer expecting 64-bit instructions to be used +by the time that the ".arch i386" directive is encountered. + +Based on similar iPXE fix: +https://github.com/ipxe/ipxe/commit/6ca597eee + +Signed-off-by: Michel Lind <michel@michel-slm.name> +Signed-off-by: Simon Horman <horms@kernel.org> + +Upstream-Status: Backport [https://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git/commit/?h=main&id=328de8e00e298f00d7ba6b25dc3950147e9642e6] +Signed-off-by: Yoann Congal <yoann.congal@smile.fr> +--- + purgatory/arch/i386/entry32-16-debug.S | 2 +- + purgatory/arch/i386/entry32-16.S | 2 +- + purgatory/arch/i386/entry32.S | 2 +- + purgatory/arch/i386/setup-x86.S | 2 +- + 4 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/purgatory/arch/i386/entry32-16-debug.S b/purgatory/arch/i386/entry32-16-debug.S +index 5167944..12e1164 100644 +--- a/purgatory/arch/i386/entry32-16-debug.S ++++ b/purgatory/arch/i386/entry32-16-debug.S +@@ -25,10 +25,10 @@ + .globl entry16_debug_pre32 + .globl entry16_debug_first32 + .globl entry16_debug_old_first32 +- .arch i386 + .balign 16 + entry16_debug: + .code32 ++ .arch i386 + /* Compute where I am running at (assumes esp valid) */ + call 1f + 1: popl %ebx +diff --git a/purgatory/arch/i386/entry32-16.S b/purgatory/arch/i386/entry32-16.S +index c051aab..eace095 100644 +--- a/purgatory/arch/i386/entry32-16.S ++++ b/purgatory/arch/i386/entry32-16.S +@@ -20,10 +20,10 @@ + #undef i386 + .text + .globl entry16, entry16_regs +- .arch i386 + .balign 16 + entry16: + .code32 ++ .arch i386 + /* Compute where I am running at (assumes esp valid) */ + call 1f + 1: popl %ebx +diff --git a/purgatory/arch/i386/entry32.S b/purgatory/arch/i386/entry32.S +index f7a494f..8ce9e31 100644 +--- a/purgatory/arch/i386/entry32.S ++++ b/purgatory/arch/i386/entry32.S +@@ -20,10 +20,10 @@ + #undef i386 + + .text +- .arch i386 + .globl entry32, entry32_regs + entry32: + .code32 ++ .arch i386 + + /* Setup a gdt that should that is generally usefully */ + lgdt %cs:gdt +diff --git a/purgatory/arch/i386/setup-x86.S b/purgatory/arch/i386/setup-x86.S +index 201bb2c..a212eed 100644 +--- a/purgatory/arch/i386/setup-x86.S ++++ b/purgatory/arch/i386/setup-x86.S +@@ -21,10 +21,10 @@ + #undef i386 + + .text +- .arch i386 + .globl purgatory_start + purgatory_start: + .code32 ++ .arch i386 + + /* Load a gdt so I know what the segment registers are */ + lgdt %cs:gdt +-- +2.39.2 + |