[RESEND PATCH v1 0/9] toradex: Misc fixes for v2020.10

Includes: - Using splashscreen env variable instead of wrongly added function for showing boot logo. - Providing fdtfile value in preboot script/or in default env instead of setting it in bootcmd.
Igor Opaniuk (9): colibri-imx6ull: use splashcreen value instead of legacy function colibri_imx7: use splashcreen value instead of legacy function toradex: drop legacy show_boot_logo function and use splashscreen colibri_imx7: wrap video specific funcs with ifdefs colibri-imx6ull: use preboot for fdtfile evaluation colibri_vf: use preboot for fdtfile evaluation colibri_imx7: use preboot for fdtfile evaluation colibri_imx6: provide fdtfile in env instead of setting it in runtime apalis_imx6: provide fdtfile in env instead of setting it in runtime
.../toradex/colibri-imx6ull/colibri-imx6ull.c | 2 -- board/toradex/colibri_imx7/colibri_imx7.c | 4 ++-- board/toradex/common/tdx-common.c | 19 ------------------- configs/colibri-imx6ull_defconfig | 2 ++ configs/colibri_imx7_defconfig | 2 ++ configs/colibri_imx7_emmc_defconfig | 2 ++ configs/colibri_vf_defconfig | 2 ++ include/configs/apalis_imx6.h | 3 ++- include/configs/colibri-imx6ull.h | 9 ++++----- include/configs/colibri_imx6.h | 3 ++- include/configs/colibri_imx7.h | 5 ++--- include/configs/colibri_vf.h | 3 +-- 12 files changed, 21 insertions(+), 35 deletions(-)

From: Igor Opaniuk igor.opaniuk@toradex.com
Set proper splashscreen env value instead of calling legacy function to show embed boot logo.
Fixes: 391c712dde("colibri-imx6ull: show boot logo") Signed-off-by: Igor Opaniuk igor.opaniuk@toradex.com ---
board/toradex/colibri-imx6ull/colibri-imx6ull.c | 2 -- include/configs/colibri-imx6ull.h | 1 + 2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/board/toradex/colibri-imx6ull/colibri-imx6ull.c b/board/toradex/colibri-imx6ull/colibri-imx6ull.c index 89b99a0b74..45f8da3c42 100644 --- a/board/toradex/colibri-imx6ull/colibri-imx6ull.c +++ b/board/toradex/colibri-imx6ull/colibri-imx6ull.c @@ -173,8 +173,6 @@ int board_late_init(void)
#if defined(CONFIG_DM_VIDEO) setup_lcd(); - - show_boot_logo(); #endif
return 0; diff --git a/include/configs/colibri-imx6ull.h b/include/configs/colibri-imx6ull.h index 2fdcdefa32..530240f069 100644 --- a/include/configs/colibri-imx6ull.h +++ b/include/configs/colibri-imx6ull.h @@ -111,6 +111,7 @@ "fatload ${interface} 0:1 ${loadaddr} " \ "${board}/flash_blk.img && source ${loadaddr}\0" \ "splashpos=m,m\0" \ + "splashimage=" __stringify(CONFIG_LOADADDR) "\0" \ "videomode=video=ctfb:x:640,y:480,depth:18,pclk:39722,le:48,ri:16,up:33,lo:10,hs:96,vs:2,sync:0,vmode:0\0" \ "vidargs=video=mxsfb:640x480M-16@60"

From: Igor Opaniuk igor.opaniuk@toradex.com Set proper splashscreen env value instead of calling legacy function to show embed boot logo. Fixes: 391c712dde("colibri-imx6ull: show boot logo") Signed-off-by: Igor Opaniuk igor.opaniuk@toradex.com
Applied to u-boot-imx, master, thanks !
Best regards, Stefano Babic

