VAR-SOM-AM33 NAND Flash Burning: Difference between revisions
From Variscite Wiki
(2 intermediate revisions by the same user not shown) | |||
Line 7: | Line 7: | ||
== Step by step manual flashing of NAND binaries == | == Step by step manual flashing of NAND binaries == | ||
Replacing Nand Flash images can be done from either Linux user space or U-Boot. | Replacing Nand Flash images can be done from either Linux user space or U-Boot. <br> | ||
<u>From Linux shell</u><u></u><br> | <u>From Linux shell</u><u></u><br> | ||
<pre> | <pre> | ||
Line 15: | Line 15: | ||
$ flash_erase /dev/mtd2 0 0 | $ flash_erase /dev/mtd2 0 0 | ||
$ flash_erase /dev/mtd3 0 0 | $ flash_erase /dev/mtd3 0 0 | ||
$ nandwrite -p /dev/mtd0 | $ nandwrite -p /dev/mtd0 /opt/TISDK/nand/MLO | ||
$ nandwrite -p /dev/mtd1 | $ nandwrite -p /dev/mtd1 /opt/TISDK/nand/MLO | ||
$ nandwrite -p /dev/mtd2 | $ nandwrite -p /dev/mtd2 /opt/TISDK/nand/MLO | ||
$ nandwrite -p /dev/mtd3 | $ nandwrite -p /dev/mtd3 /opt/TISDK/nand/MLO | ||
<< Install device tree >> | << Install device tree >> | ||
$ flash_erase /dev/mtd4 0 0 | $ flash_erase /dev/mtd4 0 0 | ||
$ nandwrite -p /dev/mtd4 | $ nandwrite -p /dev/mtd4 /opt/TISDK/zImage-var-som-amx3.dtb | ||
<< Install U-Boot >> | << Install U-Boot >> | ||
$ flash_erase /dev/mtd5 0 0 | $ flash_erase /dev/mtd5 0 0 | ||
$ nandwrite -p /dev/mtd5 | $ flash_erase /dev/mtd6 0 0 | ||
$ flash_erase /dev/mtd7 0 0 | |||
$ nandwrite -p /dev/mtd5 /opt/TISDK/nand/u-boot.img | |||
<< Install Kernel >> | << Install Kernel >> | ||
$ flash_erase /dev/ | $ flash_erase /dev/mtd8 0 0 | ||
$ nandwrite -p /dev/ | $ nandwrite -p /dev/mtd8 /opt/TISDK/zImage | ||
<< Install UBI rootfs >> | |||
$ flash_erase /dev/mtd9 0 0 > /dev/null | |||
$ ubiformat /dev/mtd9 -f /opt/TISDK/rootfs-var-som-amx3.ubi.img -s 2048 -O 2048 | |||
</pre> | </pre> |
Latest revision as of 12:16, 16 October 2017
Flash Images to NAND
using nand-recovery.sh script
Variscite provides a sample script which burns all required images (MLO, U-BOOT, zImage, device tree, and UBI rootfs) to NAND-Flash.
For sample script, please refer to : https://github.com/varigit/meta-variscite-amx3/blob/master/utils/nand-recovery.sh
In the above example script, NAND-Flash binaries reside in /opt/TISDK on the SD-Card
Step by step manual flashing of NAND binaries
Replacing Nand Flash images can be done from either Linux user space or U-Boot.
From Linux shell
<< Flash MLO (4 copies) >> $ flash_erase /dev/mtd0 0 0 $ flash_erase /dev/mtd1 0 0 $ flash_erase /dev/mtd2 0 0 $ flash_erase /dev/mtd3 0 0 $ nandwrite -p /dev/mtd0 /opt/TISDK/nand/MLO $ nandwrite -p /dev/mtd1 /opt/TISDK/nand/MLO $ nandwrite -p /dev/mtd2 /opt/TISDK/nand/MLO $ nandwrite -p /dev/mtd3 /opt/TISDK/nand/MLO << Install device tree >> $ flash_erase /dev/mtd4 0 0 $ nandwrite -p /dev/mtd4 /opt/TISDK/zImage-var-som-amx3.dtb << Install U-Boot >> $ flash_erase /dev/mtd5 0 0 $ flash_erase /dev/mtd6 0 0 $ flash_erase /dev/mtd7 0 0 $ nandwrite -p /dev/mtd5 /opt/TISDK/nand/u-boot.img << Install Kernel >> $ flash_erase /dev/mtd8 0 0 $ nandwrite -p /dev/mtd8 /opt/TISDK/zImage << Install UBI rootfs >> $ flash_erase /dev/mtd9 0 0 > /dev/null $ ubiformat /dev/mtd9 -f /opt/TISDK/rootfs-var-som-amx3.ubi.img -s 2048 -O 2048