Skip to contentSkip to conversation

toradex: Misc fixes for v2020.10

PATCH Superseded Igor Opaniuk 2 participants 12 messages Sep 14, 2020 – Sep 16, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover 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(-)
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/9 colibri-imx6ull: use splashcreen value instead of legacy function

From: Igor Opaniuk <[email protected]>

Set proper splashscreen env value instead of calling legacy function to show embed boot logo.

Fixes 391c712dde("colibri-imx6ull: show boot logo")

---

 board/toradex/colibri-imx6ull/colibri-imx6ull.c | 2 --
 include/configs/colibri-imx6ull.h               | 1 +
 2 files changed, 1 insertion(+), 2 deletions(-)
board/toradex/colibri-imx6ull/colibri-imx6ull.c +0 -2
index 89b99a0b74..45f8da3c42 100644
@@ -173,8 +173,6 @@ int board_late_init(void)
 
 #if defined(CONFIG_DM_VIDEO)
 	setup_lcd();
-
-	show_boot_logo();
 #endif
 
 	return 0;
include/configs/colibri-imx6ull.h +1 -0
index 2fdcdefa32..530240f069 100644
@@ -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 at 60"
 
Signature · 1 line
2.17.1
#2 lore raw

PATCH 2/9 colibri_imx7: use splashcreen value instead of legacy function

In reply to Igor Opaniuk

From: Igor Opaniuk <[email protected]>

Set proper splashscreen env value instead of calling legacy function to show embed boot logo.

Fixes 195011b24d("colibri-imx7: fix splash logo drawing")

---

 board/toradex/colibri_imx7/colibri_imx7.c | 2 --
 include/configs/colibri_imx7.h            | 1 +
 2 files changed, 1 insertion(+), 2 deletions(-)
board/toradex/colibri_imx7/colibri_imx7.c +0 -2
index 14df3fc42c..b087cb0dc7 100644
@@ -356,8 +356,6 @@ int board_late_init(void)
 {
 #if defined(CONFIG_DM_VIDEO)
 	setup_lcd();
-
-	show_boot_logo();
 #endif
 	return 0;
 }
include/configs/colibri_imx7.h +1 -0
index 79aa735ccb..8cc5a36996 100644
@@ -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"
 
Signature · 1 line
2.17.1
#3 lore raw

PATCH 3/9 toradex: drop legacy show_boot_logo function and use splashscreen

In reply to Igor Opaniuk

From: Igor Opaniuk <[email protected]>

Drop show_boot_logo legacy function, as splashscreen functionality can be used instead.

Fixes d324189772("toradex: common: show boot logo")

---

 board/toradex/common/tdx-common.c | 19 -------------------
 1 file changed, 19 deletions(-)
board/toradex/common/tdx-common.c +0 -19
index fe5295f94b..a3d287ed5e 100644
@@ -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 */
Signature · 1 line
2.17.1
#4 lore raw

PATCH 4/9 colibri_imx7: wrap video specific funcs with ifdefs

In reply to Igor Opaniuk

From: Igor Opaniuk <[email protected]>

Wrap video specific functionality with ifdefs.

Fixes 195011b24d("colibri-imx7: fix splash logo drawing")

---

 board/toradex/colibri_imx7/colibri_imx7.c | 2 ++
 1 file changed, 2 insertions(+)
board/toradex/colibri_imx7/colibri_imx7.c +2 -0
index b087cb0dc7..8afe1bfd5e 100644
@@ -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)
Signature · 1 line
2.17.1
#5 lore raw

PATCH 5/9 colibri-imx6ull: use preboot for fdtfile evaluation

In reply to Igor Opaniuk

From: Igor Opaniuk <[email protected]>

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")

---

 configs/colibri-imx6ull_defconfig | 2 ++
 include/configs/colibri-imx6ull.h | 8 +++-----
 2 files changed, 5 insertions(+), 5 deletions(-)
