diff options
author | Daniel Baumann <daniel@debian.org> | 2012-12-16 21:06:25 +0100 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2012-12-16 21:39:38 +0100 |
commit | 46b0d4370ba1d3311128570720528261afc4cb08 (patch) | |
tree | 27053b870caadfc8c5bc06e4958d429c322532e8 /scripts/build | |
parent | 9687f85695c6ef77a6acf95758e5d3e513890d8f (diff) | |
download | vyos-live-build-46b0d4370ba1d3311128570720528261afc4cb08.tar.gz vyos-live-build-46b0d4370ba1d3311128570720528261afc4cb08.zip |
Switching from genisoimage to xorriso.
Diffstat (limited to 'scripts/build')
-rwxr-xr-x | scripts/build/binary_iso | 78 | ||||
-rwxr-xr-x | scripts/build/source_debian | 2 | ||||
-rwxr-xr-x | scripts/build/source_iso | 20 |
3 files changed, 50 insertions, 50 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 diff --git a/scripts/build/source_debian b/scripts/build/source_debian index 61603f7f5..fc85ff601 100755 --- a/scripts/build/source_debian +++ b/scripts/build/source_debian @@ -55,7 +55,7 @@ Chroot chroot "dpkg --get-selections" | awk '{ print $1 }' > source-selection.tx cat >> source-selection.txt << EOF ${LB_BOOTLOADER} live-build -genisoimage +xorriso parted squashfs-tools mtd-tools diff --git a/scripts/build/source_iso b/scripts/build/source_iso index a9f0c281f..81b4f5cef 100755 --- a/scripts/build/source_iso +++ b/scripts/build/source_iso @@ -53,7 +53,7 @@ Check_lockfile .lock Create_lockfile .lock # Checking depends -Check_package chroot/usr/bin/genisoimage genisoimage +Check_package chroot/usr/bin/xorriso xorriso # Installing depends Install_package @@ -64,41 +64,45 @@ then rm -f source.iso fi +# Handle xorriso generic options +XORRISO_OPTIONS="-as mkisofs -r -J -joliet-long -l -cache-inodes" + +# Handle xorriso 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 # Moving image mv source chroot cat >> chroot/source.sh << EOF -genisoimage ${GENISOIMAGE_OPTIONS} -o source.iso -r -J -l -cache-inodes source +xorriso ${XORRISO_OPTIONS} -o source.iso source EOF Chroot chroot "sh source.sh" |