2015-04-27 16:14:26 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Do install stuff for arm*, including making bootable CDs
|
|
|
|
# Works with debian-installer
|
|
|
|
#
|
|
|
|
# $1 is the CD number
|
|
|
|
# $2 is the temporary CD build dir
|
|
|
|
#
|
|
|
|
# This is copied from the old arm script and it is currently disabled as there
|
|
|
|
# don't seem to be any bootable armel/armhf machines.
|
|
|
|
|
|
|
|
. $BASEDIR/tools/boot/$CODENAME/common.sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
N=$1
|
|
|
|
CDDIR=$2
|
2015-08-27 13:27:49 +00:00
|
|
|
INSTALLDIR="install"
|
2015-04-27 16:14:26 +00:00
|
|
|
if [ "$DI_WWW_HOME" = "default" ];then
|
|
|
|
# Tempting as it might be to merge these two definitions using $ARCH,
|
|
|
|
# do *not* do that - these defs are parsed out by other scripts that
|
|
|
|
# won't cope with that
|
|
|
|
if [ "$ARCH" = armel ]; then
|
2016-01-02 23:37:39 -01:00
|
|
|
DI_WWW_HOME="https://d-i.debian.org/daily-images/armel/daily"
|
2015-08-27 13:27:49 +00:00
|
|
|
CUT=3
|
2015-04-27 16:14:26 +00:00
|
|
|
elif [ "$ARCH" = armhf ]; then
|
2016-01-02 23:37:39 -01:00
|
|
|
DI_WWW_HOME="https://d-i.debian.org/daily-images/armhf/daily"
|
2015-08-27 13:27:49 +00:00
|
|
|
CUT=3
|
2015-04-27 16:14:26 +00:00
|
|
|
else
|
|
|
|
echo "$0: unknown arch $ARCH; abort"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
try_di_image_cache
|
|
|
|
fi
|
|
|
|
|
|
|
|
cd $CDDIR/..
|
|
|
|
|
|
|
|
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-J -joliet-long"
|
|
|
|
|
2015-08-27 13:27:49 +00:00
|
|
|
# Exit if this is not CD#1/DVD#1
|
|
|
|
if [ $NN != 1 ] ; then exit 0; fi
|
|
|
|
|
|
|
|
# Armel/armhf 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
|
|
|
|
# DTBs
|
|
|
|
# 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
|
|
|
|
|
|
|
|
if [ ! "$DI_WWW_HOME" ];then
|
|
|
|
if [ ! "$DI_DIR" ];then
|
|
|
|
DI_DIR="$MIRROR/dists/$DI_DIST/main/installer-$ARCH/current/images"
|
|
|
|
fi
|
|
|
|
cp "$DI_DIR/MANIFEST" MANIFEST
|
|
|
|
else
|
2016-01-03 11:54:46 -01:00
|
|
|
$WGET "$DI_WWW_HOME/MANIFEST" -O MANIFEST
|
2015-08-27 13:27:49 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
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-08-27 13:27:49 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
2016-01-03 11:54:46 -01:00
|
|
|
# Clean up in case we had to use $WGET :-(
|
2015-08-27 13:27:49 +00:00
|
|
|
find . -name 'index.html*' -delete
|
|
|
|
|
2015-04-27 16:14:26 +00:00
|
|
|
exit 0
|