diff options
author | Tony Breeds <tony@bakeyournoodle.com> | 2008-06-24 00:20:29 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-06-30 21:28:32 -0400 |
commit | 9b09c6d909dfd8de96b99b9b9c808b94b0a71614 (patch) | |
tree | 0796f29964a133130ed39584000b2108497f3d65 /arch/powerpc/boot/wrapper | |
parent | c230328def963373ec474056f372e1918692c3c8 (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-x | arch/powerpc/boot/wrapper | 14 |
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 | |||
138 | tmp=$tmpdir/zImage.$$.o | 138 | tmp=$tmpdir/zImage.$$.o |
139 | ksection=.kernel:vmlinux.strip | 139 | ksection=.kernel:vmlinux.strip |
140 | isection=.kernel:initrd | 140 | isection=.kernel:initrd |
141 | link_address='0x400000' | ||
141 | 142 | ||
142 | case "$platform" in | 143 | case "$platform" in |
143 | pmac|pseries|chrp) | 144 | pseries) |
145 | platformo=$object/of.o | ||
146 | link_address='0x4000000' | ||
147 | ;; | ||
148 | pmac|chrp) | ||
144 | platformo=$object/of.o | 149 | platformo=$object/of.o |
145 | ;; | 150 | ;; |
146 | coff) | 151 | coff) |
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 | ;; |
150 | miboot|uboot) | 156 | miboot|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 | ;; |
194 | ep88xc|ep405|ep8248e) | 201 | ep88xc|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 | |||
272 | fi | 279 | fi |
273 | 280 | ||
274 | if [ "$platform" != "miboot" ]; then | 281 | if [ "$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 |
278 | fi | 288 | fi |