Embedded module TQMa8Xx - Yocto Linux BSP documentation

Deployment Yocto

  1. All binaries are intended for the usage on a STKa8Xx
  2. The symlinks point to the files of the last build

Target Machine: tqma8xdp-1gb-mba8Xx

System Images

Boot Device Symlink File
SD Card/eMMC
SD Card/eMMC tq-image-weston-tqma8xdp-1gb-mba8xx.wic tq-image-weston-tqma8xdp-1gb-mba8xx-<build_timestamp>.rootfs.wic

Bootloader Binaries

Boot Device Symlink File
SD/eMMC imx-boot imx-boot-tqma8xdp-1gb-mba8xx-sd.bin-flash_spl

Linux Kernel Image

Symlink File
Image Image–5.10.74+git0+a988e804a1-r0-tqma8xdp-1gb-mba8xx-<build_timestamp>.bin

Devicetree Blobs

Symlink Description
imx8dxp-tqma8xdp-mba8xx.dtb Default
imx8dxp-tqma8xdp-mba8xx-lvds0-tm070jvhg33.dtb Default with LVDS0 interface activated
imx8dxp-tqma8xdp-mba8xx-lvds1-tm070jvhg33.dtb Default with LVDS1 interface activated
imx8dxp-tqma8xdp-mba8xx-rpmsg.dtb Default with RPMSG support

Rootfs images

Symlink File
tq-image-weston-tqma8xdp-1gb-mba8xx.ext4 tq-image-weston-tqma8xdp-1gb-mba8xx-<build_timestamp>.rootfs.ext4
tq-image-weston-tqma8xdp-1gb-mba8xx.tar.gz tq-image-weston-tqma8xdp-1gb-mba8xx-<build_timestamp>.rootfs.tar.gz

Target Machine: tqma8xqp-1gb-mba8xx

System Images

Boot Device Symlink File
SD Card/eMMC
SD Card/eMMC tq-image-weston-tqma8xqp-1gb-mba8xx.wic tq-image-weston-tqma8xqp-1gb-mba8xx-<build_timestamp>.rootfs.wic

Bootloader Binaries

Boot Device Symlink File
SD/eMMC imx-boot imx-boot-tqma8xqp-1gb-mba8xx-sd.bin-flash_spl

Linux Kernel Image

Symlink File
Image Image–5.10.74+git0+a988e804a1-r0-tqma8xqp-1gb-mba8xx-<build_timestamp>.bin

Devicetree Blobs

Symlink Description
imx8qxp-tqma8xqp-mba8xx.dtb Default
imx8qxp-tqma8xqp-mba8xx-lvds0-tm070jvhg33.dtb Default with LVDS0 interface activated
imx8qxp-tqma8xqp-mba8xx-lvds1-tm070jvhg33.dtb Default with LVDS1 interface activated
imx8qxp-tqma8xqp-mba8xx-rpmsg.dtb Default with RPMSG support

Rootfs images

Symlink File
tq-image-weston-tqma8xqp-1gb-mba8xx.ext4 tq-image-weston-tqma8xqp-1gb-mba8xx-<build_timestamp>.rootfs.ext4
tq-image-weston-tqma8xqp-1gb-mba8xx.tar.gz tq-image-weston-tqma8xqp-1gb-mba8xx-<build_timestamp>.rootfs.tar.gz

Target Machine: tqma8xqp-2gb-mba8xx

System Images

Boot Device Symlink File
SD Card/eMMC
SD Card/eMMC tq-image-weston-tqma8xqp-2gb-mba8xx.wic tq-image-weston-tqma8xqp-2gb-mba8xx-<build_timestamp>.rootfs.wic

Bootloader Binaries

Boot Device Symlink File
SD/eMMC imx-boot imx-boot-tqma8xqp-2gb-mba8xx-sd.bin-flash_spl

Linux Kernel Image

