geniso revision 677833bc953b6cb418c701facbdcf4aa18d6c44e
830N/A#!/bin/bash
830N/A#
830N/A# Generate a isolinux ISO boot image
830N/A#
830N/A# geniso foo.iso foo.zlilo
830N/A#
830N/A# the ISO image is the first argument so that a list of .zlilo images
830N/A# to include can be specified
830N/A#
830N/Acase $# in
830N/A0|1)
830N/A echo Usage: $0 foo.iso foo.zlilo ...
830N/A exit 1
830N/A ;;
830N/Aesac
830N/A# This should be the default location of the isolinux.bin file
830N/Aisolinux_bin=${ISOLINUX_BIN:-util/isolinux.bin}
830N/Aif [ ! -r $isolinux_bin ]
830N/Athen
830N/A echo $0: $isolinux_bin not found, please install, or set ISOLINUX_BIN in arch/i386/Config correctly
830N/A exit 1
830N/Afi
830N/Aout=$1
830N/Ashift
830N/Adir=bin/iso.dir
830N/Amkdir -p $dir
830N/Acfg=$dir/isolinux.cfg
830N/Acp -p $isolinux_bin $dir
830N/Acat > $cfg <<EOF
830N/A# These default options can be changed in the geniso script
830N/ASAY Etherboot ISO boot image generated by geniso
830N/ATIMEOUT 30
830N/AEOF
830N/Afirst=
830N/Afor f
830N/Ado
830N/A if [ ! -r $f ]
830N/A then
830N/A echo $f does not exist, skipping 1>&2
830N/A continue
830N/A fi
830N/A b=$(basename $f)
830N/A g=${b%.zlilo}
830N/A g=${g//[^a-z0-9]}.zli
830N/A case "$first" in
830N/A "")
830N/A echo DEFAULT $g
830N/A ;;
830N/A esac
830N/A first=$g
830N/A echo LABEL $b
830N/A echo "" KERNEL $g
830N/A cp -p $f $dir/$g
830N/Adone >> $cfg
830N/Amkisofs -l -o $out -c boot.cat -b isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table $dir
830N/Arm -fr $dir
830N/A