From: Igor Opaniuk igor.opaniuk@toradex.com
Set proper splashscreen env value instead of calling legacy function to show embed boot logo.
Fixes: 195011b24d("colibri-imx7: fix splash logo drawing") Signed-off-by: Igor Opaniuk igor.opaniuk@toradex.com ---
board/toradex/colibri_imx7/colibri_imx7.c | 2 -- include/configs/colibri_imx7.h | 1 + 2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/board/toradex/colibri_imx7/colibri_imx7.c b/board/toradex/colibri_imx7/colibri_imx7.c index 14df3fc42c..b087cb0dc7 100644 --- a/board/toradex/colibri_imx7/colibri_imx7.c +++ b/board/toradex/colibri_imx7/colibri_imx7.c @@ -356,8 +356,6 @@ int board_late_init(void) { #if defined(CONFIG_DM_VIDEO) setup_lcd(); - - show_boot_logo(); #endif return 0; } diff --git a/include/configs/colibri_imx7.h b/include/configs/colibri_imx7.h index 79aa735ccb..8cc5a36996 100644 --- a/include/configs/colibri_imx7.h +++ b/include/configs/colibri_imx7.h @@ -173,6 +173,7 @@ "fatload ${interface} 0:1 ${loadaddr} " \ "${board}/flash_blk.img && source ${loadaddr}\0" \ "splashpos=m,m\0" \ + "splashimage=" __stringify(CONFIG_LOADADDR) "\0" \ "videomode=video=ctfb:x:640,y:480,depth:18,pclk:39722,le:48,ri:16,up:33,lo:10,hs:96,vs:2,sync:0,vmode:0\0" \ "updlevel=2\0"

From: Igor Opaniuk igor.opaniuk@toradex.com Set proper splashscreen env value instead of calling legacy function to show embed boot logo. Fixes: 195011b24d("colibri-imx7: fix splash logo drawing") Signed-off-by: Igor Opaniuk igor.opaniuk@toradex.com
Applied to u-boot-imx, master, thanks !
Best regards, Stefano Babic

From: Igor Opaniuk igor.opaniuk@toradex.com
Drop show_boot_logo legacy function, as splashscreen functionality can be used instead.
Fixes: d324189772("toradex: common: show boot logo") Signed-off-by: Igor Opaniuk igor.opaniuk@toradex.com ---
board/toradex/common/tdx-common.c | 19 ------------------- 1 file changed, 19 deletions(-)
diff --git a/board/toradex/common/tdx-common.c b/board/toradex/common/tdx-common.c index fe5295f94b..a3d287ed5e 100644 --- a/board/toradex/common/tdx-common.c +++ b/board/toradex/common/tdx-common.c @@ -203,22 +203,3 @@ int ft_common_board_setup(void *blob, struct bd_info *bd) }
#endif /* CONFIG_TDX_CFG_BLOCK */ - -#if defined(CONFIG_DM_VIDEO) -int show_boot_logo(void) -{ - struct udevice *dev; - int ret; - int xpos, ypos; - - splash_get_pos(&xpos, &ypos); - - ret = uclass_get_device(UCLASS_VIDEO, 0, &dev); - if (ret) - return ret; - - ret = video_bmp_display(dev, (ulong)bmp_logo_bitmap, xpos, ypos, true); - - return ret; -} -#endif /* CONFIG_DM_VIDEO */

From: Igor Opaniuk igor.opaniuk@toradex.com Drop show_boot_logo legacy function, as splashscreen functionality can be used instead. Fixes: d324189772("toradex: common: show boot logo") Signed-off-by: Igor Opaniuk igor.opaniuk@toradex.com
Applied to u-boot-imx, master, thanks !
Best regards, Stefano Babic

