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=`rpm -qf --qf %{VERSION} /boot/vmlinux-*-pmac64`
15 #
16 mkdir -pv $CD1/ppc/netboot
17 mkdir -pv $CD1/ppc/chrp
18 mkdir -pv $CD1/etc
19 mkdir -pv $CD1/boot
20 mkdir -pv $CD1/suseboot
21 # to trigger the HFS part, avoid 8.3 filenames and allow OF booting
22 mkdir -pv $CD2/suseboot
23 mkdir -pv $CD2/boot
24 #
25 cp -pfv $bdir/initrd-* $CD2/boot/
26 cp -pfv /lib/lilo/chrp/yaboot.chrp $CD1/
27 cp -pfv /lib/lilo/pmac/yaboot $CD1/suseboot/
28 cp -pfv /boot/vmlinux-*-default $CD1/vmlinux32
29 cp -pfv $bdir/initrd-kernel-default-ppc $CD1/initrd32
30 cp -pfv /boot/vmlinux-*-pmac64 $CD1/vmlinux64
31 cp -pfv $bdir/initrd-kernel-pmac64 $CD1/initrd64
32 cp -pfv $bdir/initrd-kernel-iseries64 $CD1/boot
33 cp -pfv $bdir/initrd-kernel-pseries64 $CD1/boot
34
35 if [ -f /lib/lilo/chrp/mkzimage_cmdline ] ; then
36         cp -pfv /lib/lilo/chrp/mkzimage_cmdline $CD1/ppc/netboot
37         chmod 0755 $CD1/ppc/netboot/mkzimage_cmdline
38 fi
39 #
40 bash /lib/lilo/chrp/chrp64/addRamdisk.sh \
41         /var/tmp/chrpinitrd.$$ \
42         /boot/vmlinux-*-pseries64 \
43         $bdir/initrd-kernel-pseries64 \
44         $CD1/install
45 #
46 /lib/lilo/iseries/iseries-addRamDisk \
47         $bdir/initrd-kernel-iseries64 \
48         /boot/System.map-*-iseries64 \
49         /boot/vmlinux-*-iseries64 \
50         $CD1/ISERIES64
51 #
52 /lib/lilo/prep/make_zimage_prep.sh \
53         --vmlinux /boot/vmlinux-*-default \
54         --initrd $bdir/initrd-kernel-default-ppc \
55         --output $CD1/boot/zImage.prep.initrd
56 #
57 /lib/lilo/pmac/oldworld_coff/make_zimage_pmac_oldworld_coff.sh \
58         --vmlinux /boot/vmlinux-*-default \
59         --initrd $bdir/initrd-kernel-default-ppc32_pmac_coff \
60         --output $CD1/boot/install-pmaccoff-$k_deflt
61 #
62 /lib/lilo/pmac/oldworld_coff/make_zimage_pmac_oldworld_coff.sh \
63         --vmlinux /boot/vmlinux-*-default \
64         --output $CD1/boot/vmlinux-pmaccoff-$k_deflt
65 #
66 /lib/lilo/pmac/newworld/make_zimage_pmac_newworld.sh \
67         --vmlinux /boot/vmlinux-*-default \
68         --initrd $bdir/initrd-kernel-default-ppc \
69         --output $CD1/boot/install-pmac-$k_deflt
70 #
71 /lib/lilo/pmac/newworld/make_zimage_pmac_newworld.sh \
72         --vmlinux /boot/vmlinux-*-default \
73         --output $CD1/boot/vmlinux-pmac-$k_deflt
74 #
75 /lib/lilo/pmac/newworld/make_zimage_pmac_newworld.sh \
76         --vmlinux /boot/vmlinux-*-pmac64 \
77         --initrd $bdir/initrd-kernel-pmac64 \
78         --output $CD1/boot/install-pmac64-$k_pmac64
79 #
80 /lib/lilo/pmac/newworld/make_zimage_pmac_newworld.sh \
81         --vmlinux /boot/vmlinux-*-pmac64 \
82         --output $CD1/boot/vmlinux-pmac64-$k_pmac64
83 #
84 ln -sv boot/install-pmac-$k_deflt       $CD1/installpmac
85 ln -sv boot/install-pmac64-$k_pmac64    $CD1/installpmac64
86 #
87 cat > $CD1/ppc/bootinfo.txt <<EOF
88 <chrp-boot>
89 <description>$BUILD_DISTRIBUTION_NAME</description>
90 <os-name>$BUILD_DISTRIBUTION_NAME</os-name>
91 <boot-script>boot &device;:1,yaboot.chrp </boot-script>
92 </chrp-boot>
93
94 EOF
95 cat $CD1/ppc/bootinfo.txt
96 #
97 cat > $CD1/yaboot.txt <<EOF
98
99   Welcome to SuSE Linux (SLES9 preview)!
100
101   Use  "install"     to boot the pSeries 64bit kernel
102   Use  "install32"   to boot the 32bit RS/6000 kernel
103
104   You can pass the option "noinitrd"  to skip the installer.
105   Example: install noinitrd root=/dev/sda4
106
107 EOF
108 cat $CD1/yaboot.txt
109 #
110 cat > $CD1/etc/yaboot.conf <<EOF
111 message=yaboot.txt
112 image=install
113   label=install
114 #  append="ide0=noautotune"
115 image=cdrom:1,\\vmlinux32
116   label=install32
117   initrd=cdrom:1,\\initrd32
118
119 EOF
120 cat $CD1/etc/yaboot.conf
121 #
122
123 cat > $CD1/suseboot/os-chooser <<EOF
124 <CHRP-BOOT>
125 <COMPATIBLE>
126 MacRISC MacRISC3 MacRISC4
127 </COMPATIBLE>
128 <DESCRIPTION>
129 SuSE Linux for PowerMac
130 </DESCRIPTION>
131 <BOOT-SCRIPT>
132 : printf fb8-write drop ;                                                                                               
133 : we-are-64-bit " 64bit "(0d 0a)" printf " cd:,installpmac64" \$boot ;
134 : we-are-32-bit " 32bit "(0d 0a)" printf " cd:,installpmac" \$boot ;
135
136 " screen" output
137 dev screen
138 " "(0000000000aa00aa0000aaaaaa0000aa00aaaa5500aaaaaa)" drop 0 7 set-colors
139 " "(5555555555ff55ff5555ffffff5555ff55ffffff55ffffff)" drop 8 15 set-colors
140 device-end
141 f to foreground-color
142 0 to background-color
143
144 " "(0d 0a)" printf
145 " booting kernel ... " printf
146 " /cpus/@0" find-package IF " 64-bit" rot get-package-property 0= IF we-are-64-bit ELSE we-are-32-bit THEN THEN
147 </BOOT-SCRIPT>
148 <OS-BADGE-ICONS>
149 1010
150 000000000000F8FEACF6000000000000
151 0000000000F5FFFFFEFEF50000000000
152 00000000002BFAFEFAFCF70000000000
153 0000000000F65D5857812B0000000000
154 0000000000F5350B2F88560000000000
155 0000000000F6335708F8FE0000000000
156 00000000005600F600F5FD8100000000
157 00000000F9F8000000F5FAFFF8000000
158 000000008100F5F50000F6FEFE000000
159 000000F8F700F500F50000FCFFF70000
160 00000088F70000F50000F5FCFF2B0000
161 0000002F582A00F5000008ADE02C0000
162 00090B0A35A62B0000002D3B350A0000
163 000A0A0B0B3BF60000505E0B0A0B0A00
164 002E350B0B2F87FAFCF45F0B2E090000
165 00000007335FF82BF72B575907000000
166 000000000000ACFFFF81000000000000
167 000000000081FFFFFFFF810000000000
168 0000000000FBFFFFFFFFAC0000000000
169 000000000081DFDFDFFFFB0000000000
170 000000000081DD5F83FFFD0000000000
171 000000000081DDDF5EACFF0000000000
172 0000000000FDF981F981FFFF00000000
173 00000000FFACF9F9F981FFFFAC000000
174 00000000FFF98181F9F981FFFF000000
175 000000ACACF981F981F9F9FFFFAC0000
176 000000FFACF9F981F9F981FFFFFB0000
177 00000083DFFBF981F9F95EFFFFFC0000
178 005F5F5FDDFFFBF9F9F983DDDD5F0000
179 005F5F5F5FDD81F9F9E7DF5F5F5F5F00
180 0083DD5F5F83FFFFFFFFDF5F835F0000
181 000000FBDDDFACFBACFBDFDFFB000000
182 000000000000FFFFFFFF000000000000
183 0000000000FFFFFFFFFFFF0000000000
184 0000000000FFFFFFFFFFFF0000000000
185 0000000000FFFFFFFFFFFF0000000000
186 0000000000FFFFFFFFFFFF0000000000
187 0000000000FFFFFFFFFFFF0000000000
188 0000000000FFFFFFFFFFFFFF00000000
189 00000000FFFFFFFFFFFFFFFFFF000000
190 00000000FFFFFFFFFFFFFFFFFF000000
191 000000FFFFFFFFFFFFFFFFFFFFFF0000
192 000000FFFFFFFFFFFFFFFFFFFFFF0000
193 000000FFFFFFFFFFFFFFFFFFFFFF0000
194 00FFFFFFFFFFFFFFFFFFFFFFFFFF0000
195 00FFFFFFFFFFFFFFFFFFFFFFFFFFFF00
196 00FFFFFFFFFFFFFFFFFFFFFFFFFF0000
197 000000FFFFFFFFFFFFFFFFFFFF000000
198 </OS-BADGE-ICONS>
199 </CHRP-BOOT>
200 EOF
201 cat $CD1/suseboot/os-chooser
202 #
203
204 find $CD1 $CD2 -ls
205 du -sm $CD1 $CD2