Symlink File
Image Image–5.10.74+git0+a988e804a1-r0-tqma8xqp-2gb-mba8xx-<build_timestamp>.bin

Devicetree Blobs

Symlink Description
imx8qxp-tqma8xqp-mba8xx.dtb Default
imx8qxp-tqma8xqp-mba8xx-lvds0-tm070jvhg33.dtb Default with LVDS0 interface activated
imx8qxp-tqma8xqp-mba8xx-lvds1-tm070jvhg33.dtb Default with LVDS1 interface activated
imx8qxp-tqma8xqp-mba8xx-rpmsg.dtb Default with RPMSG support

Rootfs images

Symlink File
tq-image-weston-tqma8xqp-2gb-mba8xx.ext4 tq-image-weston-tqma8xqp-2gb-mba8xx-<build_timestamp>.rootfs.ext4
tq-image-weston-tqma8xqp-2gb-mba8xx.tar.gz tq-image-weston-tqma8xqp-2gb-mba8xx-<build_timestamp>.rootfs.tar.gz

BSP Revision ≥ 0025

System Image

SD Card/eMMC
Symlink File
tq-image-weston-tqma8xqp-mba8xx.wic tq-image-weston-tqma8xqp-mba8xx-<build_timestamp>.rootfs.wic

Bootstream (Bootloader) Binary

SD Card/eMMC
Symlink File
imx-boot-tqma8xqp-mba8xx-sd.bin imx-boot-tqma8xqp-mba8xx-sd.bin-flash_spl

Linux Kernel Binary

Symlink File
Image
Image-tqma8xqp-mba8xx.bin
Image–5.4-r0-tqma8xqp-mba8xx-<build_timestamp>.bin

Devicetree Binarys

Symlink Description
imx8qxp-mba8xx.dtb
imx8qxp-mba8xx-tqma8xqp-mba8xx.dtb
device tree blob for TQMa8XQP on MBa8Xx
imx8qxp-mba8xx-lvds-tm070jvhg33.dtb
imx8qxp-mba8xx-lvds-tm070jvhg33-tqma8xqp-mba8xx.dtb
device tree blob for LVDS Display

RootFS Images

Symlink File
tq-image-weston-tqma8xqp-mba8xx.ext4 tq-image-weston-tqma8xqp-mba8xx-<build_timestamp>.rootfs.ext4
tq-image-weston-tqma8xqp-mba8xx.tar.gz tq-image-weston-tqma8xqp-mba8xx-20200625075001.rootfs.tar.gz

BSP Revision ≤ 0017

System Image

SD Card/eMMC
Symlink File
tq-image-qt5-tqma8xd-mba8xx.wic tq-image-qt5-tqma8xd-mba8xx-<build_timestamp>.rootfs.wic

Bootstream (Bootloader) Binary

SD Card/eMMC
Symlink File
imx-boot-tqma8xd-mba8xx-sd.bin imx-boot-tqma8xd-mba8xx-sd.bin-flash

Linux Kernel Binary

Symlink File
Image
Image-tqma8xd-mba8xx.bin
Image–4.14.98-r0-tqma8xd-mba8xx-<build_timestamp>.bin

Devicetree Binarys

Symlink Description
Image-fsl-imx8dx-tqma8xd-mba8xx.dtb
fsl-imx8dx-tqma8xd-mba8xx.dtb
device tree blob for TQMa8XD
Image-fsl-imx8dx-tqma8xd-mba8xx-lvds-etml1010g0dka.dtb
fsl-imx8dx-tqma8xd-mba8xx-lvds-etml1010g0dka.dtb
device tree blob for LVDS Display
Image-fsl-imx8dx-tqma8xd-mba8xx-lvds-tm070jvhg33.dtb
fsl-imx8dx-tqma8xd-mba8xx-lvds-tm070jvhg33.dtb
device tree blob for TIANMA LVDS Display
Image-fsl-imx8dx-tqma8xd-mba8xx-no-pcie.dtb
fsl-imx8dx-tqma8xd-mba8xx-no-pcie.dtb
Devicetree for older Carrier Revision to disable PCIe
Image-fsl-imx8dx-tqma8xd-mba8xx-pcie-gen1.dtb
fsl-imx8dx-tqma8xd-mba8xx-pcie-gen1.dtb
Devicetree for older Carrier Revision to enable PCIe Gen1

