All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] config: Add 'update_bootimg' command to update flash.bin on Phytec's imx8mm
@ 2024-08-01 12:54 Lukasz Majewski
  2024-08-01 12:54 ` [PATCH 2/2] config: Adjust Phytec imx8mm module config to support NVME disk Lukasz Majewski
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Lukasz Majewski @ 2024-08-01 12:54 UTC (permalink / raw)
  To: Teresa Remmet, u-boot
  Cc: Tom Rini, Benjamin Hahn, Cem Tenruh, Martyn Welch, Simon Glass,
	Lukasz Majewski

This command allows easy update on SD card (hence the update_mmc_part=1)
of the flash.bin generated during u-boot build.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
---
 include/configs/phycore_imx8mm.h | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/include/configs/phycore_imx8mm.h b/include/configs/phycore_imx8mm.h
index ce6dc87c69..fdeb11933f 100644
--- a/include/configs/phycore_imx8mm.h
+++ b/include/configs/phycore_imx8mm.h
@@ -29,6 +29,17 @@
 	"mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \
 	"mmcpart=1\0" \
 	"mmcroot=2\0" \
+	"update_mmc_part=1\0" \
+	"update_offset=0x42\0" \
+	"update_filename=flash.bin\0" \
+	"hostname=/tftpboot/lukma/\0" \
+	"update_bootimg="						\
+		"mmc dev ${mmcdev} ; "		\
+		"if dhcp ${hostname}/${update_filename} ; then "	\
+		"setexpr fw_sz ${filesize} / 0x200 ; "	/* SD block size */ \
+		"setexpr fw_sz ${fw_sz} + 1 ; "				\
+		"mmc write ${loadaddr} ${update_offset} ${fw_sz} ; "	\
+		"fi\0" \
 	"mmcautodetect=yes\0" \
 	"mmcargs=setenv bootargs console=${console} " \
 		"root=/dev/mmcblk${mmcdev}p${mmcroot} rootwait rw\0" \
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-08-02 10:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-01 12:54 [PATCH 1/2] config: Add 'update_bootimg' command to update flash.bin on Phytec's imx8mm Lukasz Majewski
2024-08-01 12:54 ` [PATCH 2/2] config: Adjust Phytec imx8mm module config to support NVME disk Lukasz Majewski
2024-08-01 14:31   ` Fabio Estevam
2024-08-01 14:42     ` Lukasz Majewski
2024-08-01 13:13 ` [PATCH 1/2] config: Add 'update_bootimg' command to update flash.bin on Phytec's imx8mm Fabio Estevam
2024-08-01 21:16   ` Tom Rini
2024-08-02  8:50 ` Benjamin Hahn
2024-08-02 10:31   ` Lukasz Majewski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.