2011-03-30 10:29:44 +00:00
|
|
|
# This script gets sourced from boot-hurd-i386.
|
|
|
|
#
|
|
|
|
# Do install stuff for hurd, including making bootable CDs
|
|
|
|
# Works with debian-installer
|
|
|
|
#
|
|
|
|
# $1 is the CD number
|
|
|
|
# $2 is the temporary CD build dir
|
|
|
|
|
|
|
|
. $BASEDIR/tools/boot/$DI_CODENAME/common.sh
|
|
|
|
. $BASEDIR/tools/boot/$DI_CODENAME/x86-desktop.sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
#set -x
|
|
|
|
|
|
|
|
N=$1
|
|
|
|
CDDIR=$2
|
|
|
|
BOOTDIR=
|
|
|
|
if [ "$DI_WWW_HOME" = "default" ];then
|
2016-01-02 23:37:39 -01:00
|
|
|
DI_WWW_HOME="https://d-i.debian.org/daily-images/hurd-i386/daily/"
|
2011-03-30 10:29:44 +00:00
|
|
|
if [ -n "$DI_DIR" ];then
|
2016-01-02 23:37:39 -01:00
|
|
|
DI_DIR="$DI_DIR/${DI_WWW_HOME#*https://}"
|
2011-03-30 10:29:44 +00:00
|
|
|
DI_WWW_HOME=""
|
|
|
|
echo "Using images from $DI_DIR"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
if [ ! "$DI_DIST" ]; then
|
|
|
|
DI_DIST="$DI_CODENAME"
|
|
|
|
fi
|
|
|
|
|
|
|
|
cd $CDDIR/..
|
|
|
|
|
|
|
|
# Only disc 1 bootable
|
|
|
|
if [ $N != 1 ]; then
|
|
|
|
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-J -joliet-long"
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Download boot images.
|
2012-07-05 23:48:48 +00:00
|
|
|
BOOT_IMAGES="cdrom/debian-cd_info.tar.gz cdrom/gnumach.gz cdrom/initrd.gz cdrom/gtk/initrd.gz cdrom/ext2fs.static cdrom/ld.so.1"
|
2011-03-30 10:29:44 +00:00
|
|
|
|
|
|
|
for image in $BOOT_IMAGES; do
|
|
|
|
if [ ! -e "$image" ]; then
|
|
|
|
dir=$(dirname $image)
|
|
|
|
mkdir -p $dir
|
|
|
|
if [ ! "$DI_WWW_HOME" ];then
|
|
|
|
if [ ! "$DI_DIR" ];then
|
|
|
|
DI_DIR="$MIRROR/dists/$DI_DIST/main/installer-$ARCH/current/images"
|
|
|
|
fi
|
|
|
|
cp "$DI_DIR/$image" $image
|
|
|
|
else
|
2016-01-03 11:54:46 -01:00
|
|
|
$WGET "$DI_WWW_HOME/$image" -O $image
|
2011-03-30 10:29:44 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
# Install kernel and initrd
|
|
|
|
mkdir -p $CDDIR/boot/kernel/
|
2012-07-05 23:48:48 +00:00
|
|
|
mkdir -p $CDDIR/boot/gtk/
|
2011-03-30 10:29:44 +00:00
|
|
|
cp "cdrom/gnumach.gz" "$CDDIR/boot/kernel/gnumach.gz"
|
|
|
|
cp "cdrom/initrd.gz" "$CDDIR/boot/initrd.gz"
|
2012-07-05 23:48:48 +00:00
|
|
|
cp "cdrom/gtk/initrd.gz" "$CDDIR/boot/gtk/initrd.gz"
|
2011-03-30 10:29:44 +00:00
|
|
|
cp "cdrom/ext2fs.static" "$CDDIR/boot/kernel/ext2fs.static"
|
|
|
|
cp "cdrom/ld.so.1" "$CDDIR/boot/kernel/ld.so.1"
|
|
|
|
|
|
|
|
# Install bootloader
|
|
|
|
mkdir -p boot$N
|
|
|
|
tar -C boot$N -zxf cdrom/debian-cd_info.tar.gz
|
|
|
|
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-J -joliet-long"
|
|
|
|
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-b boot/grub/grub_eltorito"
|
|
|
|
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-c boot/boot.cat"
|
|
|
|
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-no-emul-boot"
|
2012-08-13 13:06:04 +00:00
|
|
|
|
2012-09-20 11:46:46 +00:00
|
|
|
bls=4 # Specify 4 for BIOS boot, don't calculate it
|
2012-08-13 13:06:04 +00:00
|
|
|
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-boot-load-size $bls"
|
2011-03-30 10:29:44 +00:00
|
|
|
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-boot-info-table"
|
|
|
|
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-cache-inodes"
|
|
|
|
add_mkisofs_opt $CDDIR/../$N.mkisofs_dirs "boot$N"
|
|
|
|
|
|
|
|
# Add autorun
|
|
|
|
if [ -f $CDDIR/README.html ]; then
|
|
|
|
todos > $CDDIR/autorun.inf <<EOF
|
|
|
|
[autorun]
|
|
|
|
open=autorun.bat
|
2015-02-17 05:30:28 -01:00
|
|
|
label=Install Debian GNU/Hurd
|
2011-03-30 10:29:44 +00:00
|
|
|
EOF
|
|
|
|
todos > $CDDIR/autorun.bat <<EOF
|
|
|
|
@echo Starting "README.html"...
|
|
|
|
@start README.html
|
|
|
|
@exit
|
|
|
|
EOF
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Install languages
|
|
|
|
install_languages $CDDIR
|
|
|
|
|
|
|
|
# Cleanup
|
|
|
|
rm -rf cdrom
|
|
|
|
|
|
|
|
# done
|