5
# (C) 2001 Jochen R�hrig <jr@debian.org>
6
# 2005 Frans Pop <fjp@debian.org>
7
# 2015-2020 Canonical Ltd - changes for ubuntu
9
# Released under the GNU general Public License.
10
# See the copyright file for license details.
11
# Released as part of the debian_cd package, not much use stand alone.
13
# Install stuff for booting an s390 system from VM-reader,
14
# FTP-server, or CD-ROM.
17
# $2 is the temporary CD build dir
19
. $BASEDIR/tools/boot/$DI_CODENAME/common.sh
31
# copy static .ins & exec scripts, docs
32
cp -r $BASEDIR/data/$CODENAME/$ARCH/* $CDDIR/
34
# copy kernel image to the name that is used in .ins & exec scripts
35
mv $CDDIR/casper/filesystem.kernel-generic $CDDIR/boot/kernel.ubuntu
37
# copy initrd to the name that is used in .ins & exec scripts
38
mv $CDDIR/casper/filesystem.initrd-generic $CDDIR/boot/initrd.ubuntu
40
# compute initrd offset & size, store it in the names used in .ins & exec scripts
41
perl -e "print pack('N', 0x1000000)" > $CDDIR/boot/initrd.off
42
perl -e "print pack('N', -s '$CDDIR/boot/initrd.ubuntu')" > $CDDIR/boot/initrd.siz
44
# compute cmdline, store it in the name used in .ins & exec scripts
45
echo " --- " > $CDDIR/boot/parmfile.ubuntu
47
# secondary top-level ubuntu.ins file was requested in
48
# https://bugs.launchpad.net/ubuntu-cdimage/+bug/1536981/comments/6
49
sed -e 's,^[^*],boot/&,g' < $CDDIR/boot/ubuntu.ins > $CDDIR/ubuntu.ins
51
# generate QEMU-KVM boot image
52
$BASEDIR/tools/gen-s390-cd-kernel.pl --initrd=$CDDIR/boot/initrd.ubuntu --kernel=$CDDIR/boot/kernel.ubuntu --cmdline="$(cat $CDDIR/boot/parmfile.ubuntu)" --outfile=$CDDIR/boot/ubuntu.ikr
54
# enable Joliet and add QEMU-KVM boot image
55
echo -n " -J -no-emul-boot -b boot/ubuntu.ikr" >> $N.mkisofs_opts