X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=arch%2Fpowerpc%2Fboot%2Fwrapper;h=d50e498a072b99cd50af01960655a8edae9af27e;hb=4faa8496650f9417189dacce8f933e8ec61dc032;hp=31147a0377283e179b473aa4fa4c9f720ce8ed48;hpb=a80b824f0b63fa3a8c269903828beb0837d738e7;p=linux-2.6-omap-h63xx.git diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper index 31147a03772..d50e498a072 100755 --- a/arch/powerpc/boot/wrapper +++ b/arch/powerpc/boot/wrapper @@ -45,6 +45,7 @@ CROSS= # directory for object and other files used by this script object=arch/powerpc/boot +objbin=$object # directory for working files tmpdir=. @@ -95,6 +96,7 @@ while [ "$#" -gt 0 ]; do shift [ "$#" -gt 0 ] || usage object="$1" + objbin="$1" ;; -W) shift @@ -116,10 +118,13 @@ while [ "$#" -gt 0 ]; do done if [ -n "$dts" ]; then + if [ ! -r "$dts" -a -r "$object/dts/$dts" ]; then + dts="$object/dts/$dts" + fi if [ -z "$dtb" ]; then dtb="$platform.dtb" fi - dtc -O dtb -o "$dtb" -b 0 -V 16 "$dts" + $object/dtc -O dtb -o "$dtb" -b 0 "$dts" fi if [ -z "$kernel" ]; then @@ -153,6 +158,29 @@ miboot|uboot) cuboot*) binary=y gzip= + case "$platform" in + *-mpc885ads|*-adder875*|*-ep88xc) + platformo=$object/cuboot-8xx.o + ;; + *5200*|*-motionpro) + platformo=$object/cuboot-52xx.o + ;; + *-pq2fads|*-ep8248e|*-mpc8272*|*-storcenter) + platformo=$object/cuboot-pq2.o + ;; + *-mpc824*) + platformo=$object/cuboot-824x.o + ;; + *-mpc83*) + platformo=$object/cuboot-83xx.o + ;; + *-tqm8541|*-mpc8560*|*-tqm8560|*-tqm8555*) + platformo=$object/cuboot-85xx-cpm2.o + ;; + *-mpc85*) + platformo=$object/cuboot-85xx.o + ;; + esac ;; ps3) platformo="$object/ps3-head.o $object/ps3-hvcall.o $object/ps3.o" @@ -163,10 +191,14 @@ ps3) ksection=.kernel:vmlinux.bin isection=.kernel:initrd ;; -ep88xc) +ep88xc|ep405|ep8248e) platformo="$object/fixed-head.o $object/$platform.o" binary=y ;; +adder875-redboot) + platformo="$object/fixed-head.o $object/redboot-8xx.o" + binary=y + ;; esac vmz="$tmpdir/`basename \"$kernel\"`.$ext" @@ -246,11 +278,11 @@ fi # post-processing needed for some platforms case "$platform" in pseries|chrp) - $object/addnote "$ofile" + $objbin/addnote "$ofile" ;; coff) ${CROSS}objcopy -O aixcoff-rs6000 --set-start "$entry" "$ofile" - $object/hack-coff "$ofile" + $objbin/hack-coff "$ofile" ;; cuboot*) gzip -f -9 "$ofile" @@ -259,7 +291,7 @@ cuboot*) ;; treeboot*) mv "$ofile" "$ofile.elf" - $object/mktree "$ofile.elf" "$ofile" "$base" "$entry" + $objbin/mktree "$ofile.elf" "$ofile" "$base" "$entry" if [ -z "$cacheit" ]; then rm -f "$ofile.elf" fi @@ -287,8 +319,6 @@ ps3) overlay_dest="256" overlay_size="256" - rm -f "$object/otheros.bld" - ${CROSS}objcopy -O binary "$ofile" "$ofile.bin" dd if="$ofile.bin" of="$ofile.bin" conv=notrunc \ @@ -299,6 +329,8 @@ ps3) skip=$system_reset_overlay seek=$overlay_dest \ count=$overlay_size bs=1 - gzip --force -9 --stdout "$ofile.bin" > "$object/otheros.bld" + odir="$(dirname "$ofile.bin")" + rm -f "$odir/otheros.bld" + gzip --force -9 --stdout "$ofile.bin" > "$odir/otheros.bld" ;; esac