Creating a bootable SD card requires an SD card reader operational under Linux to format and access the Linux partition of the card. If you do not have SD card access under Linux then copying the bootloader and mounting the root filesystem on SD/MMC card will not be possible.
If using prePre-built images provided by PHYTEC, the exact image names required for each step are listed in the instructions below. If 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/<MACHINE NAME>/ <YOCTO_MACHINE>/
Note that the names of the images differ between releases. YOCTO_IMAGE in the instructions below refers to the Yocto image name that was used to build the image, and YOCTO_MACHINE refers to the machine that was selected to build the image. Refer to the "Built Images" section of the Quickstart pertaining to the specific release you are using for clarification on image names.
Flashing a Complete Image:
- Determine the SD card device name
The SD card device name is of the form /dev/sd[b|c|d|e]. Run the following without and with the SD card connected:
Code Block language bash ls /dev/sd*
The device that appeared on the call to ls with the SD card but not the call without is the SD card device.
Unmount all partitions of the SD card, using the SD card device name from Step 1:
Code Block language bash umount /dev/sd[b|c|d|e]*
Load the SD card image onto the SD card from the linux command line. This will format the appropriate partitions, as well as add U-Boot, the kernel image, and the root filesystem to the card.
From the directory that contains the '.sdcard' file, execute the following command:
Code Block language bash sudo dd if=fsl-image-validation-imx-<MACHINE_NAME><YOCTO_IMAGE>-<YOCTO_MACHINE>.sdcard of=/dev/sd[b|c|d|e] bs=1MB && sync
...
If modifying the kernel, remove the existing zImage and device tree binary files:
Code Block language bash rm /media/<user>/Boot\ imx7d-/zImage rm /media/<user>/Boot\ imx7d-/oftree
Load the new Linux kernel and device tree binary to the SD Card. By default u-boot loads the file named "oftree" as the DTB, so make sure to rename the device tree that you intend to use:
Code Block language bash cp zImage /media/<user>/Boot\ imx7d-/; sync cp zImage-<MACHINE NAME><YOCTO_MACHINE>.dtb /media/<user>/Boot\ imx7d-/oftree; sync
Note If you wish to change the dtb name that is loaded from "oftree" to a specific dtb name, follow these steps to modify the U-Boot environment:
a. Power on the board and press any key to stop autoboot and enter U-Boot:
b. Type the following commands:
Code Block setenv fdt_file <dtb name> saveenv reset
...
If modifying the root filesystem, remove the existing:
Code Block language bash sudo rm -rf /media/<user>/<rootfs partition>/*
Load the new filesystem to the SD Card:
Code Block language bash sudo tar -jxf fsl-image-validation-imx-<MACHINE NAME><YOCTO_IMAGE>-<YOCTO_MACHINE>.tar.bz2 -C /media/<user>/<rootfs partition>/; sync
...