5
# Common code for s390 and s390x
7
# (C) 2001 Jochen R�hrig <jr@debian.org>
8
# 2005 Frans Pop <fjp@debian.org>
9
# 2015-2016 Dimitri John Ledkov <xnox@ubuntu.com> - changes for ubuntu
11
# Released under the GNU general Public License.
12
# See the copyright file for license details.
13
# Released as part of the debian_cd package, not much use stand alone.
15
# Install stuff for booting an s390 system from VM-reader,
16
# FTP-server, or CD-ROM.
19
# $2 is the temporary CD build dir
21
. $BASEDIR/tools/boot/$DI_CODENAME/common.sh
28
INSTALLDIR=$CDDIR/install
29
if [ ! "$DI_DIST" ]; then
30
export DI_DIST="$DI_CODENAME"
32
if [ -z "$DI_PATH" ]; then
33
DI_PATH="$($BASEDIR/tools/find-newest-installer)"
41
install_languages $CDDIR
43
imagedir="boot$N/boot"
45
DI_DIR="$DI_PATH/current/images"
47
cp -lf "$DI_DIR/generic/ubuntu.exec" $imagedir
48
cp -lf "$DI_DIR/generic/parmfile.ubuntu" $imagedir
49
cp -lf "$DI_DIR/generic/initrd.ubuntu" $imagedir
50
cp -lf "$DI_DIR/generic/kernel.ubuntu" $imagedir
52
$BASEDIR/tools/gen-s390-cd-kernel.pl --initrd=$imagedir/initrd.ubuntu --kernel=$imagedir/kernel.ubuntu --outfile=$imagedir/ubuntu.ikr
54
# Create the files specifying offset and size of the initrd
55
perl -e "print pack('N', 0x1000000)" >"$imagedir/initrd.off"
56
perl -e "print pack('N', -s '$imagedir/initrd.ubuntu')" >"$imagedir/initrd.siz"
58
cp "$DI_DIR/MANIFEST.udebs" .
59
list_kernel_abis $images_S390 | check_kernel_sync
61
# Copy the different boot files
62
# - ubuntu.ins : for booting from CD-ROM or FTP-Server
64
cp $BASEDIR/data/$CODENAME/$ARCH/* $imagedir
66
# secondary top-level ubuntu.ins file was requested in
67
# https://bugs.launchpad.net/ubuntu-cdimage/+bug/1536981/comments/6
68
sed -e 's,^[^*],boot/&,g' < $imagedir/ubuntu.ins > $imagedir/../ubuntu.ins
70
# add_mkisofs_opt is buggy, it thinks "-b" was already "specified" in
73
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-no-emul-boot -b boot/ubuntu.ikr"
75
# Include the boot$N/-tree into the iso-image
76
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-J boot$N"