summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/kexec
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2024-02-01 14:28:49 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-02-03 21:52:15 +0000
commited4c21d70e47c2c72d9fd30b7a744cc33fb660a5 (patch)
treefa2b6f9f595217b7cd7cdde148d822623e1bc67b /meta/recipes-kernel/kexec
parentf7366f44fd7d0bc5a5b073cec9c68ffd8258903c (diff)
downloadopenembedded-core-ed4c21d70e47c2c72d9fd30b7a744cc33fb660a5.tar.gz
kexec-tools: Fix build with gas 2.42
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-kernel/kexec')
-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_2.0.28.bb1
2 files changed, 60 insertions, 0 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
new file mode 100644
index 0000000000..6104a29d71
--- /dev/null
+++ b/meta/recipes-kernel/kexec/kexec-tools/0001-kexec-tools-purgatory-fix-build-on-binutils-2.42.patch
@@ -0,0 +1,59 @@
+From 2cdbb12f4b101c7ecb3a4791819d9269d4f07c19 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyich@gmail.com>
+Date: Wed, 31 Jan 2024 10:05:08 +0000
+Subject: [PATCH] kexec-tools: purgatory: fix build on `binutils-2.42`
+
+`binutils-2.42` introduced stricter checks on what `.arch` can be used
+in 64-bit mode and started failing the build as:
+
+ $ as-2.42 --64 -o entry32-16-debug.o entry32-16-debug.s
+ purgatory/arch/i386/entry32-16-debug.S: Assembler messages:
+ purgatory/arch/i386/entry32-16-debug.S:28: Error: 64bit mode not supported on `i386'.
+
+The change moves `.code32` before `.arch 386` as suggested in
+https://sourceware.org/PR31319
+
+Upstream-Status: Submitted [https://lore.kernel.org/all/ZbopWV9qrxMME2hU@MiWiFi-R3L-srv/T/]
+Signed-off-by: Sergei Trofimovich <slyich@gmail.com>
+Reviewed-by: Baoquan He <bhe@redhat.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ purgatory/arch/i386/entry32-16-debug.S | 2 +-
+ purgatory/arch/i386/entry32-16.S | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/purgatory/arch/i386/entry32-16-debug.S b/purgatory/arch/i386/entry32-16-debug.S
+index 5167944..297d6f5 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
++ .code32
+ .arch i386
+ .balign 16
+ entry16_debug:
+- .code32
+ /* 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..7a84565 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
++ .code32
+ .arch i386
+ .balign 16
+ entry16:
+- .code32
+ /* Compute where I am running at (assumes esp valid) */
+ call 1f
+ 1: popl %ebx
+--
+2.43.0
+
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 c2141e6716..4471cdf21e 100644
--- a/meta/recipes-kernel/kexec/kexec-tools_2.0.28.bb
+++ b/meta/recipes-kernel/kexec/kexec-tools_2.0.28.bb
@@ -17,6 +17,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/kexec/kexec-tools-${PV}.tar.gz
file://0003-kexec-ARM-Fix-add_buffer_phys_virt-align-issue.patch \
file://0005-Disable-PIE-during-link.patch \
file://0001-arm64-kexec-disabled-check-if-kaslr-seed-dtb-propert.patch \
+ file://0001-kexec-tools-purgatory-fix-build-on-binutils-2.42.patch \
"
SRC_URI[sha256sum] = "f33d2660b3e38d25a127e87097978e0f7a9a73ab5151a29eb80974d169ff6a29"