forked from openwrt/openwrt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
49 changed files
with
3,093 additions
and
164 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
81 changes: 81 additions & 0 deletions
81
package/boot/kexec-tools/patches/010-Fix-building-on-x86_64-with-binutils-2.41.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
From 328de8e00e298f00d7ba6b25dc3950147e9642e6 Mon Sep 17 00:00:00 2001 | ||
From: Michel Lind <[email protected]> | ||
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 <[email protected]> | ||
Signed-off-by: Simon Horman <[email protected]> | ||
--- | ||
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(-) | ||
|
||
--- 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 | ||
--- 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 | ||
--- 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 | ||
--- 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 |
37 changes: 37 additions & 0 deletions
37
package/boot/kexec-tools/patches/020-i386-improve-basename-compatibility.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
From 99f62f58fac57214ecc3c9aabf6bf61ac1e1201d Mon Sep 17 00:00:00 2001 | ||
From: Tony Ambardar <[email protected]> | ||
Date: Fri, 7 Jun 2024 21:54:56 -0700 | ||
Subject: [PATCH] i386: improve basename() compatibility | ||
|
||
Drop usage of glibc basename() in favour of a simpler implementation that | ||
works across GNU and musl libc, and is similar to existing code in fs2dt.c. | ||
|
||
This fixes compile errors seen building against musl. | ||
|
||
Signed-off-by: Tony Ambardar <[email protected]> | ||
--- | ||
kexec/arch/i386/x86-linux-setup.c | 5 +++-- | ||
1 file changed, 3 insertions(+), 2 deletions(-) | ||
|
||
--- a/kexec/arch/i386/x86-linux-setup.c | ||
+++ b/kexec/arch/i386/x86-linux-setup.c | ||
@@ -318,6 +318,7 @@ static int add_edd_entry(struct x86_linu | ||
uint8_t devnum, version; | ||
uint32_t mbr_sig; | ||
struct edd_info *edd_info; | ||
+ char *basename = strrchr(sysfs_name,'/') + 1; | ||
|
||
if (!current_mbr || !current_edd) { | ||
fprintf(stderr, "%s: current_edd and current_edd " | ||
@@ -329,9 +330,9 @@ static int add_edd_entry(struct x86_linu | ||
memset(edd_info, 0, sizeof(struct edd_info)); | ||
|
||
/* extract the device number */ | ||
- if (sscanf(basename(sysfs_name), "int13_dev%hhx", &devnum) != 1) { | ||
+ if (sscanf(basename, "int13_dev%hhx", &devnum) != 1) { | ||
fprintf(stderr, "Invalid format of int13_dev dir " | ||
- "entry: %s\n", basename(sysfs_name)); | ||
+ "entry: %s\n", basename); | ||
return -1; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.