2004-04-13 18:48:46 +00:00
|
|
|
#!/bin/bash
|
|
|
|
#
|
|
|
|
# Do install stuff for m68k, including making bootable CDs for bvme6000
|
|
|
|
# Works with debian-installer
|
|
|
|
#
|
|
|
|
# $1 is the CD number
|
|
|
|
# $2 is the temporary CD build dir
|
|
|
|
|
|
|
|
. $BASEDIR/tools/boot/$CODENAME/common.sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
N=$1
|
|
|
|
CDDIR=$2
|
|
|
|
INSTALLDIR=$CDDIR/install
|
|
|
|
if [ "$DI_WWW_HOME" = "default" ];then
|
|
|
|
DI_WWW_HOME="http://people.debian.org/~smarenka/d-i/images-m68k/daily"
|
2004-05-12 19:51:18 +00:00
|
|
|
elif [ "$DI_WWW_HOME" = "test" ];then
|
|
|
|
DI_WWW_HOME="http://people.debian.org/~smarenka/d-i/test/cd"
|
2004-04-13 18:48:46 +00:00
|
|
|
fi
|
|
|
|
if [ ! "$DI_DIST" ]; then
|
|
|
|
DI_DIST="$DI_CODENAME"
|
|
|
|
fi
|
|
|
|
|
2004-05-12 19:51:18 +00:00
|
|
|
DI_BOOTLOADER="http://people.debian.org/~smarenka/d-i"
|
2004-04-13 18:48:46 +00:00
|
|
|
|
|
|
|
cd $CDDIR/..
|
|
|
|
|
|
|
|
echo -n "--netatalk -J -hfs -probe -map $BASEDIR/data/hfs.map" \
|
|
|
|
> $N.mkisofs_opts
|
|
|
|
|
|
|
|
# Only disk 1 bootable
|
|
|
|
if [ $N != 1 ]; then
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2004-05-12 19:51:18 +00:00
|
|
|
echo "DI_WWW_HOME: $DI_WWW_HOME"
|
|
|
|
echo "DI_BOOTLOADER: $DI_BOOTLOADER"
|
|
|
|
|
2004-04-13 18:48:46 +00:00
|
|
|
install_languages $CDDIR
|
|
|
|
|
|
|
|
# remove i386 stuff
|
|
|
|
rm -rf $CDDIR/tools
|
|
|
|
|
|
|
|
cd $INSTALLDIR
|
|
|
|
|
2004-05-12 19:51:18 +00:00
|
|
|
# This setup is designed to automatically use whatever subarchs are
|
|
|
|
# available to build the cd.
|
2004-04-13 18:48:46 +00:00
|
|
|
|
|
|
|
if [ ! "$DI_WWW_HOME" ];then
|
|
|
|
DI_DIR="$MIRROR/dists/$DI_DIST/main/installer-$ARCH/current/images"
|
2004-05-12 19:51:18 +00:00
|
|
|
SUBARCHS=`find "$DI_DIR/*" -type d -print | cut -d'/' -f3`
|
|
|
|
|
|
|
|
for subarch in $SUBARCHS; do
|
|
|
|
echo "subarch: $subarch"
|
|
|
|
mkdir $subarch
|
|
|
|
cp "$DI_DIR"/$subarch/* $subarch
|
|
|
|
done
|
2004-04-13 18:48:46 +00:00
|
|
|
cp "$DI_DIR/cdrom-initrd.gz" root.bin
|
2004-05-12 19:51:18 +00:00
|
|
|
if [ -f "$DI_DIR/cdrom22-initrd.gz" ]; then
|
|
|
|
cp "$DI_DIR/cdrom22-initrd.gz" root22.bin
|
|
|
|
fi
|
|
|
|
cp "$DI_DIR/MANIFEST" .
|
2004-04-13 18:48:46 +00:00
|
|
|
else
|
2004-05-12 19:51:18 +00:00
|
|
|
SUBARCHS=$(wget -q "$DI_WWW_HOME/" -O - | \
|
|
|
|
sed -n -e 's/.*>\(.*\)\/<.*/\1/p')
|
|
|
|
|
|
|
|
for subarch in $SUBARCHS; do
|
|
|
|
echo "subarch: $subarch"
|
|
|
|
mkdir $subarch
|
|
|
|
cd $subarch
|
|
|
|
wget -q -np -nd -r -l 1 -R '.gif' "$DI_WWW_HOME/$subarch"
|
|
|
|
rm index*
|
|
|
|
cd ..
|
|
|
|
done
|
2004-04-13 18:48:46 +00:00
|
|
|
wget -O root.bin "$DI_WWW_HOME/cdrom-initrd.gz"
|
2004-05-12 19:51:18 +00:00
|
|
|
if ! `wget -O root22.bin "$DI_WWW_HOME/cdrom22-initrd.gz"` ; then
|
|
|
|
rm root22.bin
|
|
|
|
fi
|
|
|
|
wget -O MANIFEST "$DI_WWW_HOME/MANIFEST"
|
2004-04-13 18:48:46 +00:00
|
|
|
fi
|
|
|
|
|
2004-05-12 19:51:18 +00:00
|
|
|
# grab unpackged stuff
|
|
|
|
for subarch in $SUBARCHS; do
|
|
|
|
TARF="bootloaders-$subarch.tar.bz2"
|
|
|
|
if `wget -O $TARF "$DI_BOOTLOADER/$TARF"` ; then
|
|
|
|
tar -xvjf $TARF
|
|
|
|
fi
|
|
|
|
rm -f $TARF
|
|
|
|
done
|
|
|
|
|
|
|
|
# old way, get rid of it once the above is validated.
|
|
|
|
# create directories for different sub-archs
|
|
|
|
#mkdir {amiga,atari,bvme6000,mac,mvme147,mvme16x}
|
|
|
|
|
|
|
|
#wget -O bootloaders.tar.bz2 "$DI_BOOTLOADER"/../../bootloaders.tar.bz2
|
|
|
|
#tar -xvjf bootloaders.tar.bz2
|
|
|
|
#rm bootloaders.tar.bz2
|
|
|
|
|
|
|
|
#if [ ! "$DI_WWW_HOME" ];then
|
|
|
|
# DI_DIR="$MIRROR/dists/$DI_DIST/main/installer-$ARCH/current/images"
|
|
|
|
# cp "$DI_DIR"/amiga/nativehd-vmlinuz* amiga/vmlinuz
|
|
|
|
# cp "$DI_DIR"/mac/nativehd-vmlinuz* mac/vmlinuz
|
|
|
|
# cp "$DI_DIR/cdrom-initrd.gz" root.bin
|
|
|
|
# cp "$DI_DIR/cdrom22-initrd.gz" root22.bin
|
|
|
|
#else
|
|
|
|
# kernel_amiga=$(wget "$DI_WWW_HOME/amiga/" -O - | \
|
|
|
|
# sed -n 's/.*a href="\(nativehd-vmlinuz-[0-9\.]\+-amiga\)".*/\1/p')
|
|
|
|
# kernel_mac=$(wget "$DI_WWW_HOME/mac/" -O - | \
|
|
|
|
# sed -n 's/.*a href="\(nativehd-vmlinuz-[0-9\.]\+-mac\)".*/\1/p')
|
|
|
|
# wget -O amiga/vmlinuz "$DI_WWW_HOME/amiga/$kernel_amiga"
|
|
|
|
# wget -O mac/vmlinuz "$DI_WWW_HOME/mac/$kernel_mac"
|
|
|
|
# wget -O root.bin "$DI_WWW_HOME/cdrom-initrd.gz"
|
|
|
|
# wget -O root22.bin "$DI_WWW_HOME/cdrom22-initrd.gz"
|
|
|
|
#fi
|
2004-04-13 18:48:46 +00:00
|
|
|
|
2004-05-12 19:51:18 +00:00
|
|
|
# amiga specific stuff
|
|
|
|
if [ "" != "`echo $SUBARCHS | grep amiga`" ]; then
|
|
|
|
# Amiboot and dmesg need to be executable
|
|
|
|
chmod a+x amiga/amiboot-5.6
|
|
|
|
chmod a+x amiga/dmesg
|
|
|
|
|
|
|
|
# Setup amiga icons
|
|
|
|
cp amiga/amiga.info $CDDIR/install.info
|
|
|
|
mv amiga/amiga.info .
|
|
|
|
fi
|
2004-04-13 18:48:46 +00:00
|
|
|
|
|
|
|
##-----------------------------< end of file >------------------------------##
|