configs/colibri-imx6ull_defconfig +2 -0
index 3defaf0ccc..6ef5dff2db 100644
@@ -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
include/configs/colibri-imx6ull.h +3 -5
index 530240f069..63b3fef34c 100644
@@ -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) \
Signature · 1 line
2.17.1
#6 lore raw

PATCH 6/9 colibri_vf: use preboot for fdtfile evaluation

In reply to Igor Opaniuk

From: Igor Opaniuk <[email protected]>

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")

---

 configs/colibri_vf_defconfig | 2 ++
 include/configs/colibri_vf.h | 3 +--
 2 files changed, 3 insertions(+), 2 deletions(-)
configs/colibri_vf_defconfig +2 -0
index b145b9f699..def64b1043 100644
@@ -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
include/configs/colibri_vf.h +1 -2
index 86d4621f85..cae7c14bfb 100644
@@ -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) \
Signature · 1 line
2.17.1
#7 lore raw

PATCH 7/9 colibri_imx7: use preboot for fdtfile evaluation

In reply to Igor Opaniuk

From: Igor Opaniuk <[email protected]>

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")

---

 configs/colibri_imx7_defconfig      | 2 ++
 configs/colibri_imx7_emmc_defconfig | 2 ++
 include/configs/colibri_imx7.h      | 4 +---
 3 files changed, 5 insertions(+), 3 deletions(-)
configs/colibri_imx7_defconfig +2 -0
index f33ca11a4a..a13a4bcda5 100644
@@ -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
configs/colibri_imx7_emmc_defconfig +2 -0
index e4b0c99d4f..c8b6ce79b0 100644
@@ -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
include/configs/colibri_imx7.h +1 -3
index 8cc5a36996..76088d53a3 100644
@@ -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
Signature · 1 line
2.17.1
#8 lore raw

PATCH 8/9 colibri_imx6: provide fdtfile in env instead of setting it in runtime

In reply to Igor Opaniuk

From: Igor Opaniuk <[email protected]>

Provide fdtfile value in default env instead of setting it dynamically in runtime.

Fixes 85cb2bc686("apalis/colibri imx6: provide proper fdtfile value")

---

 include/configs/colibri_imx6.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
include/configs/colibri_imx6.h +2 -1
index 13b03a594e..097e620de4 100644
@@ -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 \
Signature · 1 line
2.17.1
#9 lore raw

PATCH 9/9 apalis_imx6: provide fdtfile in env instead of setting it in runtime

In reply to Igor Opaniuk

From: Igor Opaniuk <[email protected]>

Provide fdtfile value in default env instead of setting it dynamically in runtime.

Fixes 85cb2bc686("apalis/colibri imx6: provide proper fdtfile value")

---

 include/configs/apalis_imx6.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
include/configs/apalis_imx6.h +2 -1
index 9bc70f979a..4cffc7f887 100644
@@ -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 \
Signature · 1 line
2.17.1
#10 lore raw

cover toradex: Misc fixes for v2020.10

In reply to Igor Opaniuk

Hi Stefano,

Quoted 32 lines · Igor Opaniuk

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(-)
Quoted 3 lines

--
2.17.1

Any chance we can get the following bug-fix series pulled in v2020.10?

Thanks

Signature · 8 lines
Best regards - Freundliche Gr?sse - Meilleures salutations

Igor Opaniuk

mailto: igor.opaniuk at gmail.com
skype: igor.opanyuk
+380 (93) 836 40 67
http://ua.linkedin.com/in/iopaniuk
#11 lore raw

cover toradex: Misc fixes for v2020.10

Quoted 35 lines · Igor Opaniuk

Hi Stefano,

Quoted 32 lines · Igor Opaniuk

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(-)
Quoted 5 lines
Quoted 3 lines

--
2.17.1

Any chance we can get the following bug-fix series pulled in v2020.10?

Yes, I will go through a last pick-up round for 2020.10.

Stefano

Quoted 3 lines

Thanks

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================