summaryrefslogtreecommitdiffstats
path: root/main/syslinux
diff options
context:
space:
mode:
authorWilliam Pitcock <nenolod@dereferenced.org>2011-09-03 00:27:50 -0500
committerWilliam Pitcock <nenolod@dereferenced.org>2011-09-03 00:27:50 -0500
commit2879013b96ec401b65200e652b5e81c0468d4489 (patch)
treed635984022507f89882f151a5c8c664883c30b30 /main/syslinux
parent600b2cccb98253eb249d66cc55b574a9f1694c04 (diff)
downloadaports-2879013b96ec401b65200e652b5e81c0468d4489.tar.bz2
aports-2879013b96ec401b65200e652b5e81c0468d4489.tar.xz
main/syslinux: detect xen
Diffstat (limited to 'main/syslinux')
-rw-r--r--main/syslinux/APKBUILD6
-rwxr-xr-xmain/syslinux/update-extlinux24
-rw-r--r--main/syslinux/update-extlinux.conf5
3 files changed, 31 insertions, 4 deletions
diff --git a/main/syslinux/APKBUILD b/main/syslinux/APKBUILD
index 459085bc3..7a420c10e 100644
--- a/main/syslinux/APKBUILD
+++ b/main/syslinux/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=syslinux
pkgver=4.04
-pkgrel=6
+pkgrel=7
pkgdesc="Boot loader for the Linux operating system"
url="http://syslinux.org"
arch="x86 x86_64"
@@ -37,5 +37,5 @@ package() {
}
md5sums="a3936208767eb7ced65320abe2e33a10 syslinux-4.04.tar.bz2
-14443fe391bd315a54478851abdc32cb update-extlinux.conf
-7164c110dae13a8d06d175943e48b841 update-extlinux"
+92ed1795cfda4bc2f06fca2da0dc977c update-extlinux.conf
+5a2ecfb888bea885cbd56d271713a4ae update-extlinux"
diff --git a/main/syslinux/update-extlinux b/main/syslinux/update-extlinux
index a2488cc8d..1ba98658e 100755
--- a/main/syslinux/update-extlinux
+++ b/main/syslinux/update-extlinux
@@ -89,6 +89,28 @@ echo "MENU AUTOBOOT Alpine will be booted automatically in # seconds." >> $conf.
echo "TIMEOUT $rtimeout" >> $conf.new
lst=0
+if [ -f "/boot/xen.gz" ]; then
+ for kernel in $(find /boot -name vmlinuz-* -type f); do
+ tag=$(basename $kernel | cut -b9-)
+ everbose "Found Xen hypervisor: /boot/xen.gz, kernel: $kernel"
+
+ if [ -f "/boot/initramfs-$tag" ]; then
+ everbose "Found initramfs: /boot/initramfs-$tag"
+ initramfs="initrd=initramfs-$tag"
+ fi
+
+ echo "LABEL $lst" >> $conf.new
+ if [ "$lst" = "$default" ]; then
+ echo " MENU DEFAULT" >> $conf.new
+ fi
+ echo " MENU LABEL Xen + Linux $tag" >> $conf.new
+ echo " KERNEL mboot.c32" >> $conf.new
+ echo " APPEND xen.gz $xen_opts --- $(basename $kernel) root=$root modules=${modules}${TYPE:+,$TYPE} $default_kernel_opts --- $initramfs" >> $conf.new
+ echo "" >> $conf.new
+ lst=$(($lst + 1))
+ done
+fi
+
for kernel in $(find /boot -name vmlinuz-* -type f); do
tag=$(basename $kernel | cut -b9-)
everbose "Found kernel: $kernel"
@@ -122,7 +144,7 @@ everbose "$lst entries found."
for entry in /etc/update-extlinux.d/*; do
[ -f "$entry" ] && cat $entry >> $conf.new
-done
+done
if [ "$overwrite" = "1" ]; then
# keep a backup just in case
diff --git a/main/syslinux/update-extlinux.conf b/main/syslinux/update-extlinux.conf
index 17a47f22c..c64988b79 100644
--- a/main/syslinux/update-extlinux.conf
+++ b/main/syslinux/update-extlinux.conf
@@ -29,3 +29,8 @@ verbose=0
# hidden
# if set to non-zero, the boot menu will be hidden by default.
hidden=1
+
+# xen_opts
+# options to hand to xen hypervisor, useful ones are:
+# dom0_mem=256M (give domain-0 environment 256M ram)
+xen_opts=dom0_mem=256M