summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libre/syslinux/PKGBUILD85
-rw-r--r--libre/syslinux/fix_infinite_loop_tests.patch16
-rw-r--r--libre/syslinux/gnu-efi-git.patch28
-rw-r--r--libre/syslinux/single-load-segment.patch304
-rw-r--r--libre/syslinux/strip_note_section.patch29
5 files changed, 367 insertions, 95 deletions
diff --git a/libre/syslinux/PKGBUILD b/libre/syslinux/PKGBUILD
index a564f0fa7..1549ffb22 100644
--- a/libre/syslinux/PKGBUILD
+++ b/libre/syslinux/PKGBUILD
@@ -6,9 +6,11 @@
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
pkgname=syslinux
-pkgver=6.03
-_tag=syslinux-$pkgver
-pkgrel=10.parabola1
+pkgver=6.04.pre1.r41.g5e426532
+#_tag=syslinux-$pkgver
+_commit=5e426532210bb830d2d7426eb8d8c154d9dfcba6
+pkgrel=1
+pkgrel+=.par1
pkgdesc='Collection of boot loaders that boot from FAT, ext2/3/4 and btrfs filesystems, from CDs and via PXE (Parabola rebranded)'
url='http://www.syslinux.org/'
arch=(i686 x86_64)
@@ -33,69 +35,47 @@ optdepends=('perl-crypt-passwdmd5: For md5pass'
# The syslinux-install_update script is maintained at https://gist.github.com/pyther/772138
# Script not yet updated for syslinux-efi
-source=(git://git.kernel.org/pub/scm/boot/syslinux/syslinux.git#tag=$_tag
- git://git.code.sf.net/p/gnu-efi/code#commit=ab54e2b40e914d0ca01dc3d44c8d4eb8517bf999
+source=(git+https://repo.or.cz/syslinux.git#commit=$_commit
+ gnu-efi::git://git.code.sf.net/p/gnu-efi/code
syslinux.cfg
syslinux-install_update
- btrfs-fix.patch::http://repo.or.cz/syslinux.git/patch/548386049cd41e887079cdb904d3954365eb28f3?hp=721a0af2f0ba111c31685c5f6c5481eb25346971
- gcc-fix-alignment.patch::http://repo.or.cz/syslinux.git/patch/e5f2b577ded109291c9632dacb6eaa621d8a59fe?hp=8dc6d758b564a1ccc44c3ae11f265d43628219ce
- dont-guess-alignment.patch::http://repo.or.cz/syslinux.git/patch/0cc9a99e560a2f52bcf052fd85b1efae35ee812f?hp=e5f2b577ded109291c9632dacb6eaa621d8a59fe
- kdb-230.patch::http://repo.or.cz/syslinux.git/patch/138e850fab106b5235178848b3e0d33e25f4d3a2
- correct_base_type.patch::http://repo.or.cz/syslinux.git/patch/83aad4f
- set_mode_base.patch::http://repo.or.cz/syslinux.git/patch/0a2dbb3
- fix_return_pointer.patch::http://repo.or.cz/syslinux.git/patch/8dc6d758b564a1ccc44c3ae11f265d43628219ce
- support-ext4-64bit.patch::http://repo.or.cz/syslinux.git/patch/af7e95c32cea40c1e443ae301e64b27f068b4915
- fix_infinite_loop_tests.patch
- gnu-efi-git.patch
+ strip_note_section.patch
+ single-load-segment.patch
splash.png)
sha1sums=('SKIP'
'SKIP'
'e40acf4cf9d05ec000c59284f959d1540b35a3be'
'df5160a138ca8c6502d67fe1a64fec78b50e82c2'
- '6ebf77bf028c928a6ef33dadeee7402b3113b6d3'
- 'eaa9f5cd82b501f076ece4812d2d37f49d02caae'
- 'c6a6e96e233b2f8105503725cd614abc1bac2845'
- 'f50e0a92c65536ef73a84614d489e52d9d1db329'
- 'e24bf5b1617bab4a3f46925c5a8ee6079f4686bf'
- '500c174fce91133d40024b28f6f5cedb144b84c2'
- 'b3d2196aaec154749c5b796c6d9bfd605a918cf8'
- 'fe3ab41235aa57259bb6af8cc30c5877c1d8fb57'
- '7ecb02550666dfafeb0b22a67dcc34caa4b79767'
- '324af118594e6fb0864ef4905ce47d95c4d8e6ef'
+ '11d928087764ca286af0327d40230f219348568c'
+ '830c88005fb6c9e759f67b91ab33a10b002385de'
'aab1c7789e0d7290fe87538abad181abac069d40')
+sha256sums=('SKIP'
+ 'SKIP'
+ '67fe3050e60a0d1572293ff095dac2e6cab9da6d0f98fb1fc555850ec046d6ea'
+ '5f86b5813465c48ba7bd178389aacb5149ff0b5f2467ab1772a4f862c5b15d41'
+ '80d783fad7f96077a17634a6b17d8b7750a443221584aa802c096434bdaed603'
+ '0ba5667654ecd5b94c1941c7dce7ce945059b1fa70467f6f5a8770a959fcf82b'
+ 'a839e3e1242c5279f95f5f913af47be73cf16339c7aa55af378a428c904f1595')
+
_targets='bios efi32'
case "$CARCH" in
x86_64) _targets+=' efi64' ;;
esac
-prepare() {
+pkgver() {
cd syslinux
+ git describe --long | sed 's/^syslinux-//;s/\([^-]*-g\)/r\1/;s/-/./g'
+}
- # FS#48253
- patch -p1 < ../gcc-fix-alignment.patch
- patch -p1 < ../dont-guess-alignment.patch
-
- # FS#48214
- patch -p1 < ../btrfs-fix.patch
-
- # FS#49046
- patch -p1 < ../kdb-230.patch
-
- # FS#53083
- patch -p1 < ../correct_base_type.patch
- patch -p1 < ../set_mode_base.patch
-
- # FS#49250
- patch -p1 < ../fix_return_pointer.patch
-
- # fix infinite loop in load_linux
- patch -p1 < ../fix_infinite_loop_tests.patch
+prepare() {
+ cd syslinux
- # FS#58137
- patch -p1 < ../support-ext4-64bit.patch
+ # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=906414
+ patch -p1 < ../strip_note_section.patch
- patch -p1 < ../gnu-efi-git.patch
+ # https://bugs.archlinux.org/task/61059
+ patch -p1 < ../single-load-segment.patch
# do not swallow efi compilation output to make debugging easier
sed 's|> /dev/null 2>&1||' -i efi/check-gnu-efi.sh
@@ -103,8 +83,9 @@ prepare() {
# disable debug and development flags to reduce bootloader size
truncate --size 0 mk/devel.mk
- mkdir -p gnu-efi
- cp -rv $srcdir/code/gnu-efi-3.0 gnu-efi
+ git submodule init
+ git config --local submodule.gnu-efi.url "$srcdir/gnu-efi"
+ git submodule update
}
build() {
@@ -116,7 +97,9 @@ build() {
check() {
cd syslinux
- make unittest
+ # tests fail to compile
+ # make unittest
+ true
}
package() {
diff --git a/libre/syslinux/fix_infinite_loop_tests.patch b/libre/syslinux/fix_infinite_loop_tests.patch
deleted file mode 100644
index a86c842dd..000000000
--- a/libre/syslinux/fix_infinite_loop_tests.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-diff --git a/com32/lib/syslinux/tests/load_linux.c b/com32/lib/syslinux/tests/load_linux.c
-index ed973841..751b8b24 100644
---- a/com32/lib/syslinux/tests/load_linux.c
-+++ b/com32/lib/syslinux/tests/load_linux.c
-@@ -38,8 +38,10 @@ int syslinux_shuffle_boot_rm(struct syslinux_movelist *fraglist,
- while (ml) {
- addr_t cmdline_addr, last_lowmem_addr;
-
-- if (ml->src != __test_cmdline)
-+ if (ml->src != __test_cmdline) {
-+ ml = ml->next;
- continue;
-+ }
-
- last_lowmem_addr = __test_cmdline_addr;
- cmdline_addr = ml->dst;
diff --git a/libre/syslinux/gnu-efi-git.patch b/libre/syslinux/gnu-efi-git.patch
deleted file mode 100644
index 974a49c41..000000000
--- a/libre/syslinux/gnu-efi-git.patch
+++ /dev/null
@@ -1,28 +0,0 @@
---- a/efi/build-gnu-efi.sh 2014-10-06 11:27:44.000000000 -0500
-+++ b/efi/build-gnu-efi.sh 2018-02-05 04:53:03.458264480 -0500
-@@ -27,11 +27,6 @@
- exit 1
- fi
-
--(
-- cd ../..
-- git submodule update --init
--)
--
- mkdir -p "$objdir/gnu-efi"
- cd "$objdir/gnu-efi"
-
---- a/efi/clean-gnu-efi.sh 2014-10-06 11:27:44.000000000 -0500
-+++ b/efi/clean-gnu-efi.sh 2018-02-05 04:54:39.959105784 -0500
-@@ -21,11 +21,6 @@
- ARCH="$1"
- objdir=$(readlink -f "$2")
-
--(
-- cd ../..
-- git submodule update --init
--)
--
- if [ -d "$objdir/gnu-efi" ];then
- cd "$objdir/gnu-efi"
- EFIDIR="$(readlink -f "$objdir/../gnu-efi/gnu-efi-3.0")"
diff --git a/libre/syslinux/single-load-segment.patch b/libre/syslinux/single-load-segment.patch
new file mode 100644
index 000000000..db9b7d0a1
--- /dev/null
+++ b/libre/syslinux/single-load-segment.patch
@@ -0,0 +1,304 @@
+Author: Lukas Schwaighofer <lukas@schwaighofer.name>
+Description: Force the linker to put all sections into a single PT_LOAD
+ segment. This is required when using binutils >= 2.31 which writes two PT_LOAD
+ segments by default. This is not supported by the wrapper.c script used to
+ convert the shared object into an elf binary.
+Forwarded: https://www.syslinux.org/archives/2018-August/026167.html
+
+---
+ efi/i386/syslinux.ld | 37 +++++++++++++++++++++----------------
+ efi/x86_64/syslinux.ld | 37 +++++++++++++++++++++----------------
+ 2 files changed, 42 insertions(+), 32 deletions(-)
+
+diff --git a/efi/i386/syslinux.ld b/efi/i386/syslinux.ld
+index bab3fc7..5b4589d 100644
+--- a/efi/i386/syslinux.ld
++++ b/efi/i386/syslinux.ld
+@@ -19,6 +19,11 @@ OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
+ OUTPUT_ARCH(i386)
+ ENTRY(_start)
+
++PHDRS
++{
++ all PT_LOAD ;
++}
++
+ SECTIONS
+ {
+ . = 0;
+@@ -31,7 +36,7 @@ SECTIONS
+ *(.text)
+ *(.text.*)
+ __text_end = .;
+- }
++ } :all
+
+ . = ALIGN(16);
+
+@@ -40,7 +45,7 @@ SECTIONS
+ *(.rodata)
+ *(.rodata.*)
+ __rodata_end = .;
+- }
++ } :all
+
+ . = ALIGN(4);
+
+@@ -49,14 +54,14 @@ SECTIONS
+ KEEP (*(SORT(.ctors.*)))
+ KEEP (*(.ctors))
+ __ctors_end = .;
+- }
++ } :all
+
+ .dtors : {
+ __dtors_start = .;
+ KEEP (*(SORT(.dtors.*)))
+ KEEP (*(.dtors))
+ __dtors_end = .;
+- }
++ } :all
+
+ . = ALIGN(4096);
+ .rel : {
+@@ -64,7 +69,7 @@ SECTIONS
+ *(.rel.data)
+ *(.rel.data.*)
+ *(.rel.ctors)
+- }
++ } :all
+
+ . = ALIGN(4);
+
+@@ -72,14 +77,14 @@ SECTIONS
+ __gnu_hash_start = .;
+ *(.gnu.hash)
+ __gnu_hash_end = .;
+- }
++ } :all
+
+
+ .dynsym : {
+ __dynsym_start = .;
+ *(.dynsym)
+ __dynsym_end = .;
+- }
++ } :all
+
+ . = ALIGN(4);
+
+@@ -87,7 +92,7 @@ SECTIONS
+ __dynstr_start = .;
+ *(.dynstr)
+ __dynstr_end = .;
+- }
++ } :all
+
+ . = ALIGN(4);
+
+@@ -104,7 +109,7 @@ SECTIONS
+ KEEP (*(.got.plt))
+ KEEP (*(.got))
+ __got_end = .;
+- }
++ } :all
+
+ . = ALIGN(4);
+
+@@ -112,7 +117,7 @@ SECTIONS
+ __dynamic_start = .;
+ *(.dynamic)
+ __dynamic_end = .;
+- }
++ } :all
+
+ . = ALIGN(16);
+
+@@ -122,19 +127,19 @@ SECTIONS
+ *(.data.*)
+ *(.lowmem)
+ __data_end = .;
+- }
++ } :all
+
+ .reloc : {
+ *(.reloc)
+- }
++ } :all
+
+ .symtab : {
+ *(.symtab)
+- }
++ } :all
+
+ .strtab : {
+ *(.strtab)
+- }
++ } :all
+
+ .bss (NOLOAD) : {
+ /* the EFI loader doesn't seem to like a .bss section,
+@@ -148,7 +153,7 @@ SECTIONS
+ __bss_end = .;
+ *(.sbss)
+ *(.scommon)
+- }
++ } :all
+ __bss_len = ABSOLUTE(__bss_end) - ABSOLUTE(__bss_start);
+ __bss_dwords = (__bss_len + 3) >> 2;
+
+@@ -161,7 +166,7 @@ SECTIONS
+ *(.hugebss)
+ *(.hugebss.*)
+ __hugebss_end = .;
+- }
++ } :all
+
+ _end = .;
+
+diff --git a/efi/x86_64/syslinux.ld b/efi/x86_64/syslinux.ld
+index 450641c..cad28a8 100644
+--- a/efi/x86_64/syslinux.ld
++++ b/efi/x86_64/syslinux.ld
+@@ -19,6 +19,11 @@ OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", "elf64-x86-64")
+ OUTPUT_ARCH(i386:x86-64)
+ ENTRY(_start)
+
++PHDRS
++{
++ all PT_LOAD ;
++}
++
+ SECTIONS
+ {
+ . = 0;
+@@ -31,7 +36,7 @@ SECTIONS
+ *(.text)
+ *(.text.*)
+ __text_end = .;
+- }
++ } :all
+
+ . = ALIGN(16);
+
+@@ -40,7 +45,7 @@ SECTIONS
+ *(.rodata)
+ *(.rodata.*)
+ __rodata_end = .;
+- }
++ } :all
+
+ . = ALIGN(4);
+
+@@ -49,14 +54,14 @@ SECTIONS
+ KEEP (*(SORT(.ctors.*)))
+ KEEP (*(.ctors))
+ __ctors_end = .;
+- }
++ } :all
+
+ .dtors : {
+ __dtors_start = .;
+ KEEP (*(SORT(.dtors.*)))
+ KEEP (*(.dtors))
+ __dtors_end = .;
+- }
++ } :all
+
+ . = ALIGN(4096);
+ .rel : {
+@@ -64,7 +69,7 @@ SECTIONS
+ *(.rel.data)
+ *(.rel.data.*)
+ *(.rel.ctors)
+- }
++ } :all
+
+ . = ALIGN(4);
+
+@@ -72,14 +77,14 @@ SECTIONS
+ __gnu_hash_start = .;
+ *(.gnu.hash)
+ __gnu_hash_end = .;
+- }
++ } :all
+
+
+ .dynsym : {
+ __dynsym_start = .;
+ *(.dynsym)
+ __dynsym_end = .;
+- }
++ } :all
+
+ . = ALIGN(4);
+
+@@ -87,7 +92,7 @@ SECTIONS
+ __dynstr_start = .;
+ *(.dynstr)
+ __dynstr_end = .;
+- }
++ } :all
+
+ . = ALIGN(4);
+
+@@ -104,7 +109,7 @@ SECTIONS
+ KEEP (*(.got.plt))
+ KEEP (*(.got))
+ __got_end = .;
+- }
++ } :all
+
+ . = ALIGN(4);
+
+@@ -112,7 +117,7 @@ SECTIONS
+ __dynamic_start = .;
+ *(.dynamic)
+ __dynamic_end = .;
+- }
++ } :all
+
+ . = ALIGN(16);
+
+@@ -122,19 +127,19 @@ SECTIONS
+ *(.data.*)
+ *(.lowmem)
+ __data_end = .;
+- }
++ } :all
+
+ .reloc : {
+ *(.reloc)
+- }
++ } :all
+
+ .symtab : {
+ *(.symtab)
+- }
++ } :all
+
+ .strtab : {
+ *(.strtab)
+- }
++ } :all
+
+ .bss (NOLOAD) : {
+ /* the EFI loader doesn't seem to like a .bss section,
+@@ -148,7 +153,7 @@ SECTIONS
+ __bss_end = .;
+ *(.sbss)
+ *(.scommon)
+- }
++ } :all
+ __bss_len = ABSOLUTE(__bss_end) - ABSOLUTE(__bss_start);
+ __bss_dwords = (__bss_len + 3) >> 2;
+
+@@ -161,7 +166,7 @@ SECTIONS
+ *(.hugebss)
+ *(.hugebss.*)
+ __hugebss_end = .;
+- }
++ } :all
+
+ _end = .;
+
diff --git a/libre/syslinux/strip_note_section.patch b/libre/syslinux/strip_note_section.patch
new file mode 100644
index 000000000..b71b69d07
--- /dev/null
+++ b/libre/syslinux/strip_note_section.patch
@@ -0,0 +1,29 @@
+Author: Lukas Schwaighofer <lukas@schwaighofer.name>
+Description: Strip the .note.gnu.property section for the mbr. This section is
+ added since binutils Debian version 2.31.1-2 and causes mbr.bin to grow in
+ size beyond what can fit into the master boot record.
+---
+ mbr/i386/mbr.ld | 1 +
+ mbr/x86_64/mbr.ld | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/mbr/i386/mbr.ld b/mbr/i386/mbr.ld
+index d14ba80..5368346 100644
+--- a/mbr/i386/mbr.ld
++++ b/mbr/i386/mbr.ld
+@@ -70,4 +70,5 @@ SECTIONS
+ .debug_typenames 0 : { *(.debug_typenames) }
+ .debug_varnames 0 : { *(.debug_varnames) }
+ /DISCARD/ : { *(.note.GNU-stack) }
++ /DISCARD/ : { *(.note.gnu.property) }
+ }
+diff --git a/mbr/x86_64/mbr.ld b/mbr/x86_64/mbr.ld
+index ae27d49..b8c0d89 100644
+--- a/mbr/x86_64/mbr.ld
++++ b/mbr/x86_64/mbr.ld
+@@ -69,4 +69,5 @@ SECTIONS
+ .debug_typenames 0 : { *(.debug_typenames) }
+ .debug_varnames 0 : { *(.debug_varnames) }
+ /DISCARD/ : { *(.note.GNU-stack) }
++ /DISCARD/ : { *(.note.gnu.property) }
+ }