Table of Contents

TQMa93xxLA - YOCTO Linux BSP documentation

Create SD-Card image

Create SD Card with BSP Image

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-tqma93xxla-mba93xxla.rootfs.wic.zst /dev/sdc #Assuming the SD card is assigned to /dev/sdc

Method 2: Using the dd command

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-tqma93xxla-mba93xxla.rootfs.wic of=/dev/sdc bs=1M conv=fsync #Assuming the SD card is assigned to /dev/sdc

Identify the SD Card

To identify the SD card in Linux, the shell command dmesg can be used:

  1. Open a new terminal
  2. Execute the following command without plugged SD Card:
     $ dmesg | tail -n 15
  3. Insert SD Card and wait a few seconds
  4. Run the command from step two again:
$ dmesg | tail -n 15 
#plug in SD Card into the reader
$ dmesg | tail -n 15 

NXP UUU (Universal Update Utility)

NXP UUU Tool for TQMa93xxLA

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.

Prerequisites

If you have a module with revision < PROTO1 Rev. 0102, the following must be done in order to build the BSP, since early release samples of TQMa93xx use i.MX93 chip revision 1.0.

TheAN13997 Migration Guide from i.MX 93 A0 to A1 lists differences between A0 to A1 parts. An alternative description is “Silicon Rev” 1.0 and 2.0 as mentioned in Figure 1 “Part number nomenclature - i.MX93” in Datasheet Rev. 3 12/1023.

A0 and A1 need a different sentinel firmware files, defaulting for A1. In order to set the older firmware, add the following line to `conf/local.conf`:

IMX_SOC_REV = "A0"
  • A working Host PC (Linux or Windows).
  • The latest UUU release (downloadable from the NXP GitHub releases page).
  • The corresponding image files for the TQMa93xxLA (located in the Yocto deploy directory):
    • Bootstream: imx-boot-tqma93xxla-mba93xxla-sd.bin-flash_singleboot
    • WIC-Image: *.wic or *.wic.zst (e.g., tq-image-weston-debug-tqma93xxla-mba93xxla.rootfs.wic.zst)

Prepare Hardware (Serial Downloader Mode)

To communicate with the module via USB, it must be set to “Serial Download” mode.

  1. Power off the module.
  2. Set the DIP switch S1 on the mainboard (MBa93xxLA) as follows:

Serial Downloader

S1

  1. Connect the Host PC via a suitable USB cable to the X17 connector (USB0).
  2. Power on the board.
  3. Verify that the device is detected by running the following command in the Host PC terminal: uuu -lsusb.

UUU Usage

Load and start U-Boot in RAM

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 TQMa93xxLA:

sudo uuu imx-boot-tqma93xxla-mba93xxla-sd.bin-flash_singleboot

Program complete image to eMMC

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 TQMa93xxLA:

sudo uuu -bmap -b emmc_all imx-boot-tqma93xxla-mba93xxla-sd.bin-flash_singleboot tq-image-weston-debug-tqma93xxla-mba93xxla.rootfs.wic.zst

Use a custom workflow (Custom Cmdlist)

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.

  1. Create a text file (e.g., uuu.tqma93xxla) in the same directory as the UUU tool.
  2. Insert your desired UUU commands (you can find examples in the UUU documentation).
  3. Execute the script by passing the BOOTSTREAM and WICIMAGE variables:
uuu -e BOOTSTREAM=<bootstream> -e WICIMAGE=<wic image> uuu.tqma93xxla

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
Depending on the CPU architecture used, the boot ROM of the i.MX SoC expects a different initial protocol to receive the bootstream. Older generations (e.g., i.MX6, i.MX7, i.MX8M) use the classic SDP (Serial Download Protocol). For newer generations, such as the i.MX93 used here (as well as i.MX8QXP, i.MX95), SDPS (Serial Download Protocol Stream) must strictly be used as the first command in custom scripts.

If the wrong protocol is used in the UUU script (e.g., using SDP instead of SDPS on the i.MX93), 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 [).

Tip: Determining the correct protocol for your SoC

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:.

The information provided on this wiki page is subject to change due to circumstances beyond our control. While we strive to keep all details as accurate and up-to-date as possible, it is possible that certain updates or changes may go unnoticed for some time. As a result, some sections of this page may contain outdated information. If you notice any mistakes in the documentation, we kindly ask you to inform the TQ Support through our ticket system.