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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
|
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
}
makeS390initrd() {
EXTRAINITRDPATH=""
PCMCIA=""
INITRDSIZE=""
KEEP=""
PADSIZE=""
LOADERBIN=""
INITRDMODULES=""
MODULEBALLNAME="modules.cgz"
MYLANGTABLE=$LANGTABLE
MYLOADERTR=loader.tr
while [ x$(echo $1 | cut -c1-2) = x"--" ]; do
if [ $1 = "--initrdto" ]; then
EXTRAINITRDPATH=$2
shift; shift
continue
elif [ $1 = "--pcmcia" ]; then
PCMCIA=yes
shift
continue
elif [ $1 = "--keep" ]; then
KEEP=yes
shift
continue
elif [ $1 = "--initrdsize" ]; then
INITRDSIZE=$2
shift; shift
continue
elif [ $1 = "--padsize" ]; then
PADSIZE=$2
shift; shift
continue
elif [ $1 = "--loaderbin" ]; then
LOADERBIN=$2
shift; shift
continue
elif [ $1 = "--modules" ]; then
LOADERMODULES=$2
shift; shift
continue
elif [ $1 = "--moduleballname" ]; then
MODULEBALLNAME=$2
shift; shift
continue
fi
echo "Unknown option passed to makeS390initrd"
exit 1
done
if [ -z "$LOADERBIN" ]; then
echo "no loader binary specified!" >&2
exit 1
fi
if [ -z "$LOADERMODULES" ]; then
echo "warning: no loader modules specified!" >&2
fi
if [ -z "$INITRDSIZE" ]; then
echo "I don't know how big to make the initrd image!" >&2
exit 1
fi
MBD_DIR=/tmp/makebootdisk.dir.$$
MBD_FSIMAGE=/tmp/makebootdisk.initrdimage.$$
MBD_MNTPOINT=/tmp/makebootdisk.mount.$$
MBD_TMPIMAGE=/tmp/makebootdisk.image.$$
MBD_BOOTTREE=/tmp/makebootdisk.tree.$$
INITBIN=init
rm -rf $MBD_DIR MBD_FSIMAGE
mkdir -p $MBD_DIR/modules
mkdir -p $MBD_DIR/sbin
mkdir -p $MBD_DIR/dev/pts
mkdir -p $MBD_DIR/dev/input
mkdir -p $MBD_DIR/etc
mkdir -p $MBD_DIR/proc
mkdir -p $MBD_DIR/tmp
mkdir -p $MBD_DIR/etc/terminfo/{a,d,k,l,s,v,x}
mkdir -p $MBD_DIR/var/state
ln -s /tmp $MBD_DIR/var/state/xkb
if [ -n "$LOADERMODULES" ]; then
MODSET=`expandModuleSet "$LOADERMODULES"`
makemoduleball --name $MODULEBALLNAME $MBD_DIR/modules "$MODSET"
fi
cat > $MBD_DIR/etc/passwd << EOF
root::0:0:root:/:/bin/bash
sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin
EOF
echo "sshd:x:74:" >> $MBD_DIR/etc/group
mkdir -p $MBD_DIR/var/empty/sshd $MBD_DIR/etc/pam.d $MBD_DIR/lib/security \
$MBD_DIR/etc/security $MBD_DIR/$LIBDIR/security
chmod 111 $MBD_DIR/var/empty/sshd
for i in pam_stack.so pam_nologin.so pam_limits.so pam_console.so \
pam_securetty.so pam_env.so pam_unix.so pam_deny.so pam_cracklib.so \
pam_limits.so; do
cp -f $IMGPATH/$LIBDIR/security/$i $MBD_DIR/$LIBDIR/security
done
cp -f $IMGPATH/$LIBDIR/libpam_misc.so* $IMGPATH/$LIBDIR/libpam.so* $MBD_DIR/$LIBDIR
for i in sshd login system-auth other; do
cp -f $IMGPATH/etc/pam.d/$i $MBD_DIR/etc/pam.d
done
cp -f $IMGPATH/etc/security/{limits.conf,pam_env.conf} $MBD_DIR/etc/security/
cp -f $IMGPATH/usr/bin/login $MBD_DIR/sbin/login
cp -f $IMGPATH/usr/sbin/sshd $MBD_DIR/sbin/sshd
install -s -m 755 $LOADERBINDIR/$LOADERBIN $MBD_DIR/sbin/loader
#install -s -m 755 $LOADERBINDIR/load_anaconda $MBD_DIR/sbin/loader
# install -m 644 $KEYMAPS $MBD_DIR/etc/keymaps.gz
# install -m 644 $FONTS $MBD_DIR/etc/fonts.cgz
install -m 644 $MYLANGTABLE $MBD_DIR/etc/lang-table
install -m 644 $LOADERBINDIR/$MYLOADERTR $MBD_DIR/etc/loader.tr
for i in a/ansi d/dumb k/kterm l/linux s/screen v/vt100 v/vt102 x/xterm x/xterm-color; do
install -m 644 $IMGPATH/usr/share/terminfo/$i $MBD_DIR/etc/terminfo/$i
done
makeproductfile $MBD_DIR
if [ -f $LOADERBINDIR/kon.cfg ]; then
mkdir -p $MBD_DIR/etc/terminfo/k
install -m 644 $IMGPATH/usr/share/terminfo/k/kon $MBD_DIR/etc/terminfo/k/kon
install -m 644 $LOADERBINDIR/kon.cfg $MBD_DIR/etc
install -m 644 $LOADERBINDIR/minikon.fnt $MBD_DIR/etc
ln -s loader $MBD_DIR/sbin/continue
fi
for n in insmod rmmod modprobe; do
ln -s loader $MBD_DIR/sbin/$n
done
mkdir -p $MBD_DIR/$LIBDIR $MBD_DIR/usr/kerberos/$LIBDIR $MBD_DIR/mnt1 \
$MBD_DIR/mnt/runtime $MBD_DIR/etc/ssh $MBD_DIR/mnt/source \
$MBD_DIR/usr/$LIBDIR/gconv/ $MBD_DIR/lib $MBD_DIR/etc/xinetd.d
for links in X11R6 bin sbin share; do
ln -sf /mnt/runtime/usr/$links $MBD_DIR/usr/$links
done
cp -f $IMGPATH/usr/lib/anaconda-runtime/loader/linuxrc.s390 $MBD_DIR/linuxrc
ln -s ../linuxrc $MBD_DIR/sbin/init
cp -f $IMGPATH/usr/bin/bash $MBD_DIR/sbin/bash
ln -sf bash $MBD_DIR/sbin/sh
cp -f $IMGPATH/usr/bin/gawk $MBD_DIR/sbin/awk
cp -f $IMGPATH/usr/bin/sort_save $MBD_DIR/sbin/sort
cp -f $IMGPATH/usr/sbin/chroot $MBD_DIR/sbin/chroot
cp -f $IMGPATH/usr/sbin/consoletype $MBD_DIR/sbin/consoletype
cp -f $IMGPATH/usr/sbin/mke2fs $MBD_DIR/sbin/mke2fs
cp -f $IMGPATH/usr/bin/busybox $MBD_DIR/sbin/busybox
for i in cp uname tee rm ps mv more mkdir ls ln hostname head \
gzip grep dd chmod cat; do
ln -sf busybox $MBD_DIR/sbin/$i
done
cp -f $IMGPATH/usr/X11R6/bin/xauth $MBD_DIR/sbin/xauth
cp -f $IMGPATH/usr/bin/sed_save $MBD_DIR/sbin/sed
cp -f $IMGPATH/usr/bin/mount $MBD_DIR/sbin/mount
cp -f $IMGPATH/usr/bin/umount $MBD_DIR/sbin/umount
ln -s gzip $MBD_DIR/sbin/zcat
cp -f $IMGPATH/usr/bin/ldd $MBD_DIR/sbin/ldd
cp -f $IMGPATH/usr/bin/strace $MBD_DIR/sbin/strace
cp -f $IMGPATH/usr/bin/mknod $MBD_DIR/sbin/mknod
cp -df $IMGPATH/$LIBDIR/libtermcap* $MBD_DIR/$LIBDIR/
cp -df $IMGPATH/usr/X11R6/$LIBDIR/libX11* $MBD_DIR/$LIBDIR/
cp -df $IMGPATH/usr/X11R6/$LIBDIR/libXmuu* $MBD_DIR/$LIBDIR/
cp -df $IMGPATH/usr/X11R6/$LIBDIR/libXext* $MBD_DIR/$LIBDIR/
install -m 755 $IMGPATH/usr/sbin/dasdfmt $MBD_DIR/sbin/dasdfmt
install -m 755 $IMGPATH/usr/sbin/fdasd $MBD_DIR/sbin/fdasd
install -m 755 $IMGPATH/usr/sbin/ldconfig $MBD_DIR/sbin/ldconfig
cp -f $IMGPATH/usr/sbin/ifconfig $MBD_DIR/sbin/ifconfig
cp -f $IMGPATH/usr/sbin/xinetd $MBD_DIR/sbin/xinetd
cp -f $IMGPATH/usr/sbin/in.telnetd $MBD_DIR/sbin/in.telnetd
cp -f $IMGPATH/usr/sbin/route $MBD_DIR/sbin/route
cp -f $IMGPATH/usr/sbin/portmap $MBD_DIR/sbin/portmap
cp -f $IMGPATH/etc/xinetd.conf $MBD_DIR/etc/xinetd.conf
# key generation takes ages on s390, you really don't want this for every
# installation attempt. These are NOT the keys of the installed system!
echo -n "Generating SSH1 RSA host key: "
/usr/bin/ssh-keygen -q -t rsa1 -f $MBD_DIR/etc/ssh/ssh_host_key \
-C '' -N '' >&/dev/null
chmod 600 $MBD_DIR/etc/ssh/ssh_host_key
chmod 644 $MBD_DIR/etc/ssh/ssh_host_key.pub
echo
echo -n "Generating SSH2 RSA host key: "
/usr/bin/ssh-keygen -q -t rsa -f $MBD_DIR/etc/ssh/ssh_host_rsa_key \
-C '' -N '' >&/dev/null
chmod 600 $MBD_DIR/etc/ssh/ssh_host_rsa_key
chmod 644 $MBD_DIR/etc/ssh/ssh_host_rsa_key.pub
echo
echo -n "Generating SSH2 DSA host key: "
/usr/bin/ssh-keygen -q -t dsa -f $MBD_DIR/etc/ssh/ssh_host_dsa_key \
-C '' -N '' >&/dev/null
chmod 600 $MBD_DIR/etc/ssh/ssh_host_dsa_key
chmod 644 $MBD_DIR/etc/ssh/ssh_host_dsa_key.pub
echo
cat > $MBD_DIR/etc/ssh/sshd_config <<EOF
Port 22
HostKey /etc/ssh/ssh_host_key
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
PermitRootLogin yes
IgnoreRhosts yes
StrictModes yes
X11Forwarding yes
X11DisplayOffset 10
PrintMotd yes
XAuthLocation /sbin/xauth
KeepAlive yes
SyslogFacility AUTHPRIV
RhostsAuthentication no
RSAAuthentication yes
PasswordAuthentication yes
PermitEmptyPasswords yes
EOF
for file in ISO8859-15.so EUC-JP.so libJIS.so gconv-modules; do
cp -f $IMGPATH/usr/$LIBDIR/gconv/$file $MBD_DIR/usr/$LIBDIR/gconv/$file
done
cp -f $IMGPATH/etc/services $MBD_DIR/etc/
cp -df $IMGPATH/$LIBDIR/libpam.so* $MBD_DIR/$LIBDIR
cp -df $IMGPATH/$LIBDIR/libdl.so* $MBD_DIR/$LIBDIR
cp -df $IMGPATH/$LIBDIR/libdl-*.so* $MBD_DIR/$LIBDIR
cp -df $IMGPATH/$LIBDIR/libnsl.so* $MBD_DIR/$LIBDIR
cp -df $IMGPATH/$LIBDIR/libnsl-*.so* $MBD_DIR/$LIBDIR
cp -df $IMGPATH/$LIBDIR/libnss_compat* $MBD_DIR/$LIBDIR
cp -df $IMGPATH/$LIBDIR/libnss_dns* $MBD_DIR/$LIBDIR
cp -df $IMGPATH/$LIBDIR/libnss_files* $MBD_DIR/$LIBDIR
cp -df $IMGPATH/$LIBDIR/libutil.so* $MBD_DIR/$LIBDIR
cp -df $IMGPATH/$LIBDIR/libutil-*.so* $MBD_DIR/$LIBDIR
cp -df $IMGPATH/$LIBDIR/libcrypt*so* $MBD_DIR/$LIBDIR
cp -df $IMGPATH/usr/$LIBDIR/libwrap*.so* $MBD_DIR/$LIBDIR
cp -df $IMGPATH/$LIBDIR/libc.so* $MBD_DIR/$LIBDIR
cp -df $IMGPATH/$LIBDIR/libc-*.so* $MBD_DIR/$LIBDIR
if [ "$BUILDARCH" = "s390" ]; then
cp -df $IMGPATH/$LIBDIR/ld.so* $MBD_DIR/lib
else # (s390x)
cp -df $IMGPATH/$LIBDIR/ld64.so* $MBD_DIR/$LIBDIR
cp -df $IMGPATH/lib/ld64.so* $MBD_DIR/lib
fi
cp -df $IMGPATH/$LIBDIR/ld-*.so* $MBD_DIR/$LIBDIR
cp -df $IMGPATH/$LIBDIR/libresolv.so* $MBD_DIR/$LIBDIR
cp -df $IMGPATH/$LIBDIR/libresolv-*.so* $MBD_DIR/$LIBDIR
cp -df $IMGPATH/$LIBDIR/libvtoc*.so* $MBD_DIR/$LIBDIR
cp -df $IMGPATH/$LIBDIR/libm.so* $MBD_DIR/$LIBDIR
cp -df $IMGPATH/$LIBDIR/libm-*.so* $MBD_DIR/$LIBDIR
cp -df $IMGPATH/usr/$LIBDIR/libz.so* $MBD_DIR/$LIBDIR
cp -df $IMGPATH/$LIBDIR/libssl* $MBD_DIR/$LIBDIR
cp -df $IMGPATH/$LIBDIR/libext2* $MBD_DIR/$LIBDIR
cp -df $IMGPATH/$LIBDIR/libcom_err* $MBD_DIR/$LIBDIR
cp -df $IMGPATH/$LIBDIR/libcrack* $MBD_DIR/$LIBDIR
cp -df $IMGPATH/usr/kerberos/$LIBDIR/libgssapi_krb5* $MBD_DIR/usr/kerberos/$LIBDIR
cp -df $IMGPATH/usr/kerberos/$LIBDIR/libkrb5.so* $MBD_DIR/usr/kerberos/$LIBDIR
cp -df $IMGPATH/usr/kerberos/$LIBDIR/libk5crypto.so* $MBD_DIR/usr/kerberos/$LIBDIR
cp -df $IMGPATH/usr/kerberos/$LIBDIR/libcom_err.so* $MBD_DIR/usr/kerberos/$LIBDIR
cp -df $IMGPATH/$LIBDIR/libe2p* $MBD_DIR/$LIBDIR
cp -df $IMGPATH/$LIBDIR/libuuid* $MBD_DIR/$LIBDIR
cat >>$MBD_DIR/etc/ld.so.conf <<EOF
/usr/kerberos/$LIBDIR
/usr/X11R6/$LIBDIR
/mnt/runtime/$LIBDIR
/mnt/runtime/usr/$LIBDIR
EOF
(/usr/sbin/chroot $MBD_DIR /sbin/ldconfig )
ln -s /proc/mounts $MBD_DIR/etc/mtab
ln -s sbin $MBD_DIR/bin
awk '{ printf("mknod %s/dev/%s %s %s %s\n", $1, $2, $3, $4, $5);
printf("chmod %s %s/dev/%s\n", $6, $1, $2);
printf("chown %s %s/dev/%s\n", $7, $1, $2);
}' <<EOF | sh
$MBD_DIR console c 4 64 600 root:root
$MBD_DIR random c 1 8 644 root:root
$MBD_DIR ram0 b 1 1 640 root:root
$MBD_DIR ram1 b 1 2 640 root:root
$MBD_DIR ram2 b 1 3 640 root:root
$MBD_DIR ram3 b 1 4 640 root:root
$MBD_DIR loop0 b 7 0 640 root:disk
$MBD_DIR loop1 b 7 1 640 root:disk
$MBD_DIR loop2 b 7 2 640 root:disk
$MBD_DIR loop3 b 7 3 640 root:disk
$MBD_DIR urandom c 1 9 644 root:root
$MBD_DIR xpram0 b 35 0 600 root:root
$MBD_DIR xpram1 b 35 1 600 root:root
$MBD_DIR xpram2 b 35 2 600 root:root
$MBD_DIR tty c 5 0 666 root:root
$MBD_DIR null c 1 3 666 root:root
$MBD_DIR zero c 1 5 666 root:root
$MBD_DIR md0 b 9 0 644 root:root
$MBD_DIR mem c 1 1 600 root:root
$MBD_DIR ptmx c 5 2 666 root:root
$MBD_DIR tty0 c 4 0 600 root:tty
$MBD_DIR tty1 c 4 1 600 root:tty
$MBD_DIR openprom c 10 139 644 root:root
$MBD_DIR ptyp0 c 2 0 644 root:root
$MBD_DIR ttyp1 c 3 1 644 root:root
$MBD_DIR ttyp2 c 3 2 644 root:root
$MBD_DIR ttyp3 c 3 3 644 root:root
$MBD_DIR ttyp4 c 3 4 644 root:root
$MBD_DIR ttyp5 c 3 5 644 root:root
$MBD_DIR ttyp6 c 3 6 644 root:root
$MBD_DIR ttyp7 c 3 7 644 root:root
$MBD_DIR ttyp8 c 3 8 644 root:root
$MBD_DIR ttyp9 c 3 9 644 root:root
$MBD_DIR fd0 b 2 0 644 root:root
$MBD_DIR fd1 b 2 1 644 root:root
EOF
ln -s ram1 $MBD_DIR/dev/ram
for i in `seq 2 9`; do
ln -s console $MBD_DIR/dev/tty$i
done
dd if=/dev/zero of=$MBD_DIR/etc/ramfs.img.big bs=1k count=17000
mke2fs -F -q $MBD_DIR/etc/ramfs.img.big
gzip -9 < $MBD_DIR/etc/ramfs.img.big > $MBD_DIR/etc/ramfs.img
rm -f $MBD_DIR/etc/ramfs.img.big
cat > $MBD_DIR/.profile <<EOF
PATH=/bin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/mnt/sbin:/mnt/usr/sbin:/mnt/bin:/mnt/usr/bin
export PATH
EOF
rm -f $MBD_FSIMAGE
dd if=/dev/zero of=$MBD_FSIMAGE bs=1k count=$INITRDSIZE 2> /dev/null
/sbin/mke2fs -F -i 1024 -q $MBD_FSIMAGE $INITRDSIZE #> /dev/null 2>/dev
rm -rf $MBD_MNTPOINT
mkdir $MBD_MNTPOINT
mount -o loop -t ext2 $MBD_FSIMAGE $MBD_MNTPOINT
(cd $MBD_DIR; find . | cpio --quiet -p $MBD_MNTPOINT)
left=$(df $MBD_MNTPOINT | tail +2)
left=$(echo $left | awk '{print $4'})
umount $MBD_MNTPOINT
mv -f $MBD_FSIMAGE $MBD_FSIMAGE.uncompressed
gzip -9 < $MBD_FSIMAGE.uncompressed > $MBD_FSIMAGE
rm -rf $MBD_FSIMAGE.uncompressed $MBD_DIR
size=$(du $MBD_FSIMAGE | awk '{ print $1 }')
echo "Wrote $MBD_BOOTTREE (${size}k compressed, ${left}k free)"
rm -rf $MBD_TMPIMAGE $MBD_BOOTTREE
if [ -n "$PADSIZE" ]; then
padfile $MBD_FSIMAGE $PADSIZE
fi
if [ -n "$EXTRAINITRDPATH" ]; then
mkdir -p `dirname $EXTRAINITRDPATH`
cp -a $MBD_FSIMAGE $EXTRAINITRDPATH
fi
if [ -z "$KEEP" ]; then
rm -rf $MBD_TMPIMAGE $MBD_FSIMAGE $MBD_MNTPOINT $MBD_BOOTTREE
fi
}
if [ $BUILDARCH = "s390x" ]; then
LIBDIR=lib64
else
LIBDIR=lib
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
makeS390initrd --initrdto $TOPDESTPATH/images/initrd.img \
--initrdsize 15000 \
--loaderbin loader \
--modules "$NETWORKMODULES"
cp -vf $KERNELROOT/boot/${KERNELNAME}-${version} $TOPDESTPATH/images/kernel.img
fi
if [ "$kernelvers" = "BOOTtape" ]; then
makeS390initrd --initrdto $TOPDESTPATH/images/tapeinrd.img \
--initrdsize 15000 \
--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
unset BOOTLANG
unset BOOTDIR
if [ "$kernelvers" = "BOOT" ]; then
makemainmodules "=scsi =net $SECSTAGE"
makeinstimage "netstg" "=scsi $SECSTAGE"
makeinstimage "hdstg" "=net $SECSTAGE"
makemainimage "stage2" "cramfs"
fi
|