From f5467e28d4e2569b2c71435d438ce3c7f9ac238e Mon Sep 17 00:00:00 2001 From: Paul Mackerras Date: Tue, 29 Oct 2013 16:21:26 +1100 Subject: powerpc/boot: Don't change link address for OF-based platforms Commit c55aef0e5bc6 ("powerpc/boot: Change the load address for the wrapper to fit the kernel") adjusts the wrapper address unnecessarily for platforms that use arch/powerpc/boot/of.c, since the code there allocates space for the kernel wherever it can find it and doesn't necessarily load the kernel at address 0. Changing the link address is actually harmful since it can cause the zImage to overlap with Open Firmware and thus fail to boot. To fix this, we set make_space to n for all of the platforms that use of.o. Signed-off-by: Paul Mackerras Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/boot/wrapper | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'arch/powerpc/boot/wrapper') diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper index cd7af841ba05..ac16e9984ecb 100755 --- a/arch/powerpc/boot/wrapper +++ b/arch/powerpc/boot/wrapper @@ -150,18 +150,22 @@ case "$platform" in pseries) platformo="$object/of.o $object/epapr.o" link_address='0x4000000' + make_space=n ;; maple) platformo="$object/of.o $object/epapr.o" link_address='0x400000' + make_space=n ;; pmac|chrp) platformo="$object/of.o $object/epapr.o" + make_space=n ;; coff) platformo="$object/crt0.o $object/of.o $object/epapr.o" lds=$object/zImage.coff.lds link_address='0x500000' + make_space=n pie= ;; miboot|uboot*) -- cgit v1.2.3 From 44790a0b93d8481a8dc5bf6aa600941627b56d56 Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Tue, 5 Nov 2013 10:09:11 +1100 Subject: powerpc/boot: Properly handle the base "of" boot wrapper The wrapper script needs an explicit rule for the "of" boot wrapper (generic wrapper, similar to pseries). Before 0c9fa29149d3726e14262aeb0c8461a948cc9d56 it was hanlded implicitly by the statement: platformo=$object/"$platform".o But now that epapr.o needs to be added, that doesn't work and an explicit rule must be added. Signed-off-by: Benjamin Herrenschmidt --- arch/powerpc/boot/wrapper | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'arch/powerpc/boot/wrapper') diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper index ac16e9984ecb..2e1af74a64be 100755 --- a/arch/powerpc/boot/wrapper +++ b/arch/powerpc/boot/wrapper @@ -147,6 +147,10 @@ link_address='0x400000' make_space=y case "$platform" in +of) + platformo="$object/of.o $object/epapr.o" + make_space=n + ;; pseries) platformo="$object/of.o $object/epapr.o" link_address='0x4000000' -- cgit v1.2.3