summaryrefslogtreecommitdiffstats
path: root/scripts/mk-images.s390
blob: b3e9db1a588d220f4f9a7024f9c32a3c2a65a7aa (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
#
# mk-images.s390
#
# Copyright (C) 2007  Red Hat, Inc.  All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
#

S390SCSIMODS="zfcp tape390"
S390DASDMODS=" dasd_diag_mod dasd_eckd_mod dasd_fba_mod dasd_mod"
S390NETMODS="ctc netiucv smsgiucv lcs qdio qeth ccwgroup crypto_api xfrm_nalgo"
S390MODS="$S390SCSIMODS $S390DASDMODS $S390NETMODS"

makeBootImages() {
	makeinitrd --initrdto $TOPDESTPATH/images/initrd.img \
	    --initrdsize 20000 \
	    --loaderbin loader \
	    --modules "$INITRDMODS $S390MODS"
	sz=$(ls -l $TOPDESTPATH/images/initrd.img | awk '{print $5}')
	$GENINITRDSZ $sz $TOPDESTPATH/images/initrd.size
	cp -vf $KERNELROOT/boot/${KERNELNAME}-${version} $TOPDESTPATH/images/kernel.img

	cp -v $BOOTDISKDIR/redhat.exec $TOPDESTPATH/images/redhat.exec
	cp -v $BOOTDISKDIR/generic.prm $TOPDESTPATH/images/generic.prm
	cp -v $BOOTDISKDIR/generic.ins $TOPDESTPATH/generic.ins

   $MKS390CDBOOT \
      -i $TOPDESTPATH/images/kernel.img \
      -r $TOPDESTPATH/images/initrd.img \
      -p $TOPDESTPATH/images/generic.prm \
      -o $TOPDESTPATH/images/cdboot.img

    cat << __EOT__ >> $TOPDESTPATH/.treeinfo
[images-$KERNELARCH]
kernel = images/kernel.img
initrd = images/initrd.img
initrd.size = images/initrd.size
generic.prm = images/generic.prm
generic.ins = generic.ins
cdboot.img = images/cdboot.img

__EOT__
}