[arch-commits] Commit in mksyslinux/trunk (PKGBUILD mksyslinux)

Tobias Powalowski tpowa at archlinux.org
Thu Aug 26 05:33:36 EDT 2010


    Date: Thursday, August 26, 2010 @ 05:33:35
  Author: tpowa
Revision: 88914

upgpkg: mksyslinux 2010.08-1
update to use /boot and /boot/syslinux directorx

Modified:
  mksyslinux/trunk/PKGBUILD
  mksyslinux/trunk/mksyslinux

------------+
 PKGBUILD   |    9 +++++----
 mksyslinux |   48 ++++++++++++++++++++++++++++--------------------
 2 files changed, 33 insertions(+), 24 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2010-08-26 08:37:24 UTC (rev 88913)
+++ PKGBUILD	2010-08-26 09:33:35 UTC (rev 88914)
@@ -2,13 +2,13 @@
 # Maintainer : Tobias Powalowski <tpowa at archlinux.org>
 
 pkgname=mksyslinux
-pkgver=2008.12
+pkgver=2010.08
 pkgrel=1
 pkgdesc="Advanced, modular syslinux boot image creation utility"
-arch=(i686 x86_64)
+arch=(any)
 license=('GPL')
 url="http://www.archlinux.org/"
-depends=('mkinitcpio' 'syslinux')
+depends=('mkinitcpio' 'syslinux' 'pciutils')
 source=('boot.msg' 'mksyslinux' 'mksyslinux.conf' 'options.msg')
 backup=(etc/mksyslinux.conf)
 
@@ -20,7 +20,8 @@
   install -D -m644 boot.msg $startdir/pkg/usr/share/mksyslinux/boot.msg
   install -D -m644 options.msg  $startdir/pkg/usr/share/mksyslinux/options.msg
 }
+
 md5sums=('6a269fc5b58c7bcc6688efeaa2075606'
-         '3eaa9d2699a4afd28731f52855ff2272'
+         '35a9cdf3109777b45a229f1fd33f46af'
          '498997ebe6bba351bdfbaa59f5d8e523'
          'b211c5f7e30d2ee36cde20f71aa3f2b8')

Modified: mksyslinux
===================================================================
--- mksyslinux	2010-08-26 08:37:24 UTC (rev 88913)
+++ mksyslinux	2010-08-26 09:33:35 UTC (rev 88914)
@@ -5,6 +5,7 @@
 CONFIG="/etc/mksyslinux.conf"
 export TEMPDIR=$(mktemp /tmp/mksyslinux.XXX)
 TMPDIR=$(mktemp -d /tmp/mksyslinux-image.XXX)
