aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/boot/Makefile
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2009-07-24 12:33:01 +0100
committerCatalin Marinas <catalin.marinas@arm.com>2009-07-24 12:33:01 +0100
commite2ed3be7319f2734fcd9c7638888501934c22751 (patch)
treed13e3a3e82dace717ad12b8261724f69a06f60dc /arch/arm/boot/Makefile
parentdff2ab16ac53d2e21c1ee5ec72f446d5740d8ca2 (diff)
Thumb-2: Make the uImage entry an odd number
This allows U-Boot to branch to the kernel in Thumb-2 mode via "mov pc, lr". Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm/boot/Makefile')
-rw-r--r--arch/arm/boot/Makefile9
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/arm/boot/Makefile b/arch/arm/boot/Makefile
index da226abce2d..4a590f4113e 100644
--- a/arch/arm/boot/Makefile
+++ b/arch/arm/boot/Makefile
@@ -61,7 +61,7 @@ endif
quiet_cmd_uimage = UIMAGE $@
cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A arm -O linux -T kernel \
- -C none -a $(LOADADDR) -e $(LOADADDR) \
+ -C none -a $(LOADADDR) -e $(STARTADDR) \
-n 'Linux-$(KERNELRELEASE)' -d $< $@
ifeq ($(CONFIG_ZBOOT_ROM),y)
@@ -70,6 +70,13 @@ 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)
@echo ' Image $@ is ready'