...
Copy u-boot.imx-nand to the Boot partition of the SD card. In order to be able to save the environment to NAND and boot kernel images from NAND by default, the u-boot.imx-nand image is needed. The default u-boot.imx image will default to SD card. Both images are available in the release binaries.
Code Block cp u-boot.imx-nand /media/<user>/Boot\ imx7/; sync
Info To build a u-boot.imx-nand image with Yocto, follow the same instructions for building the BSP described in the Quickstart, but set the UBOOT_CONFIG variable to nand in $YOCTO_DIR/build/conf/local.conf before starting the build:
Code Block UBOOT_CONFIG = "nand"
Create a new partition on the SD card to hold the root filesystem ext4 image.
Code Block sudo fdisk /dev/sd<X> p print current partitions (note end of partition 2, 1826815 for NXP 1.2.0 release) n newpartition p primary 3 partition number 1826816 (start after end of partition 2) first sector <enter> Use defaultvalue forlast sector t Change partition systemid 3 Partition number c FAT32 w write table to disk and exit sudo mkfs.vfat -n "data" /dev/sd<X>3
Copy the filesystem image to the new "data" partition. Due to the size of NAND, the standard 'fsl-image-gui' and 'fsl-image-validation-imx' filesystems do not fit on NAND, so a smaller filesystem will need to be used. This example uses the Yocto image "core-image-minimal", which is included in the BSP release images.
Code Block cp core-image-minimal-<MACHINE NAME>.tar.bz2 /media/<user>/data/; sync
- Set the boot switches, according to Boot Configurations, to boot from SD card and power on the board into Linux.
Erase mtd0 and use NXP's utility "kobs-ng" to flash u-boot.imx-nand to NAND:
Code Block flash_erase /dev/mtd0 0 0 kobs-ng init -x /run/media/mmcblk0p1/u-boot.imx-nand
Flash zImage and device tree :
Code Block flash_erase /dev/mtd1 0 0 nandwrite -p /dev/mtd1 /run/media/mmcblk0p1/zImage flash_erase /dev/mtd2 0 0 nandwrite -p /dev/mtd2 /run/media/mmcblk0p1/<MACHINE NAME>.dtb
Flash filesystem:
Code Block 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 /run/media/mmcblk0p3/core-image-minimal-<MACHINE NAME>.tar.bz2 -C /tmp/rootfs/; sync
- Power off the board, set boot switches according to Boot Configurations, and power back on.
...