summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWang Mingyu <wangmy@fujitsu.com>2024-07-29 09:09:40 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-08-03 07:47:35 +0100
commit10398200c80dbc0431291660205d9524064f4f3e (patch)
treea0fc00409c48c9ee77869a66cf5ed85faa566486
parent67c0075955e1e1212da9db9a0e386915a41fa59b (diff)
downloadpoky-10398200c80dbc0431291660205d9524064f4f3e.tar.gz
kexec-tools: upgrade 2.0.28 -> 2.0.29
0001-x86-linux-setup.c-Use-POSIX-basename-API.patch 0003-kexec-ARM-Fix-add_buffer_phys_virt-align-issue.patch Fix-building-on-x86_64-with-binutils-2.41.patch removed since they're included in 2.0.29 License-Update: "GNU Library General" changedto "GNU Lesser General" file format changed (From OE-Core rev: 74b382e2d43a2bc355e2f2b2591c6ce9cadd56a3) Signed-off-by: Wang Mingyu <wangmy@fujitsu.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-kernel/kexec/kexec-tools/0001-x86-linux-setup.c-Use-POSIX-basename-API.patch54
-rw-r--r--meta/recipes-kernel/kexec/kexec-tools/0003-kexec-ARM-Fix-add_buffer_phys_virt-align-issue.patch50
-rw-r--r--meta/recipes-kernel/kexec/kexec-tools/Fix-building-on-x86_64-with-binutils-2.41.patch95
-rw-r--r--meta/recipes-kernel/kexec/kexec-tools_2.0.29.bb (renamed from meta/recipes-kernel/kexec/kexec-tools_2.0.28.bb)11
4 files changed, 4 insertions, 206 deletions
diff --git a/meta/recipes-kernel/kexec/kexec-tools/0001-x86-linux-setup.c-Use-POSIX-basename-API.patch b/meta/recipes-kernel/kexec/kexec-tools/0001-x86-linux-setup.c-Use-POSIX-basename-API.patch
deleted file mode 100644
index e223f45998..0000000000
--- a/meta/recipes-kernel/kexec/kexec-tools/0001-x86-linux-setup.c-Use-POSIX-basename-API.patch
+++ /dev/null
@@ -1,54 +0,0 @@
1From 32c8ffa7ace6f1b7e63f9ddffab00b00c36a7b57 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 15 May 2024 21:18:08 -0700
4Subject: [PATCH] x86-linux-setup.c: Use POSIX basename API
5
6Musl C library only supports POSIX basename function. while glibc has
7both GNU extention as well as POSIX basename implemented. Switch to
8using posix version, so it can work across musl and glibc
9
10basename prototype has been removed from string.h from latest musl [1]
11compilers e.g. clang-18/GCC-14 flags the absense of prototype as error.
12therefore include libgen.h for providing it.
13
14[1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7
15
16Upstream-Status: Submitted [https://lists.infradead.org/pipermail/kexec/2024-May/030034.html]
17Signed-off-by: Khem Raj <raj.khem@gmail.com>
18---
19 kexec/arch/i386/x86-linux-setup.c | 9 ++++++---
20 1 file changed, 6 insertions(+), 3 deletions(-)
21
22diff --git a/kexec/arch/i386/x86-linux-setup.c b/kexec/arch/i386/x86-linux-setup.c
23index 9a281dc..73251b9 100644
24--- a/kexec/arch/i386/x86-linux-setup.c
25+++ b/kexec/arch/i386/x86-linux-setup.c
26@@ -14,6 +14,7 @@
27 *
28 */
29 #define _GNU_SOURCE
30+#include <libgen.h>
31 #include <stdint.h>
32 #include <stdio.h>
33 #include <string.h>
34@@ -329,12 +330,14 @@ static int add_edd_entry(struct x86_linux_param_header *real_mode,
35 memset(edd_info, 0, sizeof(struct edd_info));
36
37 /* extract the device number */
38- if (sscanf(basename(sysfs_name), "int13_dev%hhx", &devnum) != 1) {
39+ char* sysfs_name_copy = strdup(sysfs_name);
40+ if (sscanf(basename(sysfs_name_copy), "int13_dev%hhx", &devnum) != 1) {
41 fprintf(stderr, "Invalid format of int13_dev dir "
42- "entry: %s\n", basename(sysfs_name));
43+ "entry: %s\n", basename(sysfs_name_copy));
44+ free(sysfs_name_copy);
45 return -1;
46 }
47-
48+ free(sysfs_name_copy);
49 /* if there's a MBR signature, then add it */
50 if (file_scanf(sysfs_name, "mbr_signature", "0x%x", &mbr_sig) == 1) {
51 real_mode->edd_mbr_sig_buffer[*current_mbr] = mbr_sig;
52--
532.45.1
54
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
deleted file mode 100644
index 489b109285..0000000000
--- a/meta/recipes-kernel/kexec/kexec-tools/0003-kexec-ARM-Fix-add_buffer_phys_virt-align-issue.patch
+++ /dev/null
@@ -1,50 +0,0 @@
1From b62c1da8f8e641397add10367ee9c4cfdedb1cc0 Mon Sep 17 00:00:00 2001
2From: Haiqing Bai <Haiqing.Bai@windriver.com>
3Date: Mon, 9 Jan 2017 15:26:29 +0800
4Subject: [PATCH] kexec: ARM: Fix add_buffer_phys_virt() align issue
5
6When "CONFIG_ARM_LPAE" is enabled,3 level page table
7is used by MMU, the "SECTION_SIZE" is defined with
8(1 << 21), but 'add_buffer_phys_virt()' hardcode this
9to (1 << 20).
10
11Upstream-Status: Submitted [via email to horms@kernel.org,http://lists.infradead.org/pipermail/kexec/2024-April/029903.html]
12
13Suggested-By:fredrik.markstrom@gmail.com
14Signed-off-by: Haiqing Bai <Haiqing.Bai@windriver.com>
15
16---
17 kexec/arch/arm/crashdump-arm.c | 5 ++++-
18 1 file changed, 4 insertions(+), 1 deletion(-)
19
20diff --git a/kexec/arch/arm/crashdump-arm.c b/kexec/arch/arm/crashdump-arm.c
21index 1ec1826..cc20f63 100644
22--- a/kexec/arch/arm/crashdump-arm.c
23+++ b/kexec/arch/arm/crashdump-arm.c
24@@ -242,6 +242,7 @@ int load_crashdump_segments(struct kexec_info *info, char *mod_cmdline)
25 void *buf;
26 int err;
27 int last_ranges;
28+ unsigned short align_bit_shift = 20;
29
30 /*
31 * First fetch all the memory (RAM) ranges that we are going to pass to
32@@ -283,6 +284,7 @@ int load_crashdump_segments(struct kexec_info *info, char *mod_cmdline)
33
34 /* for support LPAE enabled kernel*/
35 elf_info.class = ELFCLASS64;
36+ align_bit_shift = 21;
37
38 err = crash_create_elf64_headers(info, &elf_info,
39 usablemem_rgns.ranges,
40@@ -304,8 +306,9 @@ int load_crashdump_segments(struct kexec_info *info, char *mod_cmdline)
41 * 1MB) so that available memory passed in kernel command line will be
42 * aligned to 1MB. This is because kernel create_mapping() wants memory
43 * regions to be aligned to SECTION_SIZE.
44+ * The SECTION_SIZE of LPAE kernel is '1UL << 21' defined in pgtable-3level.h
45 */
46- elfcorehdr = add_buffer_phys_virt(info, buf, bufsz, bufsz, 1 << 20,
47+ elfcorehdr = add_buffer_phys_virt(info, buf, bufsz, bufsz, 1 << align_bit_shift,
48 crash_kernel_mem.start,
49 crash_kernel_mem.end, -1, 0);
50
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
deleted file mode 100644
index 4894f044fc..0000000000
--- a/meta/recipes-kernel/kexec/kexec-tools/Fix-building-on-x86_64-with-binutils-2.41.patch
+++ /dev/null
@@ -1,95 +0,0 @@
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
diff --git a/meta/recipes-kernel/kexec/kexec-tools_2.0.28.bb b/meta/recipes-kernel/kexec/kexec-tools_2.0.29.bb
index b60c51df4a..b88db60ee8 100644
--- a/meta/recipes-kernel/kexec/kexec-tools_2.0.28.bb
+++ b/meta/recipes-kernel/kexec/kexec-tools_2.0.29.bb
@@ -1,11 +1,11 @@
1
2SUMMARY = "Kexec fast reboot tools" 1SUMMARY = "Kexec fast reboot tools"
3DESCRIPTION = "Kexec is a fast reboot feature that lets you reboot to a new Linux kernel" 2DESCRIPTION = "Kexec is a fast reboot feature that lets you reboot to a new Linux kernel"
4HOMEPAGE = "http://kernel.org/pub/linux/utils/kernel/kexec/" 3HOMEPAGE = "http://kernel.org/pub/linux/utils/kernel/kexec/"
5SECTION = "kernel/userland" 4SECTION = "kernel/userland"
6LICENSE = "GPL-2.0-only" 5LICENSE = "GPL-2.0-only"
7LIC_FILES_CHKSUM = "file://COPYING;md5=ea5bed2f60d357618ca161ad539f7c0a \ 6LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
8 file://kexec/kexec.c;beginline=1;endline=20;md5=af10f6ae4a8715965e648aa687ad3e09" 7 file://kexec/kexec.c;beginline=1;endline=20;md5=af10f6ae4a8715965e648aa687ad3e09 \
8 "
9DEPENDS = "zlib xz" 9DEPENDS = "zlib xz"
10 10
11SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/kexec/kexec-tools-${PV}.tar.gz \ 11SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/kexec/kexec-tools-${PV}.tar.gz \
@@ -14,14 +14,11 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/kexec/kexec-tools-${PV}.tar.gz
14 file://kdump.service \ 14 file://kdump.service \
15 file://0001-powerpc-change-the-memory-size-limit.patch \ 15 file://0001-powerpc-change-the-memory-size-limit.patch \
16 file://0002-purgatory-Pass-r-directly-to-linker.patch \ 16 file://0002-purgatory-Pass-r-directly-to-linker.patch \
17 file://0003-kexec-ARM-Fix-add_buffer_phys_virt-align-issue.patch \
18 file://0005-Disable-PIE-during-link.patch \ 17 file://0005-Disable-PIE-during-link.patch \
19 file://0001-arm64-kexec-disabled-check-if-kaslr-seed-dtb-propert.patch \ 18 file://0001-arm64-kexec-disabled-check-if-kaslr-seed-dtb-propert.patch \
20 file://Fix-building-on-x86_64-with-binutils-2.41.patch \
21 file://0001-x86-linux-setup.c-Use-POSIX-basename-API.patch \
22 " 19 "
23 20
24SRC_URI[sha256sum] = "f33d2660b3e38d25a127e87097978e0f7a9a73ab5151a29eb80974d169ff6a29" 21SRC_URI[sha256sum] = "0756dd54dab2f2a437e5d4df64b9760c3e6cf6a7d29fb296bdeeeb749f6ea28e"
25 22
26inherit autotools update-rc.d systemd 23inherit autotools update-rc.d systemd
27 24