Adding debian version 3.70~pre8+dfsg-1.
[syslinux-debian/hramrach.git] / gpxe / src / util / geniso
blob7642ed368b535df22445672320fe77cf08dbf85e
1 #!/bin/bash
3 # Generate a isolinux ISO boot image
5 # geniso foo.iso foo.lkrn
7 # the ISO image is the first argument so that a list of .lkrn images
8 # to include can be specified
10 case $# in
11 0|1)
12 echo Usage: $0 foo.iso foo.lkrn ...
13 exit 1
15 esac
16 # This should be the default location of the isolinux.bin file
17 isolinux_bin=${ISOLINUX_BIN:-util/isolinux.bin}
18 if [ ! -r $isolinux_bin ]
19 then
20 echo $0: $isolinux_bin not found, please install, or set ISOLINUX_BIN in arch/i386/config correctly
21 exit 1
23 out=$1
24 shift
25 dir=bin/iso.dir
26 mkdir -p $dir
27 cfg=$dir/isolinux.cfg
28 cp -p $isolinux_bin $dir
29 cat > $cfg <<EOF
30 # These default options can be changed in the geniso script
31 SAY Etherboot ISO boot image generated by geniso
32 TIMEOUT 30
33 EOF
34 first=
35 for f
37 if [ ! -r $f ]
38 then
39 echo $f does not exist, skipping 1>&2
40 continue
42 b=$(basename $f)
43 g=${b%.lkrn}
44 g=${g//[^a-z0-9]}.krn
45 case "$first" in
46 "")
47 echo DEFAULT $g
49 esac
50 first=$g
51 echo LABEL $b
52 echo "" KERNEL $g
53 cp -p $f $dir/$g
54 done >> $cfg
55 mkisofs -l -o $out -c boot.cat -b isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table $dir
56 rm -fr $dir