TQMa95xxLA - YOCTO Linux BSP documentation

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-tqma95xxla-4gb-mba95xxca.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-tqma95xxla-4gb-mba95xxca.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:

  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 Tool for TQMa95xxLA

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.

If module revision < PROTO1 Rev. 0102 is used, the local.conf has to be modified, build the BSP properly for i.MX95 chip revision A0/A1.
Revision A0/A1 chips need a special ELE firmware and also uses a different DDR-RAM timing. There the following lines need to be added to your conf/local.conf:
IMX_SOC_REV:${MACHINE} ?= "A0" # The ELE firmware does not differ between A0 and A1 chip revision
OEI_DDRCONFIG = "TQMa95xxSA.DDR-Timing.${OEI_RAM_SIZE}GB.V16.0005"

If you have not built your software for the correct SOC revision, problems and crashes will occur when using the UUU tool.

  • A working Host PC (Linux or Windows).
  • The latest UUU release (downloadable from the NXP GitHub releases page).
  • The corresponding image files for the TQMa95xxLA (located in the Yocto deploy directory):
    • Bootstream: imx-boot-tqma95xxla-*-sd.bin-flash_a55
    • WIC-Image: *.wic or *.wic.zst (e.g., tq-image-weston-debug-tqma95xxla-4gb-mba95xxca.rootfs.wic.zst)

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 (MBa95xxCA) as follows:

Serial Downloader

S1

In serial download mode, USB dual role port X9 is not supported in this mode, and the USB0 controller is routed to the X9 connector.
  1. Connect the Host PC via a suitable USB cable to the X9 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.

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

sudo uuu imx-boot-tqma95xxla-4gb-mba95xxca-sd.bin-flash_a55

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

sudo uuu -bmap -b emmc_all imx-boot-tqma95xxla-4gb-mba95xxca-sd.bin-flash_a55 tq-image-weston-debug-tqma95xxla-4gb-mba95xxca.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.tqma95xxla) 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.tqma95xxla

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.MX95 used here (as well as i.MX8QXP, i.MX93), 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.MX95), 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.MX95 script strictly requires SDPS:.