Set network settings using DHCP
Write the U-Boot image (bootstream) to QSPI-NOR:
This script uses the bootstream defined in the environment variable uboot, which is set to bootstream.bin by default. Make sure to either name the file on the TFTP server root accordingly or rewrite the variable uboot using setenv uboot <name>. The corresponding file in the BSP is u-boot-with-spl-qspi_lga-2023.04-r0.imx.
run update_uboot_spi
Write the rootfs to QSPI-NOR:
It is mandatory to prepare the MTD root partition initially.
This script erases the rootfs partition on the SPI and creates a new ubi volume.
run prepare_ubi_part
This script uses the UBIFS defined in the environment variable ubirootfs, which is set to rootfs.ubifsby default. Make sure to either name the file on the TFTP server root accordingly or rewrite the variable ubirootfs using setenv ubirootfs <name>. The corresponding file in the BSP is tq-image-small-debug-tqma6ulxl-mba6ulx.rootfs.ubifs.
run update_rootfs_spi
tftp boot-ubi.scr
sf probe
sf update ${loadaddr} script ${filesize}
Finally, power off and set the DIP switches to QSPI NOR boot.
There are two common ways to write the image to an SD card: using the highly recommended bmaptool (which is significantly faster) or the standard dd command.
The bmaptool provides a faster and safer way to flash images. It automatically utilizes the .bmap file to skip empty blocks, verifies the integrity during flashing, and can flash compressed images (like .wic.zst) on the fly without manual extraction.
$ cd <path to your image> $ sudo bmaptool copy tq-image-weston-debug-tqma7x-mba7x.rootfs.wic.zst /dev/sdc #Assuming the SD card is assigned to /dev/sdc
Alternatively, the uncompressed image can be simply written to the SD Card by using the dd shell command in Linux:
$ cd <path to your image> $ sudo dd if=tq-image-weston-debug-tqma7x-mba7x.rootfs.wic of=/dev/sdc bs=1M conv=fsync #Assuming the SD card is assigned to /dev/sdc
To identify the SD card in Linux, the shell command dmesg can be used:
$ dmesg | tail -n 15
$ dmesg | tail -n 15 #plug in SD Card into the reader $ dmesg | tail -n 15