summaryrefslogtreecommitdiffstats
path: root/arch/arm/boot/Makefile
diff options
context:
space:
mode:
authorDave Martin <dave.martin@linaro.org>2010-11-29 19:43:27 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-11-30 13:44:26 +0000
commit26e5ca93dda9425f8ff78ccb2f9b193328087e45 (patch)
treefae95715e23c176c804766612b5d2702c236fcf0 /arch/arm/boot/Makefile
parentbfa64c4ab1235b732542f11f4e0005e1774f779a (diff)
downloadlinux-26e5ca93dda9425f8ff78ccb2f9b193328087e45.tar.bz2
ARM: 6503/1: Thumb-2: Restore sensible zImage header layout for CONFIG_THUMB2_KERNEL
The code which makes up the zImage header intends to leave a 32-byte gap followed by a branch to the real entry point, a magic number, and a word containing the absolute entry point address. This gets messed up with with CONFIG_THUMB2_KERNEL, because the size of the initial padding NOPs changes. Instead, the header can be made fully compatible by restoring it to ARM. In the Thumb-2 case, we can replace the initial NOPs with a sequence which switches to Thumb and jumps to the real entry point. As a consequence, the zImage entry point is now always ARM, so no special magic is needed any more for the uImage rules in the Thumb-2 case. Signed-off-by: Dave Martin <dave.martin@linaro.org> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/boot/Makefile')
-rw-r--r--arch/arm/boot/Makefile5
1 files changed, 0 insertions, 5 deletions
diff --git a/arch/arm/boot/Makefile b/arch/arm/boot/Makefile
index 4a590f4113e2..4d26f2c52a75 100644
--- a/arch/arm/boot/Makefile
+++ b/arch/arm/boot/Makefile
@@ -70,12 +70,7 @@ else
$(obj)/uImage: LOADADDR=$(ZRELADDR)
endif
-ifeq ($(CONFIG_THUMB2_KERNEL),y)
-# Set bit 0 to 1 so that "mov pc, rx" switches to Thumb-2 mode
-$(obj)/uImage: STARTADDR=$(shell echo $(LOADADDR) | sed -e "s/.$$/1/")
-else
$(obj)/uImage: STARTADDR=$(LOADADDR)
-endif
$(obj)/uImage: $(obj)/zImage FORCE
$(call if_changed,uimage)