summaryrefslogtreecommitdiffstats
path: root/scripts/mk-images.s390
blob: a64360ec774e42f6397b97c45061c85f03cef3ab (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


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="raid0 raid1 raid5 ext3 $IDEMODS $SCSIMODS "
SECSTAGE="$IDEMODS $SCSIMODS "

COMMONMODULES="vfat"
LOCALMODULES="$COMMONMODULES tape390 $IDEMODS $SCSIMODS"
NETWORKMODULES="$COMMONMODULES nfs ctc netiucv"


makeinitrd --initrdto $TOPDESTPATH/images/initrd.img \
	   --initrdsize 6000 \
	   --loaderbin loader \
	   --modules "$NETWORKMODULES"

#for I in $BOOTDISKDIR; do
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

#makedriverdisk --padsize 1440 "Supplemental Drivers" "drivers" "+scsi +net"

unset BOOTLANG
unset BOOTDIR

makemainmodules "=scsi =net $SECSTAGE"

makeinstimage "netstg" "=scsi $SECSTAGE"
#makeinstimage "hdstg" "=net $SECSTAGE"
#makemainimage "stage2" "cramfs"
makemainimage "stage2" "ext2"