+BOOTDIRNAME=boot/syslinux
 
 usage ()
 {
@@ -60,7 +61,6 @@
 # export for mkinitcpio
 [ -n "${APPENDBOOTMESSAGE}" ] && export APPENDBOOTMESSAGE
 [ -n "${APPENDBOOTMESSAGE_SYSLINUX}" ] && export APPENDBOOTMESSAGE_SYSLINUX
-[ -n "${APPENDBOOTMESSAGE_SYSLINUX_LOWMEM}" ] && export APPENDBOOTMESSAGE_SYSLINUX_LOWMEM
 [ -n "${APPENDOPTIONSBOOTMESSAGE}" ] && export APPENDOPTIONSBOOTMESSAGE
 
 MBRDEVICE="$(echo ${DEVICE} | sed -e 's/[0-9]//g')"
@@ -71,29 +71,37 @@
 export USEKERNEL=${VERSION}
 # begin script
 [ -e ${TEMPDIR} ] && rm -r ${TEMPDIR}
-mkdir -p ${TEMPDIR}
+mkdir -p ${TEMPDIR}/$BOOTDIRNAME
 echo ":: Mounting ${DEVICE} ..."
 if ! [ "${IMAGENAME}" = "" ]; then
 	modprobe loop
 else
 	mount ${DEVICE} ${TEMPDIR} || exit 1
 fi
+# prepare syslinux bootloader
+install -m755 /usr/lib/syslinux/isolinux.bin ${TEMPDIR}/${BOOTDIRNAME}/isolinux.bin
+for i in /usr/lib/syslinux/*.c32; do
+    install -m644 $i ${TEMPDIR}/${BOOTDIRNAME}/$(basename $i)
+done
+install -m644 /lib/modules/$(uname -r)/modules.pcimap ${TEMPDIR}/${BOOTDIRNAME}/modules.pcimap
+install -m644 /usr/share/hwdata/pci.ids ${TEMPDIR}/${BOOTDIRNAME}/pci.ids
+
 # create syslinux.cfg
 echo ":: Creating syslinux.cfg ..."
 if [ "${SYSLINUXCFG}" = "" ]; then
-	[ -e ${TEMPDIR}/syslinux.cfg ] && rm ${TEMPDIR}/syslinux.cfg
-	echo "prompt ${PROMPT}" >> ${TEMPDIR}/syslinux.cfg
-	echo "timeout ${TIMEOUT}" >> ${TEMPDIR}/syslinux.cfg
-	echo "display boot.msg" >> ${TEMPDIR}/syslinux.cfg
-	echo "F1 boot.msg" >>  ${TEMPDIR}/syslinux.cfg
-	echo "F2 options.msg" >>  ${TEMPDIR}/syslinux.cfg
-	echo "default arch"  >> ${TEMPDIR}/syslinux.cfg
-	echo "label arch" >> ${TEMPDIR}/syslinux.cfg
-	echo "kernel vmlinuz" >> ${TEMPDIR}/syslinux.cfg
-	echo "append initrd=initrd.img ${KERNEL_BOOT_OPTIONS}" >> ${TEMPDIR}/syslinux.cfg
+	[ -e ${TEMPDIR}/${BOOTDIRNAME}/syslinux.cfg ] && rm ${TEMPDIR}/${BOOTDIRNAME}/syslinux.cfg
+	echo "prompt ${PROMPT}" >> ${TEMPDIR}/${BOOTDIRNAME}/syslinux.cfg
+	echo "timeout ${TIMEOUT}" >> ${TEMPDIR}/${BOOTDIRNAME}/syslinux.cfg
+	echo "display boot.msg" >> ${TEMPDIR}/${BOOTDIRNAME}/syslinux.cfg
+	echo "F1 boot.msg" >>  ${TEMPDIR}/${BOOTDIRNAME}/syslinux.cfg
+	echo "F2 options.msg" >>  ${TEMPDIR}/${BOOTDIRNAME}/syslinux.cfg
+	echo "default arch"  >> ${TEMPDIR}/${BOOTDIRNAME}/syslinux.cfg
+	echo "label arch" >> ${TEMPDIR}/${BOOTDIRNAME}/syslinux.cfg
+	echo "kernel /boot/vmlinuz" >> ${TEMPDIR}/${BOOTDIRNAME}/syslinux.cfg
+	echo "append initrd=/boot/initrd.img ${KERNEL_BOOT_OPTIONS}" >> ${TEMPDIR}/${BOOTDIRNAME}/syslinux.cfg
 else
 	sed "s|@@PROMPT@@|${PROMPT}|g;s|@@TIMEOUT@@|${TIMEOUT}|g;s|@@KERNEL_BOOT_OPTIONS@@|${KERNEL_BOOT_OPTIONS}|g" \
-		${SYSLINUXCFG} > ${TEMPDIR}/syslinux.cfg
+		${SYSLINUXCFG} > ${TEMPDIR}/${BOOTDIRNAME}/syslinux.cfg
 fi
 [ ! -s ${TEMPDIR}/syslinux.cfg ] && echo "No syslinux.cfg found" && exit 1
 echo ":: Calling mkinitcpio CONFIG=${MKINITCPIO_CONFIG} KERNEL=${VERSION} ..." 
@@ -101,11 +109,11 @@
 echo ":: Creating initramdisk ..."
 	mkinitcpio -c ${MKINITCPIO_CONFIG} -k ${VERSION} -g ${TEMPDIR}/initrd.img
 echo ":: Using ${KERNEL} as image kernel ..."
-	install -m644 ${KERNEL} ${TEMPDIR}/vmlinuz
-	install -m644 ${BOOTMESSAGE} ${TEMPDIR}/boot.msg
-	install -m644 ${OPTIONSBOOTMESSAGE} ${TEMPDIR}/options.msg
-	[ ! -s ${TEMPDIR}/boot.msg ] && echo 'ERROR:no boot.msg found, aborting!' && exit 1
-	[ ! -s ${TEMPDIR}/options.msg ] && echo 'ERROR:no options.msg found, aborting!' && exit 1
+	install -m644 ${KERNEL} ${TEMPDIR}/boot/vmlinuz
+	install -m644 ${BOOTMESSAGE} ${TEMPDIR}/${BOOTDIRNAME}/boot.msg
+	install -m644 ${OPTIONSBOOTMESSAGE} ${TEMPDIR}/${BOOTDIRNAME}/options.msg
+	[ ! -s ${TEMPDIR}/${BOOTDIRNAME}/boot.msg ] && echo 'ERROR:no boot.msg found, aborting!' && exit 1
+	[ ! -s ${TEMPDIR}/${BOOTDIRNAME}/options.msg ] && echo 'ERROR:no options.msg found, aborting!' && exit 1
 if ! [ "${IMAGENAME}" = "" ]; then
 	# ext2 overhead's upper bound is 6%
 	# empirically tested up to 1GB
@@ -124,12 +132,12 @@
 fi
 if ! [ "${IMAGENAME}" = "" ]; then
 	echo ":: Installing SYSLINUX on ${IMAGENAME} ..."
-	/usr/bin/syslinux ${IMAGENAME} && echo "Installation completed."
+	syslinux ${IMAGENAME} && echo "Installation completed."
 else
 	echo ":: Installing MBR on ${MBRDEVICE} ..."
 	cat ${MBR} > ${MBRDEVICE}
 	echo ":: Installing SYSLINUX on ${DEVICE} ..."
-	/usr/bin/syslinux -o offset ${DEVICE} && echo "Installation completed."
+	syslinux -o offset ${DEVICE} && echo "Installation completed."
 fi
 # clean /tmp
 rm -r ${TEMPDIR}



More information about the arch-commits mailing list