mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
ipfire-netboot: Update iPXE to version 0cc0f47
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
include Config
|
||||
|
||||
VER = v2.0
|
||||
PXE_VER = 1b67a05
|
||||
PXE_VER = 0cc0f47
|
||||
|
||||
THISAPP = ipfire-netboot-$(VER)
|
||||
DL_FILE = $(THISAPP).tar.gz
|
||||
@@ -44,7 +44,7 @@ $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
|
||||
ipxe-$(PXE_VER).tar.gz = $(URL_IPFIRE)/ipxe-$(PXE_VER).tar.gz
|
||||
|
||||
$(DL_FILE)_BLAKE2 = 5f66932b7be228f5a246b92352e31c99d4f4e8666da9795a6f9762c979f480fb3c2620fc128af14d396065d0c9362e1cdc10eddce2bb58901567581c0d5e8cee
|
||||
ipxe-$(PXE_VER).tar.gz_BLAKE2 = 5a6b7c422856157ff1f6aeb7e835add5a2bdd6678d8cc960eae2d926709ce73803484bbe0a428022de2fbc5b018096526ba48f2172c2c25540e1dc12c7a1f8e1
|
||||
ipxe-$(PXE_VER).tar.gz_BLAKE2 = f678abfe4cb1bf4ff85667719417c694365aece144c05fff8f8df82008100a6172bd27799498f27eddf8c38f43b3d553e704191037ef94dfbcaf19428c07028c
|
||||
|
||||
install : $(TARGET)
|
||||
|
||||
@@ -77,10 +77,6 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
|
||||
# Extract iPXE source
|
||||
cd $(DIR_APP) && tar axf $(DIR_DL)/ipxe-$(PXE_VER).tar.gz
|
||||
cd $(DIR_APP)/ipxe-$(PXE_VER) && patch -Np1 < $(DIR_SRC)/src/patches/ipxe-fix-stringop-truncation-warning-with-gcc-8-x.patch
|
||||
cd $(DIR_APP)/ipxe-$(PXE_VER) && patch -Np1 < $(DIR_SRC)/src/patches/ipxe-handle-R_X86_64_PLT32.patch
|
||||
cd $(DIR_APP)/ipxe-$(PXE_VER) && patch -Np1 < $(DIR_SRC)/src/patches/ipxe-1b67a05-be-explicit-about-fcommon-compiler-directive.patch
|
||||
cd $(DIR_APP)/ipxe-$(PXE_VER) && patch -Np1 < $(DIR_SRC)/src/patches/ipxe-use-the-right-sized-register-for-push.patch
|
||||
cd $(DIR_APP) && rm -rfv ipxe && ln -s ipxe-$(PXE_VER) ipxe
|
||||
cd $(DIR_APP) && make $(MAKETUNING) bin/ipxe.lkrn
|
||||
ifeq "$(BUILD_ARCH)" "x86_64"
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
From f982a712979619dbae2c6e0d741757e2ce94be11 Mon Sep 17 00:00:00 2001
|
||||
From: Bruce Rogers <brogers@suse.com>
|
||||
Date: Wed, 6 May 2020 15:03:02 -0600
|
||||
Subject: [PATCH] [build] Be explicit about -fcommon compiler directive
|
||||
|
||||
gcc10 switched default behavior from -fcommon to -fno-common. Since
|
||||
"__shared" relies on the legacy behavior, explicitly specify it.
|
||||
|
||||
Signed-off-by: Bruce Rogers <brogers@suse.com>
|
||||
Modified-by: Michael Brown <mcb30@ipxe.org>
|
||||
Signed-off-by: Michael Brown <mcb30@ipxe.org>
|
||||
---
|
||||
src/Makefile.housekeeping | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/Makefile.housekeeping b/src/Makefile.housekeeping
|
||||
index 66d6dd449..b6c61c112 100644
|
||||
--- a/src/Makefile.housekeeping
|
||||
+++ b/src/Makefile.housekeeping
|
||||
@@ -418,6 +418,7 @@ CFLAGS += -Os
|
||||
CFLAGS += -g
|
||||
ifeq ($(CCTYPE),gcc)
|
||||
CFLAGS += -ffreestanding
|
||||
+CFLAGS += -fcommon
|
||||
CFLAGS += -Wall -W -Wformat-nonliteral
|
||||
HOST_CFLAGS += -Wall -W -Wformat-nonliteral
|
||||
endif
|
||||
@@ -1,32 +0,0 @@
|
||||
From ddfb60813c74e988ba7c16dbbe1b163593c9da4e Mon Sep 17 00:00:00 2001
|
||||
From: Christian Hesse <mail@eworm.de>
|
||||
Date: Tue, 15 May 2018 23:25:01 +0200
|
||||
Subject: [PATCH] [build] fix stringop truncation warning with GCC 8.x
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
GCC 8.x gives a warning about stringop truncation:
|
||||
|
||||
util/elf2efi.c:497:2: error: ‘strncpy’ specified bound 8 equals destination
|
||||
size [-Werror=stringop-truncation]
|
||||
|
||||
It assumes that strncpy() is intended to copy strings, which are NULL
|
||||
terminated. We do copy fixed size memory regions, so use memcpy() instead.
|
||||
---
|
||||
src/util/elf2efi.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/util/elf2efi.c b/src/util/elf2efi.c
|
||||
index 6718df777..de3c92463 100644
|
||||
--- a/src/util/elf2efi.c
|
||||
+++ b/src/util/elf2efi.c
|
||||
@@ -494,7 +494,7 @@ static struct pe_section * process_section ( struct elf_file *elf,
|
||||
memset ( new, 0, sizeof ( *new ) + section_filesz );
|
||||
|
||||
/* Fill in section header details */
|
||||
- strncpy ( ( char * ) new->hdr.Name, name, sizeof ( new->hdr.Name ) );
|
||||
+ memcpy ( ( char * ) new->hdr.Name, name, sizeof ( new->hdr.Name ) );
|
||||
new->hdr.Misc.VirtualSize = section_memsz;
|
||||
new->hdr.VirtualAddress = shdr->sh_addr;
|
||||
new->hdr.SizeOfRawData = section_filesz;
|
||||
@@ -1,23 +0,0 @@
|
||||
From 5dce2d454b2829431e0484ac0f993b7a2759e0df Mon Sep 17 00:00:00 2001
|
||||
From: Christian Hesse <mail@eworm.de>
|
||||
Date: Sat, 25 Aug 2018 13:53:08 +0200
|
||||
Subject: [PATCH] [build] handle R_X86_64_PLT32 from binutils 2.31
|
||||
|
||||
Starting from binutils 2.31.0 (commit bd7ab16b) x86-64 assembler
|
||||
generates R_X86_64_PLT32 instead of R_X86_64_PC32.
|
||||
---
|
||||
src/util/elf2efi.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/util/elf2efi.c b/src/util/elf2efi.c
|
||||
index 6718df777..2c5b9df8a 100644
|
||||
--- a/src/util/elf2efi.c
|
||||
+++ b/src/util/elf2efi.c
|
||||
@@ -636,6 +636,7 @@ static void process_reloc ( struct elf_file *elf, const Elf_Shdr *shdr,
|
||||
case ELF_MREL ( EM_ARM, R_ARM_THM_JUMP24 ) :
|
||||
case ELF_MREL ( EM_ARM, R_ARM_V4BX ):
|
||||
case ELF_MREL ( EM_X86_64, R_X86_64_PC32 ) :
|
||||
+ case ELF_MREL ( EM_X86_64, R_X86_64_PLT32 ) :
|
||||
case ELF_MREL ( EM_AARCH64, R_AARCH64_CALL26 ) :
|
||||
case ELF_MREL ( EM_AARCH64, R_AARCH64_JUMP26 ) :
|
||||
case ELF_MREL ( EM_AARCH64, R_AARCH64_ADR_PREL_LO21 ) :
|
||||
@@ -1,44 +0,0 @@
|
||||
From 08caa8be3a143d6f33782f398b7937efb39ff283 Mon Sep 17 00:00:00 2001
|
||||
From: Justin Cano <5184128+jstncno@users.noreply.github.com>
|
||||
Date: Thu, 3 Aug 2023 09:58:11 -0700
|
||||
Subject: [PATCH] Use the right sized register for the push operand based on
|
||||
the size of the value being pushed
|
||||
|
||||
Fixes https://github.com/ipxe/ipxe/issues/997
|
||||
---
|
||||
src/arch/x86/include/librm.h | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/arch/x86/include/librm.h b/src/arch/x86/include/librm.h
|
||||
index 5196d390fa..d9e748adfc 100644
|
||||
--- a/src/arch/x86/include/librm.h
|
||||
+++ b/src/arch/x86/include/librm.h
|
||||
@@ -250,8 +250,10 @@ extern void remove_user_from_rm_stack ( userptr_t data, size_t size );
|
||||
/* CODE_DEFAULT: restore default .code32/.code64 directive */
|
||||
#ifdef __x86_64__
|
||||
#define CODE_DEFAULT ".code64"
|
||||
+#define PUSH "pushq"
|
||||
#else
|
||||
#define CODE_DEFAULT ".code32"
|
||||
+#define PUSH "pushl"
|
||||
#endif
|
||||
|
||||
/* LINE_SYMBOL: declare a symbol for the current source code line */
|
||||
@@ -268,7 +270,7 @@ extern void remove_user_from_rm_stack ( userptr_t data, size_t size );
|
||||
|
||||
/* REAL_CODE: declare a fragment of code that executes in real mode */
|
||||
#define REAL_CODE( asm_code_str ) \
|
||||
- "push $1f\n\t" \
|
||||
+ PUSH " $1f\n\t" \
|
||||
"call real_call\n\t" \
|
||||
TEXT16_CODE ( "\n1:\n\t" \
|
||||
asm_code_str \
|
||||
@@ -277,7 +279,7 @@ extern void remove_user_from_rm_stack ( userptr_t data, size_t size );
|
||||
|
||||
/* PHYS_CODE: declare a fragment of code that executes in flat physical mode */
|
||||
#define PHYS_CODE( asm_code_str ) \
|
||||
- "push $1f\n\t" \
|
||||
+ PUSH " $1f\n\t" \
|
||||
"call phys_call\n\t" \
|
||||
".section \".text.phys\", \"ax\", @progbits\n\t"\
|
||||
"\n" LINE_SYMBOL "\n\t" \
|
||||
Reference in New Issue
Block a user