]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
config: Add 'update_bootimg' command to update flash.bin on Phytec's imx8mm
authorLukasz Majewski <lukma@denx.de>
Fri, 9 Aug 2024 16:53:32 +0000 (18:53 +0200)
committerFabio Estevam <festevam@gmail.com>
Fri, 23 Aug 2024 17:49:02 +0000 (14:49 -0300)
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 <lukma@denx.de>
Reviewed-by: Benjamin Hahn <B.Hahn@phytec.de>
Tested-by: Teresa Remmet <t.remmet@phytec.de>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
include/configs/phycore_imx8mm.h

index dd7cfdba52d2b00b3aaabaca884fb84f9235732e..0910ae2d8702d131b8c7b152ce23a3f88c82284a 100644 (file)
        "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" \