diff options
Diffstat (limited to 'arch/powerpc/boot/wrapper')
-rwxr-xr-x | arch/powerpc/boot/wrapper | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper index d6c96d9ab29..644bf9d4ea0 100755 --- a/arch/powerpc/boot/wrapper +++ b/arch/powerpc/boot/wrapper | |||
@@ -138,14 +138,20 @@ objflags=-S | |||
138 | tmp=$tmpdir/zImage.$$.o | 138 | tmp=$tmpdir/zImage.$$.o |
139 | ksection=.kernel:vmlinux.strip | 139 | ksection=.kernel:vmlinux.strip |
140 | isection=.kernel:initrd | 140 | isection=.kernel:initrd |
141 | link_address='0x400000' | ||
141 | 142 | ||
142 | case "$platform" in | 143 | case "$platform" in |
143 | pmac|pseries|chrp) | 144 | pseries) |
145 | platformo=$object/of.o | ||
146 | link_address='0x4000000' | ||
147 | ;; | ||
148 | pmac|chrp) | ||
144 | platformo=$object/of.o | 149 | platformo=$object/of.o |
145 | ;; | 150 | ;; |
146 | coff) | 151 | coff) |
147 | platformo=$object/of.o | 152 | platformo=$object/of.o |
148 | lds=$object/zImage.coff.lds | 153 | lds=$object/zImage.coff.lds |
154 | link_address='0x500000' | ||
149 | ;; | 155 | ;; |
150 | miboot|uboot) | 156 | miboot|uboot) |
151 | # miboot and U-boot want just the bare bits, not an ELF binary | 157 | # miboot and U-boot want just the bare bits, not an ELF binary |
@@ -171,13 +177,13 @@ cuboot*) | |||
171 | *-mpc824*) | 177 | *-mpc824*) |
172 | platformo=$object/cuboot-824x.o | 178 | platformo=$object/cuboot-824x.o |
173 | ;; | 179 | ;; |
174 | *-mpc83*) | 180 | *-mpc83*|*-asp834x*) |
175 | platformo=$object/cuboot-83xx.o | 181 | platformo=$object/cuboot-83xx.o |
176 | ;; | 182 | ;; |
177 | *-tqm8541|*-mpc8560*|*-tqm8560|*-tqm8555|*-ksi8560*) | 183 | *-tqm8541|*-mpc8560*|*-tqm8560|*-tqm8555|*-ksi8560*) |
178 | platformo=$object/cuboot-85xx-cpm2.o | 184 | platformo=$object/cuboot-85xx-cpm2.o |
179 | ;; | 185 | ;; |
180 | *-mpc85*|*-tqm8540|*-sbc85*) | 186 | *-mpc85*|*-tqm85*|*-sbc85*) |
181 | platformo=$object/cuboot-85xx.o | 187 | platformo=$object/cuboot-85xx.o |
182 | ;; | 188 | ;; |
183 | esac | 189 | esac |
@@ -190,6 +196,7 @@ ps3) | |||
190 | objflags="-O binary --set-section-flags=.bss=contents,alloc,load,data" | 196 | objflags="-O binary --set-section-flags=.bss=contents,alloc,load,data" |
191 | ksection=.kernel:vmlinux.bin | 197 | ksection=.kernel:vmlinux.bin |
192 | isection=.kernel:initrd | 198 | isection=.kernel:initrd |
199 | link_address='' | ||
193 | ;; | 200 | ;; |
194 | ep88xc|ep405|ep8248e) | 201 | ep88xc|ep405|ep8248e) |
195 | platformo="$object/fixed-head.o $object/$platform.o" | 202 | platformo="$object/fixed-head.o $object/$platform.o" |
@@ -200,7 +207,19 @@ adder875-redboot) | |||
200 | binary=y | 207 | binary=y |
201 | ;; | 208 | ;; |
202 | simpleboot-virtex405-*) | 209 | simpleboot-virtex405-*) |
203 | platformo="$object/virtex405-head.o $object/simpleboot.o" | 210 | platformo="$object/virtex405-head.o $object/simpleboot.o $object/virtex.o" |
211 | binary=y | ||
212 | ;; | ||
213 | simpleboot-virtex440-*) | ||
214 | platformo="$object/simpleboot.o $object/virtex.o" | ||
215 | binary=y | ||
216 | ;; | ||
217 | simpleboot-*) | ||
218 | platformo="$object/simpleboot.o" | ||
219 | binary=y | ||
220 | ;; | ||
221 | asp834x-redboot) | ||
222 | platformo="$object/fixed-head.o $object/redboot-83xx.o" | ||
204 | binary=y | 223 | binary=y |
205 | ;; | 224 | ;; |
206 | esac | 225 | esac |
@@ -268,7 +287,10 @@ if [ -n "$dtb" ]; then | |||
268 | fi | 287 | fi |
269 | 288 | ||
270 | if [ "$platform" != "miboot" ]; then | 289 | if [ "$platform" != "miboot" ]; then |
271 | ${CROSS}ld -m elf32ppc -T $lds -o "$ofile" \ | 290 | if [ -n "$link_address" ] ; then |
291 | text_start="-Ttext $link_address --defsym _start=$link_address" | ||
292 | fi | ||
293 | ${CROSS}ld -m elf32ppc -T $lds $text_start -o "$ofile" \ | ||
272 | $platformo $tmp $object/wrapper.a | 294 | $platformo $tmp $object/wrapper.a |
273 | rm $tmp | 295 | rm $tmp |
274 | fi | 296 | fi |