RootFS Images

Symlink File
tq-image-qt5-tqma8xd-mba8xx.ext4 tq-image-qt5-tqma8xd-mba8xx-<build_timestamp>.rootfs.ext4
tq-image-qt5-tqma8xd-mba8xx.tar.gz tq-image-qt5-tqma8xd-mba8xx-<build_timestamp>.rootfs.tar.gz

System Image

SD Card/eMMC
Symlink File
tq-image-qt5-tqma8xqp-mba8xx.wic tq-image-qt5-tqma8xqp-mba8xx-<build_timestamp>.rootfs.wic

Bootstream (Bootloader) Binary

SD Card/eMMC
Symlink File
imx-boot-tqma8xqp-mba8xx-sd.bin imx-boot-tqma8xqp-mba8xx-sd.bin-flash

Linux Kernel Binary

Symlink File
Image
Image-tqma8xqp-mba8xx.bin
Image–4.14.98-r0-tqma8xqp-mba8xx-<build_timestamp>.bin

Devicetree Binarys

Symlink Description
Image-fsl-imx8dx-tqma8xqp-mba8xx.dtb
fsl-imx8dx-tqma8xqp-mba8xx.dtb
device tree blob for TQMa8XQP
Image-fsl-imx8dx-tqma8xqp-mba8xx-lvds-etml1010g0dka.dtb
fsl-imx8dx-tqma8xqp-mba8xx-lvds-etml1010g0dka.dtb
device tree blob for LVDS Display
Image-fsl-imx8dx-tqma8xqp-mba8xx-lvds-tm070jvhg33.dtb
fsl-imx8dx-tqma8xqp-mba8xx-lvds-tm070jvhg33.dtb
device tree blob for TIANMA LVDS Display
Image-fsl-imx8dx-tqma8xqp-mba8xx-no-pcie.dtb
fsl-imx8dx-tqma8xqp-mba8xx-no-pcie.dtb
Devicetree for older Carrier Revision to disable PCIe
Image-fsl-imx8dx-tqma8xqp-mba8xx-pcie-gen1.dtb
fsl-imx8dx-tqma8xqp-mba8xx-pcie-gen1.dtb
Devicetree for older Carrier Revision to enable PCIe Gen1

RootFS Images

Symlink File
tq-image-qt5-tqma8xqp-mba8xx.ext4 tq-image-qt5-tqma8xqp-mba8xx-<build_timestamp>.rootfs.ext4
tq-image-qt5-tqma8xqp-mba8xx.tar.gz tq-image-qt5-tqma8xqp-mba8xx-<build_timestamp>.rootfs.tar.gz

SD / eMMC image

Sector 1) Size 2) Contents Linux (SD-Card) Linux (eMMC) Mountpoint
0x000000 … 0x000000 0x0001 sector / 512 B MBR / Partition Table unpartitioned area n/a
0x000001 … 0x00003F 0x003F sectors / 32256 B none
0x000040 … 0x001FFF 0x1FC0 sectors / 4064 kiB bootstream (U-Boot)
0x002000 … 0x003FFF 0x2000 sectors / 4 MiB U-Boot environment
0x004000 … 0x023FFF 0x20000 sectors / 64 MiB firmware (Kernel, devicetrees) mmcblk1p1 mmcblk0p1 /boot
0x024000 … actual size depends on contents of RootFS RootFS mmcblk1p2 mmcblk0p2 /

The 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-qt5-tqma8xd-mba8xx-<build Timestamp>.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 




