summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel
diff options
context:
space:
mode:
authorYoann Congal <yoann.congal@smile.fr>2024-02-14 00:03:01 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-02-14 13:53:36 +0000
commitf441e63de9d34631ad90d062239fe7cae0b7c996 (patch)
tree60967f950d3516296d005278b6ceacdced5e4fd0 /meta/recipes-kernel
parent1523bba26fd86cbf13793ecdda2d745b5ca44e30 (diff)
downloadpoky-f441e63de9d34631ad90d062239fe7cae0b7c996.tar.gz
kexec-tools: Replace a submitted patch by the backported one
This replaces "kexec-tools: purgatory: fix build on `binutils-2.42`" (Submitted upstream) by "Fix building on x86_64 with binutils 2.41" (which was actually merged). Upstream maintainers found the second patch more complete [0]. [0]: https://lore.kernel.org/all/ZbopWV9qrxMME2hU@MiWiFi-R3L-srv/T/ (From OE-Core rev: 704523a383d6a7f5fa46348010e9676b4e828331) Signed-off-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-kernel')
-rw-r--r--meta/recipes-kernel/kexec/kexec-tools/0001-kexec-tools-purgatory-fix-build-on-binutils-2.42.patch59
-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.28.bb2
3 files changed, 96 insertions, 60 deletions
diff --git a/meta/recipes-kernel/kexec/kexec-tools/0001-kexec-tools-purgatory-fix-build-on-binutils-2.42.patch b/meta/recipes-kernel/kexec/kexec-tools/0001-kexec-tools-purgatory-fix-build-on-binutils-2.42.patch
deleted file mode 100644
index 6104a29d71..0000000000
--- a/meta/recipes-kernel/kexec/kexec-tools/0001-kexec-tools-purgatory-fix-build-on-binutils-2.42.patch
+++ /dev/null
@@ -1,59 +0,0 @@
1From 2cdbb12f4b101c7ecb3a4791819d9269d4f07c19 Mon Sep 17 00:00:00 2001
2From: Sergei Trofimovich <slyich@gmail.com>
3Date: Wed, 31 Jan 2024 10:05:08 +0000
4Subject: [PATCH] kexec-tools: purgatory: fix build on `binutils-2.42`
5
6`binutils-2.42` introduced stricter checks on what `.arch` can be used
7in 64-bit mode and started failing the build as:
8
9 $ as-2.42 --64 -o entry32-16-debug.o entry32-16-debug.s
10 purgatory/arch/i386/entry32-16-debug.S: Assembler messages:
11 purgatory/arch/i386/entry32-16-debug.S:28: Error: 64bit mode not supported on `i386'.
12
13The change moves `.code32` before `.arch 386` as suggested in
14https://sourceware.org/PR31319
15
16Upstream-Status: Submitted [https://lore.kernel.org/all/ZbopWV9qrxMME2hU@MiWiFi-R3L-srv/T/]
17Signed-off-by: Sergei Trofimovich <slyich@gmail.com>
18Reviewed-by: Baoquan He <bhe@redhat.com>
19Signed-off-by: Khem Raj <raj.khem@gmail.com>
20---
21 purgatory/arch/i386/entry32-16-debug.S | 2 +-
22 purgatory/arch/i386/entry32-16.S | 2 +-
23 2 files changed, 2 insertions(+), 2 deletions(-)
24
25diff --git a/purgatory/arch/i386/entry32-16-debug.S b/purgatory/arch/i386/entry32-16-debug.S
26index 5167944..297d6f5 100644
27--- a/purgatory/arch/i386/entry32-16-debug.S
28+++ b/purgatory/arch/i386/entry32-16-debug.S
29@@ -25,10 +25,10 @@
30 .globl entry16_debug_pre32
31 .globl entry16_debug_first32
32 .globl entry16_debug_old_first32
33+ .code32
34 .arch i386
35 .balign 16
36 entry16_debug:
37- .code32
38 /* Compute where I am running at (assumes esp valid) */
39 call 1f
40 1: popl %ebx
41diff --git a/purgatory/arch/i386/entry32-16.S b/purgatory/arch/i386/entry32-16.S
42index c051aab..7a84565 100644
43--- a/purgatory/arch/i386/entry32-16.S
44+++ b/purgatory/arch/i386/entry32-16.S
45@@ -20,10 +20,10 @@
46 #undef i386
47 .text
48 .globl entry16, entry16_regs
49+ .code32
50 .arch i386
51 .balign 16
52 entry16:
53- .code32
54 /* Compute where I am running at (assumes esp valid) */
55 call 1f
56 1: popl %ebx
57--
582.43.0
59
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
diff --git a/meta/recipes-kernel/kexec/kexec-tools_2.0.28.bb b/meta/recipes-kernel/kexec/kexec-tools_2.0.28.bb
index 4471cdf21e..dec821ea88 100644
--- a/meta/recipes-kernel/kexec/kexec-tools_2.0.28.bb
+++ b/meta/recipes-kernel/kexec/kexec-tools_2.0.28.bb
@@ -17,7 +17,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/kexec/kexec-tools-${PV}.tar.gz
17 file://0003-kexec-ARM-Fix-add_buffer_phys_virt-align-issue.patch \ 17 file://0003-kexec-ARM-Fix-add_buffer_phys_virt-align-issue.patch \
18 file://0005-Disable-PIE-during-link.patch \ 18 file://0005-Disable-PIE-during-link.patch \
19 file://0001-arm64-kexec-disabled-check-if-kaslr-seed-dtb-propert.patch \ 19 file://0001-arm64-kexec-disabled-check-if-kaslr-seed-dtb-propert.patch \
20 file://0001-kexec-tools-purgatory-fix-build-on-binutils-2.42.patch \ 20 file://Fix-building-on-x86_64-with-binutils-2.41.patch \
21 " 21 "
22 22
23SRC_URI[sha256sum] = "f33d2660b3e38d25a127e87097978e0f7a9a73ab5151a29eb80974d169ff6a29" 23SRC_URI[sha256sum] = "f33d2660b3e38d25a127e87097978e0f7a9a73ab5151a29eb80974d169ff6a29"