display5: config: Provide command to flash the whole SPI-NOR memory
authorLukasz Majewski <lukma@denx.de>
Fri, 11 May 2018 14:51:02 +0000 (16:51 +0200)
committerStefano Babic <sbabic@denx.de>
Mon, 18 Jun 2018 13:42:38 +0000 (15:42 +0200)
It may be necessary to update the content of the whole SPI-NOR memory at
once with using a single command (tftp_sf_img).

Signed-off-by: Lukasz Majewski <lukma@denx.de>
include/configs/display5.h

index f4aa6d5315faaa69af55863f54d4653cf631d13e..3cb6365367ee4a42a1495794f4e09bf05c96b9bc 100644 (file)
                "sf write ${loadaddr} 0x400 ${filesize};" \
        "fi\0" \
 
+#define TFTP_UPDATE_SPINOR \
+       "spinorfile=core-image-lwn-display5.spinor\0" \
+       "spinorsize=0x2000000\0" \
+       "tftp_sf_img=" \
+           "if tftp ${loadaddr} ${spinorfile}; then " \
+               "sf probe;" \
+               "sf erase 0x0 ${spinorsize};" \
+               "sf write ${loadaddr} 0x0 ${filesize};" \
+       "fi\0" \
+
 #define CONFIG_EXTRA_ENV_SETTINGS        \
        PARTS_DEFAULT \
        "display=tianma-tm070-800x480\0" \
        "BOOT_FROM=ACTIVE\0" \
        "BOOT_FROM_RECOVERY=Linux\0" \
        TFTP_UPDATE_BOOTLOADER \
+       TFTP_UPDATE_SPINOR \
        "kernel_part_active=1\0" \
        "kernel_part_backup=3\0" \
        __TFTP_UPDATE_KERNEL \