This commit was manufactured by cvs2svn to create tag
[opensuse:installation-images.git] / bin / mk_ppc_installation-images_bootbinaries.sh
1 #!/bin/bash
2 set -ex
3 echo foo
4 bdir=$1
5 targetdir=$2
6 if [ -z "$bdir" -o -z "$targetdir" -o ! -f /.buildenv ] ; then
7 echo usage: $0 builddir targetdir
8 exit 1
9 fi
10 . /.buildenv
11 CD1=$targetdir/CD1
12 CD2=$targetdir/CD2
13 k_deflt=`rpm -qf --qf %{VERSION} /boot/vmlinux-*-default`
14 k_pmac64_32bit=`rpm -qf --qf %{VERSION} /boot/vmlinux-*-pmac64_32bit`
15 #
16 mkdir -pv $CD1/ppc/chrp
17 mkdir -pv $CD1/etc
18 mkdir -pv $CD1/boot
19 mkdir -pv $CD1/suseboot
20 # to trigger the HFS part, avoid 8.3 filenames and allow OF booting
21 mkdir -pv $CD2/suseboot
22 mkdir -pv $CD2/boot
23 #
24 cp -pfv $bdir/initrd-* $CD2/boot/
25 cp -pfv /lib/lilo/chrp/yaboot.chrp $CD1/
26 cp -pfv /lib/lilo/pmac/yaboot $CD1/suseboot/
27 cp -pfv /boot/vmlinux-*-default $CD1/vmlinux32
28 cp -pfv $bdir/initrd-kernel-default-ppc_pmac_new $CD1/initrd32
29 cp -pfv /boot/vmlinux-*-pmac64_32bit $CD1/vmlinux64
30 cp -pfv $bdir/initrd-kernel-pmac64_32bit $CD1/initrd64
31 cp -pfv $bdir/initrd-kernel-iseries64 $CD1/boot
32 cp -pfv $bdir/initrd-kernel-pseries64 $CD1/boot
33
34 #
35 bash /lib/lilo/chrp/chrp64/addRamdisk.sh \
36         /var/tmp/chrpinitrd.$$ \
37         /boot/vmlinux-*-pseries64 \
38         $bdir/initrd-kernel-pseries64 \
39         $CD1/install
40 #
41 /lib/lilo/iseries/iseries-addRamDisk \
42         $bdir/initrd-kernel-iseries64 \
43         /boot/System.map-*-iseries64 \
44         /boot/vmlinux-*-iseries64 \
45         $CD1/ISERIES64
46 #
47 /lib/lilo/prep/make_zimage_prep.sh \
48         --vmlinux /boot/vmlinux-*-default \
49         --initrd $bdir/initrd-kernel-default-ppc_prep \
50         --output $CD1/boot/zImage.prep.initrd
51 #
52 /lib/lilo/pmac/oldworld_coff/make_zimage_pmac_oldworld_coff.sh \
53         --vmlinux /boot/vmlinux-*-default \
54         --initrd $bdir/initrd-kernel-default-ppc_pmac_coff \
55         --output $CD1/boot/install-pmaccoff-$k_deflt
56 #
57 /lib/lilo/pmac/oldworld_coff/make_zimage_pmac_oldworld_coff.sh \
58         --vmlinux /boot/vmlinux-*-default \
59         --output $CD1/boot/vmlinux-pmaccoff-$k_deflt
60 #
61 /lib/lilo/pmac/newworld/make_zimage_pmac_newworld.sh \
62         --vmlinux /boot/vmlinux-*-default \
63         --initrd $bdir/initrd-kernel-default-ppc_pmac_new \
64         --output $CD1/boot/install-pmac-$k_deflt
65 #
66 /lib/lilo/pmac/newworld/make_zimage_pmac_newworld.sh \
67         --vmlinux /boot/vmlinux-*-default \
68         --output $CD1/boot/vmlinux-pmac-$k_deflt
69 #
70 /lib/lilo/pmac/newworld/make_zimage_pmac_newworld.sh \
71         --vmlinux /boot/vmlinux-*-pmac64_32bit \
72         --initrd $bdir/initrd-kernel-pmac64_32bit \
73         --output $CD1/boot/install-pmac64-$k_pmac64_32bit
74 #
75 /lib/lilo/pmac/newworld/make_zimage_pmac_newworld.sh \
76         --vmlinux /boot/vmlinux-*-pmac64_32bit \
77         --output $CD1/boot/vmlinux-pmac64-$k_pmac64_32bit
78 #
79 ln -sv boot/install-pmac-$k_deflt       $CD1/installpmac
80 ln -sv boot/install-pmac64-$k_pmac64_32bit $CD1/installpmac64
81 #
82 cat > $CD1/ppc/bootinfo.txt <<EOF
83 <chrp-boot>
84 <description>$BUILD_DISTRIBUTION_NAME</description>
85 <os-name>$BUILD_DISTRIBUTION_NAME</os-name>
86 <boot-script>boot &device;:1,yaboot.chrp </boot-script>
87 </chrp-boot>
88
89 EOF
90 cat $CD1/ppc/bootinfo.txt
91 #
92 cat > $CD1/yaboot.txt <<EOF
93
94   Welcome to SuSE Linux (SLES9 preview)!
95
96   Use  "install"     to boot the pSeries 64bit kernel
97   Use  "install32"   to boot the 32bit RS/6000 kernel
98
99   You can pass the option "noinitrd"  to skip the installer.
100   Example: install noinitrd root=/dev/sda4
101
102 EOF
103 cat $CD1/yaboot.txt
104 #
105 cat > $CD1/etc/yaboot.conf <<EOF
106 message=yaboot.txt
107 image=install
108   label=install
109 #  append="ide0=noautotune"
110 image=cdrom:1,\\vmlinux32
111   label=install32
112   initrd=cdrom:1,\\initrd32
113
114 EOF
115 cat $CD1/etc/yaboot.conf
116 #
117 cat > $CD1/suseboot/yaboot.conf <<EOF
118 image=vmlinux32
119   label=install32
120   initrd=initrd32
121 #  append="ide0=noautotune"
122 image=vmlinux64
123   label=install64
124   initrd=initrd64
125
126 EOF
127 cat $CD1/suseboot/yaboot.conf
128 #
129
130 find $CD1 $CD2 -ls
131 du -sm $CD1 $CD2