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-tqma8mx-multi-mba8mx.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-tqm8mx-multi-mba8mx.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
The UUU (Universal Update Utility) is an open source program provided by NXP, which is the successor of NXP's MFG Tools, intended to download and execute code on the i.MX SoC family via the Serial Download Protocol (SDP). Documentation, source code, and prebuilt tool releases are available via the NXP mfgtools github repository.
imx-boot-tqma8mx-4gb-mba8mx-mfgtool.bin-flash_spl_uboot*.wic or *.wic.zst (e.g., tq-image-weston-debug-tqma8mx-multi-mba8mx.rootfs.wic.zst)To communicate with the module via USB, it must be set to “Serial Download” mode.
S9
NOTE: Only the DIP switches 9-2 and 9-3 define the boot mode on MBa8Mx
uuu -lsusb.To initially boot the board (e.g., with an empty flash memory), U-Boot can be loaded directly into RAM without writing to the eMMC.
Execute the following command in the folder containing the UUU binary and the bootstream:
sudo uuu <bootstream>
Example for the TQMa8Mx:
sudo uuu imx-boot-tqma8mx-multi-mba8mx-mfgtool.bin-flash_spl_uboot
This command boots the board and uses the booted system to flash the bootstream and the WIC image to the eMMC.
sudo uuu -bmap -b emmc_all <bootstream> <wic-image>
Example for the TQMa8Mx:
sudo uuu -bmap -b emmc_all imx-boot-tqma8mx-multi-mba8mx-mfgtool.bin-flash_spl_uboot tq-image-weston-debug-tqma8mx-multi-mba8mx.rootfs.wic.zst
For custom flashing procedures (e.g., if you want to program a WIC image to eMMC without writing the boot stream to the eMMC boot partition), UUU commands can be collected in a cmdlist file.
uuu.tqma8mx) in the same directory as the UUU tool.BOOTSTREAM and WICIMAGE variables:uuu -e BOOTSTREAM=<bootstream> -e WICIMAGE=<wic image> uuu.tqma8mx
An example of a custom script can be found here:
uuu_version 1.5.4
SDPS: delay 500
SDPS: @ boot -f @BOOTSTREAM@
SDPV: delay 1000
SDPV: @ write -f @BOOTSTREAM@ -skipspl -scanterm -scanlimited 0x800000
SDPV: jump -scanlimited 0x800000
FB: ucmd setenv fastboot_dev mmc
FB: ucmd setenv mmcdev ${emmc_dev}
FB: ucmd mmc dev ${emmc_dev}
FB: @ flash -raw2sparse all @WICIMAGE@
FB: done
If the wrong protocol is used in the UUU script (e.g., using SDP instead of SDPS on the i.MX8MP), the UUU tool will detect the USB device, but the transfer will permanently freeze at the first command (e.g., visible as a hang at 1/ 0 [).
By running the command
uuu.exe -v
(without any further arguments), the UUU tool lists its internal configuration. In the Pctl (Protocol) column, you can look up the correct protocol prefix assignment for the respective chip (in the Chip column).
Example excerpt:
Pctl Chip Vid Pid BcdVersion Serial_No
==================================================
SDPS: MX93 0x1fc9 0x014e
SDPS: MX95 0x1fc9 0x015d
SDP: MX6Q 0x15a2 0x0054
SDP: MX8MM 0x1fc9 0x0134
Here you can see that an i.MX8MM script must begin with SDP:, while an i.MX93 script strictly requires SDPS:.