aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2008-04-15 15:52:29 -0400
committerPaul Mackerras <paulus@samba.org>2008-04-16 17:46:14 -0400
commitb18796d32a35ca4d996c584c3bb6d0a4f8a7d310 (patch)
tree99c03eaf2eda0da6d5766d2cedd961aa10cf7ff2 /arch/powerpc
parent366234f657879aeb7a1e2ca582f2f24f3fae9269 (diff)
[POWERPC] bootwrapper: Use physical address in PHDR for uImage
Now that we properly set the physical address in the program header of the vmlinux ELF we can extract it to properly set the load and entry point for u-boot uImages. Before we always hard coded the load & entry point to 0. However there are situations that the kernel may be built with a non-zero physical address. We use objdump to extract the PHDR. We assume that there is only one PHDR in the vmlinux of type LOAD. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc')
-rwxr-xr-xarch/powerpc/boot/wrapper5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper
index 14a01823ba53..d6c96d9ab291 100755
--- a/arch/powerpc/boot/wrapper
+++ b/arch/powerpc/boot/wrapper
@@ -230,10 +230,13 @@ if [ -n "$version" ]; then
230 uboot_version="-n Linux-$version" 230 uboot_version="-n Linux-$version"
231fi 231fi
232 232
233# physical offset of kernel image
234membase=`${CROSS}objdump -p "$kernel" | grep -m 1 LOAD | awk '{print $7}'`
235
233case "$platform" in 236case "$platform" in
234uboot) 237uboot)
235 rm -f "$ofile" 238 rm -f "$ofile"
236 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 \
237 $uboot_version -d "$vmz" "$ofile" 240 $uboot_version -d "$vmz" "$ofile"
238 if [ -z "$cacheit" ]; then 241 if [ -z "$cacheit" ]; then
239 rm -f "$vmz" 242 rm -f "$vmz"