[RFC PATCH 6/7] powerpc: Update the default FIT image to use the correct load/boot addresses

Michal Simek monstr at monstr.eu
Fri Jun 17 00:14:27 EST 2011


From: John Williams <john.williams at petalogix.com>

The default kernel_fdt.its hard codes zero load/start addresses, but this may
no longer be true.

As we copy the FIT tree descriptor, update these values based on the incoming
ELF payload.

Signed-off-by: John Williams <john.williams at petalogix.com>
---
 arch/powerpc/boot/wrapper |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper
index 594aa02..54fbc2e 100755
--- a/arch/powerpc/boot/wrapper
+++ b/arch/powerpc/boot/wrapper
@@ -281,7 +281,11 @@ uboot-fit)
     rm -f "$ofile"
     #[ "$vmz" != vmlinux.bin.gz ] && mv "$vmz" "vmlinux.bin.gz"
     mv "$dtb" "target.dtb"
-    cp arch/powerpc/boot/kernel_fdt.its .
+    # Check the ELF file for a non-zero load/entry address
+    membase=${membase:2:8}
+    sed -e "s/load = <.*$/load = <${membase}>;/g" \
+        -e "s/entry = <.*$/entry = <${membase}>;/g" \
+            arch/powerpc/boot/kernel_fdt.its > kernel_fdt.its
     mkimage -f kernel_fdt.its "$ofile"
     #rm kernet_fdt.its
     exit 0
-- 
1.5.5.6



More information about the Linuxppc-dev mailing list