A good approach to update the firmare components U-Boot,Linux kernel and devicetree in a running system it to load them from a tftp server.
This process requires a running TFTP server, please see the following page how to setup TFTP Server. After setting up the TFTP server, the binaries to be updated must be copied into the TFTP directory.

1. Setup the Starterkit to boot from eMMC or SD
2. Connect the kit to the network with TFTP server supplying the binaries via ethernet on connector ETH1 (X18)
3. Power up the system and interrupt the boot process in U-Boot

Hit any key to stop autoboot:  0
=>

3. Setup the ethernet interface:

Set network settings manually

Set network settings using DHCP


4. Set U-Boot variable mmcdev according to the drive you want to write to.

=> setenv mmcdev <device_number>

Device assignment:
mmcdev 0 = eMMC
mmcdev 1 = SD Card

5. Set the file name of the binary to update in U-Boot :

  • For U-Boot update: ⇒ setenv uboot <filename>
    e.g. bootstream.bin
  • For devicetree update: ⇒ setenv fdt_file <filename>
    e.g. fsl-imx8qxp-tqma8xqp-mba8xx.dtb
  • For Linux kernel update: ⇒ setenv image <filename>
    e.g. Image

6. Perform Update by running the update command:

  • U-Boot update:
    => run update_uboot_mmc


  • Device Tree update:
    => run update_fdt_mmc


  • Kernel update:
    => run update_kernel_mmc


The variables can be saved with the command saveenv to keep the values permanently.

  • Write Image to SD card (use dd command under Linux or Win32diskImager under Windows)
  • Set Starterkit to boot from SD, please see DIP Switch Settings
  • Interrupt the boot process to get to the U-Boot prompt
  • Use the following commands to copy the SD card to eMMMC
The following commands are based on the default eMMC/SD image partitioning.

1. Run the following commands in the Uboot shell to create update script:

 
setenv root_loop 'setenv start 24000 && setenv r1 $rootblks16 && while itest $r1 -gt 0; do if itest $r1 -gt 0x100000; then setenv count 0x100000; else setenv count $r1; fi && mmc dev 1 && mmc read $loadaddr $start $count && mmc dev 0 && mmc write $loadaddr $start $count && setexpr start $start + $count && setexpr r1 $r1 - $count; done; setenv r1; setenv start; setenv count'
 
setenv  install_firmware 'echo MBR... && mmc dev 1 && mmc read $loadaddr 0 1 && mmc dev 0 && mmc write $loadaddr 0 1 && echo U-Boot... && mmc dev 1 && mmc read $loadaddr 40 1FC0 && mmc dev 0 && mmc write $loadaddr 40 1FC0 && echo U-Boot environment... && mmc dev 1 && mmc read $loadaddr 2000 2000 && mmc dev 0 && mmc write $loadaddr 2000 2000 && echo Firmware Partition... && mmc dev 1 && mmc read $loadaddr 4000 20000 && mmc dev 0 && mmc write $loadaddr 4000 20000  && echo Root FS... && run root_loop'
  • create the environment variable rootblks16 and set the value accordingly to the size of the RootFS in this case 2070MB.

To calculate the value of rootblks16 devide the size of the image in byte by 512 and convert the result into a hex value.

2070 * 1024 * 1024 = 2170552320
2170552320 / 512 = 4239360
4239360 = 40B000HEX

setenv rootblks16 0x40B000


2. Save environment U-boot environment (optional):

=> saveenv


3. run the following command to start the update procedure:

=> run install_firmware

Prerequisites

To boot the TQMa8Xx from network you need a working bootloader in eMMC/SD-card or SPI-NOR (placement option on TQMa8Xx ) which is able to get the kernel image over tftp and to provide the kernel with commandline settings for NFS. The dtb-file and kernel image have to be provided via tftp and the rootfs via nfs.

Configuration of U-Boot Environment

The bootloader environment needs to be modified to work with your tftp-server and your nfs-server.

1. Prepare network interface:

Set network settings manually

Set network settings using DHCP

