Commit e2ed3be7 authored by Catalin Marinas's avatar Catalin Marinas

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: default avatarCatalin Marinas <catalin.marinas@arm.com>
parent dff2ab16
...@@ -61,7 +61,7 @@ endif ...@@ -61,7 +61,7 @@ endif
quiet_cmd_uimage = UIMAGE $@ quiet_cmd_uimage = UIMAGE $@
cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A arm -O linux -T kernel \ 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 $< $@ -n 'Linux-$(KERNELRELEASE)' -d $< $@
ifeq ($(CONFIG_ZBOOT_ROM),y) ifeq ($(CONFIG_ZBOOT_ROM),y)
...@@ -70,6 +70,13 @@ else ...@@ -70,6 +70,13 @@ else
$(obj)/uImage: LOADADDR=$(ZRELADDR) $(obj)/uImage: LOADADDR=$(ZRELADDR)
endif 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 $(obj)/uImage: $(obj)/zImage FORCE
$(call if_changed,uimage) $(call if_changed,uimage)
@echo ' Image $@ is ready' @echo ' Image $@ is ready'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment