Skip to contentSkip to conversation

arm: Migrate SYS_THUMB_BUILD to Kconfig, introduce SPL_SYS_THUMB_BUILD

PATCH Superseded Tom Rini 2 participants 5 messages Mar 6, 2017 – Mar 7, 2017

Subsystems (9)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 arm: Migrate SYS_THUMB_BUILD to Kconfig, introduce SPL_SYS_THUMB_BUILD

Today, we have cases where we wish to build all of U-Boot in Thumb2 mode for various reasons. We also have cases where we only build SPL in Thumb2 mode due to size constraints and wish to build the rest of the system in ARM mode. So in this migration we introduce a new symbol as well, SPL_SYS_THUMB_BUILD to control if we build everything or just SPL (or in theory, just U-Boot) in Thumb2 mode.

---
 Makefile                                |  5 +++--
 README                                  |  8 --------
 arch/arm/Kconfig                        | 30 ++++++++++++++++++++++++++++++
 arch/arm/config.mk                      |  8 +++-----
 arch/arm/cpu/arm920t/Makefile           |  2 +-
 arch/arm/cpu/arm926ejs/Makefile         |  2 +-
 arch/arm/cpu/arm926ejs/cache.c          |  2 +-
 arch/arm/cpu/armv7/cache_v7_asm.S       |  2 +-
 arch/arm/cpu/pxa/cache.c                |  2 +-
 arch/arm/include/asm/assembler.h        |  2 +-
 arch/arm/include/asm/cache.h            |  2 +-
 arch/arm/include/asm/setjmp.h           |  2 +-
 arch/arm/lib/Makefile                   |  2 +-
 arch/arm/lib/cache.c                    |  2 +-
 arch/arm/lib/crt0.S                     |  2 +-
 arch/arm/lib/lib1funcs.S                |  2 +-
 arch/arm/lib/memcpy.S                   |  2 +-
 arch/arm/lib/memset.S                   |  2 +-
 arch/arm/mach-at91/arm926ejs/Makefile   |  8 ++++++++
 arch/arm/mach-orion5x/Makefile          |  2 +-
 configs/am335x_evm_norboot_defconfig    |  1 +
 configs/am3517_crane_defconfig          |  1 +
 configs/am3517_evm_defconfig            |  1 +
 configs/am43xx_evm_qspiboot_defconfig   |  1 +
 configs/apalis_imx6_defconfig           |  1 +
 configs/apalis_imx6_nospl_com_defconfig |  1 +
 configs/apalis_imx6_nospl_it_defconfig  |  1 +
 configs/axm_defconfig                   |  1 +
 configs/bk4r1_defconfig                 |  1 +
 configs/cgtqmx6eval_defconfig           |  1 +
 configs/cm_fx6_defconfig                |  1 +
 configs/cm_t3517_defconfig              |  1 +
 configs/cm_t35_defconfig                |  1 +
 configs/cm_t43_defconfig                |  1 +
 configs/colibri_imx6_defconfig          |  1 +
 configs/colibri_imx6_nospl_defconfig    |  1 +
 configs/colibri_imx7_defconfig          |  1 +
 configs/colibri_vf_defconfig            |  1 +
 configs/eco5pk_defconfig                |  1 +
 configs/gwventana_defconfig             |  1 +
 configs/highbank_defconfig              |  1 +
 configs/imx6dl_icore_mmc_defconfig      |  1 +
 configs/imx6dl_icore_nand_defconfig     |  1 +
 configs/imx6dl_icore_rqs_mmc_defconfig  |  1 +
 configs/imx6q_icore_mmc_defconfig       |  1 +
 configs/imx6q_icore_nand_defconfig      |  1 +
 configs/imx6q_icore_rqs_mmc_defconfig   |  1 +
 configs/imx6ul_geam_mmc_defconfig       |  1 +
 configs/imx6ul_geam_nand_defconfig      |  1 +
 configs/liteboard_defconfig             |  1 +
 configs/mccmon6_nor_defconfig           |  1 +
 configs/mccmon6_sd_defconfig            |  1 +
 configs/mcx_defconfig                   |  1 +
 configs/mt_ventoux_defconfig            |  1 +
 configs/mx6cuboxi_defconfig             |  1 +
 configs/mx6sabresd_spl_defconfig        |  1 +
 configs/mx6slevk_spl_defconfig          |  1 +
 configs/mx6sxsabresd_spl_defconfig      |  1 +
 configs/mx6ul_14x14_evk_defconfig       |  1 +
 configs/mx6ul_9x9_evk_defconfig         |  1 +
 configs/nokia_rx51_defconfig            |  1 +
 configs/novena_defconfig                |  1 +
 configs/omap3_evm_defconfig             |  1 +
 configs/omap3_ha_defconfig              |  1 +
 configs/openrd_base_defconfig           |  1 +
 configs/openrd_client_defconfig         |  1 +
 configs/openrd_ultimate_defconfig       |  1 +
 configs/ot1200_spl_defconfig            |  1 +
 configs/pcm052_defconfig                |  1 +
 configs/pcm058_defconfig                |  1 +
 configs/platinum_picon_defconfig        |  1 +
 configs/platinum_titanium_defconfig     |  1 +
 configs/smartweb_defconfig              |  1 +
 configs/sniper_defconfig                |  1 +
 configs/tao3530_defconfig               |  1 +
 configs/taurus_defconfig                |  1 +
 configs/tbs2910_defconfig               |  1 +
 configs/twister_defconfig               |  1 +
 configs/udoo_defconfig                  |  1 +
 configs/udoo_neo_defconfig              |  1 +
 configs/wandboard_defconfig             |  1 +
 configs/x600_defconfig                  |  1 +
 configs/xpress_spl_defconfig            |  1 +
 configs/zc5202_defconfig                |  1 +
 configs/zc5601_defconfig                |  1 +
 include/configs/apalis_imx6.h           |  1 -
 include/configs/colibri_imx6.h          |  1 -
 include/configs/colibri_imx7.h          |  2 --
 include/configs/colibri_vf.h            |  1 -
 include/configs/highbank.h              |  1 -
 include/configs/imx6_spl.h              |  1 -
 include/configs/kc1.h                   |  2 --
 include/configs/openrd.h                |  1 -
 include/configs/pcm052.h                |  2 --
 include/configs/rcar-gen2-common.h      |  2 --
 include/configs/rk3036_common.h         |  1 -
 include/configs/rk3288_common.h         |  1 -
 include/configs/smartweb.h              |  1 -
 include/configs/socfpga_common.h        |  2 --
 include/configs/stm32f429-discovery.h   |  1 -
 include/configs/stm32f746-disco.h       |  2 --
 include/configs/sunxi-common.h          |  7 -------
 include/configs/taurus.h                |  1 -
 include/configs/tbs2910.h               |  1 -
 include/configs/ti_armv7_common.h       |  2 --
 include/configs/ti_omap4_common.h       |  2 --
 include/configs/tricorder.h             |  1 -
 include/configs/x600.h                  |  1 -
 108 files changed, 124 insertions(+), 67 deletions(-)
Makefile +3 -2
index 7cbb610..b182f15 100644
@@ -624,8 +624,9 @@ KBUILD_CFLAGS += $(KCFLAGS)
 UBOOTINCLUDE    := \
 		-Iinclude \
 		$(if $(KBUILD_SRC), -I$(srctree)/include) \
-		$(if $(CONFIG_SYS_THUMB_BUILD), $(if $(CONFIG_HAS_THUMB2),, \
-			-I$(srctree)/arch/$(ARCH)/thumb1/include),) \
+		$(if $(CONFIG_$(SPL_)SYS_THUMB_BUILD), \
+			$(if $(CONFIG_HAS_THUMB2),, \
+				-I$(srctree)/arch/$(ARCH)/thumb1/include),) \
 		-I$(srctree)/arch/$(ARCH)/include \
 		-include $(srctree)/include/linux/kconfig.h
 
README +0 -8
index 4f0dbd4..0138c03 100644
@@ -592,14 +592,6 @@ The following options need to be configured:
 		Select high exception vectors of the ARM core, e.g., do not
 		clear the V bit of the c1 register of CP15.
 
-		CONFIG_SYS_THUMB_BUILD
-
-		Use this flag to build U-Boot using the Thumb instruction
-		set for ARM architectures. Thumb instruction set provides
-		better code density. For ARM architectures that support
-		Thumb2 this flag will result in Thumb2 code generated by
-		GCC.
-
 		CONFIG_ARM_ERRATA_716044
 		CONFIG_ARM_ERRATA_742230
 		CONFIG_ARM_ERRATA_743622
arch/arm/Kconfig +30 -0
index e84b74e..6806a8a 100644
@@ -112,6 +112,25 @@ config SEMIHOSTING
 	  the hosted environment to call out to the emulator to
 	  retrieve files from the host machine.
 
+config SYS_THUMB_BUILD
+	bool "Build U-Boot using the Thumb instruction set"
+	depends on !ARM64
+	help
+	   Use this flag to build U-Boot using the Thumb instruction set for
+	   ARM architectures. Thumb instruction set provides better code
+	   density. For ARM architectures that support Thumb2 this flag will
+	   result in Thumb2 code generated by GCC.
+
+config SPL_SYS_THUMB_BUILD
+	bool "Build SPL using the Thumb instruction set"
+	default y if SYS_THUMB_BUILD
+	depends on !ARM64
+	help
+	   Use this flag to build SPL using the Thumb instruction set for
+	   ARM architectures. Thumb instruction set provides better code
+	   density. For ARM architectures that support Thumb2 this flag will
+	   result in Thumb2 code generated by GCC.
+
 config SYS_L2CACHE_OFF
 	bool "L2cache off"
 	help
@@ -502,6 +521,7 @@ config ARCH_KEYSTONE
 	bool "TI Keystone"
 	select CPU_V7
 	select SUPPORT_SPL
+	select SYS_THUMB_BUILD
 	select CMD_POWEROFF
 
 config ARCH_MESON
@@ -569,20 +589,24 @@ config TARGET_MX53SMD
 config OMAP34XX
 	bool "OMAP34XX SoC"
 	select ARCH_OMAP2
+	imply SYS_THUMB_BUILD
 	select USE_TINY_PRINTF
 
 config OMAP44XX
 	bool "OMAP44XX SoC"
 	select ARCH_OMAP2
+	imply SYS_THUMB_BUILD
 	select USE_TINY_PRINTF
 
 config OMAP54XX
 	bool "OMAP54XX SoC"
 	select ARCH_OMAP2
+	select SYS_THUMB_BUILD
 
 config AM43XX
 	bool "AM43XX SoC"
 	select ARCH_OMAP2
+	imply SYS_THUMB_BUILD
 	help
 	  Support for AM43xx SOC from Texas Instruments.
 	  The AM43xx high performance SOC features a Cortex-A9
@@ -593,6 +617,7 @@ config AM43XX
 config AM33XX
 	bool "AM33XX SoC"
 	select ARCH_OMAP2
+	imply SYS_THUMB_BUILD
 	help
 	  Support for AM335x SOC from Texas Instruments.
 	  The AM335x high performance SOC features a Cortex-A8
@@ -605,6 +630,7 @@ config ARCH_RMOBILE
 	select DM
 	select DM_SERIAL
 	select BOARD_EARLY_INIT_F
+	select SYS_THUMB_BUILD
 
 config TARGET_S32V234EVB
 	bool "Support s32v234evb"
@@ -634,6 +660,7 @@ config ARCH_SOCFPGA
 	select ARCH_EARLY_INIT_R
 	select ARCH_MISC_INIT
 	select SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION
+	select SYS_THUMB_BUILD
 
 config TARGET_CM_T43
 	bool "Support cm_t43"
@@ -656,6 +683,7 @@ config ARCH_SUNXI
 	select SPL_STACK_R if SUPPORT_SPL
 	select SPL_SYS_MALLOC_SIMPLE if SUPPORT_SPL
 	select SYS_NS16550
+	select SPL_SYS_THUMB_BUILD if !ARM64
 	select USB if DISTRO_DEFAULTS
 	select USB_STORAGE if DISTRO_DEFAULTS
 	select USB_KEYBOARD if DISTRO_DEFAULTS
@@ -982,6 +1010,7 @@ config STM32
 	select CPU_V7M
 	select DM
 	select DM_SERIAL
+	select SYS_THUMB_BUILD
 
 config ARCH_ROCKCHIP
 	bool "Support Rockchip SoCs"
@@ -990,6 +1019,7 @@ config ARCH_ROCKCHIP
 	select DM
 	select SPL_DM if SPL
 	select SYS_MALLOC_F
