sh: Fix zImage load address when CONFIG_32BIT=y
authorMatt Fleming <matt@console-pimps.org>
Sat, 24 Apr 2010 12:34:44 +0000 (13:34 +0100)
committerMatt Fleming <matt@console-pimps.org>
Sun, 25 Apr 2010 19:44:23 +0000 (20:44 +0100)
We can't necessarily use the P1SEG region to access RAM when running in
32BIT mode, so use CONFIG_MEMORY_START as the base address.

Signed-off-by: Matt Fleming <matt@console-pimps.org>
arch/sh/boot/compressed/Makefile

index 5d660b90943b05bb4662ca9209fa1957da60192a..cfa5a087a886f5e9fa7ee5e90dd467e5003cc041 100644 (file)
@@ -14,10 +14,16 @@ OBJECTS = $(obj)/head_$(BITS).o $(obj)/misc.o $(obj)/cache.o
 #
 # IMAGE_OFFSET is the load offset of the compression loader
 #
+ifeq ($(CONFIG_32BIT),y)
+IMAGE_OFFSET   := $(shell /bin/bash -c 'printf "0x%08x" \
+                    $$[$(CONFIG_MEMORY_START)  + \
+                       $(CONFIG_BOOT_LINK_OFFSET)]')
+else
 IMAGE_OFFSET   := $(shell /bin/bash -c 'printf "0x%08x" \
                     $$[$(CONFIG_PAGE_OFFSET)  + \
                        $(KERNEL_MEMORY) + \
                        $(CONFIG_BOOT_LINK_OFFSET)]')
+endif
 
 LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)