aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/boot/wrapper
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/boot/wrapper')
-rwxr-xr-xarch/powerpc/boot/wrapper32
1 files changed, 20 insertions, 12 deletions
diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper
index 8f8b8494d62f..d6c96d9ab291 100755
--- a/arch/powerpc/boot/wrapper
+++ b/arch/powerpc/boot/wrapper
@@ -174,7 +174,7 @@ cuboot*)
174 *-mpc83*) 174 *-mpc83*)
175 platformo=$object/cuboot-83xx.o 175 platformo=$object/cuboot-83xx.o
176 ;; 176 ;;
177 *-tqm8541|*-mpc8560*|*-tqm8560|*-tqm8555) 177 *-tqm8541|*-mpc8560*|*-tqm8560|*-tqm8555|*-ksi8560*)
178 platformo=$object/cuboot-85xx-cpm2.o 178 platformo=$object/cuboot-85xx-cpm2.o
179 ;; 179 ;;
180 *-mpc85*|*-tqm8540|*-sbc85*) 180 *-mpc85*|*-tqm8540|*-sbc85*)
@@ -199,6 +199,10 @@ adder875-redboot)
199 platformo="$object/fixed-head.o $object/redboot-8xx.o" 199 platformo="$object/fixed-head.o $object/redboot-8xx.o"
200 binary=y 200 binary=y
201 ;; 201 ;;
202simpleboot-virtex405-*)
203 platformo="$object/virtex405-head.o $object/simpleboot.o"
204 binary=y
205 ;;
202esac 206esac
203 207
204vmz="$tmpdir/`basename \"$kernel\"`.$ext" 208vmz="$tmpdir/`basename \"$kernel\"`.$ext"
@@ -226,10 +230,13 @@ if [ -n "$version" ]; then
226 uboot_version="-n Linux-$version" 230 uboot_version="-n Linux-$version"
227fi 231fi
228 232
233# physical offset of kernel image
234membase=`${CROSS}objdump -p "$kernel" | grep -m 1 LOAD | awk '{print $7}'`
235
229case "$platform" in 236case "$platform" in
230uboot) 237uboot)
231 rm -f "$ofile" 238 rm -f "$ofile"
232 mkimage -A ppc -O linux -T kernel -C gzip -a 00000000 -e 00000000 \ 239 mkimage -A ppc -O linux -T kernel -C gzip -a $membase -e $membase \
233 $uboot_version -d "$vmz" "$ofile" 240 $uboot_version -d "$vmz" "$ofile"
234 if [ -z "$cacheit" ]; then 241 if [ -z "$cacheit" ]; then
235 rm -f "$vmz" 242 rm -f "$vmz"
@@ -298,15 +305,16 @@ treeboot*)
298 exit 0 305 exit 0
299 ;; 306 ;;
300ps3) 307ps3)
301 # The ps3's loader supports loading gzipped binary images from flash 308 # The ps3's loader supports loading a gzipped binary image from flash
302 # rom to addr zero. The loader enters the image at addr 0x100. A 309 # rom to ram addr zero. The loader then enters the system reset
303 # bootwrapper overlay is use to arrange for the kernel to be loaded 310 # vector at addr 0x100. A bootwrapper overlay is used to arrange for
304 # to addr zero and to have a suitable bootwrapper entry at 0x100. 311 # a binary image of the kernel to be at addr zero, and yet have a
305 # To construct the rom image, 0x100 bytes from offset 0x100 in the 312 # suitable bootwrapper entry at 0x100. To construct the final rom
306 # kernel is copied to the bootwrapper symbol __system_reset_kernel. 313 # image 512 bytes from offset 0x100 is copied to the bootwrapper
307 # The 0x100 bytes at the bootwrapper symbol __system_reset_overlay is 314 # place holder at symbol __system_reset_kernel. The 512 bytes of the
308 # then copied to offset 0x100. At runtime the bootwrapper program 315 # bootwrapper entry code at symbol __system_reset_overlay is then
309 # copies the 0x100 bytes at __system_reset_kernel to addr 0x100. 316 # copied to offset 0x100. At runtime the bootwrapper program copies
317 # the data at __system_reset_kernel back to addr 0x100.
310 318
311 system_reset_overlay=0x`${CROSS}nm "$ofile" \ 319 system_reset_overlay=0x`${CROSS}nm "$ofile" \
312 | grep ' __system_reset_overlay$' \ 320 | grep ' __system_reset_overlay$' \
@@ -317,7 +325,7 @@ ps3)
317 | cut -d' ' -f1` 325 | cut -d' ' -f1`
318 system_reset_kernel=`printf "%d" $system_reset_kernel` 326 system_reset_kernel=`printf "%d" $system_reset_kernel`
319 overlay_dest="256" 327 overlay_dest="256"
320 overlay_size="256" 328 overlay_size="512"
321 329
322 ${CROSS}objcopy -O binary "$ofile" "$ofile.bin" 330 ${CROSS}objcopy -O binary "$ofile" "$ofile.bin"
323 331