VAR-SOM-MX6 Yocto NAND Recovery

From Variscite Wiki

Variscite provides a recovery SD-card image that can be used to install the pre-built U-Boot, Linux kernel and the UBI file system into the Nand-Flash This SD card image includes a script (nand-recovery.sh) that installs all the boot images and root file-system.

Preparing rescue SD-Card:

  • Plug-in the supplied SD card to your Linux machine, run dmesg and see which device is added (i.e. /dev/sdX or /dev/mmcblk0)
  • Download mx6-som-nand-recovery-sd.vXX.img.gz ( latest which is available on Variscite's FTP)
$ gunzip mx6-som-nand-recovery-sd.XX.img.gz
$ sudo dd if=mx6-som-nand-recovery-sd.vXX.img of=/dev/sdX bs=128k
Replace /dev/sdX with your true device, You can find it with dmesg.

Recover Nand Flash:

  • Insert the SD card into the SD/MMC slot of the custom board
  • Press and hold the boot-select button, power-off and power-on the board
  • The board will automatically boot into Linux from SD-Card

Flash from GUI

Desktop1 1.png

  • Press the right arrow on the upper right corner to change the desktop into Utilities.

Nandr-38-p1.jpg

  • Push Android-eMMC flash Android into eMMC.
  • Push Yocto-nand flash Yocto into nand.
  • Push Yocto-eMMC flash Yocto into eMMC. This option require changes in u-boot environment.

Flash from command line

  • Login as root (no password)
  • From Linux command line, type one of flash options
$ android-emmc.sh - flash Android into eMMC
$ yocto-emmc.sh - flash Yocto into eMMC (See note below)
$ yocto-dart.sh - flash Yocto into eMMC DART only.
$ yocto-nand.sh - flash Yocto into nand
  • in case of yocto-emmc.sh, change boot arguments to :
$ setenv bootargs console=ttymxc0,115200 video=mxcfb1:off root=/dev/mmcblk1p1 rootwait rw
$ saveenv

SDCARD image file tree

/media/rootfs/opt/images/
├── Android
│   └── Emmc
│       ├── boot.img
│       ├── boot-imx6q-var-dart.img
│       ├── boot-som-mx6dl-c.img
│       ├── boot-som-mx6dl-r.img
│       ├── boot-som-mx6q-c.img
│       ├── boot-som-mx6q-r.img
│       ├── boot-som-mx6q-vsc.img
│       ├── boot-som-solo-c.img
│       ├── boot-som-solo-r.img
│       ├── boot-som-solo-vsc.img
│       ├── recovery.img
│       ├── recovery-imx6q-var-dart.img
│       ├── recovery-som-mx6dl-c.img
│       ├── recovery-som-mx6dl-r.img
│       ├── recovery-som-mx6q-c.img
│       ├── recovery-som-mx6q-r.img
│       ├── recovery-som-mx6q-vsc.img
│       ├── recovery-som-solo-c.img
│       ├── recovery-som-solo-r.img
│       ├── recovery-som-solo-vsc.img
│       ├── SPL
│       ├── SPL.mmc
│       ├── SPL.new
│       ├── system.img
│       ├── u-boot-var-imx6-nand.img
│       └── u-boot-var-imx6-sd.img
└── Yocto
    ├── rootfs.tar.bz2
    ├── rootfs.ubi.img
    ├── SPL
    ├── SPL.mmc
    ├── u-boot.img
    ├── u-boot.img.mmc
    ├── uImage
    ├── uImage-imx6dl-var-som.dtb
    ├── uImage-imx6dl-var-som-solo.dtb
    ├── uImage-imx6dl-var-som-solo-vsc.dtb
    ├── uImage-imx6q-var-dart.dtb
    ├── uImage-imx6q-var-som.dtb
    └── uImage-imx6q-var-som-vsc.dtb
Script files located on /media/rootfs/sbin/
android-emmc.sh
mkmmc_yocto.sh    
yocto-dart.sh  
yocto-nand.sh
mkmmc_android.sh
nand-recovery.sh
yocto-emmc.sh