2015-04-27 16:14:26 +00:00
|
|
|
#!/bin/bash
|
|
|
|
#
|
|
|
|
# boot-mips
|
|
|
|
#
|
|
|
|
# $1 is the CD number
|
|
|
|
# $2 is the temporary CD build dir
|
|
|
|
|
|
|
|
# genisovh is used to make ISOs bootable on mips.
|
|
|
|
|
|
|
|
. $BASEDIR/tools/boot/$DI_CODENAME/common.sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
N=$1
|
2015-09-11 17:26:35 +00:00
|
|
|
CDDIR=$2
|
|
|
|
INSTALLDIR="install"
|
2015-04-27 16:14:26 +00:00
|
|
|
if [ "$DI_WWW_HOME" = "default" ];then
|
2016-01-02 23:37:39 -01:00
|
|
|
DI_WWW_HOME="https://d-i.debian.org/daily-images/mips/daily/"
|
2015-04-27 16:14:26 +00:00
|
|
|
try_di_image_cache
|
|
|
|
fi
|
|
|
|
|
2015-09-11 17:26:35 +00:00
|
|
|
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-J -joliet-long"
|
2015-04-27 16:14:26 +00:00
|
|
|
|
|
|
|
# Only disk 1* bootable
|
2017-05-03 09:40:34 +00:00
|
|
|
if [ $N != 1 ]; then
|
2015-04-27 16:14:26 +00:00
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2015-09-11 17:26:35 +00:00
|
|
|
# Mips is currently not bootable directly from CD, and there's
|
|
|
|
# not a lot we can do about that. But add the needed files in the
|
|
|
|
# right place so that users can find them, at least:
|
|
|
|
#
|
|
|
|
# kernel(s)
|
|
|
|
# initramfs
|
|
|
|
# etc...
|
|
|
|
#
|
|
|
|
# The best wasy to find all the files is to parse d-i's MANIFEST file
|
|
|
|
# and work from there.
|
|
|
|
mkdir -p $CDDIR/$INSTALLDIR
|
|
|
|
cd $CDDIR/$INSTALLDIR
|
|
|
|
|
2015-04-27 16:14:26 +00:00
|
|
|
if [ ! "$DI_WWW_HOME" ];then
|
|
|
|
if [ ! "$DI_DIR" ];then
|
|
|
|
DI_DIR="$MIRROR/dists/$DI_DIST/main/installer-$ARCH/current/images"
|
|
|
|
fi
|
2015-09-11 17:26:35 +00:00
|
|
|
cp "$DI_DIR/MANIFEST" MANIFEST
|
2015-04-27 16:14:26 +00:00
|
|
|
else
|
2016-01-03 11:54:46 -01:00
|
|
|
$WGET "$DI_WWW_HOME/MANIFEST" -O MANIFEST
|
2015-04-27 16:14:26 +00:00
|
|
|
fi
|
|
|
|
|
2015-09-11 17:26:35 +00:00
|
|
|
for image in $(awk '{print $1}' MANIFEST); do
|
|
|
|
if [ ! -e "$image" ]; then
|
|
|
|
dir=$(dirname $image)
|
|
|
|
mkdir -p $dir
|
|
|
|
if [ -n "$LOCAL" -a -f "${LOCALDEBS:-$MIRROR}/dists/$DI_DIST/local/installer-$ARCH/current/images/$image" ]; then
|
|
|
|
cp "${LOCALDEBS:-$MIRROR}/dists/$DI_DIST/local/installer-$ARCH/current/images/$image" "$image"
|
|
|
|
elif [ ! "$DI_WWW_HOME" ];then
|
|
|
|
if [ ! "$DI_DIR" ];then
|
|
|
|
DI_DIR="$MIRROR/dists/$DI_DIST/main/installer-$ARCH/current/images"
|
|
|
|
fi
|
|
|
|
cp -a "$DI_DIR/$image" "$image"
|
|
|
|
else
|
2016-01-03 11:54:46 -01:00
|
|
|
$WGET --no-parent -r -nH --cut-dirs=3 "$DI_WWW_HOME/$image"
|
2015-09-11 17:26:35 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
done
|
2015-04-27 16:14:26 +00:00
|
|
|
|
2016-01-03 11:54:46 -01:00
|
|
|
# Clean up in case we had to use $WGET :-(
|
2015-09-11 17:26:35 +00:00
|
|
|
find . -name 'index.html*' -delete
|
2015-04-27 16:14:26 +00:00
|
|
|
|
|
|
|
exit 0
|