2. set the Uboot variables for TFTP and NFS:

  • setenv rootpath <rootpath> (NFS directory has to set in /etc/exports on the Computer that runs the NFS server first)
  • setenv fdt_file <fdt_file> (name of devicetree file to be downloaded from the tftp server)
  • setenv image <image> (name of the Linux kernel image to be downloaded from the tftp server)

3. Run the uboot script to boot from nfs:

uboot command to start netboot
=> run netboot

1) , 2)
sector size = 512 B

NXP UUU (Universal Update Utility)

The UUU (Universal Update Utility is an open source programm provided by NXP, it is the successor of NXP's MFG Tools, intended to download and execute code on i.MX SoC family via the Serial Download Protocol (SDP). Documentation, source code and prebuild releases are available via the NXP mfgtools github repository.

1. Download the latest release from Universal Update Utility repository or build it from source

2. TQMa8Xx BSP built following the BSP quickstart instructions.

A prebuild UUU release version can be downloaded from the UUU git repository.

It is recommended to use the latest avialable release.


The Universal Update Utility (UUU) tool can be compiled manually. The build instructions for Linux, Windows are available in the UUU documentation:


A U-Boot binary with the U-Boot configuration mfgtool is required to use the UUU. This particular U-Boot will be built during the TQMa8Xx Yocto BSP build process and is located in the build directory deploy folder named imx-boot-tqma8xqp-mba8xx-mfgtool.bin-flash_spl.


The syntax of the UUU tool is identical for Windows and Linux.
In Windows uuu.exe has to be used while in Linux the uuu binary has no file extension.

For the sake of siplicity, copy the following components to a new folder e.g. in your home directory:

  • UUU binary (manually compiled or prebuilt release)
  • U-Boot binary with UUU configuration imx-boot-tqma8xqp-mba8xx-mfgtool.bin-flash_spl
  • SD / eMMC image for example the default image tq-image-weston-debug

The following commands are executed in the folder containing the tool and the binaries.

  • Set the STKa8Xx DIP switches to Serial Downloader Mode (See DIP-Switch Settings)
  • Connect STKa8Xx via connector X29 to the Host Computer


After connecting the kit, it should be automatically detected when it is in serial downloader mode. Run the following command to list all detected devices:

uuu -lsusb


To load the U-boot binary into the RAM and start it from there use the command below:

uuu <u-boot binary>

Example for the STKa8Xx:

uuu imx-boot-tqma8xqp-mba8xx-mfgtool.bin-flash_spl


Use the following command to program a U-Boot binary into the eMMC.

uuu -b emmc <u-boot binary>

Example for the STKa8Xx:

uuu -b emmc imx-boot-tqma8xqp-mba8xx-mfgtool.bin-flash_spl


Follow the command below to load the mfgtool U-Boot and write an image onto the TQMa8Xx eMMC afterwards.

uuu -b emmc_all <u-boot binary> <wic-image>

Example for the STKa8Xx:

uuu -b emmc_all imx-boot-tqma8xqp-mba8xx-mfgtool.bin-flash_spl.bin tq-image-weston-debug

Use a custom workflow:
For a custom workflow uuu commands can be listed in a cmdlist file. The following example shows how to program a wic image to eMMC user area, without writing the bootstream to the eMMC boot partition.

Following example is tested with uuu version 1.5.4.

Example cmdlist file on STKa8Xx:

For the sake of simplicity, create the cmdlist file in the same location as the uuu executable. For example uuu.tqma8xx

Example command for the STKa8Xx using custom cmdlist:

uuu -e BOOTSTREAM=<bootstream for uuu> -e WICIMAGE=<wic image for eMMC> uuu.tqma8xx
uuu -e BOOTSTREAM=imx-boot-tqma8xqp-mba8xx-mfgtool.bin-flash_spl -e WICIMAGE=tq-image-weston-debug uuu.tqma8xx

  • Last modified: 2023/10/23 08:19