blob: 4c180fef192ac9ee38c21c03067ce703dab5eed0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
prepareBootImage() {
dd if=/dev/zero bs=1k count=$BOOTDISKSIZE of=/$MBD_TMPIMAGE 2>/dev/null
mount -o loop -t msdos $MBD_TMPIMAGE $MBD_BOOTTREE
(cd $BOOTDISKDIR; find . ! -name "*.msg" -maxdepth 1 ! -type d | cpio --quiet -p $MBD_BOOTTREE)
cp $MBD_FSIMAGE $MBD_BOOTTREE/initrd.img
cp $KERNELROOT/boot/vmlinuz-* $MBD_BOOTTREE/vmlinuz
if [ -d $BOOTDISKDIR/$BOOTLANG ]; then
# fb console and kon don't get along...
for file in $BOOTDISKDIR/$BOOTLANG/*.msg; do
filename=`basename $file`
sed -e "s/@VERSION@/$VERSION/g" $file > $MBD_BOOTTREE/$filename
done
if [ $? != 0 ]; then
echo $0: Failed to copy messages from $BOOTDISKDIR/$BOOTLANG to $MBD_BOOTTREE.
umount $MBD_BOOTTREE
rm -rf $MBD_BOOTTREE $MBD_TMPIMAGE
exit 1
fi
else
for file in $BOOTDISKDIR/*.msg; do
filename=`basename $file`
sed -e "s/@VERSION@/$VERSION/g" $file > $MBD_BOOTTREE/$filename
done
if [ $? != 0 ]; then
echo $0: Failed to copy messages from $BOOTDISKDIR to $MBD_BOOTTREE.
umount $MBD_BOOTTREE
rm -rf $MBD_BOOTTREE $MBD_TMPIMAGE
exit 1
fi
fi
}
IDEMODS=""
SCSIMODS=""
SECSTAGE="$IDEMODS $SCSIMODS raid0 raid1 raid5"
COMMONMODULES="loop cramfs dasd_diag_mod dasd_eckd_mod dasd_fba_mod dasd_mod tape390 isofs ext3"
LOCALMODULES="$COMMONMODULES tape390 $IDEMODS $SCSIMODS"
NETWORKMODULES="$COMMONMODULES nfs ctc netiucv ipv6"
echo "In mk-images.s390: kernelvers is $kernelvers"
if [ "$kernelvers" = "BOOT" ]; then
makeinitrd --initrdto $TOPDESTPATH/images/initrd.img \
--initrdsize 8192 \
--loaderbin loader \
--modules "$NETWORKMODULES"
cp -vf $KERNELROOT/boot/${KERNELNAME}-${version} $TOPDESTPATH/images/kernel.img
fi
if [ "$kernelvers" = "BOOTtape" ]; then
makeinitrd --initrdto $TOPDESTPATH/images/tapeinrd.img \
--initrdsize 8192 \
--loaderbin loader \
--modules "$NETWORKMODULES"
cp -vf $KERNELROOT/boot/${KERNELNAME}-${version} $TOPDESTPATH/images/tapekrnl.img
fi
for I in `find $BOOTDISKDIR -type d`; do
BOOTLANG=`basename $I`
BOOTDIR=`basename $I | cut -d'_' -f1`
if [ $BOOTLANG = "boot" ]; then
BOOTLANG=""
BOOTDIR=""
fi
done
#makebootdisk --kernelto $TOPDESTPATH/boot/vmlinuz \
# --bootdisksize 1440 \
# --imagename $BOOTDIR/kernel.img #\
# #--initrd $TOPDESTPATH//autoboot/initrd.img
unset BOOTLANG
unset BOOTDIR
if [ "$kernelvers" = "BOOT" ]; then
makemainmodules "=scsi =net $SECSTAGE"
makeinstimage "netstg" "=scsi $SECSTAGE"
makeinstimage "hdstg" "=net $SECSTAGE"
makemainimage "stage2" "cramfs"
fi
|