summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libre/syslinux/PKGBUILD45
-rw-r--r--libre/syslinux/fix_infinite_loop_tests.patch16
-rw-r--r--libre/syslinux/gnu-efi-git.patch28
-rw-r--r--libre/syslinux/syslinux-install_update8
4 files changed, 83 insertions, 14 deletions
diff --git a/libre/syslinux/PKGBUILD b/libre/syslinux/PKGBUILD
index cdc954703..fa0886dd7 100644
--- a/libre/syslinux/PKGBUILD
+++ b/libre/syslinux/PKGBUILD
@@ -2,12 +2,13 @@
# Maintainer (Arch): Thomas Bächler <thomas@archlinux.org>
# Maintainer (Arch): Anatol Pomozov <anatol.pomozov@gmail.com>
# Contributor (Arch): Keshav Amburay <(the ddoott ridikulus ddoott rat) (aatt) (gemmaeiil) (ddoott) (ccoomm)>
-# Maintainer: André Silva <emulatorman@hyperbola.info>
+# Maintainer (Hyperbola): André Silva <emulatorman@hyperbola.info>
+# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
pkgname=syslinux
pkgver=6.03
_tag=syslinux-$pkgver
-pkgrel=7.parabola1
+pkgrel=8.parabola1
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)
@@ -21,10 +22,7 @@ options=(!makeflags !buildflags)
replaces=(${pkgname}-parabola)
conflicts=(${pkgname}-parabola)
makedepends=(git python2 nasm upx asciidoc)
-if [[ "$CARCH" == x86_64 ]]; then
- # efi32 needs it
- makedepends+=(lib32-glibc)
-fi
+makedepends_x86_64=(lib32-glibc) # efi32 needs it
optdepends=('perl-crypt-passwdmd5: For md5pass'
'perl-digest-sha1: For sha1pass'
'mtools: For mkdiskimage and syslinux support'
@@ -36,6 +34,7 @@ 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
syslinux.cfg
syslinux-install_update
btrfs-fix.patch::http://repo.or.cz/syslinux.git/patch/548386049cd41e887079cdb904d3954365eb28f3?hp=721a0af2f0ba111c31685c5f6c5481eb25346971
@@ -44,16 +43,23 @@ source=(git://git.kernel.org/pub/scm/boot/syslinux/syslinux.git#tag=$_tag
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
+ fix_infinite_loop_tests.patch
+ gnu-efi-git.patch
splash.png)
sha1sums=('SKIP'
+ 'SKIP'
'e40acf4cf9d05ec000c59284f959d1540b35a3be'
- '2cf5a0eccfb0bf4196b8aea4add1002be948332d'
- '3e7d6e399c25fb7f5d31cc8e580d01163695e351'
- '74b976dd3ce28a619c2e9ef69a33fd455dc4bd4c'
- 'b6ef5a7cdd4b7c714fd78c174e93ae6e854ae1ee'
- '370b4bd392361d3fbc4a10f057d69c737acabd8a'
- '6fdd0ebd6c34e4a424982e29beacff0a16e50c02'
- 'd3551c17674ea51f3457a05ec1136604349fb89e'
+ '6bf38a8de1891ba3fbea27ef73cc4a8047c1b6c7'
+ '6ebf77bf028c928a6ef33dadeee7402b3113b6d3'
+ 'eaa9f5cd82b501f076ece4812d2d37f49d02caae'
+ 'c6a6e96e233b2f8105503725cd614abc1bac2845'
+ 'f50e0a92c65536ef73a84614d489e52d9d1db329'
+ 'e24bf5b1617bab4a3f46925c5a8ee6079f4686bf'
+ '500c174fce91133d40024b28f6f5cedb144b84c2'
+ 'b3d2196aaec154749c5b796c6d9bfd605a918cf8'
+ '7ecb02550666dfafeb0b22a67dcc34caa4b79767'
+ '324af118594e6fb0864ef4905ce47d95c4d8e6ef'
'aab1c7789e0d7290fe87538abad181abac069d40')
_targets='bios efi32'
@@ -78,15 +84,28 @@ prepare() {
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
+
+ patch -p1 < ../gnu-efi-git.patch
+
# do not swallow efi compilation output to make debugging easier
sed 's|> /dev/null 2>&1||' -i efi/check-gnu-efi.sh
# 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
}
build() {
cd syslinux
+ export LDFLAGS+=--no-dynamic-linker # workaround for binutils 2.28 http://www.syslinux.org/wiki/index.php?title=Building
+ export EXTRA_CFLAGS=-fno-PIE # to fix gpxe build
make PYTHON=python2 $_targets
}
diff --git a/libre/syslinux/fix_infinite_loop_tests.patch b/libre/syslinux/fix_infinite_loop_tests.patch
new file mode 100644
index 000000000..a86c842dd
--- /dev/null
+++ b/libre/syslinux/fix_infinite_loop_tests.patch
@@ -0,0 +1,16 @@
+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
new file mode 100644
index 000000000..974a49c41
--- /dev/null
+++ b/libre/syslinux/gnu-efi-git.patch
@@ -0,0 +1,28 @@
+--- 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/syslinux-install_update b/libre/syslinux/syslinux-install_update
index ce45881b2..13dbe258c 100644
--- a/libre/syslinux/syslinux-install_update
+++ b/libre/syslinux/syslinux-install_update
@@ -59,8 +59,9 @@ get_disk() {
fi
case "$part" in
+ # catch cases like mmcblk0p1 and loop0p3
*[[:digit:]]p[[:digit:]]*)
- local disk="${part%%p$partnum}" # get everything before p1
+ local disk="${part%p[[:digit:]]}" # get everything before p1
;;
*)
local disk="${part%%[[:digit:]]*}"
@@ -203,6 +204,11 @@ getBoot() {
echo "Could not find filesystem on / (root) or /boot."
exit 1
fi
+
+ if [[ $bootfs = ext4 && -n "$(tune2fs -l $bootpart | grep 64bit)" ]]; then
+ echo "64 bit option on EXT filesystem is not supported by Syslinux, see http://www.syslinux.org/wiki/index.php?title=Filesystem#ext";
+ exit 1
+ fi
}
# We store the partition table type either gpt or mbr in var ptb