From: Igor Opaniuk igor.opaniuk@toradex.com
Wrap video specific functionality with ifdefs.
Fixes: 195011b24d("colibri-imx7: fix splash logo drawing") Signed-off-by: Igor Opaniuk igor.opaniuk@toradex.com ---
board/toradex/colibri_imx7/colibri_imx7.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/board/toradex/colibri_imx7/colibri_imx7.c b/board/toradex/colibri_imx7/colibri_imx7.c index b087cb0dc7..8afe1bfd5e 100644 --- a/board/toradex/colibri_imx7/colibri_imx7.c +++ b/board/toradex/colibri_imx7/colibri_imx7.c @@ -133,8 +133,10 @@ static int setup_lcd(void) */ void board_preboot_os(void) { +#ifdef CONFIG_DM_VIDEO gpio_direction_output(GPIO_PWM_A, 1); gpio_direction_output(GPIO_BL_ON, 0); +#endif }
static void setup_iomux_uart(void)

From: Igor Opaniuk igor.opaniuk@toradex.com Wrap video specific functionality with ifdefs. Fixes: 195011b24d("colibri-imx7: fix splash logo drawing") Signed-off-by: Igor Opaniuk igor.opaniuk@toradex.com
Applied to u-boot-imx, master, thanks !
Best regards, Stefano Babic

From: Igor Opaniuk igor.opaniuk@toradex.com
Enable and set preboot var with fdtfile evaluation. preboot will be checked and run immediately before starting the CONFIG_BOOTDELAY countdown and/or running the auto-boot command resp. entering interactive mode.
This provides possibility to use different boot cmds in interactive mode without manual setting fdtfile value, as it it's already evaluated before entering interactive mode.
Fixes: board: 31b1e17f44("toradex: add Colibri iMX6ULL support") Signed-off-by: Igor Opaniuk igor.opaniuk@toradex.com ---
configs/colibri-imx6ull_defconfig | 2 ++ include/configs/colibri-imx6ull.h | 8 +++----- 2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/configs/colibri-imx6ull_defconfig b/configs/colibri-imx6ull_defconfig index 3defaf0ccc..6ef5dff2db 100644 --- a/configs/colibri-imx6ull_defconfig +++ b/configs/colibri-imx6ull_defconfig @@ -14,6 +14,8 @@ CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/toradex/colibri-imx6ull/imximage.cfg, CONFIG_BOOTDELAY=1 # CONFIG_USE_BOOTCOMMAND is not set # CONFIG_CONSOLE_MUX is not set +CONFIG_USE_PREBOOT=y +CONFIG_PREBOOT="setenv fdtfile imx6ull-colibri${variant}-${fdt_board}.dtb" CONFIG_SYS_CONSOLE_IS_IN_ENV=y CONFIG_VERSION_VARIABLE=y # CONFIG_DISPLAY_BOARDINFO is not set diff --git a/include/configs/colibri-imx6ull.h b/include/configs/colibri-imx6ull.h index 530240f069..63b3fef34c 100644 --- a/include/configs/colibri-imx6ull.h +++ b/include/configs/colibri-imx6ull.h @@ -35,8 +35,6 @@ #define CONFIG_NETMASK 255.255.255.0 #define CONFIG_SERVERIP 192.168.10.1
-#define FDT_FILE "imx6ull-colibri${variant}-${fdt_board}.dtb" - #define MEM_LAYOUT_ENV_SETTINGS \ "bootm_size=0x10000000\0" \ "fdt_addr_r=0x82100000\0" \ @@ -57,7 +55,7 @@ "setenv bootargs ${defargs} ${nfsargs} " \ "${setupargs} ${vidargs}; echo Booting from NFS...;" \ "dhcp ${kernel_addr_r} && " \ - "tftp ${fdt_addr_r} " FDT_FILE " && " \ + "tftp ${fdt_addr_r} ${fdtfile} && " \ "run fdt_fixup && bootz ${kernel_addr_r} - ${fdt_addr_r}\0" \
#define UBI_BOOTCMD \ @@ -71,8 +69,8 @@ "ubi read ${fdt_addr_r} dtb && " \ "run fdt_fixup && bootz ${kernel_addr_r} - ${fdt_addr_r}\0" \
-#define CONFIG_BOOTCOMMAND "run ubiboot; " \ - "setenv fdtfile " FDT_FILE " && run distro_bootcmd;" +/* Run Distro Boot script if ubiboot fails */ +#define CONFIG_BOOTCOMMAND "run ubiboot || run distro_bootcmd;"
#define BOOT_TARGET_DEVICES(func) \ func(MMC, mmc, 0) \

From: Igor Opaniuk igor.opaniuk@toradex.com Enable and set preboot var with fdtfile evaluation. preboot will be checked and run immediately before starting the CONFIG_BOOTDELAY countdown and/or running the auto-boot command resp. entering interactive mode. This provides possibility to use different boot cmds in interactive mode without manual setting fdtfile value, as it it's already evaluated before entering interactive mode. Fixes: board: 31b1e17f44("toradex: add Colibri iMX6ULL support") Signed-off-by: Igor Opaniuk igor.opaniuk@toradex.com
Applied to u-boot-imx, master, thanks !
Best regards, Stefano Babic

From: Igor Opaniuk igor.opaniuk@toradex.com
Enable and set preboot var with fdtfile evaluation. preboot will be checked and run immediately before starting the CONFIG_BOOTDELAY countdown and/or running the auto-boot command resp. entering interactive mode.
This provides possibility to use different boot cmds in interactive mode without manual setting fdtfile value, as it it's already evaluated before entering interactive mode.
Fixes: 304042c1f3("colibri_vf: set fdtfile for distroboot") Signed-off-by: Igor Opaniuk igor.opaniuk@toradex.com ---
configs/colibri_vf_defconfig | 2 ++ include/configs/colibri_vf.h | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/configs/colibri_vf_defconfig b/configs/colibri_vf_defconfig index b145b9f699..def64b1043 100644 --- a/configs/colibri_vf_defconfig +++ b/configs/colibri_vf_defconfig @@ -11,6 +11,8 @@ CONFIG_TARGET_COLIBRI_VF=y CONFIG_DEFAULT_DEVICE_TREE="vf610-colibri" CONFIG_ENV_VARS_UBOOT_CONFIG=y CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/toradex/colibri_vf/imximage.cfg,IMX_NAND" +CONFIG_USE_PREBOOT=y +CONFIG_PREBOOT="setenv fdtfile ${soc}-colibri-${fdt_board}.dtb" CONFIG_BOOTDELAY=1 CONFIG_LOGLEVEL=3 CONFIG_VERSION_VARIABLE=y diff --git a/include/configs/colibri_vf.h b/include/configs/colibri_vf.h index 86d4621f85..cae7c14bfb 100644 --- a/include/configs/colibri_vf.h +++ b/include/configs/colibri_vf.h @@ -76,8 +76,7 @@ "ubi read ${fdt_addr_r} dtb && " \ "run fdt_fixup && bootz ${kernel_addr_r} - ${fdt_addr_r}\0" \
-#define CONFIG_BOOTCOMMAND "run ubiboot; " \ - "setenv fdtfile ${soc}-colibri-${fdt_board}.dtb && run distro_bootcmd;" +#define CONFIG_BOOTCOMMAND "run ubiboot || run distro_bootcmd;"
#define BOOT_TARGET_DEVICES(func) \ func(MMC, mmc, 0) \

From: Igor Opaniuk igor.opaniuk@toradex.com Enable and set preboot var with fdtfile evaluation. preboot will be checked and run immediately before starting the CONFIG_BOOTDELAY countdown and/or running the auto-boot command resp. entering interactive mode. This provides possibility to use different boot cmds in interactive mode without manual setting fdtfile value, as it it's already evaluated before entering interactive mode. Fixes: 304042c1f3("colibri_vf: set fdtfile for distroboot") Signed-off-by: Igor Opaniuk igor.opaniuk@toradex.com
Applied to u-boot-imx, master, thanks !
Best regards, Stefano Babic

From: Igor Opaniuk igor.opaniuk@toradex.com
Enable and set preboot var with fdtfile evaluation. preboot will be checked and run immediately before starting the CONFIG_BOOTDELAY countdown and/or running the auto-boot command resp. entering interactive mode.
This provides possibility to use different boot cmds in interactive mode without manual setting fdtfile value, as it it's already evaluated before entering interactive mode.
Fixes: a62c60610f("colibri_imx7_emmc: add Colibri iMX7D 1GB (eMMC) module support") Signed-off-by: Igor Opaniuk igor.opaniuk@toradex.com ---
configs/colibri_imx7_defconfig | 2 ++ configs/colibri_imx7_emmc_defconfig | 2 ++ include/configs/colibri_imx7.h | 4 +--- 3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/configs/colibri_imx7_defconfig b/configs/colibri_imx7_defconfig index f33ca11a4a..a13a4bcda5 100644 --- a/configs/colibri_imx7_defconfig +++ b/configs/colibri_imx7_defconfig @@ -12,6 +12,8 @@ CONFIG_IMX_HAB=y CONFIG_DEFAULT_DEVICE_TREE="imx7-colibri-rawnand" CONFIG_DISTRO_DEFAULTS=y CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/toradex/colibri_imx7/imximage.cfg,MX7D" +CONFIG_USE_PREBOOT=y +CONFIG_PREBOOT="setenv fdtfile ${soc}-colibri-${fdt_board}.dtb " CONFIG_BOOTDELAY=1 # CONFIG_USE_BOOTCOMMAND is not set # CONFIG_CONSOLE_MUX is not set diff --git a/configs/colibri_imx7_emmc_defconfig b/configs/colibri_imx7_emmc_defconfig index e4b0c99d4f..c8b6ce79b0 100644 --- a/configs/colibri_imx7_emmc_defconfig +++ b/configs/colibri_imx7_emmc_defconfig @@ -14,6 +14,8 @@ CONFIG_DEFAULT_DEVICE_TREE="imx7-colibri-emmc" CONFIG_DISTRO_DEFAULTS=y CONFIG_FIT=y CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/toradex/colibri_imx7/imximage.cfg,MX7D" +CONFIG_USE_PREBOOT=y +CONFIG_PREBOOT="setenv fdtfile ${soc}-colibri-emmc-${fdt_board}.dtb" CONFIG_BOOTDELAY=1 # CONFIG_USE_BOOTCOMMAND is not set # CONFIG_CONSOLE_MUX is not set diff --git a/include/configs/colibri_imx7.h b/include/configs/colibri_imx7.h index 8cc5a36996..76088d53a3 100644 --- a/include/configs/colibri_imx7.h +++ b/include/configs/colibri_imx7.h @@ -118,13 +118,11 @@
#if defined(CONFIG_TARGET_COLIBRI_IMX7_NAND) #define CONFIG_BOOTCOMMAND "run ubiboot ; echo ; echo ubiboot failed ; " \ - "setenv fdtfile ${soc}-colibri-${fdt_board}.dtb && run distro_bootcmd;" + "run distro_bootcmd;" #define MODULE_EXTRA_ENV_SETTINGS \ "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \ UBI_BOOTCMD #elif defined(CONFIG_TARGET_COLIBRI_IMX7_EMMC) -#define CONFIG_BOOTCOMMAND \ - "setenv fdtfile ${soc}-colibri-emmc-${fdt_board}.dtb && run distro_bootcmd;" #define MODULE_EXTRA_ENV_SETTINGS \ "variant=-emmc\0" \ EMMC_ANDROID_BOOTCMD

From: Igor Opaniuk igor.opaniuk@toradex.com Enable and set preboot var with fdtfile evaluation. preboot will be checked and run immediately before starting the CONFIG_BOOTDELAY countdown and/or running the auto-boot command resp. entering interactive mode. This provides possibility to use different boot cmds in interactive mode without manual setting fdtfile value, as it it's already evaluated before entering interactive mode. Fixes: a62c60610f("colibri_imx7_emmc: add Colibri iMX7D 1GB (eMMC) module support") Signed-off-by: Igor Opaniuk igor.opaniuk@toradex.com
Applied to u-boot-imx, master, thanks !
Best regards, Stefano Babic

From: Igor Opaniuk igor.opaniuk@toradex.com
Provide fdtfile value in default env instead of setting it dynamically in runtime.
Fixes: 85cb2bc686("apalis/colibri imx6: provide proper fdtfile value") Signed-off-by: Igor Opaniuk igor.opaniuk@toradex.com ---
include/configs/colibri_imx6.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/configs/colibri_imx6.h b/include/configs/colibri_imx6.h index 13b03a594e..097e620de4 100644 --- a/include/configs/colibri_imx6.h +++ b/include/configs/colibri_imx6.h @@ -118,7 +118,7 @@ #define FDT_FILE "imx6dl-colibri-eval-v3.dtb" #define CONFIG_EXTRA_ENV_SETTINGS \ BOOTENV \ - "bootcmd=setenv fdtfile ${fdt_file}; run distro_bootcmd; " \ + "bootcmd=run distro_bootcmd; " \ "usb start ; " \ "setenv stdout serial,vidconsole; " \ "setenv stdin serial,usbkbd\0" \ @@ -126,6 +126,7 @@ "console=ttymxc0\0" \ "defargs=enable_wait_mode=off galcore.contiguousSize=50331648\0" \ "fdt_file=" FDT_FILE "\0" \ + "fdtfile=" FDT_FILE "\0" \ "fdt_fixup=;\0" \ MEM_LAYOUT_ENV_SETTINGS \ NFS_BOOTCMD \

From: Igor Opaniuk igor.opaniuk@toradex.com Provide fdtfile value in default env instead of setting it dynamically in runtime. Fixes: 85cb2bc686("apalis/colibri imx6: provide proper fdtfile value") Signed-off-by: Igor Opaniuk igor.opaniuk@toradex.com
Applied to u-boot-imx, master, thanks !
Best regards, Stefano Babic

From: Igor Opaniuk igor.opaniuk@toradex.com
Provide fdtfile value in default env instead of setting it dynamically in runtime.
Fixes: 85cb2bc686("apalis/colibri imx6: provide proper fdtfile value") Signed-off-by: Igor Opaniuk igor.opaniuk@toradex.com ---
include/configs/apalis_imx6.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/configs/apalis_imx6.h b/include/configs/apalis_imx6.h index 9bc70f979a..4cffc7f887 100644 --- a/include/configs/apalis_imx6.h +++ b/include/configs/apalis_imx6.h @@ -135,7 +135,7 @@ #endif #define CONFIG_EXTRA_ENV_SETTINGS \ BOOTENV \ - "bootcmd=setenv fdtfile ${fdt_file}; run distro_bootcmd ; " \ + "bootcmd=run distro_bootcmd ; " \ "usb start ; " \ "setenv stdout serial,vidconsole; " \ "setenv stdin serial,usbkbd\0" \ @@ -143,6 +143,7 @@ "console=ttymxc0\0" \ "defargs=enable_wait_mode=off vmalloc=400M\0" \ "fdt_file=" FDT_FILE "\0" \ + "fdtfile=" FDT_FILE "\0" \ "fdt_fixup=;\0" \ MEM_LAYOUT_ENV_SETTINGS \ NFS_BOOTCMD \

From: Igor Opaniuk igor.opaniuk@toradex.com Provide fdtfile value in default env instead of setting it dynamically in runtime. Fixes: 85cb2bc686("apalis/colibri imx6: provide proper fdtfile value") Signed-off-by: Igor Opaniuk igor.opaniuk@toradex.com
Applied to u-boot-imx, master, thanks !
Best regards, Stefano Babic
participants (2)
-
Igor Opaniuk
-
sbabic@denx.de