summaryrefslogtreecommitdiff
path: root/scripts/build/binary_iso
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2012-12-16 21:06:25 +0100
committerDaniel Baumann <mail@daniel-baumann.ch>2013-05-06 14:50:02 +0200
commit0d7322500bdd3b267d6b4fbf86344aea9aeb0072 (patch)
tree27053b870caadfc8c5bc06e4958d429c322532e8 /scripts/build/binary_iso
parent960d954aeb754bb44d1cff540439fa73a2b0a566 (diff)
downloadvyos-live-build-0d7322500bdd3b267d6b4fbf86344aea9aeb0072.tar.gz
vyos-live-build-0d7322500bdd3b267d6b4fbf86344aea9aeb0072.zip
Switching from genisoimage to xorriso.
Diffstat (limited to 'scripts/build/binary_iso')
-rwxr-xr-xscripts/build/binary_iso78
1 files changed, 37 insertions, 41 deletions
diff --git a/scripts/build/binary_iso b/scripts/build/binary_iso
index d9a277379..7802f046e 100755
--- a/scripts/build/binary_iso
+++ b/scripts/build/binary_iso
@@ -53,11 +53,11 @@ Check_lockfile .lock
Create_lockfile .lock
# Checking depends
-Check_package chroot/usr/bin/genisoimage genisoimage
+Check_package chroot/usr/bin/xorriso xorriso
if [ "${LB_BINARY_IMAGES}" = "iso-hybrid" ]
then
- Check_package chroot/usr/bin/isohybrid syslinux
+ Check_package chroot/usr/lib/syslinux/isohdpfx.bin syslinux-common
fi
# Restoring cache
@@ -72,79 +72,85 @@ then
rm -f ${IMAGE}
fi
-# Handle genisoimage generic options
-GENISOIMAGE_OPTIONS="-J -l -cache-inodes -allow-multidot"
+# Handle xorriso generic options
+XORRISO_OPTIONS="-as mkisofs -r -J -joliet-long -l -cache-inodes"
+
+# Handle xorriso live-build specific options
+if [ "${LB_BINARY_IMAGES}" = "iso-hybrid" ]
+then
+ XORRISO_OPTIONS="${XORRISO_OPTIONS} -isohybrid-mbr /usr/lib/syslinux/isohdpfx.bin -partition_offset 16"
+fi
-# Handle genisoimage live-build specific options
if [ "${_QUIET}" = "true" ]
then
- GENISOIMAGE_OPTIONS="${GENISOIMAGE_OPTIONS} -quiet"
+ XORRISO_OPTIONS="${XORRISO_OPTIONS} -quiet"
fi
if [ "${_VERBOSE}" = "true" ]
then
- GENISOIMAGE_OPTIONS="${GENISOIMAGE_OPTIONS} -v"
+ XORRISO_OPTIONS="${XORRISO_OPTIONS} -v"
fi
if [ -n "${LB_ISO_APPLICATION}" ] && [ "${LB_ISO_APPLICATION}" != "none" ]
then
- GENISOIMAGE_OPTIONS="${GENISOIMAGE_OPTIONS} -A \"${LB_ISO_APPLICATION}\""
+ XORRISO_OPTIONS="${XORRISO_OPTIONS} -A \"${LB_ISO_APPLICATION}\""
fi
if [ -n "${LB_ISO_PREPARER}" ] && [ "${LB_ISO_PREPARER}" != "none" ]
then
- GENISOIMAGE_OPTIONS="${GENISOIMAGE_OPTIONS} -p \"${LB_ISO_PREPARER}\""
+ XORRISO_OPTIONS="${XORRISO_OPTIONS} -p \"${LB_ISO_PREPARER}\""
fi
if [ -n "${LB_ISO_PUBLISHER}" ] && [ "${LB_ISO_PUBLISHER}" != "none" ]
then
- GENISOIMAGE_OPTIONS="${GENISOIMAGE_OPTIONS} -publisher \"${LB_ISO_PUBLISHER}\""
+ XORRISO_OPTIONS="${XORRISO_OPTIONS} -publisher \"${LB_ISO_PUBLISHER}\""
fi
if [ -n "${LB_ISO_VOLUME}" ] && [ "${LB_ISO_VOLUME}" != "none" ]
then
- GENISOIMAGE_OPTIONS="${GENISOIMAGE_OPTIONS} -V \"${LB_ISO_VOLUME}\""
+ XORRISO_OPTIONS="${XORRISO_OPTIONS} -V \"${LB_ISO_VOLUME}\""
fi
-# Handle genisoimage architecture specific options
+# Handle xorriso architecture specific options
case "${LB_BOOTLOADER}" in
grub)
- GENISOIMAGE_OPTIONS="${GENISOIMAGE_OPTIONS} -no-emul-boot -boot-load-size 4 -boot-info-table"
- GENISOIMAGE_OPTIONS="${GENISOIMAGE_OPTIONS} -r -b boot/grub/stage2_eltorito"
- GENISOIMAGE_EXCLUDE="boot/grub/stage2_eltorito"
+ XORRISO_OPTIONS="${XORRISO_OPTIONS} -no-emul-boot -boot-load-size 4 -boot-info-table"
+ XORRISO_OPTIONS="${XORRISO_OPTIONS} -b boot/grub/stage2_eltorito"
+ XORRISO_EXCLUDE="boot/grub/stage2_eltorito"
;;
grub2)
- GENISOIMAGE_OPTIONS="${GENISOIMAGE_OPTIONS} -no-emul-boot -boot-load-size 4 -boot-info-table"
- GENISOIMAGE_OPTIONS="${GENISOIMAGE_OPTIONS} -r -b boot/grub/grub_eltorito -J"
- GENISOIMAGE_EXCLUDE="boot/grub/grub_eltorito"
+ XORRISO_OPTIONS="${XORRISO_OPTIONS} -no-emul-boot -boot-load-size 4 -boot-info-table"
+ XORRISO_OPTIONS="${XORRISO_OPTIONS} -b boot/grub/grub_eltorito -J"
+ XORRISO_EXCLUDE="boot/grub/grub_eltorito"
;;
silo)
- GENISOIMAGE_OPTIONS="${GENISOIMAGE_OPTIONS} -r -G boot/isofs.b -B ..."
- GENISOIMAGE_EXCLUDE="boot/isofs.b"
+ XORRISO_OPTIONS="${XORRISO_OPTIONS} -G boot/isofs.b -B ..."
+ XORRISO_EXCLUDE="boot/isofs.b"
;;
syslinux)
- GENISOIMAGE_OPTIONS="${GENISOIMAGE_OPTIONS} -no-emul-boot -boot-load-size 4 -boot-info-table"
case "${LB_MODE}" in
progress-linux)
- GENISOIMAGE_OPTIONS="${GENISOIMAGE_OPTIONS} -r -b boot/boot.bin -c boot/boot.cat"
- GENISOIMAGE_EXCLUDE="boot/boot.bin"
+ XORRISO_OPTIONS="${XORRISO_OPTIONS} -b boot/boot.bin -c boot/boot.cat"
+ XORRISO_EXCLUDE="boot/boot.bin"
;;
*)
- GENISOIMAGE_OPTIONS="${GENISOIMAGE_OPTIONS} -r -b isolinux/isolinux.bin -c isolinux/boot.cat"
- GENISOIMAGE_EXCLUDE="isolinux/isolinux.bin"
+ XORRISO_OPTIONS="${XORRISO_OPTIONS} -b isolinux/isolinux.bin -c isolinux/boot.cat"
+ XORRISO_EXCLUDE="isolinux/isolinux.bin"
;;
esac
+
+ XORRISO_OPTIONS="${XORRISO_OPTIONS} -no-emul-boot -boot-load-size 4 -boot-info-table"
;;
yaboot)
- GENISOIMAGE_OPTIONS="${GENISOIMAGE_OPTIONS} -r --iso-level 2 --netatalk -hfs -probe -map"
- GENISOIMAGE_OPTIONS="${GENISOIMAGE_OPTIONS} binary/yaboot/hfs.map --chrp-boot -part -no-desktop"
- GENISOIMAGE_OPTIONS="${GENISOIMAGE_OPTIONS} -hfs-bless binary/yaboot -hfs-volid Debian/Live_powerpc"
- GENISOIMAGE_EXCLUDE="yaboot/hfs.map"
+ XORRISO_OPTIONS="${XORRISO_OPTIONS} --iso-level 2 --netatalk -hfs -probe -map"
+ XORRISO_OPTIONS="${XORRISO_OPTIONS} binary/yaboot/hfs.map --chrp-boot -part -no-desktop"
+ XORRISO_OPTIONS="${XORRISO_OPTIONS} -hfs-bless binary/yaboot -hfs-volid Debian/Live_powerpc"
+ XORRISO_EXCLUDE="yaboot/hfs.map"
;;
*)
@@ -156,7 +162,7 @@ esac
#if [ "${LB_DEBIAN_INSTALLER}" != "live" ]
#then
-# GENISOIMAGE_OPTIONS="${GENISOIMAGE_OPTIONS} -m ${GENISOIMAGE_EXCLUDE}"
+# XORRISO_OPTIONS="${XORRISO_OPTIONS} -m ${XORRISO_EXCLUDE}"
#fi
if [ "${LB_BOOTLOADER}" = "grub2" ]
@@ -193,19 +199,9 @@ fi
cat >> binary.sh << EOF
-genisoimage ${GENISOIMAGE_OPTIONS} -o ${IMAGE} binary
-EOF
-
-if [ "${LB_BINARY_IMAGES}" = "iso-hybrid" ]
-then
-
-cat >> binary.sh << EOF
-
-isohybrid ${ISOHYBRID_OPTIONS} ${IMAGE}
+xorriso ${XORRISO_OPTIONS} -o ${IMAGE} binary
EOF
-fi
-
case "${LB_BUILD_WITH_CHROOT}" in
true)
# Moving image