From 3d6123e69ab879c72ff489afc5bf93ef0b7a94ce Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Tue, 8 Mar 2005 18:53:11 +0000 Subject: Initial revision --- src/util/geniso | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100755 src/util/geniso (limited to 'src/util/geniso') diff --git a/src/util/geniso b/src/util/geniso new file mode 100755 index 000000000..5bd5c7be5 --- /dev/null +++ b/src/util/geniso @@ -0,0 +1,56 @@ +#!/bin/bash +# +# Generate a isolinux ISO boot image +# +# geniso foo.iso foo.zlilo +# +# the ISO image is the first argument so that a list of .zlilo images +# to include can be specified +# +case $# in +0|1) + echo Usage: $0 foo.iso foo.zlilo ... + exit 1 + ;; +esac +# This should be the default location of the isolinux.bin file +isolinux_bin=${ISOLINUX_BIN:-util/isolinux.bin} +if [ ! -r $isolinux_bin ] +then + echo $0: $isolinux_bin not found, please install, or set ISOLINUX_BIN in arch/i386/config correctly + exit 1 +fi +out=$1 +shift +dir=bin/iso.dir +mkdir -p $dir +cfg=$dir/isolinux.cfg +cp -p $isolinux_bin $dir +cat > $cfg <&2 + continue + fi + b=$(basename $f) + g=${b%.zlilo} + g=${g//[^a-z0-9]}.zli + case "$first" in + "") + echo DEFAULT $g + ;; + esac + first=$g + echo LABEL $b + echo "" KERNEL $g + cp -p $f $dir/$g +done >> $cfg +mkisofs -l -o $out -c boot.cat -b isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table $dir +rm -fr $dir -- cgit v1.2.3-55-g7522