+	select SYS_THUMB_BUILD if !ARM64
 	select SPL_SYS_MALLOC_SIMPLE if SPL
 	select DM_GPIO
 	select DM_I2C
arch/arm/config.mk +3 -5
index 3a81f13..08d7d1b 100644
@@ -31,7 +31,7 @@ PLATFORM_RELFLAGS	+= $(LLVM_RELFLAGS)
 PLATFORM_CPPFLAGS += -D__ARM__
 
 # Choose between ARM/Thumb instruction sets
-ifeq ($(CONFIG_SYS_THUMB_BUILD),y)
+ifeq ($(CONFIG_$(SPL_)SYS_THUMB_BUILD),y)
 AFLAGS_IMPLICIT_IT	:= $(call as-option,-Wa$(comma)-mimplicit-it=always)
 PF_CPPFLAGS_ARM		:= $(AFLAGS_IMPLICIT_IT) \
 			$(call cc-option, -mthumb -mthumb-interwork,\
@@ -44,8 +44,7 @@ PF_CPPFLAGS_ARM := $(call cc-option,-marm,) \
 endif
 
 # Only test once
-ifneq ($(CONFIG_SPL_BUILD),y)
-ifeq ($(CONFIG_SYS_THUMB_BUILD),y)
+ifeq ($(CONFIG_$(SPL_)SYS_THUMB_BUILD),y)
 archprepare: checkthumb
 
 checkthumb:
@@ -57,7 +56,6 @@ checkthumb:
 		false; \
 	fi
 endif
-endif
 
 # Try if EABI is supported, else fall back to old API,
 # i. e. for example:
@@ -99,7 +97,7 @@ LDFLAGS_u-boot += -pie
 #
 # http://sourceware.org/bugzilla/show_bug.cgi?id=12532
 #
-ifeq ($(CONFIG_SYS_THUMB_BUILD),y)
+ifeq ($(CONFIG_$(SPL_)SYS_THUMB_BUILD),y)
 ifeq ($(GAS_BUG_12532),)
 export GAS_BUG_12532:=$(shell if [ $(call binutils-version) -lt 0222 ] ; \
 	then echo y; else echo n; fi)
arch/arm/cpu/arm920t/Makefile +1 -1
index 1832b9d..7aa432a 100644
@@ -16,6 +16,6 @@ obj-$(CONFIG_S3C24X0) += s3c24x0/
 
 # some files can only build in ARM mode
 
-ifdef CONFIG_SYS_THUMB_BUILD
+ifdef CONFIG_$(SPL_)SYS_THUMB_BUILD
 CFLAGS_cpu.o := -marm
 endif
arch/arm/cpu/arm926ejs/Makefile +1 -1
index fe78922..0f73011 100644
@@ -23,7 +23,7 @@ obj-$(if $(filter spear,$(SOC)),y) += spear/
 
 # some files can only build in ARM or THUMB2, not THUMB1
 
-ifdef CONFIG_SYS_THUMB_BUILD
+ifdef CONFIG_$(SPL_)SYS_THUMB_BUILD
 ifndef CONFIG_HAS_THUMB2
 
 CFLAGS_cpu.o := -marm
arch/arm/cpu/arm926ejs/cache.c +1 -1
index 02cb24c..d56e594 100644
@@ -63,6 +63,6 @@ void flush_dcache_all(void)
 
 __weak void l2_cache_disable(void) {}
 
-#if defined CONFIG_SYS_THUMB_BUILD
+#if CONFIG_IS_ENABLED(SYS_THUMB_BUILD)
 __weak void invalidate_l2_cache(void) {}
 #endif
arch/arm/cpu/armv7/cache_v7_asm.S +1 -1
index a433628..bd27ab2 100644
@@ -7,7 +7,7 @@
 #include <linux/sizes.h>
 #include <asm/system.h>
 
-#ifdef CONFIG_SYS_THUMB_BUILD
+#if CONFIG_IS_ENABLED(SYS_THUMB_BUILD)
 #define ARM(x...)
 #define THUMB(x...)	x
 #else
arch/arm/cpu/pxa/cache.c +1 -1
index d26354e..30e1e34 100644
@@ -52,6 +52,6 @@ void flush_dcache_all(void)
 
 __weak void l2_cache_disable(void) {}
 
-#if defined CONFIG_SYS_THUMB_BUILD
+#if CONFIG_IS_ENABLED(SYS_THUMB_BUILD)
 __weak void invalidate_l2_cache(void) {}
 #endif
arch/arm/include/asm/assembler.h +1 -1
index c56daf2..471a408 100644
@@ -77,7 +77,7 @@
  * We disable it especially for Thumb builds since those instructions
  * are not made in a Thumb ready way...
  */
-#ifdef CONFIG_SYS_THUMB_BUILD
+#if CONFIG_IS_ENABLED(SYS_THUMB_BUILD)
 #define CALGN(code...)
 #else
 #define CALGN(code...) code
arch/arm/include/asm/cache.h +1 -1
index 5400cbe..fac65d8 100644
@@ -16,7 +16,7 @@
 /*
  * Invalidate L2 Cache using co-proc instruction
  */
-#ifdef CONFIG_SYS_THUMB_BUILD
+#if CONFIG_IS_ENABLED(SYS_THUMB_BUILD)
 void invalidate_l2_cache(void);
 #else
 static inline void invalidate_l2_cache(void)
arch/arm/include/asm/setjmp.h +1 -1
index df9934b..c3399a7 100644
@@ -39,7 +39,7 @@ static inline int setjmp(jmp_buf jmp)
 		  "x30", "cc", "memory");
 #else
 	asm volatile(
-#ifdef CONFIG_SYS_THUMB_BUILD
+#if CONFIG_IS_ENABLED(SYS_THUMB_BUILD)
 		".align 2\n"
 		"adr r0, jmp_target\n"
 		"add r0, r0, $1\n"
arch/arm/lib/Makefile +1 -1
index 166fa9e..b95e105 100644
@@ -71,7 +71,7 @@ asflags-y += -DCONFIG_ARM_ASM_UNIFIED
 
 # some files can only build in ARM or THUMB2, not THUMB1
 
-ifdef CONFIG_SYS_THUMB_BUILD
+ifdef CONFIG_$(SPL_)SYS_THUMB_BUILD
 asflags-$(CONFIG_HAS_THUMB2) += -DCONFIG_THUMB2_KERNEL
 ifndef CONFIG_HAS_THUMB2
 
arch/arm/lib/cache.c +1 -1
index 4f72f89..7683386 100644
@@ -107,7 +107,7 @@ phys_addr_t noncached_alloc(size_t size, size_t align)
 }
 #endif /* CONFIG_SYS_NONCACHED_MEMORY */
 
