diff options
Diffstat (limited to 'arch/powerpc/boot/wrapper')
-rwxr-xr-x | arch/powerpc/boot/wrapper | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper index cb97e7511d7e..c74531af72c0 100755 --- a/arch/powerpc/boot/wrapper +++ b/arch/powerpc/boot/wrapper | |||
@@ -39,6 +39,7 @@ dts= | |||
39 | cacheit= | 39 | cacheit= |
40 | binary= | 40 | binary= |
41 | gzip=.gz | 41 | gzip=.gz |
42 | pie= | ||
42 | 43 | ||
43 | # cross-compilation prefix | 44 | # cross-compilation prefix |
44 | CROSS= | 45 | CROSS= |
@@ -157,9 +158,10 @@ pmac|chrp) | |||
157 | platformo=$object/of.o | 158 | platformo=$object/of.o |
158 | ;; | 159 | ;; |
159 | coff) | 160 | coff) |
160 | platformo=$object/of.o | 161 | platformo="$object/crt0.o $object/of.o" |
161 | lds=$object/zImage.coff.lds | 162 | lds=$object/zImage.coff.lds |
162 | link_address='0x500000' | 163 | link_address='0x500000' |
164 | pie= | ||
163 | ;; | 165 | ;; |
164 | miboot|uboot) | 166 | miboot|uboot) |
165 | # miboot and U-boot want just the bare bits, not an ELF binary | 167 | # miboot and U-boot want just the bare bits, not an ELF binary |
@@ -208,6 +210,7 @@ ps3) | |||
208 | ksection=.kernel:vmlinux.bin | 210 | ksection=.kernel:vmlinux.bin |
209 | isection=.kernel:initrd | 211 | isection=.kernel:initrd |
210 | link_address='' | 212 | link_address='' |
213 | pie= | ||
211 | ;; | 214 | ;; |
212 | ep88xc|ep405|ep8248e) | 215 | ep88xc|ep405|ep8248e) |
213 | platformo="$object/fixed-head.o $object/$platform.o" | 216 | platformo="$object/fixed-head.o $object/$platform.o" |
@@ -244,6 +247,10 @@ gamecube|wii) | |||
244 | treeboot-iss4xx-mpic) | 247 | treeboot-iss4xx-mpic) |
245 | platformo="$object/treeboot-iss4xx.o" | 248 | platformo="$object/treeboot-iss4xx.o" |
246 | ;; | 249 | ;; |
250 | epapr) | ||
251 | link_address='0x20000000' | ||
252 | pie=-pie | ||
253 | ;; | ||
247 | esac | 254 | esac |
248 | 255 | ||
249 | vmz="$tmpdir/`basename \"$kernel\"`.$ext" | 256 | vmz="$tmpdir/`basename \"$kernel\"`.$ext" |
@@ -251,7 +258,7 @@ if [ -z "$cacheit" -o ! -f "$vmz$gzip" -o "$vmz$gzip" -ot "$kernel" ]; then | |||
251 | ${CROSS}objcopy $objflags "$kernel" "$vmz.$$" | 258 | ${CROSS}objcopy $objflags "$kernel" "$vmz.$$" |
252 | 259 | ||
253 | if [ -n "$gzip" ]; then | 260 | if [ -n "$gzip" ]; then |
254 | gzip -f -9 "$vmz.$$" | 261 | gzip -n -f -9 "$vmz.$$" |
255 | fi | 262 | fi |
256 | 263 | ||
257 | if [ -n "$cacheit" ]; then | 264 | if [ -n "$cacheit" ]; then |
@@ -310,9 +317,9 @@ fi | |||
310 | 317 | ||
311 | if [ "$platform" != "miboot" ]; then | 318 | if [ "$platform" != "miboot" ]; then |
312 | if [ -n "$link_address" ] ; then | 319 | if [ -n "$link_address" ] ; then |
313 | text_start="-Ttext $link_address --defsym _start=$link_address" | 320 | text_start="-Ttext $link_address" |
314 | fi | 321 | fi |
315 | ${CROSS}ld -m elf32ppc -T $lds $text_start -o "$ofile" \ | 322 | ${CROSS}ld -m elf32ppc -T $lds $text_start $pie -o "$ofile" \ |
316 | $platformo $tmp $object/wrapper.a | 323 | $platformo $tmp $object/wrapper.a |
317 | rm $tmp | 324 | rm $tmp |
318 | fi | 325 | fi |
@@ -336,7 +343,7 @@ coff) | |||
336 | $objbin/hack-coff "$ofile" | 343 | $objbin/hack-coff "$ofile" |
337 | ;; | 344 | ;; |
338 | cuboot*) | 345 | cuboot*) |
339 | gzip -f -9 "$ofile" | 346 | gzip -n -f -9 "$ofile" |
340 | ${MKIMAGE} -A ppc -O linux -T kernel -C gzip -a "$base" -e "$entry" \ | 347 | ${MKIMAGE} -A ppc -O linux -T kernel -C gzip -a "$base" -e "$entry" \ |
341 | $uboot_version -d "$ofile".gz "$ofile" | 348 | $uboot_version -d "$ofile".gz "$ofile" |
342 | ;; | 349 | ;; |
@@ -383,6 +390,6 @@ ps3) | |||
383 | 390 | ||
384 | odir="$(dirname "$ofile.bin")" | 391 | odir="$(dirname "$ofile.bin")" |
385 | rm -f "$odir/otheros.bld" | 392 | rm -f "$odir/otheros.bld" |
386 | gzip --force -9 --stdout "$ofile.bin" > "$odir/otheros.bld" | 393 | gzip -n --force -9 --stdout "$ofile.bin" > "$odir/otheros.bld" |
387 | ;; | 394 | ;; |
388 | esac | 395 | esac |