aboutsummaryrefslogtreecommitdiffstats
path: root/main/syslinux
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2013-02-27 15:02:25 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2013-02-27 15:02:25 +0000
commitc8e8c756c116b3465271d4cfb6af3b2c583b77ce (patch)
tree116e5d4a8f535aec11fc7aa445bd0cfdb6a58e1a /main/syslinux
parent14e830ec95db7d7f8a892c6dba796862a8c8c8e5 (diff)
downloadaports-c8e8c756c116b3465271d4cfb6af3b2c583b77ce.tar.bz2
aports-c8e8c756c116b3465271d4cfb6af3b2c583b77ce.tar.xz
main/syslinux: add fix for adding back BOOT_IMAGE
Diffstat (limited to 'main/syslinux')
-rw-r--r--main/syslinux/APKBUILD11
-rw-r--r--main/syslinux/boot_image.patch66
2 files changed, 76 insertions, 1 deletions
diff --git a/main/syslinux/APKBUILD b/main/syslinux/APKBUILD
index b0a97416cd..b4506c98b1 100644
--- a/main/syslinux/APKBUILD
+++ b/main/syslinux/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=syslinux
pkgver=5.01
-pkgrel=2
+pkgrel=3
pkgdesc="Boot loader for the Linux operating system"
url="http://syslinux.org"
arch="x86 x86_64"
@@ -13,6 +13,7 @@ install="syslinux.post-upgrade"
options="textrels"
ldpath="/usr/share/syslinux"
source="http://www.kernel.org/pub/linux/utils/boot/syslinux/${pkgver%%.*}.xx/$pkgname-$pkgver.tar.bz2
+ boot_image.patch
update-extlinux.conf
update-extlinux
"
@@ -21,6 +22,11 @@ subpackages="$pkgname-doc"
_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
cd "$_builddir"
+ for i in $source; do
+ case "$i" in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
}
build() {
@@ -41,11 +47,14 @@ package() {
}
md5sums="6c21244277fa4e444967ba45469de863 syslinux-5.01.tar.bz2
+d44f960c83d9fef69839b9537ac1fc1d boot_image.patch
7ef73a7a858b8aa1ac6635d6391ac8e5 update-extlinux.conf
d420755f22dc70a617e2d7b96d3c39b3 update-extlinux"
sha256sums="2e4955dfb1f58ed7a4f82f50fbc2ebd4ca18f8d8399803b033a74fdaf137a252 syslinux-5.01.tar.bz2
+975eba87f3a4de17cce1339eec43b07be7f70ffd1aa620cde1fb773e9f6168ab boot_image.patch
ee970729e981ee1756ffe97f0cdda652d1e82773993310eeecfca1f2ddbe718b update-extlinux.conf
261c33f782f23fef134abbd9ddfc58535a1ed6d7214cbf9a8a2d2a17edfd5bcf update-extlinux"
sha512sums="0c075aff27bacf8c1958a344cb118ba20c5869d4b37deac156e0cf0ae8cdc6deab58d611c95d62b377b921e579a058f45306ba6253445ecfc6cd8437737407ab syslinux-5.01.tar.bz2
+1ef418f520a7e63f0d93644552b6224b98986805bc624571a0cf5653f27b522dddce432ccdd5d6a2bee0da34b056fb94e47e387d1c2ec6bcbbc2091d5d294e67 boot_image.patch
d0c5a0891841623c8905864caadf58866d4b9f1f893725712c6813af6cb6d64f0c08f2a3783fda56fcb1cbcc1a0a73e65562339f5591f38ee5cb213b2d16c680 update-extlinux.conf
fe9ae74060214bf52bdd7178c0a50083a0ff7770c1f617a0020fbec17e6b933375dbc9cdaba8c52e30dfe19dcebbb025206230fc67995dd57fb2d121e5111573 update-extlinux"
diff --git a/main/syslinux/boot_image.patch b/main/syslinux/boot_image.patch
new file mode 100644
index 0000000000..59f5e046c8
--- /dev/null
+++ b/main/syslinux/boot_image.patch
@@ -0,0 +1,66 @@
+From 281e6e2253e737675458e75624a5ba42f0a5f4d6 Mon Sep 17 00:00:00 2001
+From: Matt Fleming <matt.fleming@intel.com>
+Date: Thu, 7 Feb 2013 11:28:58 +0000
+Subject: [PATCH] ldlinux: Append BOOT_IMAGE= to kernel cmdline
+
+Some users rely on the syntax of the kernel cmdline from 4.xx and this
+is currently different in 5.xx. Fix things to match the 4.xx syntax.
+
+Cc: H. Peter Anvin <hpa@zytor.com>
+Signed-off-by: Matt Fleming <matt.fleming@intel.com>
+---
+ com32/elflink/ldlinux/execute.c | 2 +-
+ com32/elflink/ldlinux/kernel.c | 17 +++++------------
+ 2 files changed, 6 insertions(+), 13 deletions(-)
+
+diff --git a/com32/elflink/ldlinux/execute.c b/com32/elflink/ldlinux/execute.c
+index 5c53b99..c6fa8d8 100644
+--- a/com32/elflink/ldlinux/execute.c
++++ b/com32/elflink/ldlinux/execute.c
+@@ -142,7 +142,7 @@ __export void execute(const char *cmdline, uint32_t type)
+ } else {
+ /* Need add one item for kernel load, as we don't use
+ * the assembly runkernel.inc any more */
+- new_linux_kernel((char *)kernel, (char *)cmdline);
++ new_linux_kernel((char *)kernel, (char *)args);
+ }
+
+ free((void *)kernel);
+diff --git a/com32/elflink/ldlinux/kernel.c b/com32/elflink/ldlinux/kernel.c
+index 920246f..f3ba37f 100644
+--- a/com32/elflink/ldlinux/kernel.c
++++ b/com32/elflink/ldlinux/kernel.c
+@@ -35,14 +35,10 @@ int new_linux_kernel(char *okernel, char *ocmdline)
+ else if (append)
+ args = append;
+
+- cmdline_len = strlen(kernel_name);
+- if (args) {
+- /* +1 for the space (' ') between kernel and args */
+- cmdline_len += strlen(args) + 1;
+- }
+-
+- /* +1 for NUL termination */
+- cmdline_len++;
++ cmdline_len = strlen("BOOT_IMAGE=") + strlen(kernel_name);
++ cmdline_len += 1; /* space between BOOT_IMAGE and args */
++ cmdline_len += strlen(args);
++ cmdline_len += 1; /* NUL-termination */
+
+ cmdline = malloc(cmdline_len);
+ if (!cmdline) {
+@@ -50,10 +46,7 @@ int new_linux_kernel(char *okernel, char *ocmdline)
+ return 1;
+ }
+
+- if (args)
+- snprintf(cmdline, cmdline_len, "%s %s", kernel_name, args);
+- else
+- snprintf(cmdline, cmdline_len, "%s", kernel_name);
++ sprintf(cmdline, "BOOT_IMAGE=%s %s", kernel_name, args);
+
+ /* "keeppxe" handling */
+ #if IS_PXELINUX
+--
+1.7.6.5
+