-#if defined(CONFIG_SYS_THUMB_BUILD)
+#if CONFIG_IS_ENABLED(SYS_THUMB_BUILD)
 void invalidate_l2_cache(void)
 {
 	unsigned int val = 0;
arch/arm/lib/crt0.S +1 -1
index 8415f77..8d2eeb8 100644
@@ -167,7 +167,7 @@ clbss_l:cmp	r0, r1			/* while not at end of BSS */
 	mov     r0, r9                  /* gd_t */
 	ldr	r1, [r9, #GD_RELOCADDR]	/* dest_addr */
 	/* call board_init_r */
-#if defined(CONFIG_SYS_THUMB_BUILD)
+#if CONFIG_IS_ENABLED(SYS_THUMB_BUILD)
 	ldr	lr, =board_init_r	/* this is auto-relocated! */
 	bx	lr
 #else
arch/arm/lib/lib1funcs.S +1 -1
index 76968ce..6e29cbf 100644
@@ -368,7 +368,7 @@ ENDPROC(Ldiv0)
 .popsection
 
 /* Thumb-1 specialities */
-#if defined(CONFIG_SYS_THUMB_BUILD) && !defined(CONFIG_HAS_THUMB2)
+#if CONFIG_IS_ENABLED(SYS_THUMB_BUILD) && !defined(CONFIG_HAS_THUMB2)
 .pushsection .text.__gnu_thumb1_case_sqi, "ax"
 ENTRY(__gnu_thumb1_case_sqi)
 	push	{r1}
arch/arm/lib/memcpy.S +1 -1
index 00602e9..588b3f8 100644
@@ -56,7 +56,7 @@
 
 /* Prototype: void *memcpy(void *dest, const void *src, size_t n); */
 	.syntax unified
-#if defined(CONFIG_SYS_THUMB_BUILD) && !defined(MEMCPY_NO_THUMB_BUILD)
+#if CONFIG_IS_ENABLED(SYS_THUMB_BUILD) && !defined(MEMCPY_NO_THUMB_BUILD)
 	.thumb
 	.thumb_func
 #endif
arch/arm/lib/memset.S +1 -1
index df053a3..cc4cc44 100644
@@ -16,7 +16,7 @@
 	.align	5
 
 	.syntax unified
-#if defined(CONFIG_SYS_THUMB_BUILD) && !defined(MEMSET_NO_THUMB_BUILD)
+#if CONFIG_IS_ENABLED(SYS_THUMB_BUILD) && !defined(MEMSET_NO_THUMB_BUILD)
 	.thumb
 	.thumb_func
 #endif
arch/arm/mach-at91/arm926ejs/Makefile +8 -0
index d36e15a..624ccd7 100644
@@ -27,3 +27,11 @@ obj-y	+= timer.o
 ifndef CONFIG_SKIP_LOWLEVEL_INIT
 obj-y	+= lowlevel_init.o
 endif
+
+ifdef CONFIG_$(SPL_)SYS_THUMB_BUILD
+ifndef CONFIG_HAS_THUMB2
+
+CFLAGS_cache.o := -marm
+
+endif
+endif
arch/arm/mach-orion5x/Makefile +1 -1
index 33dcad4..5249aa8 100644
@@ -19,7 +19,7 @@ endif
 
 # some files can only build in ARM or THUMB2, not THUMB1
 
-ifdef CONFIG_SYS_THUMB_BUILD
+ifdef CONFIG_$(SPL_)SYS_THUMB_BUILD
 ifndef CONFIG_HAS_THUMB2
 
 CFLAGS_cpu.o := -marm
configs/am335x_evm_norboot_defconfig +1 -0
index f82ca16..cb61842 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+# CONFIG_SYS_THUMB_BUILD is not set
 CONFIG_AM33XX=y
 CONFIG_TARGET_AM335X_EVM=y
 CONFIG_NOR=y
configs/am3517_crane_defconfig +1 -0
index 125abff..8417709 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+# CONFIG_SYS_THUMB_BUILD is not set
 CONFIG_OMAP34XX=y
 # CONFIG_SPL_GPIO_SUPPORT is not set
 # CONFIG_SPL_EXT_SUPPORT is not set
configs/am3517_evm_defconfig +1 -0
index be55f29..ca04ad6 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+# CONFIG_SYS_THUMB_BUILD is not set
 CONFIG_OMAP34XX=y
 # CONFIG_SPL_GPIO_SUPPORT is not set
 # CONFIG_SPL_EXT_SUPPORT is not set
configs/am43xx_evm_qspiboot_defconfig +1 -0
index a9c8726..83546ed 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+# CONFIG_SYS_THUMB_BUILD is not set
 CONFIG_AM43XX=y
 CONFIG_TARGET_AM43XX_EVM=y
 CONFIG_ISW_ENTRY_ADDR=0x30000000
configs/apalis_imx6_defconfig +1 -0
index 6b2daa9..d673745 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
configs/apalis_imx6_nospl_com_defconfig +1 -0
index 457d527..b0e0995 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_TARGET_APALIS_IMX6=y
 CONFIG_VIDEO=y
configs/apalis_imx6_nospl_it_defconfig +1 -0
index bdd4a67..231639e 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_TARGET_APALIS_IMX6=y
 CONFIG_VIDEO=y
configs/axm_defconfig +1 -0
index 5b596a2..5c77a1d 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SPL_SYS_THUMB_BUILD=y
 # CONFIG_SPL_USE_ARCH_MEMCPY is not set
 # CONFIG_SPL_USE_ARCH_MEMSET is not set
 CONFIG_ARCH_AT91=y
configs/bk4r1_defconfig +1 -0
index 964cfed..1dff0d4 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_TARGET_BK4R1=y
 CONFIG_DEFAULT_DEVICE_TREE="bk4r1"
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/phytec/pcm052/imximage.cfg,ENV_IS_IN_NAND"
configs/cgtqmx6eval_defconfig +1 -0
index 2e4ed36..25f7e2b 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
configs/cm_fx6_defconfig +1 -0
index dc7544a..ced70da 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
configs/cm_t3517_defconfig +1 -0
index 1997e56..0357b91 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+# CONFIG_SYS_THUMB_BUILD is not set
 CONFIG_OMAP34XX=y
 CONFIG_TARGET_CM_T3517=y
 CONFIG_BOOTDELAY=3
configs/cm_t35_defconfig +1 -0
index 9d23243..7f0e8b7 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+# CONFIG_SYS_THUMB_BUILD is not set
 CONFIG_OMAP34XX=y
 # CONFIG_SPL_EXT_SUPPORT is not set
 CONFIG_TARGET_CM_T35=y
configs/cm_t43_defconfig +1 -0
index 3d0907b..eaa126d 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_TARGET_CM_T43=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
configs/colibri_imx6_defconfig +1 -0
index ba06a55..80fe549 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
configs/colibri_imx6_nospl_defconfig +1 -0
index c75f7d4..7a82b48 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_TARGET_COLIBRI_IMX6=y
 CONFIG_VIDEO=y
configs/colibri_imx7_defconfig +1 -0
index 341c99d..5c051d5 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX7=y
 CONFIG_TARGET_COLIBRI_IMX7=y
 CONFIG_IMX_RDC=y
configs/colibri_vf_defconfig +1 -0
index 0a12e1a..6ba673d 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_TARGET_COLIBRI_VF=y
 CONFIG_DEFAULT_DEVICE_TREE="vf610-colibri"
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/toradex/colibri_vf/imximage.cfg,ENV_IS_IN_NAND,IMX_NAND"
configs/eco5pk_defconfig +1 -0
index cc8788d..f0fff1f 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+# CONFIG_SYS_THUMB_BUILD is not set
 CONFIG_OMAP34XX=y
 # CONFIG_SPL_EXT_SUPPORT is not set
 CONFIG_TARGET_ECO5PK=y
configs/gwventana_defconfig +1 -0
index 6cc5897..819ec3a 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
configs/highbank_defconfig +1 -0
index 20801fc..041d048 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_HIGHBANK=y
 CONFIG_FIT=y
 CONFIG_OF_BOARD_SETUP=y
configs/imx6dl_icore_mmc_defconfig +1 -0
index a74ae8b..a9767c4 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
configs/imx6dl_icore_nand_defconfig +1 -0
index 69d6b56..c4eae5d 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
configs/imx6dl_icore_rqs_mmc_defconfig +1 -0
index d9d4a0e..955c3c2 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
configs/imx6q_icore_mmc_defconfig +1 -0
index 9957e92..e49b6b4 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
configs/imx6q_icore_nand_defconfig +1 -0
index e9e41a0..8467c1c 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
configs/imx6q_icore_rqs_mmc_defconfig +1 -0
index 480a2a34..600ef38 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
configs/imx6ul_geam_mmc_defconfig +1 -0
index 1d22460..2703239 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
configs/imx6ul_geam_nand_defconfig +1 -0
index a4512c5..121b1ce 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
configs/liteboard_defconfig +1 -0
index f096471..930dc8c 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
configs/mccmon6_nor_defconfig +1 -0
index 15cf8a6..7229faa 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
configs/mccmon6_sd_defconfig +1 -0
index 23f0a31..52b80c5 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBGENERIC_SUPPORT=y
configs/mcx_defconfig +1 -0
index c73b53c..90df70a 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+# CONFIG_SYS_THUMB_BUILD is not set
 CONFIG_OMAP34XX=y
 # CONFIG_SPL_GPIO_SUPPORT is not set
 # CONFIG_SPL_EXT_SUPPORT is not set
configs/mt_ventoux_defconfig +1 -0
index c035f40..faf76c0 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+# CONFIG_SYS_THUMB_BUILD is not set
 CONFIG_OMAP34XX=y
 # CONFIG_SPL_EXT_SUPPORT is not set
 CONFIG_TARGET_MT_VENTOUX=y
configs/mx6cuboxi_defconfig +1 -0
index 0b37be9..8dc0e83 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
configs/mx6sabresd_spl_defconfig +1 -0
index a488979..3b9ea0b 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
configs/mx6slevk_spl_defconfig +1 -0
index 29e179d..822e97b 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
configs/mx6sxsabresd_spl_defconfig +1 -0
index f7cbc25..a3240f8 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
configs/mx6ul_14x14_evk_defconfig +1 -0
index 9f972c4..2c518d3 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
configs/mx6ul_9x9_evk_defconfig +1 -0
index 7663709..fe9a88c 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
configs/nokia_rx51_defconfig +1 -0
index 0b8fccf..181bdb1 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+# CONFIG_SYS_THUMB_BUILD is not set
 CONFIG_OMAP34XX=y
 CONFIG_TARGET_NOKIA_RX51=y
 CONFIG_VIDEO=y
configs/novena_defconfig +1 -0
index 641928d..e9092a3 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
configs/omap3_evm_defconfig +1 -0
index 00e052e..1e3965b 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+# CONFIG_SYS_THUMB_BUILD is not set
 CONFIG_OMAP34XX=y
 # CONFIG_SPL_EXT_SUPPORT is not set
 CONFIG_TARGET_OMAP3_EVM=y
configs/omap3_ha_defconfig +1 -0
index bf806ce..75aeefb 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+# CONFIG_SYS_THUMB_BUILD is not set
 CONFIG_OMAP34XX=y
 # CONFIG_SPL_EXT_SUPPORT is not set
 CONFIG_TARGET_TAO3530=y
configs/openrd_base_defconfig +1 -0
index 067ddbc..2abf3ab 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_KIRKWOOD=y
 CONFIG_TARGET_OPENRD=y
 CONFIG_IDENT_STRING="\nOpenRD-Base"
configs/openrd_client_defconfig +1 -0
index b90ead1..8b3f25f 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_KIRKWOOD=y
 CONFIG_TARGET_OPENRD=y
 CONFIG_IDENT_STRING="\nOpenRD-Client"
configs/openrd_ultimate_defconfig +1 -0
index 2bc8ace..ba77473 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_KIRKWOOD=y
 CONFIG_TARGET_OPENRD=y
 CONFIG_IDENT_STRING="\nOpenRD-Ultimate"
configs/ot1200_spl_defconfig +1 -0
index 0ddc2fb..1b14de8 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
configs/pcm052_defconfig +1 -0
index fbd7841..4f35a1c 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_TARGET_PCM052=y
 CONFIG_DEFAULT_DEVICE_TREE="pcm052"
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/phytec/pcm052/imximage.cfg,ENV_IS_IN_NAND"
configs/pcm058_defconfig +1 -0
index b15e25e..0a015a5 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
configs/platinum_picon_defconfig +1 -0
index 186c489..b76e837 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
configs/platinum_titanium_defconfig +1 -0
index d84e02a..3781dcc 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
configs/smartweb_defconfig +1 -0
index 2e43c41..48c8781 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SPL_SYS_THUMB_BUILD=y
 # CONFIG_SPL_USE_ARCH_MEMCPY is not set
 # CONFIG_SPL_USE_ARCH_MEMSET is not set
 CONFIG_ARCH_AT91=y
configs/sniper_defconfig +1 -0
index c3f9f37..1ffca40 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+# CONFIG_SYS_THUMB_BUILD is not set
 CONFIG_OMAP34XX=y
 # CONFIG_SPL_EXT_SUPPORT is not set
 # CONFIG_SPL_NAND_SUPPORT is not set
configs/tao3530_defconfig +1 -0
index f4171da..1a0e25e 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+# CONFIG_SYS_THUMB_BUILD is not set
 CONFIG_OMAP34XX=y
 # CONFIG_SPL_EXT_SUPPORT is not set
 CONFIG_TARGET_TAO3530=y
configs/taurus_defconfig +1 -0
index 7156227..b3d9f1f 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SPL_SYS_THUMB_BUILD=y
 # CONFIG_SPL_USE_ARCH_MEMCPY is not set
 # CONFIG_SPL_USE_ARCH_MEMSET is not set
 CONFIG_ARCH_AT91=y
configs/tbs2910_defconfig +1 -0
index 95a23d8..9ba1609 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_TARGET_TBS2910=y
 CONFIG_PRE_CONSOLE_BUFFER=y
configs/twister_defconfig +1 -0
index 826f0f1..c707368 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+# CONFIG_SYS_THUMB_BUILD is not set
 CONFIG_OMAP34XX=y
 # CONFIG_SPL_EXT_SUPPORT is not set
 CONFIG_TARGET_TWISTER=y
configs/udoo_defconfig +1 -0
index a74bd90..e9845a6 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
configs/udoo_neo_defconfig +1 -0
index 81a9cc7..89bbb25 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
configs/wandboard_defconfig +1 -0
index ccf8250..6e27169 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
configs/x600_defconfig +1 -0
index 86f6fea..a72c3d4 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 # CONFIG_SPL_USE_ARCH_MEMCPY is not set
 # CONFIG_SPL_USE_ARCH_MEMSET is not set
 CONFIG_TARGET_X600=y
configs/xpress_spl_defconfig +1 -0
index be7c87a..1f77d0c 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
configs/zc5202_defconfig +1 -0
index c1da56c..cb3bfa0 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
configs/zc5601_defconfig +1 -0
index d48fcf1..8dc1266 100644
@@ -1,4 +1,5 @@
 CONFIG_ARM=y
+CONFIG_SYS_THUMB_BUILD=y
 CONFIG_ARCH_MX6=y
 CONFIG_SPL_GPIO_SUPPORT=y
 CONFIG_SPL_LIBCOMMON_SUPPORT=y
include/configs/apalis_imx6.h +0 -1
index 9c899e4..cad0420 100644
@@ -10,7 +10,6 @@
 #define __CONFIG_H
 
 #include "mx6_common.h"
-#define CONFIG_SYS_THUMB_BUILD
 
 #undef CONFIG_DISPLAY_BOARDINFO
 #define CONFIG_DISPLAY_BOARDINFO_LATE	/* Calls show_board_info() */
include/configs/colibri_imx6.h +0 -1
index 2fbadf2..b1f6b87 100644
@@ -10,7 +10,6 @@
 #define __CONFIG_H
 
 #include "mx6_common.h"
-#define CONFIG_SYS_THUMB_BUILD
 
 #undef CONFIG_DISPLAY_BOARDINFO
 #define CONFIG_DISPLAY_BOARDINFO_LATE	/* Calls show_board_info() */
include/configs/colibri_imx7.h +0 -2
index 3da4211..4da91d3 100644
@@ -14,8 +14,6 @@
 
 #include "mx7_common.h"
 
-#define CONFIG_SYS_THUMB_BUILD
-
 /*#define CONFIG_DBG_MONITOR*/
 #define PHYS_SDRAM_SIZE			SZ_512M
 
include/configs/colibri_vf.h +0 -1
index bfd5fbd..e01be9d 100644
@@ -15,7 +15,6 @@
 #include <asm/arch/imx-regs.h>
 
 #define CONFIG_VF610
-#define CONFIG_SYS_THUMB_BUILD
 #define CONFIG_SYS_FSL_CLK
 
 #define CONFIG_DISPLAY_BOARDINFO_LATE	/* Calls show_board_info() */
include/configs/highbank.h +0 -1
index b47624a..6793732 100644
@@ -10,7 +10,6 @@
 #include <config_distro_defaults.h>
 
 #define CONFIG_SYS_DCACHE_OFF
-#define CONFIG_SYS_THUMB_BUILD
 
 #define CONFIG_SYS_BOOTMAPSZ		(16 << 20)
 
include/configs/imx6_spl.h +0 -1
index c5a035f..9097354 100644
@@ -24,7 +24,6 @@
  *    and some padding thus 'our' max size is really 0x00908000 - 0x00918000
  *    or 64KB
  */
-#define CONFIG_SYS_THUMB_BUILD
 #define CONFIG_SPL_LDSCRIPT	"arch/arm/mach-omap2/u-boot-spl.lds"
 #define CONFIG_SPL_TEXT_BASE		0x00908000
 #define CONFIG_SPL_MAX_SIZE		0x10000
include/configs/kc1.h +0 -2
index cc78a09..dd18329 100644
@@ -16,8 +16,6 @@
  * Build
  */
 
-#define CONFIG_SYS_THUMB_BUILD
-
 /*
  * CPU
  */
include/configs/openrd.h +0 -1
index 14cf3b4..19660db 100644
@@ -21,7 +21,6 @@
 #define CONFIG_KW88F6281	1	/* SOC Name */
 #define CONFIG_MACH_OPENRD_BASE	/* Machine type */
 #define CONFIG_SKIP_LOWLEVEL_INIT	/* disable board lowlevel_init */
-#define CONFIG_SYS_THUMB_BUILD
 
 /*
  * Commands configuration
include/configs/pcm052.h +0 -2
index 4909049..2cbd8fe 100644
@@ -13,8 +13,6 @@
 
 #define CONFIG_VF610
 
-#define CONFIG_SYS_THUMB_BUILD
-
 #define CONFIG_SKIP_LOWLEVEL_INIT
 
 /* Enable passing of ATAGs */
include/configs/rcar-gen2-common.h +0 -2
index 39c40d3..286b5d6 100644
@@ -14,8 +14,6 @@
 #define CONFIG_CMD_DFL
 #define CONFIG_CMD_SDRAM
 
-#define CONFIG_SYS_THUMB_BUILD
-
 /* Support File sytems */
 #define CONFIG_FAT_WRITE
 #define CONFIG_SUPPORT_VFAT
include/configs/rk3036_common.h +0 -1
index 318a52c..f07f237 100644
@@ -17,7 +17,6 @@
 #define CONFIG_SYS_MALLOC_LEN		(32 << 20)
 #define CONFIG_SYS_CBSIZE		1024
 #define CONFIG_SKIP_LOWLEVEL_INIT
-#define CONFIG_SYS_THUMB_BUILD
 
 #define CONFIG_SYS_TIMER_RATE		(24 * 1000 * 1000)
 #define CONFIG_SYS_TIMER_BASE		0x200440a0 /* TIMER5 */
include/configs/rk3288_common.h +0 -1
index b5606d4..a08c852 100644
@@ -17,7 +17,6 @@
 #define CONFIG_BAUDRATE			115200
 #define CONFIG_SYS_MALLOC_LEN		(32 << 20)
 #define CONFIG_SYS_CBSIZE		1024
-#define CONFIG_SYS_THUMB_BUILD
 
 #define CONFIG_SYS_TIMER_RATE		(24 * 1000 * 1000)
 #define	CONFIG_SYS_TIMER_BASE		0xff810020 /* TIMER7 */
include/configs/smartweb.h +0 -1
index f53f5d8..46ace67 100644
@@ -270,7 +270,6 @@
 #define CONFIG_SYS_AT91_PLLB		0x10483f0e
 
 #if defined(CONFIG_SPL_BUILD)
-#define CONFIG_SYS_THUMB_BUILD
 #define CONFIG_SYS_ICACHE_OFF
 #define CONFIG_SYS_DCACHE_OFF
 #endif
include/configs/socfpga_common.h +0 -2
index 582b04a..2f1d817 100644
@@ -9,8 +9,6 @@
 /* Virtual target or real hardware */
 #undef CONFIG_SOCFPGA_VIRTUAL_TARGET
 
-#define CONFIG_SYS_THUMB_BUILD
-
 /*
  * High level configuration
  */
include/configs/stm32f429-discovery.h +0 -1
index 69135ff..42d46b0 100644
@@ -8,7 +8,6 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
-#define CONFIG_SYS_THUMB_BUILD
 #define CONFIG_STM32F4DISCOVERY
 
 #define CONFIG_MISC_INIT_R
include/configs/stm32f746-disco.h +0 -2
index ae3211a..734dc00 100644
@@ -8,8 +8,6 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
-#define CONFIG_SYS_THUMB_BUILD
-
 #define CONFIG_SYS_FLASH_BASE		0x08000000
 #define CONFIG_SYS_INIT_SP_ADDR		0x20050000
 #define CONFIG_SYS_TEXT_BASE		0x08000000
include/configs/sunxi-common.h +0 -7
index d48bdac..e5a514f 100644
@@ -32,13 +32,6 @@
 # define CONFIG_MACH_TYPE_COMPAT_REV	1
 #endif
 
-/*
- * High Level Configuration Options
- */
-#if defined(CONFIG_SPL_BUILD) && !defined(CONFIG_ARM64)
-#define CONFIG_SYS_THUMB_BUILD	/* Thumbs mode to save space in SPL */
-#endif
-
 /* Serial & console */
 #define CONFIG_SYS_NS16550_SERIAL
 /* ns16550 reg in the low bits of cpu reg */
include/configs/taurus.h +0 -1
index ba7346c..b452ea9 100644
@@ -23,7 +23,6 @@
 #include <linux/sizes.h>
 
 #if defined(CONFIG_SPL_BUILD)
-#define CONFIG_SYS_THUMB_BUILD
 #define CONFIG_SYS_ICACHE_OFF
 #define CONFIG_SYS_DCACHE_OFF
 #endif
include/configs/tbs2910.h +0 -1
index 09a7942..f69df33 100644
@@ -12,7 +12,6 @@
 #include "mx6_common.h"
 
 /* General configuration */
-#define CONFIG_SYS_THUMB_BUILD
 
 #define CONFIG_MACH_TYPE		3980
 
include/configs/ti_armv7_common.h +0 -2
index fbe8859..ca7d6a3 100644
@@ -278,8 +278,6 @@
 #define CONFIG_CMD_SPL
 #endif
 
-#define CONFIG_SYS_THUMB_BUILD
-
 /* General parts of the framework, required. */
 #define CONFIG_SPL_BOARD_INIT
 
include/configs/ti_omap4_common.h +0 -2
index 8e0f9eb..d07cb9f 100644
@@ -18,8 +18,6 @@
 #define CONFIG_OMAP4430		1	/* which is in a 4430 */
 #define CONFIG_MISC_INIT_R
 
-#define CONFIG_SYS_THUMB_BUILD
-
 #ifndef CONFIG_SYS_L2CACHE_OFF
 #define CONFIG_SYS_L2_PL310		1
 #define CONFIG_SYS_PL310_BASE	0x48242000
include/configs/tricorder.h +0 -1
index e4b3290..5735001 100644
@@ -17,7 +17,6 @@
 #define __CONFIG_H
 
 /* High Level Configuration Options */
-#define CONFIG_SYS_THUMB_BUILD
 #define CONFIG_OMAP			/* in a TI OMAP core */
 /* Common ARM Erratas */
 #define CONFIG_ARM_ERRATA_454179
include/configs/x600.h +0 -1
index 67c70f6..082ce1f 100644
@@ -16,7 +16,6 @@
  */
 #define CONFIG_SPEAR600				/* SPEAr600 SoC */
 #define CONFIG_X600				/* on X600 board */
-#define CONFIG_SYS_THUMB_BUILD
 
 #include <asm/arch/hardware.h>
 
Signature · 1 line
2.1.4
#1 lore raw

PATCH 1/1 arm: Migrate SYS_THUMB_BUILD to Kconfig, introduce SPL_SYS_THUMB_BUILD

Hi Tom,

Quoted 3 lines · On Mon, 6 Mar 2017 13:50:10 -0500 Tom Rini <[email protected]> wrote:

Today, we have cases where we wish to build all of U-Boot in Thumb2 mode for various reasons. We also have cases where we only build SPL in Thumb2 mode due to size constraints and wish to build the rest of the system in ARM mode.

Is there a good real world example of this particular use case? Even if there is enough space for having the U-Boot binary built in ARM mode, Thumb2 is still smaller and loads faster. And having reduced boot time is always nice.

Quoted 5 lines

So in this migration we introduce a new symbol as well, SPL_SYS_THUMB_BUILD to control if we build everything or just SPL (or in theory, just U-Boot) in Thumb2 mode.

[...]

Signature · 2 lines
Best regards,
Siarhei Siamashka
author
#2 lore raw

PATCH 1/1 arm: Migrate SYS_THUMB_BUILD to Kconfig, introduce SPL_SYS_THUMB_BUILD

Quoted 5 lines · Siarhei Siamashka

Hi Tom,

On Mon, 6 Mar 2017 13:50:10 -0500
Tom Rini <[email protected]> wrote:

Quoted 8 lines
Quoted 3 lines

Today, we have cases where we wish to build all of U-Boot in Thumb2 mode for various reasons. We also have cases where we only build SPL in Thumb2 mode due to size constraints and wish to build the rest of the system in ARM mode.

Is there a good real world example of this particular use case? Even if there is enough space for having the U-Boot binary built in ARM mode, Thumb2 is still smaller and loads faster. And having reduced boot time is always nice.

So, good question. At the moment, I'm not trying to change existing behavior. I also seem to recall that Thumb2 being a performance win depends on what you're doing. It would certainly be worth doing some tests to see if on say Allwinner where today we don't do the main U-Boot in Thumb2 mode there is a noticable change as it looked like a pretty big size win.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170306/acf1ae21/attachment.sig>
#3 lore raw

PATCH 1/1 arm: Migrate SYS_THUMB_BUILD to Kconfig, introduce SPL_SYS_THUMB_BUILD

Quoted 15 lines · On Mon, 6 Mar 2017 17:54:17 -0500 Tom Rini <[email protected]> wrote:
Quoted 5 lines · Siarhei Siamashka

Hi Tom,

On Mon, 6 Mar 2017 13:50:10 -0500
Tom Rini <[email protected]> wrote:

Quoted 8 lines
Quoted 3 lines

Today, we have cases where we wish to build all of U-Boot in Thumb2 mode for various reasons. We also have cases where we only build SPL in Thumb2 mode due to size constraints and wish to build the rest of the system in ARM mode.

Is there a good real world example of this particular use case? Even if there is enough space for having the U-Boot binary built in ARM mode, Thumb2 is still smaller and loads faster. And having reduced boot time is always nice.

Quoted 6 lines

So, good question. At the moment, I'm not trying to change existing behavior. I also seem to recall that Thumb2 being a performance win depends on what you're doing. It would certainly be worth doing some tests to see if on say Allwinner where today we don't do the main U-Boot in Thumb2 mode there is a noticable change as it looked like a pretty big size win.

Hmm, you are right. Currently the 'sunxi-common.h' file has the following lines:

  #if defined(CONFIG_SPL_BUILD) && !defined(CONFIG_ARM64)
  #define CONFIG_SYS_THUMB_BUILD  /* Thumbs mode to save space in SPL */
  #endif

I even did not know and was not careful enough to ever notice that sunxi builds the main U-Boot binary in ARM mode. This just seems to be weird. Basically, you are introducing two separate Kconfig options just to accommodate the current sunxi configuration, right?

I guess, the next step would be to fix sunxi to use Thumb2 everywhere :-)

Now your patch at least makes sense and looks good to me.

Signature · 2 lines
Best regards,
Siarhei Siamashka
author
#4 lore raw

PATCH 1/1 arm: Migrate SYS_THUMB_BUILD to Kconfig, introduce SPL_SYS_THUMB_BUILD

Quoted 28 lines · Siarhei Siamashka
Quoted 15 lines · On Mon, 6 Mar 2017 17:54:17 -0500 Tom Rini <[email protected]> wrote:
Quoted 5 lines · Siarhei Siamashka

Hi Tom,

On Mon, 6 Mar 2017 13:50:10 -0500
Tom Rini <[email protected]> wrote:

Quoted 8 lines
Quoted 3 lines

Today, we have cases where we wish to build all of U-Boot in Thumb2 mode for various reasons. We also have cases where we only build SPL in Thumb2 mode due to size constraints and wish to build the rest of the system in ARM mode.

Is there a good real world example of this particular use case? Even if there is enough space for having the U-Boot binary built in ARM mode, Thumb2 is still smaller and loads faster. And having reduced boot time is always nice.

Quoted 6 lines

So, good question. At the moment, I'm not trying to change existing behavior. I also seem to recall that Thumb2 being a performance win depends on what you're doing. It would certainly be worth doing some tests to see if on say Allwinner where today we don't do the main U-Boot in Thumb2 mode there is a noticable change as it looked like a pretty big size win.

Hmm, you are right. Currently the 'sunxi-common.h' file has the following lines:

Quoted 8 lines
  #if defined(CONFIG_SPL_BUILD) && !defined(CONFIG_ARM64)
  #define CONFIG_SYS_THUMB_BUILD  /* Thumbs mode to save space in SPL */
  #endif

I even did not know and was not careful enough to ever notice that sunxi builds the main U-Boot binary in ARM mode. This just seems to be weird. Basically, you are introducing two separate Kconfig options just to accommodate the current sunxi configuration, right?

Along with some at91 (arm926ej-s based) platforms. In all cases the root problem was "Oh, we can't fit SPL in our size constraint, lets tweak it like this".

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170306/de9dd628/attachment.sig>