Add script to read U-Boot from SD card and write it to matching
locations in the SPI NOR, thus making the SPI NOR bootable.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Christoph Niedermaier <cniedermaier@dh-electronics.com>
Cc: Stefano Babic <sbabic@denx.de>
Acked-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
"ramdisk_addr_r=0x18000000\0" \
"scriptaddr=0x14000000\0" \
"fdtfile=imx6q-dhcom-pdk2.dtb\0"\
+ "update_sf=" /* Erase SPI NOR and install U-Boot from SD */ \
+ "load mmc 0:1 ${loadaddr} /boot/u-boot-with-spl.imx && "\
+ "sf probe && sf erase 0x0 0xa0000 && " \
+ "sf write ${loadaddr} 0x400 ${filesize}\0" \
BOOTENV
#define BOOT_TARGET_DEVICES(func) \