summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLukasz Majewski <[email protected]>2024-08-09 18:53:32 +0200
committerFabio Estevam <[email protected]>2024-08-23 14:49:02 -0300
commit4c0b5639f19586d928dfd3cca736db82ea6a0952 (patch)
tree5059f307176e9f29a30b9c3f707021aa9f477238 /include
parenta97edb7b342dc40a70aff8fe242cfc361beb549c (diff)
config: Add 'update_bootimg' command to update flash.bin on Phytec's imx8mm
This command allows easy update on SD card or eMMC of the flash.bin generated (with binman) during u-boot build. Signed-off-by: Lukasz Majewski <[email protected]> Reviewed-by: Benjamin Hahn <[email protected]> Tested-by: Teresa Remmet <[email protected]> Reviewed-by: Fabio Estevam <[email protected]>
Diffstat (limited to 'include')
-rw-r--r--include/configs/phycore_imx8mm.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/configs/phycore_imx8mm.h b/include/configs/phycore_imx8mm.h
index dd7cfdba52d..0910ae2d870 100644
--- a/include/configs/phycore_imx8mm.h
+++ b/include/configs/phycore_imx8mm.h
@@ -29,6 +29,14 @@
"mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \
"mmcpart=1\0" \
"mmcroot=2\0" \
+ "update_offset=0x42\0" \
+ "update_filename=flash.bin\0" \
+ "update_bootimg=" \
+ "mmc dev ${mmcdev} ; " \
+ "if dhcp ${loadaddr} ${update_filepath}/${update_filename} ; then " \
+ "setexpr fw_sz ${filesize} / 0x200 ; " /* SD block size */ \
+ "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" \