| 1 |
#!/bin/bash |
| 2 |
# |
| 3 |
# Do install stuff for m68k, including making bootable CDs for bvme6000 |
| 4 |
# Works with debian-installer |
| 5 |
# |
| 6 |
# $1 is the CD number |
| 7 |
# $2 is the temporary CD build dir |
| 8 |
|
| 9 |
. $BASEDIR/tools/boot/$DI_CODENAME/common.sh |
| 10 |
|
| 11 |
set -e |
| 12 |
|
| 13 |
N=$1 |
| 14 |
CDDIR=$2 |
| 15 |
INSTALLDIR=$CDDIR/install |
| 16 |
|
| 17 |
if [ "$DI_WWW_HOME" = "default" ];then |
| 18 |
# Temporarily disabled to stop cron jobs complaining |
| 19 |
# DI_WWW_HOME="http://people.debian.org/~smarenka/d-i/m68k/images/daily/" |
| 20 |
try_di_image_cache |
| 21 |
elif [ "$DI_WWW_HOME" = "test" ];then |
| 22 |
# Temporarily disabled to stop cron jobs complaining |
| 23 |
# DI_WWW_HOME="http://people.debian.org/~smarenka/d-i/test/cd/" |
| 24 |
: |
| 25 |
fi |
| 26 |
if [ ! "$DI_DIST" ]; then |
| 27 |
DI_DIST="$DI_CODENAME" |
| 28 |
fi |
| 29 |
|
| 30 |
cd $CDDIR/.. |
| 31 |
|
| 32 |
# Recommended size for a HFS Catalog is 4 megas per giga, defaults to 4 megas |
| 33 |
# MAXDISKBLOCKS is measured in 2K blocks |
| 34 |
newsize=`echo "$MAXDISKBLOCKS * 2048 / 256" | bc` |
| 35 |
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-hfs-parms MAX_XTCSIZE=$newsize" |
| 36 |
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-J -joliet-long" |
| 37 |
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "--netatalk" |
| 38 |
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-hfs" |
| 39 |
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-probe" |
| 40 |
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-map $BASEDIR/data/hfs.map" |
| 41 |
|
| 42 |
# Only disk 1 bootable |
| 43 |
if [ $N != 1 ]; then |
| 44 |
exit 0 |
| 45 |
fi |
| 46 |
|
| 47 |
echo "DI_WWW_HOME: $DI_WWW_HOME" |
| 48 |
echo "DI_DIR: $DI_DIR" |
| 49 |
|
| 50 |
# remove i386 stuff |
| 51 |
rm -rf $CDDIR/tools |
| 52 |
|
| 53 |
|
| 54 |
cd $INSTALLDIR |
| 55 |
|
| 56 |
# This setup is designed to automatically use whatever subarchs are |
| 57 |
# available to build the cd. |
| 58 |
|
| 59 |
if [ ! "$DI_WWW_HOME" ];then |
| 60 |
if [ ! $DI_DIR ]; then |
| 61 |
DI_DIR="$MIRROR/dists/$DI_DIST/main/installer-$ARCH/current/images" |
| 62 |
echo "DI_DIR: $DI_DIR" |
| 63 |
fi |
| 64 |
cp -a $DI_DIR/* . |
| 65 |
else |
| 66 |
$WGET -q -np -nH --cut-dirs=4 -r -l 3 -R '.gif,.log,stats.txt,index*' "$DI_WWW_HOME" |
| 67 |
fi |
| 68 |
|
| 69 |
# amiga specific stuff |
| 70 |
if [ -d tools/amiga ]; then |
| 71 |
# Amiboot and dmesg need to be executable |
| 72 |
if [ -e tools/amiga/amiboot ]; then |
| 73 |
chmod a+x tools/amiga/amiboot |
| 74 |
fi |
| 75 |
# chmod a+x tools/amiga/dmesg |
| 76 |
|
| 77 |
# Setup amiga icons |
| 78 |
cp tools/amiga/amiga.info $CDDIR/install.info |
| 79 |
if [ -d $INSTALLDIR/tools ]; then |
| 80 |
cp tools/amiga/amiga.info $INSTALLDIR/tools.info |
| 81 |
fi |
| 82 |
mv tools/amiga/amiga.info tools/ |
| 83 |
fi |
| 84 |
|
| 85 |
cd $INSTALLDIR |
| 86 |
|
| 87 |
# bvme6000 specific stuff |
| 88 |
if [ -f tools/cdrom/bvme6000-boot.img.gz ]; then |
| 89 |
mkdir -p $CDDIR/boot1/boot |
| 90 |
cp tools/cdrom/bvme6000-boot.img.gz $CDDIR/boot1/boot/boot.bin |
| 91 |
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-b boot/boot.bin" |
| 92 |
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-c boot/boot.catalog" |
| 93 |
add_mkisofs_opt $CDDIR/../$N.mkisofs_dirs "boot1" |
| 94 |
fi |
| 95 |
|
| 96 |
##-----------------------------< end of file >------------------------------## |