[PATCH v1 1/3] arm: config: xea: Update environment variables for XEA board (imx287)

Lukasz Majewski lukma at denx.de
Wed Jan 10 15:48:47 CET 2024


As the XEA now supports fitImage, the default envs shall reflect this
as well.

Moreover, some SPI-NOR layout re-organization has took place.

Signed-off-by: Lukasz Majewski <lukma at denx.de>
---

 include/configs/xea.h | 45 ++++++++++++++++++++++++-------------------
 1 file changed, 25 insertions(+), 20 deletions(-)

diff --git a/include/configs/xea.h b/include/configs/xea.h
index 04ca5aa12a..a11bb522cd 100644
--- a/include/configs/xea.h
+++ b/include/configs/xea.h
@@ -33,17 +33,21 @@
 	"bootsec=sf_swu\0"						\
 	"consdev=ttyAMA0\0"						\
 	"baudrate=115200\0"						\
-	"dtbaddr=0x44000000\0"						\
-	"dtbfile=imx28-xea.dtb\0"					\
 	"rootdev=/dev/mmcblk0p2\0"					\
 	"netdev=eth0\0"							\
-	"rdaddr=0x43000000\0"						\
-	"swufile=swupdate.img\0"					\
-	"sf_kernel_offset=0x100000\0"					\
-	"sf_kernel_size=0x400000\0"					\
-	"sf_swu_offset=0x500000\0"					\
-	"sf_swu_size=0x800000\0"					\
-	"rootpath=/opt/eldk-5.5/armv5te/rootfs-qte-sdk\0"		\
+	"swufile=swupdate-image-xea-upd.itb\0"				\
+	"sf_kernel_offset=0xA0000\0"					\
+	"sf_swu_size=0xF40000\0"					\
+	"ethact=FEC\0"							\
+	"arch=xea\0"							\
+	"serverip=10.8.217.79\0"					\
+	"nfs_serverip=10.8.218.113\0"					\
+	"gatewayip=10.8.209.250\0"					\
+	"lwe_env="							\
+		"if dhcp ${loadaddr} ${hostname}/${lwe_uenv} ; then "	\
+		"source ${loadaddr}; "					\
+		"fi\0"							\
+	"lwe_uenv=env_uboot_xea.bin\0"					\
 	"do_update_mmc="						\
 		"if mmc rescan ; then "					\
 		"mmc dev 0 ${update_mmc_part} ; "			\
@@ -60,6 +64,12 @@
 		"sf write ${loadaddr} ${update_offset} ${filesize} ; "	\
 		"fi ; "							\
 		"fi\0"							\
+	"factory_reset="						\
+		"if sf probe ; then "					\
+		"run update_swu ; "					\
+		"setenv bootmode update ; "				\
+		"saveenv ; "						\
+		"fi\0"							\
 	"update_spl_filename=u-boot.sb\0"				\
 	"update_spl="							\
 		"setenv update_filename ${update_spl_filename} ; "	\
@@ -72,6 +82,8 @@
 		"run do_update_sf ; "					\
 		"setenv update_mmc_part 1 ; "				\
 		"setenv update_offset 0 ; "				\
+		"run do_update_mmc ; "					\
+		"setenv update_mmc_part 2 ; "				\
 		"run do_update_mmc\0"					\
 	"update_kernel_filename=uImage\0"				\
 	"update_kernel="						\
@@ -82,13 +94,9 @@
 		"setenv update_filename ${dtbfile} ; "			\
 		"setenv update_offset 0x400 ; "				\
 		"run do_update_mmc\0"					\
-	"update_sfkernel="						\
-		"setenv update_filename fitImage ; "			\
-		"setenv update_offset ${sf_kernel_offset} ; "		\
-		"run do_update_sf\0"					\
 	"update_swu="							\
 		"setenv update_filename ${swufile} ; "			\
-		"setenv update_offset ${sf_swu_offset} ; "		\
+		"setenv update_offset ${sf_kernel_offset} ; "		\
 		"run do_update_sf\0"					\
 	"addcons="							\
 		"setenv bootargs ${bootargs} "				\
@@ -108,9 +116,6 @@
 	"netload="							\
 		"dhcp ${loadaddr} ${hostname}/${bootfile} ; "		\
 		"tftp ${dtbaddr} ${hostname}/${dtbfile}\0"		\
-	"sfload="							\
-		"sf probe ; "						\
-		"sf read ${loadaddr} ${sf_kernel_offset} ${sf_kernel_size}\0" \
 	"usbload="							\
 		"usb start ; "						\
 		"load usb 0:1 ${loadaddr} ${bootfile}\0"		\
@@ -132,11 +137,11 @@
 		"bootm ${loadaddr} - ${dtbaddr} ; "			\
 		"fi\0"							\
 	"sf_swu="							\
-		"if run sfload ; then "					\
-		"sf read ${rdaddr} ${sf_swu_offset} ${sf_swu_size} ; "	\
+		"if sf probe ; then "					\
+		"sf read ${loadaddr} ${sf_kernel_offset} ${sf_swu_size} ; "	\
 		"setenv bootargs root=/dev/ram0 rw ; "			\
 		"run addargs ; "					\
-		"bootm ${loadaddr} ${rdaddr} ; "		\
+		"bootm ${loadaddr} ; "					\
 		"fi\0"							\
 	"net_mmc="							\
 		"if run netload mmcargs addargs ; then "		\
-- 
2.39.2



More information about the U-Boot mailing list