The phyCORE-i.MX7 SOM can be ordered with NAND Flash populated instead of eMMC. See the Release Notes and visit the PHYTEC Support Portal for more information. The following instructions for flashing images from SD card will be useful if you want to:
- Flash images because NAND is empty
- Upgrade to a new release
- Use custom built images
Pre-built images are available on PHYTEC's Artifactory. If you have built your own images then the images are located in: $YOCTO_DIR/build/tmp/deploy/images/imx7s-pcm-061-0502100e/
To build a u-boot.imx NAND image with Yocto, follow the same instructions for building the BSP described in the BSP Development Guide, but set the UBOOT_CONFIG variable to nand in $YOCTO_DIR/build/conf/local.conf before starting the build:
UBOOT_CONFIG = "nand"
Remember that this is a non-kit SOM and it's yocto MACHINE configuration is included in the layer meta-phytec-extra.
You will have to expand the rootfs partition of the SD Card such that it is large enough to hold our NAND image files. This step needs to be performed only once for a given SD Card:Click here to expand...
Take your bootable SD Card and connect it to your Ubuntu Host Machine.
In the Terminal, install gparted:
sudo apt-get install gpartedCODE
- Select the bootable SD Card in the upper right drop down menu:
- Select the rootfs partition:
- Select the Resize/Move button at the top toolbar:
- Enter the maximum size of the partition as the new size before hitting the Resize button:
Apply the operation:
- Once the partition is successfully resized, close gparted. You will need this reformatted SD Card to complete the rest of this guide.
- Download the following files to your Ubuntu Host Machine or locate the ones you built.
Copy the downloaded files to the SD Card:
sudo cp ~/Downloads/zImage /media/user/e732e4aa-1a21-47b5-8dde-808da4af277f/home/root sudo cp ~/Downloads/zImage-imx7s-pcm-061-0502100e.dtb /media/user/e732e4aa-1a21-47b5-8dde-808da4af277f/home/root sudo cp ~/Downloads/u-boot.imx /media/user/e732e4aa-1a21-47b5-8dde-808da4af277f/home/root sudo cp ~/Downloads/fsl-image-validation-imx-imx7s-pcm-061-0502100e.tar.bz2 /media/user/e732e4aa-1a21-47b5-8dde-808da4af277f/home/rootCODE
- Safely eject your SD Card and connect it to your phyCORE-i.MX7 development kit.
Configure your phyCORE-i.MX7 development kit to boot from SD Card and boot into Linux. See Boot Switch for more information.
Flash the NAND
Erase mtd0 and use NXP's utility "kobs-ng" to flash the u-boot.imx-nand file to NAND:
flash_erase /dev/mtd0 0 0 kobs-ng init -x ~/u-boot.imxCODE
Flash zImage and the device tree:
flash_erase /dev/mtd1 0 0 nandwrite -p /dev/mtd1 ~/zImage flash_erase /dev/mtd2 0 0 nandwrite -p /dev/mtd2 ~/zImage-imx7s-pcm-061-0502100e.dtbCODE
Flash the file system:
flash_erase /dev/mtd3 0 0 ubiformat /dev/mtd3; ubiattach /dev/ubi_ctrl -m 3; ubimkvol /dev/ubi0 -N rootfs -m mkdir /tmp/rootfs mount -t ubifs ubi0:rootfs /tmp/rootfs tar -xf ~/fsl-image-validation-imx-imx7s-pcm-061-0502100e.tar.bz2 -C /tmp/rootfs/ && syncCODE
And you are all set! Poweroff the board, adjust the boot switches to boot from NAND then give it a shot!