---
 arch/arm/Kconfig                  |   16 	16 +	0 -	0 !
 arch/arm/Makefile                 |    7 	6 +	1 -	0 !
 arch/arm/boot/Makefile            |   14 	13 +	1 -	0 !
 arch/arm/boot/compressed/Makefile |    2 	1 +	1 -	0 !
 arch/arm/kernel/Makefile          |    2 	1 +	1 -	0 !
 5 files changed, 37 insertions(+), 4 deletions(-)

Index: linux-2.6/arch/arm/Makefile
===================================================================
--- linux-2.6.orig/arch/arm/Makefile	2007-02-23 15:07:29.000000000 +0100
+++ linux-2.6/arch/arm/Makefile	2007-02-23 15:08:38.000000000 +0100
@@ -11,7 +11,7 @@
 # Copyright (C) 1995-2001 by Russell King
 
 LDFLAGS_vmlinux	:=-p --no-undefined -X
-CPPFLAGS_vmlinux.lds = -DTEXT_OFFSET=$(TEXT_OFFSET)
+CPPFLAGS_vmlinux.lds = -DTEXT_OFFSET="$(TEXT_OFFSET)"
 OBJCOPYFLAGS	:=-O binary -R .note -R .comment -S
 GZFLAGS		:=-9
 #CFLAGS		+=-pipe
@@ -139,7 +139,12 @@ export CFLAGS_3c589_cs.o
 endif
 
 # The byte offset of the kernel image in RAM from the start of RAM.
+
+ifeq ($(CONFIG_TXTOFFSET_DELTA),y)
+TEXT_OFFSET := $(textofs-y) + $(CONFIG_TXTOFFSET_DELTA_VALUE)
+else
 TEXT_OFFSET := $(textofs-y)
+endif
 
 ifeq ($(incdir-y),)
 incdir-y := $(machine-y)
Index: linux-2.6/arch/arm/Kconfig
===================================================================
--- linux-2.6.orig/arch/arm/Kconfig	2007-02-23 15:07:29.000000000 +0100
+++ linux-2.6/arch/arm/Kconfig	2007-02-23 15:08:38.000000000 +0100
@@ -787,6 +787,22 @@ config KEXEC
 	  initially work for you.  It may help to enable device hotplugging
 	  support.
 
+config TXTOFFSET_DELTA
+	bool "Move kernel text offset"
+	default n
+
+config TXTOFFSET_DELTA_VALUE
+	hex "Kernel text offset delta value"
+	depends on TXTOFFSET_DELTA
+	default "0x00000000"
+	help
+	  This delta value moves the default base of the kernel
+	  text segment from the architecture default. This can be
+	  useful for machines where the bootloader uses the area
+	  the kernel usually occupies for suspend/resume.
+
+	
+
 endmenu
 
 if (ARCH_SA1100 || ARCH_INTEGRATOR || ARCH_OMAP || ARCH_IMX )
Index: linux-2.6/arch/arm/boot/Makefile
===================================================================
--- linux-2.6.orig/arch/arm/boot/Makefile	2007-02-23 14:41:20.000000000 +0100
+++ linux-2.6/arch/arm/boot/Makefile	2007-02-23 15:08:38.000000000 +0100
@@ -21,10 +21,22 @@ endif
 #   ZRELADDR == virt_to_phys(PAGE_OFFSET + TEXT_OFFSET)
 #   PARAMS_PHYS must be within 4MB of ZRELADDR
 #   INITRD_PHYS must be in RAM
+# note, we use ZRELADDR_c because mkuimage needs single hex value
+
+ifeq ($(CONFIG_TXTOFFSET_DELTA),y)
+ZRELADDR    := $(zreladdr-y)+$(CONFIG_TXTOFFSET_DELTA_VALUE)
+ZRELADDR_h  := $(subst 0x,,$(ZRELADDR))
+ZRELADDR_c  := 0x$(shell echo "ibase=16; obase=10; $(ZRELADDR_h)" | bc -l)
+else
 ZRELADDR    := $(zreladdr-y)
+ZRELADDR_c  := $(zreladdr-y)
+endif
+
 PARAMS_PHYS := $(params_phys-y)
 INITRD_PHYS := $(initrd_phys-y)
 
+
+
 export ZRELADDR INITRD_PHYS PARAMS_PHYS
 
 targets := Image zImage xipImage bootpImage uImage
@@ -61,7 +73,7 @@ endif
 
 quiet_cmd_uimage = UIMAGE  $@
       cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A arm -O linux -T kernel \
-		   -C none -a $(ZRELADDR) -e $(ZRELADDR) \
+		   -C none -a $(ZRELADDR_c) -e $(ZRELADDR_c) \
 		   -n 'Linux-$(KERNELRELEASE)' -d $< $@
 
 $(obj)/uImage:	$(obj)/zImage FORCE
Index: linux-2.6/arch/arm/boot/compressed/Makefile
===================================================================
--- linux-2.6.orig/arch/arm/boot/compressed/Makefile	2007-02-23 14:41:20.000000000 +0100
+++ linux-2.6/arch/arm/boot/compressed/Makefile	2007-02-23 15:08:38.000000000 +0100
@@ -81,7 +81,7 @@ EXTRA_AFLAGS  :=
 # Supply ZRELADDR, INITRD_PHYS and PARAMS_PHYS to the decompressor via
 # linker symbols.  We only define initrd_phys and params_phys if the
 # machine class defined the corresponding makefile variable.
-LDFLAGS_vmlinux := --defsym zreladdr=$(ZRELADDR)
+LDFLAGS_vmlinux := --defsym zreladdr="$(ZRELADDR)"
 ifneq ($(INITRD_PHYS),)
 LDFLAGS_vmlinux += --defsym initrd_phys=$(INITRD_PHYS)
 endif
Index: linux-2.6/arch/arm/kernel/Makefile
===================================================================
--- linux-2.6.orig/arch/arm/kernel/Makefile	2007-02-23 15:07:29.000000000 +0100
+++ linux-2.6/arch/arm/kernel/Makefile	2007-02-23 15:08:38.000000000 +0100
@@ -2,7 +2,7 @@
 # Makefile for the linux kernel.
 #
 
-AFLAGS_head.o := -DTEXT_OFFSET=$(TEXT_OFFSET)
+AFLAGS_head.o := -DTEXT_OFFSET="$(TEXT_OFFSET)"
 
 # Object file lists.
 
