boot/syslinux: Bump to 6.04-pre2
PATCH v2 1/1 boot/syslinux: Bump to 6.04-pre2
The revision to build comes from Archlinux syslinux package, the archive from debian (to save time for git clone).
Add patch fixing passing &load_error_buf to setjmp()/longjmp(), rejected since gcc 14 made -Wincompatible-pointer-types an error by default.
---
Changelog:
v2:
- rebased onto 5bba532f22db
- build/boot tested
- added patch to fix gcc 14 build
- don't preserve host syslinux installer
v1:
https://lore.kernel.org/all/[email protected]/
...bios-Fix-alignment-change-with-gcc-5.patch | 82 --- .../0001-efi-main.c-fix-jmp_buf-passing.patch | 34 + ...-Disable-PIE-to-avoid-FTBFS-on-amd64.patch | 30 - ...sk-Force-ld-output-format-to-32-bits.patch | 32 - ...tils-Use-the-host-toolchain-to-build.patch | 60 -- ...-Use-the-host-toolchain-for-prepcore.patch | 2 +- ...ition-is-now-part-of-the-exports-of-.patch | 37 -- ...ump-calls-to-fit-the-new-declaration.patch | 37 -- ...per-build-it-with-the-host-toolchain.patch | 32 - ...-try-to-guess-the-sections-alignment.patch | 295 --------- ...10-core-Clean-up-the-i386-bios-build.patch | 622 ------------------ ...-sysmacros-h-for-major-minor-makedev.patch | 34 - ...Fix-build-with-gnu-efi-version-3.0.9.patch | 16 +- .../0015-efi-main.c-include-efisetjmp.h.patch | 2 +- ...multiple-definition-of-symbol-errors.patch | 25 +- .../0021-load_linux-correct-a-type.patch | 34 - ...fix-incorrect-type-of-load_error_buf.patch | 48 -- boot/syslinux/syslinux.hash | 4 +- boot/syslinux/syslinux.mk | 6 +- 19 files changed, 53 insertions(+), 1379 deletions(-) delete mode 100644 boot/syslinux/0001-bios-Fix-alignment-change-with-gcc-5.patch create mode 100644 boot/syslinux/0001-efi-main.c-fix-jmp_buf-passing.patch delete mode 100644 boot/syslinux/0002-Disable-PIE-to-avoid-FTBFS-on-amd64.patch delete mode 100644 boot/syslinux/0003-memdisk-Force-ld-output-format-to-32-bits.patch delete mode 100644 boot/syslinux/0004-utils-Use-the-host-toolchain-to-build.patch delete mode 100644 boot/syslinux/0006-The-VPrint-definition-is-now-part-of-the-exports-of-.patch delete mode 100644 boot/syslinux/0007-Update-the-longjump-calls-to-fit-the-new-declaration.patch delete mode 100644 boot/syslinux/0008-efi-wrapper-build-it-with-the-host-toolchain.patch delete mode 100644 boot/syslinux/0009-bios-Don-t-try-to-guess-the-sections-alignment.patch delete mode 100644 boot/syslinux/0010-core-Clean-up-the-i386-bios-build.patch delete mode 100644 boot/syslinux/0012-pull-in-sys-sysmacros-h-for-major-minor-makedev.patch delete mode 100644 boot/syslinux/0021-load_linux-correct-a-type.patch delete mode 100644 boot/syslinux/0024-efi-main.c-fix-incorrect-type-of-load_error_buf.patch
boot/syslinux/0001-bios-Fix-alignment-change-with-gcc-5.patch deleted +0 -82
@@ -1,82 +0,0 @@ -From da5cbd1a3b248f2d32281a1766a3d1414c0e8e03 Mon Sep 17 00:00:00 2001 -From: Sylvain Gault <[email protected]> -Date: Tue, 29 Sep 2015 02:38:25 +0200 -Subject: [PATCH] bios: Fix alignment change with gcc 5 - -The section aligment specified in the ld scripts have to be greater or -equal to those in the .o files generated by gcc. - -Signed-off-by: Sylvain Gault <[email protected]> -Tested-by: poma <[email protected]> -Signed-off-by: Paulo Alcantara <[email protected]> -Signed-off-by: Frank Hunleth <[email protected]> ---- - core/i386/syslinux.ld | 6 +++--- - core/x86_64/syslinux.ld | 6 +++--- - 2 files changed, 6 insertions(+), 6 deletions(-) - -diff --git a/core/i386/syslinux.ld b/core/i386/syslinux.ld -index 7b4e012..7390451 100644 ---- a/core/i386/syslinux.ld -+++ b/core/i386/syslinux.ld -@@ -266,7 +266,7 @@ SECTIONS - __text_end = .; - } - -- . = ALIGN(16); -+ . = ALIGN(32); - - __rodata_vma = .; - __rodata_lma = __rodata_vma + __text_lma - __text_vma; -@@ -361,7 +361,7 @@ SECTIONS - __dynamic_end = .; - } - -- . = ALIGN(16); -+ . = ALIGN(32); - - __data_vma = .; - __data_lma = __data_vma + __text_lma - __text_vma; -@@ -377,7 +377,7 @@ SECTIONS - __pm_code_dwords = (__pm_code_len + 3) >> 2; - - . = ALIGN(128); -- -+ - __bss_vma = .; - __bss_lma = .; /* Dummy */ - .bss (NOLOAD) : AT (__bss_lma) { -diff --git a/core/x86_64/syslinux.ld b/core/x86_64/syslinux.ld -index 1057112..bf815c4 100644 ---- a/core/x86_64/syslinux.ld -+++ b/core/x86_64/syslinux.ld -@@ -266,7 +266,7 @@ SECTIONS - __text_end = .; - } - -- . = ALIGN(16); -+ . = ALIGN(32); - - __rodata_vma = .; - __rodata_lma = __rodata_vma + __text_lma - __text_vma; -@@ -361,7 +361,7 @@ SECTIONS - __dynamic_end = .; - } - -- . = ALIGN(16); -+ . = ALIGN(32); - - __data_vma = .; - __data_lma = __data_vma + __text_lma - __text_vma; -@@ -377,7 +377,7 @@ SECTIONS - __pm_code_dwords = (__pm_code_len + 3) >> 2; - - . = ALIGN(128); -- -+ - __bss_vma = .; - __bss_lma = .; /* Dummy */ - .bss (NOLOAD) : AT (__bss_lma) { --- -2.7.4 -
boot/syslinux/0001-efi-main.c-fix-jmp_buf-passing.patch new file +34 -0
@@ -0,0 +1,34 @@ +From: Alexander Sverdlin <[email protected]> +Subject: [PATCH] efi/main.c: pass jmp_buf directly to setjmp()/longjmp() + +gnu-efi's jmp_buf is a one-element array, so load_error_buf already decays +to the element pointer setjmp()/longjmp() expect. Passing &load_error_buf +hands over a pointer-to-array instead, rejected since gcc 14 made +-Wincompatible-pointer-types an error by default. + +Upstream: N/A, dead +Signed-off-by: Alexander Sverdlin <[email protected]> +--- + efi/main.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/efi/main.c b/efi/main.c +--- a/efi/main.c ++++ b/efi/main.c +@@ -184,7 +184,7 @@ __export void local_boot(uint16_t ax) + * Inform the firmware that we failed to execute correctly, which + * will trigger the next entry in the EFI Boot Manager list. + */ +- longjmp(&load_error_buf, 1); ++ longjmp(load_error_buf, 1); + } + + void bios_timer_cleanup(void) +@@ -1384,4 +1384,4 @@ + +- if (!setjmp(&load_error_buf)) ++ if (!setjmp(load_error_buf)) + load_env32(NULL); + +-- +2.43.0
boot/syslinux/0002-Disable-PIE-to-avoid-FTBFS-on-amd64.patch deleted +0 -30
@@ -1,30 +0,0 @@ -From 250bf2c921713434627dc7bc8b0918fa0841f9b7 Mon Sep 17 00:00:00 2001 -From: Graham Inggs <[email protected]> -Date: Wed, 5 Apr 2017 22:03:12 +0200 -Subject: [PATCH] Disable PIE to avoid FTBFS on amd64 - -gcc 6.x has PIE support enabled by default, which causes a build issue -with syslinux. This patch disables PIE support in the relevant -syslinux Makefile. - -Signed-off-by: Ryan Coe <[email protected]> ---- - gpxe/src/Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/gpxe/src/Makefile b/gpxe/src/Makefile -index cc91d78..077af64 100644 ---- a/gpxe/src/Makefile -+++ b/gpxe/src/Makefile -@@ -4,7 +4,7 @@ - # - - CLEANUP := --CFLAGS := -+CFLAGS := -fno-PIE - ASFLAGS := - LDFLAGS := - MAKEDEPS := Makefile --- -2.7.4 -
boot/syslinux/0003-memdisk-Force-ld-output-format-to-32-bits.patch deleted +0 -32
@@ -1,32 +0,0 @@ -From c0287594239d5af2082cac20817f8e8b11a4b1b2 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Beno=C3=AEt=20Allard?= <[email protected]> -Date: Wed, 5 Apr 2017 14:18:09 +0200 -Subject: [PATCH] memdisk: Force ld output format to 32-bits -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -On toolchains where the default output is x86_64, we need to be -consistent with the other .o files - -Signed-off-by: Benoît Allard <[email protected]> ---- - memdisk/Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/memdisk/Makefile b/memdisk/Makefile -index e6557d8..06613ff 100644 ---- a/memdisk/Makefile -+++ b/memdisk/Makefile -@@ -78,7 +78,7 @@ memdisk16.o: memdisk16.asm - $(NASM) -f bin $(NASMOPT) $(NFLAGS) $(NINCLUDE) -o $@ -l $*.lst $< - - memdisk_%.o: memdisk_%.bin -- $(LD) -r -b binary -o $@ $< -+ $(LD) --oformat elf32-i386 -r -b binary -o $@ $< - - memdisk16.elf: $(OBJS16) - $(LD) -Ttext 0 -o $@ $^ --- -2.7.4 -
boot/syslinux/0004-utils-Use-the-host-toolchain-to-build.patch deleted +0 -60
60 lines not on this page · raw message
boot/syslinux/0005-lzo-Use-the-host-toolchain-for-prepcore.patch +1 -1
@@ -27,7 +27,7 @@ index 29f1fa6..c016e5a 100644 +%.o: %.c + $(CC_FOR_BUILD) $(UMAKEDEPS) $(CFLAGS_FOR_BUILD) $(INCLUDES) -c -o $@ $< + - LIBOBJS = $(patsubst %.c,%.o,$(subst $(SRC)/,,$(wildcard $(SRC)/src/*.c))) + LIBOBJS = $(patsubst %.c,%.o,$(subst $(SRC)/,,$(sort $(wildcard $(SRC)/src/*.c)))) LIB = lzo.a BINS = prepcore @@ -30,7 +33,7 @@ $(LIB) : $(LIBOBJS)
boot/syslinux/0006-The-VPrint-definition-is-now-part-of-the-exports-of-.patch deleted +0 -37
@@ -1,37 +0,0 @@ -From 39274503292a6003b1b0c93f694e34f11e85ea44 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Beno=C3=AEt=20Allard?= <[email protected]> -Date: Fri, 9 Jun 2017 11:55:14 +0200 -Subject: [PATCH] The VPrint definition is now part of the exports of - gnu-efi -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Signed-off-by: Benoît Allard <[email protected]> ---- - efi/fio.h | 9 --------- - 1 file changed, 9 deletions(-) - -diff --git a/efi/fio.h b/efi/fio.h -index 65fff8d..a1bfe68 100644 ---- a/efi/fio.h -+++ b/efi/fio.h -@@ -11,15 +11,6 @@ - #define MAX_EFI_ARGS 64 - #define WS(c16) (c16 == L' ' || c16 == CHAR_TAB) - --/* VPrint is not in export declarations in gnu-efi lib yet -- * although it is a global function; declare it here -- */ --extern UINTN --VPrint ( -- IN CHAR16 *fmt, -- va_list args -- ); -- - extern EFI_STATUS efi_errno; - - void efi_memcpy(unsigned char *dst, unsigned char *src, size_t len); --- -2.1.4 -
boot/syslinux/0007-Update-the-longjump-calls-to-fit-the-new-declaration.patch deleted +0 -37
@@ -1,37 +0,0 @@ -From 3bd5c2d951421a89f76b2423e5810862f53486c1 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Beno=C3=AEt=20Allard?= <[email protected]> -Date: Fri, 9 Jun 2017 11:59:43 +0200 -Subject: [PATCH] Update the longjump calls to fit the new declaration -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Signed-off-by: Benoît Allard <[email protected]> ---- - efi/main.c | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/efi/main.c b/efi/main.c -index 208fee4f..71d31a5c 100644 ---- a/efi/main.c -+++ b/efi/main.c -@@ -10,7 +10,6 @@ - #include <syslinux/firmware.h> - #include <syslinux/linux.h> - #include <sys/ansi.h> --#include <setjmp.h> - - #include "efi.h" - #include "fio.h" -@@ -30,7 +29,7 @@ uint32_t timer_irq; - __export uint8_t KbdMap[256]; - char aux_seg[256]; - --static jmp_buf load_error_buf; -+static jmp_buf *load_error_buf; - - static inline EFI_STATUS - efi_close_protocol(EFI_HANDLE handle, EFI_GUID *guid, EFI_HANDLE agent, --- -2.13.3 -
boot/syslinux/0008-efi-wrapper-build-it-with-the-host-toolchain.patch deleted +0 -32
@@ -1,32 +0,0 @@ -From ca8aaded0c7c3900397029bd9520132b62629308 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Beno=C3=AEt=20Allard?= <[email protected]> -Date: Mon, 12 Jun 2017 14:59:16 +0200 -Subject: [PATCH] efi/wrapper: build it with the host toolchain. -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The wrapper program is executed on the build machine, so it should be -built with CC_FOR_BUILD. - -Signed-off-by: Benoît Allard <[email protected]> ---- - efi/Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/efi/Makefile b/efi/Makefile -index d5443bd5..d24d16db 100644 ---- a/efi/Makefile -+++ b/efi/Makefile -@@ -79,7 +79,7 @@ syslinux.so: $(OBJS) $(CORE_OBJS) $(LIB_OBJS) - # cp $^ $@ - - wrapper: wrapper.c -- $(CC) $^ -o $@ -+ $(CC_FOR_BUILD) $^ -o $@ - - # - # Build the wrapper app and wrap our .so to produce a .efi --- -2.13.3 -
boot/syslinux/0009-bios-Don-t-try-to-guess-the-sections-alignment.patch deleted +0 -295
295 lines not on this page · raw message
boot/syslinux/0010-core-Clean-up-the-i386-bios-build.patch deleted +0 -622
622 lines not on this page · raw message
boot/syslinux/0012-pull-in-sys-sysmacros-h-for-major-minor-makedev.patch deleted +0 -34
@@ -1,34 +0,0 @@ -From 1a74985b2a404639b08882c57f3147229605dfd5 Mon Sep 17 00:00:00 2001 -From: Mike Frysinger <[email protected]> -Date: Tue, 19 Apr 2016 06:50:31 -0400 -Subject: [PATCH] extlinux: pull in sys/sysmacros.h for major/minor/makedev - -These functions are defined in sys/sysmacros.h, so add the include to -main.c. This is already handled correctly in mountinfo.c. Otherwise -we get build failures like: - -main.o: In function 'find_device_sysfs': -extlinux/main.c:1131: undefined reference to 'minor' - -Signed-off-by: Mike Frysinger <[email protected]> -Signed-off-by: Gene Cumm <[email protected]> -Signed-off-by: Alexander Sverdlin <[email protected]> ---- - extlinux/main.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/extlinux/main.c b/extlinux/main.c -index a7ebd49..ebff7ea 100644 ---- a/extlinux/main.c -+++ b/extlinux/main.c -@@ -38,6 +38,7 @@ - #include <sysexits.h> - #include <sys/ioctl.h> - #include <sys/stat.h> -+#include <sys/sysmacros.h> - #include <sys/types.h> - #include <sys/mount.h> - #include <sys/vfs.h> --- -2.10.5.GIT -
boot/syslinux/0013-Fix-build-with-gnu-efi-version-3.0.9.patch +9 -7
@@ -16,25 +16,27 @@ diff --git a/mk/lib.mk b/mk/lib.mk index ceb95bd0..c9b6eaf3 100644 --- a/mk/lib.mk +++ b/mk/lib.mk -@@ -186,9 +186,9 @@ MINLIBOBJS = \ +@@ -186,7 +186,7 @@ MINLIBOBJS = \ # $(LIBVESA_OBJS) CORELIBOBJS = \ - memcpy.o memset.o memcmp.o printf.o strncmp.o vfprintf.o \ + memcmp.o printf.o strncmp.o vfprintf.o \ strlen.o vsnprintf.o snprintf.o stpcpy.o strcmp.o strdup.o \ -- strcpy.o strncpy.o setjmp.o fopen.o fread.o fread2.o puts.o \ -+ strcpy.o strncpy.o fopen.o fread.o fread2.o puts.o \ + strcpy.o strncpy.o fopen.o fread.o fread2.o puts.o \ strtoul.o strntoumax.o strcasecmp.o \ - sprintf.o strlcat.o strchr.o strlcpy.o strncasecmp.o ctypes.o \ - fputs.o fwrite2.o fwrite.o fgetc.o fclose.o lmalloc.o \ -@@ -203,6 +203,11 @@ CORELIBOBJS = \ +@@ -203,11 +203,15 @@ CORELIBOBJS = \ + sys/stdcon_write.o \ + syslinux/memscan.o strrchr.o strcat.o \ + syslinux/debug.o \ +- $(ARCH)/setjmp.o \ + $(LIBGCC_OBJS) \ $(LIBENTRY_OBJS) \ $(LIBMODULE_OBJS) +ifndef EFI_BUILD +# For EFI, these are part of gnu-efi -+CORELIBOBJS += setjmp.o memcpy.o memset.o ++CORELIBOBJS += $(ARCH)/setjmp.o memcpy.o memset.o +endif + LDFLAGS = -m elf_$(ARCH) --hash-style=gnu -T $(com32)/lib/$(ARCH)/elf.ld
boot/syslinux/0015-efi-main.c-include-efisetjmp.h.patch +1 -1
@@ -56,7 +56,7 @@ index 71d31a5c1f13..7dc7bca7aeba 100644 +#include <efisetjmp.h> #include "fio.h" #include "version.h" - + #include "efi_pxe.h" -- 2.43.0
boot/syslinux/0016-Workaround-multiple-definition-of-symbol-errors.patch +4 -21
@@ -73,15 +73,11 @@ diff --git a/core/Makefile b/core/Makefile index ad0acb5a..3bee4dc9 100644 --- a/core/Makefile +++ b/core/Makefile -@@ -164,7 +164,7 @@ AUXLIBS = libisolinux.a libisolinux-debug.a libldlinux.a \ - LDSCRIPT = $(SRC)/$(ARCH)/syslinux.ld - +@@ -164,3 +164,3 @@ AUXLIBS = libisolinux.a libisolinux-debug.a libldlinux.a \ %.elf: %.o $(LIBDEP) $(LDSCRIPT) $(AUXLIBS) -- $(LD) $(LDFLAGS) -Bsymbolic $(LD_PIE) -E --hash-style=gnu -T $(LDSCRIPT) -M -o $@ $< \ -+ $(LD) $(LDFLAGS) -z muldefs -Bsymbolic $(LD_PIE) -E --hash-style=gnu -T $(LDSCRIPT) -M -o $@ $< \ - --start-group $(LIBS) $(subst $(*F).elf,lib$(*F).a,$@) --end-group \ - > $(@:.elf=.map) - $(OBJDUMP) -h $@ > $(@:.elf=.sec) +- $(LD) $(LDFLAGS) -pie -Bsymbolic \ ++ $(LD) $(LDFLAGS) -pie -z muldefs -Bsymbolic \ + -T $(LDSCRIPT) \ diff --git a/dos/Makefile b/dos/Makefile index b9c337d5..2af87346 100644 --- a/dos/Makefile
@@ -108,19 +104,6 @@ index d24d16db..7c714ebf 100644 # We need to rename the .hash section because the EFI firmware # linker really doesn't like it. -diff --git a/gpxe/src/arch/i386/Makefile b/gpxe/src/arch/i386/Makefile -index dd8da802..be1d00ff 100644 ---- a/gpxe/src/arch/i386/Makefile -+++ b/gpxe/src/arch/i386/Makefile -@@ -55,7 +55,7 @@ ASFLAGS += --32 - ifeq ($(HOST_OS),FreeBSD) - LDFLAGS += -m elf_i386_fbsd - else --LDFLAGS += -m elf_i386 -+LDFLAGS += -z muldefs -m elf_i386 - endif - - # EFI requires -fshort-wchar, and nothing else currently uses wchar_t -- 2.30.1
boot/syslinux/0021-load_linux-correct-a-type.patch deleted +0 -34
@@ -1,34 +0,0 @@ -From 7f1b68d561dfe615d5cd73d2f4561ac032832802 Mon Sep 17 00:00:00 2001 -From: Scot Doyle <[email protected]> -Date: Sat, 7 Feb 2015 13:52:05 -0500 -Subject: [PATCH] load_linux: correct a type - -Correct base's type to match its initialization from prot_mode_base and -passage to syslinux_memmap_find(). Tested with extlinux. - -Signed-off-by: Scot Doyle <[email protected]> -Signed-off-by: Gene Cumm <[email protected]> -Upstream: https://github.com/geneC/syslinux/commit/83aad4f69065509ba5b1c080edccfed316a4cff0 -Signed-off-by: Thomas Petazzoni <[email protected]> ---- - com32/lib/syslinux/load_linux.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/com32/lib/syslinux/load_linux.c b/com32/lib/syslinux/load_linux.c -index 06ae2a97..ac737293 100644 ---- a/com32/lib/syslinux/load_linux.c -+++ b/com32/lib/syslinux/load_linux.c -@@ -155,8 +155,8 @@ int bios_boot_linux(void *kernel_buf, size_t kernel_size, - char *cmdline) - { - struct linux_header hdr, *whdr; -- size_t real_mode_size, prot_mode_size, base; -- addr_t real_mode_base, prot_mode_base, prot_mode_max; -+ size_t real_mode_size, prot_mode_size; -+ addr_t real_mode_base, prot_mode_base, prot_mode_max, base; - addr_t irf_size; - size_t cmdline_size, cmdline_offset; - struct setup_data *sdp; --- -2.47.1 -
boot/syslinux/0024-efi-main.c-fix-incorrect-type-of-load_error_buf.patch deleted +0 -48
48 lines not on this page · raw message
boot/syslinux/syslinux.hash +1 -3
@@ -1,4 +1,2 @@ -# From https://www.kernel.org/pub/linux/utils/boot/syslinux/sha256sums.asc -sha256 26d3986d2bea109d5dc0e4f8c4822a459276cf021125e8c9f23c3cca5d8c850e syslinux-6.03.tar.xz -# Locally computed +sha256 46169f43dabb5f6cb33a3f6fb79a61008179326756481845c0a42d429d0c5bee syslinux_6.04~git20190206.bf6db5b4%2Bdfsg1.orig.tar.xz sha256 dcc100d4161cc0b7177545ab6e47216f84857cda3843847c792a25289852dcaa COPYING
boot/syslinux/syslinux.mk +3 -3
@@ -4,9 +4,9 @@ # ################################################################################ -SYSLINUX_VERSION = 6.03 -SYSLINUX_SOURCE = syslinux-$(SYSLINUX_VERSION).tar.xz -SYSLINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/boot/syslinux +SYSLINUX_VERSION = bf6db5b4 +SYSLINUX_SOURCE = syslinux_6.04~git20190206.$(SYSLINUX_VERSION)%2Bdfsg1.orig.tar.xz +SYSLINUX_SITE = https://snapshot.debian.org/archive/debian/20260905T023709Z/pool/main/s/syslinux SYSLINUX_LICENSE = GPL-2.0+ SYSLINUX_LICENSE_FILES = COPYING
Signature · 6 lines
2.56.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 7 lines · Alexander Sverdlin
The revision to build comes from Archlinux syslinux package, the archive from debian (to save time for git clone).
Add patch fixing passing
&load_error_bufto setjmp()/longjmp(), rejected since gcc 14 made -Wincompatible-pointer-types an error by default.Signed-off-by Alexander Sverdlin <[email protected]>
Does it make sense to keep syslinux? Even Wikipedia says it's "discontinued". Do you still use it?
What about all the patches you are dropping, are they all "upstream"? We usually like to have some clarification in the commit log on why patches are dropped.
Quoted 19 lines
boot/syslinux/0001-efi-main.c-fix-jmp_buf-passing.patch new file +13
-0@@ -0,0 +1,34 @@ +From: Alexander Sverdlin <[email protected]> +Subject: [PATCH] efi/main.c: pass jmp_buf directly to setjmp()/longjmp() + +gnu-efi's jmp_buf is a one-element array, so load_error_buf already decays +to the element pointer setjmp()/longjmp() expect. Passing &load_error_buf +hands over a pointer-to-array instead, rejected since gcc 14 made +-Wincompatible-pointer-types an error by default. + +Upstream: N/A, dead +Signed-off-by: Alexander Sverdlin <[email protected]> +--- + efi/main.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-)
boot/syslinux/0001-efi-main.c-fix-jmp_buf-passing.patch line 23
Quoted 10 lines
boot/syslinux/0001-efi-main.c-fix-jmp_buf-passing.patch new file +10
-0+ +diff --git a/efi/main.c b/efi/main.c +--- a/efi/main.c ++++ b/efi/main.c +@@ -184,7 +184,7 @@ __export void local_boot(uint16_t ax) + * Inform the firmware that we failed to execute correctly, which + * will trigger the next entry in the EFI Boot Manager list. + */ +- longjmp(&load_error_buf, 1); ++ longjmp(load_error_buf, 1);
Are you sure this is the right fix...
Quoted 38 lines
boot/syslinux/0024-efi-main.c-fix-incorrect-type-of-load_error_buf.patch deleted +0
-32@@ -1,48 +0,0 @@ -From cbc8a8e25c3548771de5294f5a1eaef6bfe9b5da Mon Sep 17 00:00:00 2001 -From: Thomas Petazzoni <[email protected]> -Date: Sat, 18 Jan 2025 17:03:16 +0100 -Subject: [PATCH] efi/main.c: fix incorrect type of load_error_buf -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -load_error_buf is used as argument of setjmp()/longjmp(), so it should -be a "jmp_buf", not a "jmp_buf *". According to the setjmp/longjmp man -page: - - int setjmp(jmp_buf env); - int sigsetjmp(sigjmp_buf env, int savesigs); - -Fixes build issue with GCC >= 14: - -efi/main.c:1329:21: error: passing argument 1 of ‘setjmp’ from incompatible pointer type [-Wincompatible-pointer-types] - 1329 | if (!setjmp(load_error_buf)) - | ^~~~~~~~~~~~~~ - | | - | struct <anonymous> (*)[1] -x86_64-buildroot-linux-gnu/sysroot/usr/include/efi/efisetjmp.h:7:29: note: expected ‘struct <anonymous> *’ but argument is of type ‘struct <anonymous> (*)[1]’ - 7 | extern UINTN setjmp(jmp_buf env) __attribute__((returns_twice)); - | ~~~~~~~~^~~ - -Upstream: N/A dead -Signed-off-by: Thomas Petazzoni <[email protected]> ---- - efi/main.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) -
boot/syslinux/0024-efi-main.c-fix-incorrect-type-of-load_error_buf.patch line 42
Quoted 10 lines
boot/syslinux/0024-efi-main.c-fix-incorrect-type-of-load_error_buf.patch deleted +0
-10-diff --git a/efi/main.c b/efi/main.c -index 7dc7bca7..045dae56 100644 ---- a/efi/main.c -+++ b/efi/main.c -@@ -30,7 +30,7 @@ uint32_t timer_irq; - __export uint8_t KbdMap[256]; - char aux_seg[256]; - --static jmp_buf *load_error_buf; -+static jmp_buf load_error_buf;
And not this one, that you are removing?
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hi Thomas,
Quoted 11 lines · Thomas Petazzoni
Quoted 7 lines · Alexander Sverdlin
The revision to build comes from Archlinux syslinux package, the archive from debian (to save time for git clone).
Add patch fixing passing
&load_error_bufto setjmp()/longjmp(), rejected since gcc 14 made -Wincompatible-pointer-types an error by default.Signed-off-by Alexander Sverdlin <[email protected]>Does it make sense to keep syslinux? Even Wikipedia says it's "discontinued". Do you still use it?
I'll be fine having it downstream. I just thought, there is still an interest [1] in this update ;-)
Quoted 3 lines
What about all the patches you are dropping, are they all "upstream"? We usually like to have some clarification in the commit log on why patches are dropped.
Sorry, yes, all the dropped are "already applied", I will mention this in the commit message if you'll have interest in it.
Quoted 23 lines
Quoted 23 lines
boot/syslinux/0001-efi-main.c-fix-jmp_buf-passing.patch new file +17
-0@@ -0,0 +1,34 @@ +From: Alexander Sverdlin <[email protected]> +Subject: [PATCH] efi/main.c: pass jmp_buf directly to setjmp()/longjmp() + +gnu-efi's jmp_buf is a one-element array, so load_error_buf already decays +to the element pointer setjmp()/longjmp() expect. Passing &load_error_buf +hands over a pointer-to-array instead, rejected since gcc 14 made +-Wincompatible-pointer-types an error by default. + +Upstream: N/A, dead +Signed-off-by: Alexander Sverdlin <[email protected]> +--- + efi/main.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/efi/main.c b/efi/main.c +--- a/efi/main.c ++++ b/efi/main.c
Quoted 8 lines
boot/syslinux/0001-efi-main.c-fix-jmp_buf-passing.patch line 23
Quoted 6 lines
boot/syslinux/0001-efi-main.c-fix-jmp_buf-passing.patch new file +6
-0+@@ -184,7 +184,7 @@ __export void local_boot(uint16_t ax) + * Inform the firmware that we failed to execute correctly, which + * will trigger the next entry in the EFI Boot Manager list. + */ +- longjmp(&load_error_buf, 1); ++ longjmp(load_error_buf, 1);Are you sure this is the right fix...
It is confusing, but indeed, this has been changed back and forth in the syslinux itself and because of the fact that buildroot builds syslinux against buildroot gnuefi package.
Quoted 42 lines
Quoted 42 lines
boot/syslinux/0024-efi-main.c-fix-incorrect-type-of-load_error_buf.patch deleted +0
-36@@ -1,48 +0,0 @@ -From cbc8a8e25c3548771de5294f5a1eaef6bfe9b5da Mon Sep 17 00:00:00 2001 -From: Thomas Petazzoni <[email protected]> -Date: Sat, 18 Jan 2025 17:03:16 +0100 -Subject: [PATCH] efi/main.c: fix incorrect type of load_error_buf -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -load_error_buf is used as argument of setjmp()/longjmp(), so it should -be a "jmp_buf", not a "jmp_buf *". According to the setjmp/longjmp man -page: - - int setjmp(jmp_buf env); - int sigsetjmp(sigjmp_buf env, int savesigs); - -Fixes build issue with GCC >= 14: - -efi/main.c:1329:21: error: passing argument 1 of ‘setjmp’ from incompatible pointer type [-Wincompatible-pointer-types] - 1329 | if (!setjmp(load_error_buf)) - | ^~~~~~~~~~~~~~ - | | - | struct <anonymous> (*)[1] -x86_64-buildroot-linux-gnu/sysroot/usr/include/efi/efisetjmp.h:7:29: note: expected ‘struct <anonymous> *’ but argument is of type ‘struct <anonymous> (*)[1]’ - 7 | extern UINTN setjmp(jmp_buf env) __attribute__((returns_twice)); - | ~~~~~~~~^~~ - -Upstream: N/A dead -Signed-off-by: Thomas Petazzoni <[email protected]> ---- - efi/main.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/efi/main.c b/efi/main.c -index 7dc7bca7..045dae56 100644 ---- a/efi/main.c -+++ b/efi/main.c
Quoted 8 lines
boot/syslinux/0024-efi-main.c-fix-incorrect-type-of-load_error_buf.patch line 42
Quoted 6 lines
boot/syslinux/0024-efi-main.c-fix-incorrect-type-of-load_error_buf.patch deleted +0
-6-@@ -30,7 +30,7 @@ uint32_t timer_irq; - __export uint8_t KbdMap[256]; - char aux_seg[256]; - --static jmp_buf *load_error_buf; -+static jmp_buf load_error_buf;And not this one, that you are removing?
So the patch 24 has partially reverted the patch 7, the latter is already merged upstream, but in different form (22d32c15ea96
"Update the longjump calls to fit the new declaration").
Ultimately, patch 7 doesn't apply, patch 24 doesn't apply because patch 7 doesn't apply, but even if they would both apply, the net result will be exactly what 6.04-pre2 has upstream. And it's not buildable against the buildroot gnuefi package.
[1] https://lore.kernel.org/all/aq62x3ovAUoc_Lmn@windsurf/
Signature · 5 lines
Alexander Sverdlin. _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hi Alexander, Thomas, Everyone,
Quoted 10 lines · Alexander Sverdlin
Hi Thomas,
Quoted 7 lines · Thomas Petazzoni
Quoted 6 lines · Alexander Sverdlin
The revision to build comes from Archlinux syslinux package, the archive from debian (to save time for git clone).
Add patch fixing passing
&load_error_bufto setjmp()/longjmp(), rejected since gcc 14 made -Wincompatible-pointer-types an error by default.
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
Signed-off-by Alexander Sverdlin <[email protected]>Does it make sense to keep syslinux? Even Wikipedia says it's "discontinued". Do you still use it?
I'll be fine having it downstream. I just thought, there is still an interest [1] in this update ;-)
Yes, there is still interest in this software, and I sadly mourn the absence of the don't-delete-host-syslinux patch. I did not reply earlier, because Thomas already did a deep dive.
Just some formal things:
You might take a look at the output of check-package:
$ utils/check-package boot/syslinux/* boot/syslinux/0005-lzo-Use-the-host-toolchain-for-prepcore.patch:0: missing Upstream in the header (https://nightly.buildroot.org/#_additional_patch_documentation) boot/syslinux/0011-extlinux-Use-the-host-toolchain-to-build.patch:0: missing Upstream in the header (https://nightly.buildroot.org/#_additional_patch_documentation) boot/syslinux/0013-Fix-build-with-gnu-efi-version-3.0.9.patch:0: missing Upstream in the header (https://nightly.buildroot.org/#_additional_patch_documentation) boot/syslinux/0014-Fix-build-with-binutils-note-gnu-property-section.patch:0: missing Upstream in the header (https://nightly.buildroot.org/#_additional_patch_documentation) boot/syslinux/0016-Workaround-multiple-definition-of-symbol-errors.patch:0: missing Upstream in the header (https://nightly.buildroot.org/#_additional_patch_documentation) boot/syslinux/0017-Replace-builtin-strlen-that-appears-to-get-optimized.patch:0: missing Upstream in the header (https://nightly.buildroot.org/#_additional_patch_documentation) 1137 lines processed 6 warnings generated
These should either be added to the .packageignore file or a "Upstream: N/A, dead" line, similar to 0023-com32-chain-chain.h-use-proper-type-in-struct-data_a.patch:21.
A few of the existing patches should be rebased for 6.04, they do not apply cleanly:
Quoted 1 line
Quoted 1 line
Quoted 1 line
syslinux
bf6db5b4Patching
<...>
Applying 0011-extlinux-Use-the-host-toolchain-to-build.patch using patch:
patching file extlinux/Makefile
Hunk #2 succeeded at 53 (offset 1 line).
Applying 0013-Fix-build-with-gnu-efi-version-3.0.9.patch using patch:
patching file mk/lib.mk
Hunk #1 succeeded at 188 (offset 2 lines).
Hunk #2 succeeded at 198 (offset -5 lines).
<...>
Applying 0016-Workaround-multiple-definition-of-symbol-errors.patch using patch:
patching file com32/cmenu/Makefile
patching file com32/elflink/ldlinux/Makefile
patching file com32/gpllib/Makefile
patching file com32/hdt/Makefile
patching file core/Makefile
Hunk #1 succeeded at 158 (offset -6 lines).
patching file dos/Makefile
patching file efi/Makefile
Hunk #1 succeeded at 71 (offset 1 line).
<...>
Kind regards,
Andreas
Quoted 4 lines
[1] https://lore.kernel.org/all/aq62x3ovAUoc_Lmn@windsurf/
--
Alexander Sverdlin.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Hi Andreas!
Quoted 8 lines · Andreas Ziegler
Quoted 5 lines
Quoted 2 lines
Does it make sense to keep syslinux? Even Wikipedia says it's "discontinued". Do you still use it?
I'll be fine having it downstream. I just thought, there is still an interest [1] in this update ;-)
Yes, there is still interest in this software, and I sadly mourn the absence of the don't-delete-host-syslinux patch.
Maybe I can look into creating syslinux-host package, so that I don't need to patch much in the sources and still have a functioning installer.
If Thomas makes his mind about the existence of the original syslinux package at all ;-)
Signature · 5 lines
Alexander Sverdlin. _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 2 lines · Alexander Sverdlin
If Thomas makes his mind about the existence of the original syslinux package at all ;-)
Considering we have interest, it is pretty clear that we should keep syslinux, so please go ahead with submitting new iterations :-)
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Just wanted to chime in and say I'm using syslinux as well, and I'm glad to see it will continue to be in buildroot. Thanks for maintenance work you guys are doing.
Lance
Quoted 8 lines · Thomas Petazzoni via buildroot
Quoted 2 lines · Alexander Sverdlin
If Thomas makes his mind about the existence of the original syslinux package at all ;-)
Considering we have interest, it is pretty clear that we should keep syslinux, so please go ahead with submitting new iterations :-)
Thomas
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 2 lines · Andreas Ziegler
Yes, there is still interest in this software, and I sadly mourn the absence of the don't-delete-host-syslinux patch.
Not sure to understand this one. Could you clarify? Is Alexander's patch dropping some feature that exists today in boot/syslinux/ and that is important for you?
In any case: thanks a lot for raising your interest in syslinux. If both of you could add yourself in DEVELOPERS for boot/syslinux/, it would be much appreciated.
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 8 lines · Thomas Petazzoni
Quoted 2 lines · Andreas Ziegler
Yes, there is still interest in this software, and I sadly mourn the absence of the don't-delete-host-syslinux patch.
Not sure to understand this one. Could you clarify? Is Alexander's patch dropping some feature that exists today in boot/syslinux/ and that is important for you?
The v1 of this patch was a series, which contained one additional patch: https://patchwork.buildroot.org/project/buildroot/patch/[email protected]/ . This unfortunately did not meet the upstream requirement. This change would make a messy (and dangerous) installation of syslinux on the build machine obsolete.
Quoted 3 lines
In any case: thanks a lot for raising your interest in syslinux. If both of you could add yourself in DEVELOPERS for boot/syslinux/, it would be much appreciated.
Last time I did low-level C and assembler programming was during university, which is now more than 30 years in the past -- but if it helps keeping syslinux active, why not.
Kind regards,
Andreas
Quoted 5 lines
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 7 lines · Andreas Ziegler
Quoted 6 lines · Thomas Petazzoni
Quoted 3 lines · Andreas Ziegler
Yes, there is still interest in this software, and I sadly mourn the absence
of the don't-delete-host-syslinux patch.
Quoted 8 lines
Quoted 3 lines
Not sure to understand this one. Could you clarify? Is Alexander's patch dropping some feature that exists today in boot/syslinux/ and that is important for you?
The v1 of this patch was a series, which contained one additional patch: https://patchwork.buildroot.org/project/buildroot/patch/[email protected]/
. This unfortunately did not meet the upstream requirement. This change
would make a messy (and dangerous) installation of syslinux on the build
machine obsolete.
Which change? Your proposed change at
https://patchwork.buildroot.org/project/buildroot/patch/[email protected]/
? Sorry, I'm still not following you. Could you perhaps bring a bit more context?
Quoted 3 lines
Last time I did low-level C and assembler programming was during university, which is now more than 30 years in the past -- but if it helps keeping syslinux active, why not.
All we care is about keeping syslinux active: reacting to build issues, to new upstream releases, to patches being submitted against syslinux in Buildroot.
Thanks!
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 17 lines · Thomas Petazzoni
Quoted 7 lines · Andreas Ziegler
Quoted 6 lines · Thomas Petazzoni
Quoted 3 lines · Andreas Ziegler
Yes, there is still interest in this software, and I sadly mourn the absence
of the don't-delete-host-syslinux patch.Quoted 8 lines
Quoted 3 lines
Not sure to understand this one. Could you clarify? Is Alexander's patch dropping some feature that exists today in boot/syslinux/ and that is important for you?
The v1 of this patch was a series, which contained one additional patch: https://patchwork.buildroot.org/project/buildroot/patch/[email protected]/
. This unfortunately did not meet the upstream requirement. This change
would make a messy (and dangerous) installation of syslinux on the build
machine obsolete.
Quoted 4 lines
Which change? Your proposed change at
https://patchwork.buildroot.org/project/buildroot/patch/[email protected]/
? Sorry, I'm still not following you. Could you perhaps bring a bit more context?
Yes, I was referring to the change initiated by the patch.
Alexander originally sent two patches
[1/2] boot/syslinux: Bump to 6.04-pre2 [1]
[2/2] boot/syslinux: Don't delete host syslinux installer [2]
2/2 used a pattern already used in other patches (0004, 0005, 0011) to build the syslinux binary. This was flagged because it should have been up-streamed. Since this is not possible (project discontinued, implementation is a buildroot-specific workaround), Alexander chose to discontinue it for now.
host/bin/syslinux needs to be executed to make a partition bootable. If Buildroot does not supply the binary, the corresponding host package has to be installed.
Kind regards,
Andreas
Quoted 7 lines
Thanks!
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training
https://bootlin.com
[1] https://patchwork.buildroot.org/project/buildroot/patch/[email protected]/
[2] https://patchwork.buildroot.org/project/buildroot/patch/[email protected]/
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 5 lines · Alexander Sverdlin
Quoted 2 lines
Does it make sense to keep syslinux? Even Wikipedia says it's "discontinued". Do you still use it?
I'll be fine having it downstream. I just thought, there is still an interest [1] in this update ;-)
If you're still using it, totally fine with me to continue to have it in Buildroot.
Quoted 2 lines
Sorry, yes, all the dropped are "already applied", I will mention this in the commit message if you'll have interest in it.
Perfect.
Quoted 10 lines
Quoted 1 line
And not this one, that you are removing?
So the patch 24 has partially reverted the patch 7, the latter is already merged upstream, but in different form (
22d32c15ea96
"Update the longjump calls to fit the new declaration").Ultimately, patch 7 doesn't apply, patch 24 doesn't apply because patch 7 doesn't apply, but even if they would both apply, the net result will be exactly what 6.04-pre2 has upstream. And it's not buildable against the buildroot gnuefi package.
Hum, I'm not entirely sure to follow, but if the result builds/works, that's what matters.
Can you send an updated version with a slightly improved commit message, and then we will be good to go?
Thanks a lot!
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot