aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/boot/wrapper
diff options
context:
space:
mode:
authorTony Breeds <tony@bakeyournoodle.com>2008-06-24 00:20:29 -0400
committerPaul Mackerras <paulus@samba.org>2008-06-30 21:28:32 -0400
commit9b09c6d909dfd8de96b99b9b9c808b94b0a71614 (patch)
tree0796f29964a133130ed39584000b2108497f3d65 /arch/powerpc/boot/wrapper
parentc230328def963373ec474056f372e1918692c3c8 (diff)
powerpc: Change the default link address for pSeries zImage kernels
Currently we set the start of the .text section to be 4Mb for pSeries. In situations where the zImage is > 8Mb we'll fail to boot (due to overlapping with OF). Move .text in a zImage from 4MB to 64MB (well past OF). We still will not be able to load large zImage unless we also move OF, to that end, add a note to the zImage ELF to move OF to 32Mb. If this is the very first kernel booted then we'll need to move OF manually by setting real-base. Signed-off-by: Tony Breeds <tony@bakeyournoodle.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/boot/wrapper')
-rwxr-xr-xarch/powerpc/boot/wrapper14
1 files changed, 12 insertions, 2 deletions
diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper
index cb87a015be7c..df2358e9f1ca 100755
--- a/arch/powerpc/boot/wrapper
+++ b/arch/powerpc/boot/wrapper
@@ -138,14 +138,20 @@ objflags=-S
138tmp=$tmpdir/zImage.$$.o 138tmp=$tmpdir/zImage.$$.o
139ksection=.kernel:vmlinux.strip 139ksection=.kernel:vmlinux.strip
140isection=.kernel:initrd 140isection=.kernel:initrd
141link_address='0x400000'
141 142
142case "$platform" in 143case "$platform" in
143pmac|pseries|chrp) 144pseries)
145 platformo=$object/of.o
146 link_address='0x4000000'
147 ;;
148pmac|chrp)
144 platformo=$object/of.o 149 platformo=$object/of.o
145 ;; 150 ;;
146coff) 151coff)
147 platformo=$object/of.o 152 platformo=$object/of.o
148 lds=$object/zImage.coff.lds 153 lds=$object/zImage.coff.lds
154 link_address='0x500000'
149 ;; 155 ;;
150miboot|uboot) 156miboot|uboot)
151 # miboot and U-boot want just the bare bits, not an ELF binary 157 # miboot and U-boot want just the bare bits, not an ELF binary
@@ -190,6 +196,7 @@ ps3)
190 objflags="-O binary --set-section-flags=.bss=contents,alloc,load,data" 196 objflags="-O binary --set-section-flags=.bss=contents,alloc,load,data"
191 ksection=.kernel:vmlinux.bin 197 ksection=.kernel:vmlinux.bin
192 isection=.kernel:initrd 198 isection=.kernel:initrd
199 link_address=''
193 ;; 200 ;;
194ep88xc|ep405|ep8248e) 201ep88xc|ep405|ep8248e)
195 platformo="$object/fixed-head.o $object/$platform.o" 202 platformo="$object/fixed-head.o $object/$platform.o"
@@ -272,7 +279,10 @@ if [ -n "$dtb" ]; then
272fi 279fi
273 280
274if [ "$platform" != "miboot" ]; then 281if [ "$platform" != "miboot" ]; then
275 ${CROSS}ld -m elf32ppc -T $lds -o "$ofile" \ 282 if [ -n "$link_address" ] ; then
283 text_start="-Ttext $link_address --defsym _start=$link_address"
284 fi
285 ${CROSS}ld -m elf32ppc -T $lds $text_start -o "$ofile" \
276 $platformo $tmp $object/wrapper.a 286 $platformo $tmp $object/wrapper.a
277 rm $tmp 287 rm $tmp
278fi 288fi