[PATCH v3 08/10] include/configs: apalis-imx8/verdin-imx8mm: rename kernel image variable

Marcel Ziswiler marcel at ziswiler.com
Wed Aug 25 17:14:39 CEST 2021


From: Oleksandr Suvorov <oleksandr.suvorov at toradex.com>

Variable "kernel_image" is used in boot.scr script only, that sets its
own default value to the constant string @@KERNEL_IMAGETYPE@@ in case
"kernel_image" is not set.
The default name of the kernel image shipped with BSP 5.x is "Image.gz".
Setting kernel_image="Image" as a pre-defined u-boot variable
breaks booting systems with modern versions of boot.scr, whereas
renaming it fixes booting with modern scripts and does not break working
of earlier versions of boot.scr.

Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov at toradex.com>
Signed-off-by: Marcel Ziswiler <marcel.ziswiler at toradex.com>
Reviewed-by: Fabio Estevam <festevam at gmail.com>

---

Changes in v3:
- Fix patch.
- Add missing apalis-imx8 part.
- While at it update copyright year resp. period.
- Fix closing endif comment.

Changes in v2:
- New patch allows booting recent embedded Linux BSPs.

 include/configs/apalis-imx8.h   |  6 +++---
 include/configs/verdin-imx8mm.h | 11 +++++------
 2 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/include/configs/apalis-imx8.h b/include/configs/apalis-imx8.h
index b04a03f76da..1757f025fc5 100644
--- a/include/configs/apalis-imx8.h
+++ b/include/configs/apalis-imx8.h
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0+ */
 /*
- * Copyright 2019 Toradex
+ * Copyright 2019-2021 Toradex
  */
 
 #ifndef __APALIS_IMX8_H
@@ -44,12 +44,12 @@
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	BOOTENV \
 	MEM_LAYOUT_ENV_SETTINGS \
+	"boot_file=Image\0" \
 	"console=ttyLP1 earlycon\0" \
 	"fdt_addr=0x83000000\0"	\
 	"fdt_file=fsl-imx8qm-apalis-eval.dtb\0" \
 	"fdtfile=fsl-imx8qm-apalis-eval.dtb\0" \
 	"finduuid=part uuid mmc ${mmcdev}:2 uuid\0" \
-	"image=Image\0" \
 	"initrd_addr=0x83800000\0" \
 	"initrd_high=0xffffffffffffffff\0" \
 	"mmcargs=setenv bootargs console=${console},${baudrate} " \
@@ -59,7 +59,7 @@
 	"netargs=setenv bootargs console=${console},${baudrate} " \
 		"root=/dev/nfs ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp" \
 		"\0" \
-	"nfsboot=run netargs; dhcp ${loadaddr} ${image}; tftp ${fdt_addr} " \
+	"nfsboot=run netargs; dhcp ${loadaddr} ${boot_file}; tftp ${fdt_addr} " \
 		"apalis-imx8/${fdt_file}; booti ${loadaddr} - ${fdt_addr}\0" \
 	"panel=NULL\0" \
 	"script=boot.scr\0" \
diff --git a/include/configs/verdin-imx8mm.h b/include/configs/verdin-imx8mm.h
index 7be5e5ddf11..d15a3e05fcc 100644
--- a/include/configs/verdin-imx8mm.h
+++ b/include/configs/verdin-imx8mm.h
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0+ */
 /*
- * Copyright 2020 Toradex
+ * Copyright 2020-2021 Toradex
  */
 
 #ifndef __VERDIN_IMX8MM_H
@@ -57,16 +57,16 @@
 	BOOTENV \
 	MEM_LAYOUT_ENV_SETTINGS \
 	"bootcmd_mfg=fastboot 0\0" \
+	"boot_file=Image\0" \
 	"console=ttymxc0\0" \
 	"fdt_addr=0x43000000\0" \
-	"fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
+	"fdt_board=dev\0" \
 	"initrd_addr=0x43800000\0" \
 	"initrd_high=0xffffffffffffffff\0" \
-	"kernel_image=Image\0" \
 	"netargs=setenv bootargs console=${console},${baudrate} " \
 		"root=/dev/nfs ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp" \
 		"\0" \
-	"nfsboot=run netargs; dhcp ${loadaddr} ${kernel_image}; " \
+	"nfsboot=run netargs; dhcp ${loadaddr} ${boot_file}; " \
 		"tftp ${fdt_addr} verdin/${fdtfile}; " \
 		"booti ${loadaddr} - ${fdt_addr}\0" \
 	"setup=setenv setupargs console=${console},${baudrate} " \
@@ -124,5 +124,4 @@
 #define CONFIG_MXC_USB_PORTSC	(PORT_PTS_UTMI | PORT_PTS_PTW)
 #define CONFIG_USB_MAX_CONTROLLER_COUNT 2
 
-#endif /*_VERDIN_IMX8MM_H */
-
+#endif /* __VERDIN_IMX8MM_H */
-- 
2.26.2



More information about the U-Boot mailing list