aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/boot/wrapper
diff options
context:
space:
mode:
authorScott Wood <scottwood@freescale.com>2007-04-16 19:25:50 -0400
committerPaul Mackerras <paulus@samba.org>2007-04-24 07:31:54 -0400
commit0fdd717ed4d9c82f3f766007b3f5da656649f3aa (patch)
tree16ed82c89403bcdf071181fbf126e479c38a669f /arch/powerpc/boot/wrapper
parent270429baa928fa6beff4042a7701944e23396417 (diff)
[POWERPC] bootwrapper: Add a cuboot platform and a cuImage target
The cuImage target will build a uImage with bootwrapper code and a device tree. The default device tree and platform file are determined by the kernel configuration. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/boot/wrapper')
-rwxr-xr-xarch/powerpc/boot/wrapper21
1 files changed, 19 insertions, 2 deletions
diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper
index e4566bdfbe0..5cedd901201 100755
--- a/arch/powerpc/boot/wrapper
+++ b/arch/powerpc/boot/wrapper
@@ -141,6 +141,9 @@ miboot|uboot)
141 ksection=image 141 ksection=image
142 isection=initrd 142 isection=initrd
143 ;; 143 ;;
144cuboot*)
145 gzip=
146 ;;
144esac 147esac
145 148
146vmz="$tmpdir/`basename \"$kernel\"`.$ext" 149vmz="$tmpdir/`basename \"$kernel\"`.$ext"
@@ -161,13 +164,17 @@ fi
161vmz="$vmz$gzip" 164vmz="$vmz$gzip"
162 165
163case "$platform" in 166case "$platform" in
164uboot) 167uboot|cuboot*)
165 rm -f "$ofile"
166 version=`${CROSS}strings "$kernel" | grep '^Linux version [-0-9.]' | \ 168 version=`${CROSS}strings "$kernel" | grep '^Linux version [-0-9.]' | \
167 cut -d' ' -f3` 169 cut -d' ' -f3`
168 if [ -n "$version" ]; then 170 if [ -n "$version" ]; then
169 version="-n Linux-$version" 171 version="-n Linux-$version"
170 fi 172 fi
173esac
174
175case "$platform" in
176uboot)
177 rm -f "$ofile"
171 mkimage -A ppc -O linux -T kernel -C gzip -a 00000000 -e 00000000 \ 178 mkimage -A ppc -O linux -T kernel -C gzip -a 00000000 -e 00000000 \
172 $version -d "$vmz" "$ofile" 179 $version -d "$vmz" "$ofile"
173 if [ -z "$cacheit" ]; then 180 if [ -z "$cacheit" ]; then
@@ -216,4 +223,14 @@ pmaccoff)
216 ${CROSS}objcopy -O aixcoff-rs6000 --set-start "$entry" "$ofile" 223 ${CROSS}objcopy -O aixcoff-rs6000 --set-start "$entry" "$ofile"
217 $object/hack-coff "$ofile" 224 $object/hack-coff "$ofile"
218 ;; 225 ;;
226cuboot*)
227 base=`${CROSS}nm "$ofile" | grep ' _start$' | cut -d' ' -f1`
228 entry=`${CROSS}objdump -f "$ofile" | grep '^start address ' | \
229 cut -d' ' -f3`
230 mv "$ofile" "$ofile".elf
231 ${CROSS}objcopy -O binary "$ofile".elf "$ofile".bin
232 gzip -f -9 "$ofile".bin
233 mkimage -A ppc -O linux -T kernel -C gzip -a "$base" -e "$entry" \
234 $version -d "$ofile".bin.gz "$ofile"
235 ;;
219esac 236esac