]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/boot/wrapper
[POWERPC] bootwrapper: Add dt_ops methods.
[linux-2.6-omap-h63xx.git] / arch / powerpc / boot / wrapper
index eab7318729e93a26d8eb9a898ecbd9d2d6f9d8e7..157d8c89e1386915f85351f1db836aff494a2366 100755 (executable)
@@ -179,16 +179,19 @@ if [ -z "$cacheit" ]; then
 fi
 
 if [ -n "$initrd" ]; then
-    addsec $tmp "$initrd" initrd
+    addsec $tmp "$initrd" $isection
 fi
 
 if [ -n "$dtb" ]; then
-    addsec $tmp "$dtb" dtb
+    addsec $tmp "$dtb" .kernel:dtb
+    if [ -n "$dts" ]; then
+       rm $dtb
+    fi
 fi
 
 if [ "$platform" != "miboot" ]; then
     ${CROSS}ld -m elf32ppc -T $lds -o "$ofile" \
-       $object/crt0.o $platformo $tmp $object/wrapper.a
+       $platformo $tmp $object/wrapper.a
     rm $tmp
 fi
 
@@ -198,7 +201,9 @@ pseries|chrp)
     $object/addnote "$ofile"
     ;;
 pmaccoff)
-    ${CROSS}objcopy -O aixcoff-rs6000 --set-start 0x500000 "$ofile"
+    entry=`objdump -f "$ofile" | grep '^start address ' | \
+       cut -d' ' -f3`
+    ${CROSS}objcopy -O aixcoff-rs6000 --set-start "$entry" "$ofile"
     $object/hack-coff "$ofile"
     ;;
 esac