2015-04-27 16:14:26 +00:00
|
|
|
#!/bin/bash
|
|
|
|
#
|
|
|
|
# boot-hppa
|
|
|
|
#
|
|
|
|
# $1 is the CD number
|
|
|
|
# $2 is the temporary CD build dir
|
|
|
|
|
|
|
|
# palo is used to make ISOs bootable on HPPA.
|
|
|
|
|
|
|
|
. $BASEDIR/tools/boot/$DI_CODENAME/common.sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
N=$1
|
2017-05-03 17:02:29 +00:00
|
|
|
CDDIR=$2
|
|
|
|
|
|
|
|
# Exit if this is not CD#1/DVD#1
|
|
|
|
if [ $N != "1" ]; then
|
|
|
|
exit 0
|
2015-04-27 16:14:26 +00:00
|
|
|
fi
|
|
|
|
|
2017-05-03 17:02:29 +00:00
|
|
|
if [ "$DI_WWW_HOME" = "default" ]; then
|
|
|
|
DI_WWW_HOME="https://d-i.debian.org/daily-images/hppa/daily/cdrom/2.6"
|
|
|
|
try_di_image_cache
|
|
|
|
else
|
|
|
|
DI_WWW_HOME=$(echo $DI_WWW_HOME | sed "s,%ARCH%,$ARCH,")
|
2015-04-27 16:14:26 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
PALODEB=$(find_pkg_file palo)
|
|
|
|
if [ -z "$PALODEB" ] ; then
|
|
|
|
echo "ERROR: the palo package is required." >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
(dpkg --fsys-tarfile "$MIRROR/$PALODEB" | \
|
|
|
|
tar xf - -C . ./usr/share/palo/iplboot)
|
2017-05-03 17:02:29 +00:00
|
|
|
mv usr/share/palo/iplboot $CDDIR/install/iplboot
|
2015-04-27 16:14:26 +00:00
|
|
|
|
|
|
|
if [ -n "$ARCHIVE_EXTRACTED_SOURCES" ]; then
|
|
|
|
echo $PALODEB >> $CDDIR/../$N.pkgs_extracted
|
|
|
|
find_pkg_file palo source >> $CDDIR/../$N.pkgs_extracted
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! "$DI_WWW_HOME" ];then
|
|
|
|
if [ ! "$DI_DIR" ];then
|
|
|
|
DI_DIR="$MIRROR/dists/$DI_DIST/main/installer-$ARCH/current/images/cdrom/2.6"
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
DI_DIR="di_stuff"
|
|
|
|
mkdir "$DI_DIR"
|
2016-01-03 11:54:46 -01:00
|
|
|
$WGET -r -nd --no-parent -P "$DI_DIR" "$DI_WWW_HOME"
|
2015-04-27 16:14:26 +00:00
|
|
|
fi
|
|
|
|
|
2017-09-06 11:54:37 +00:00
|
|
|
K32=$(basename "$DI_DIR"/cdrom/2.6/vmlinux-*-parisc)
|
|
|
|
K64=$(basename "$DI_DIR"/cdrom/2.6/vmlinux-*-parisc64*)
|
2015-04-27 16:14:26 +00:00
|
|
|
|
2017-09-06 11:54:37 +00:00
|
|
|
cp "$DI_DIR"/cdrom/2.6/$K32 "$CDDIR/install"/$K32
|
|
|
|
cp "$DI_DIR"/cdrom/2.6/$K64 "$CDDIR/install"/$K64
|
|
|
|
cp "$DI_DIR"/cdrom/2.6/initrd.gz "$CDDIR/install"
|
2015-04-27 16:14:26 +00:00
|
|
|
|
2017-05-03 17:02:29 +00:00
|
|
|
add_mkisofs_opt $CDDIR/../$1.mkisofs_opts "-hppa-cmdline '0/vmlinux initrd=0/ramdisk${KERNEL_PARAMS:+ $KERNEL_PARAMS}'"
|
|
|
|
add_mkisofs_opt $CDDIR/../$1.mkisofs_opts "-hppa-kernel-32 install/$K32"
|
|
|
|
add_mkisofs_opt $CDDIR/../$1.mkisofs_opts "-hppa-kernel-64 install/$K64"
|
|
|
|
add_mkisofs_opt $CDDIR/../$1.mkisofs_opts "-hppa-bootloader install/iplboot"
|
|
|
|
add_mkisofs_opt $CDDIR/../$1.mkisofs_opts "-hppa-ramdisk install/initrd.gz"
|
2015-04-27 16:14:26 +00:00
|
|
|
|
|
|
|
exit 0
|