diff options
author | Catalin Marinas <catalin.marinas@arm.com> | 2009-07-24 07:33:01 -0400 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2009-07-24 07:33:01 -0400 |
commit | e2ed3be7319f2734fcd9c7638888501934c22751 (patch) | |
tree | d13e3a3e82dace717ad12b8261724f69a06f60dc /arch/arm/boot | |
parent | dff2ab16ac53d2e21c1ee5ec72f446d5740d8ca2 (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')
-rw-r--r-- | arch/arm/boot/Makefile | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/arm/boot/Makefile b/arch/arm/boot/Makefile index da226abce2d0..4a590f4113e2 100644 --- a/arch/arm/boot/Makefile +++ b/arch/arm/boot/Makefile | |||
@@ -61,7 +61,7 @@ endif | |||
61 | 61 | ||
62 | quiet_cmd_uimage = UIMAGE $@ | 62 | quiet_cmd_uimage = UIMAGE $@ |
63 | cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A arm -O linux -T kernel \ | 63 | cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A arm -O linux -T kernel \ |
64 | -C none -a $(LOADADDR) -e $(LOADADDR) \ | 64 | -C none -a $(LOADADDR) -e $(STARTADDR) \ |
65 | -n 'Linux-$(KERNELRELEASE)' -d $< $@ | 65 | -n 'Linux-$(KERNELRELEASE)' -d $< $@ |
66 | 66 | ||
67 | ifeq ($(CONFIG_ZBOOT_ROM),y) | 67 | ifeq ($(CONFIG_ZBOOT_ROM),y) |
@@ -70,6 +70,13 @@ else | |||
70 | $(obj)/uImage: LOADADDR=$(ZRELADDR) | 70 | $(obj)/uImage: LOADADDR=$(ZRELADDR) |
71 | endif | 71 | endif |
72 | 72 | ||
73 | ifeq ($(CONFIG_THUMB2_KERNEL),y) | ||
74 | # Set bit 0 to 1 so that "mov pc, rx" switches to Thumb-2 mode | ||
75 | $(obj)/uImage: STARTADDR=$(shell echo $(LOADADDR) | sed -e "s/.$$/1/") | ||
76 | else | ||
77 | $(obj)/uImage: STARTADDR=$(LOADADDR) | ||
78 | endif | ||
79 | |||
73 | $(obj)/uImage: $(obj)/zImage FORCE | 80 | $(obj)/uImage: $(obj)/zImage FORCE |
74 | $(call if_changed,uimage) | 81 | $(call if_changed,uimage) |
75 | @echo ' Image $@ is ready' | 82 | @echo ' Image $@ is ready' |