TQMa93xxLA - YOCTO Linux BSP documentation

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.

The AN13997 Migration Guide from i.MX 93 A0 to A1 lists differences between A0 to A1 parts. An alternative description is “Sillicon 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"

Preface

The meta-tq layer extends the Yocto Project's reference system Poky to provide support for a selection of TQ Embedded CPU Modules, including the TQMa93xxLA.

It uses the same codebase as the PTXdist based TQ Linux BSPs and therefore provides the same versions of U-Boot and Linux kernel, but doesn't define a specific root filesystem configuration.

Because of the dependencies to the other yocto layers we recommend to use ci-meta-tq which already provides all required yocto layers as git submodules instead of meta-tq to build this BSP release.

The instructions on this page refer to the BSP and ancillary tools listed in the following table:

BSP Revision 0006
meta-tq release scarthgap.TQ.ARM.BSP.0006
Yocto Project / Poky Release 5.0.11
Target machine1) tqma93xxla-mba93xxla
U-Boot v2024.04
Linux Kernel TQMa-fslc-6.6-2.2.x-imx
TQM-linux-v6.12.y


The goal of these wiki pages is to get you started using ci-meta-tq with the STKa93xxLA, so instead of reinventing the wheel we will adhere to the very compact Yocto Project Quick Build and supply details specific to the STKa93xxLA where necessary.

For further details regarding Yocto Project 5.0.11 - Scarthgap please refer to its official documentation.

Prerequisites

Build Host

Yocto Project / Poky requires a Linux build host, so first of all you need a development workstation (or a virtual machine2)) with a Linux distribution installed.

Please refer to section Supported Linux Distribution of the Yocto Project Quick Start for supported linux distributions and section Required Packages for the Build Host for required build host packages for those distributions.

The instructions on this page have been tested on Ubuntu 22.04 (64 bit) in a VMWare virtual machine.

Although not required by Yocto Project / Poky, we also recommend to configure and run a tftp server (for image download / update) and an nfs server (for network mounted root filesystem) on your development host.

Yocto BSP Build Instructions

Yocto BSP

1. Open a new terminal and create a directory for the BSP build e.g. in the home directory and navigate to that directory.

mkdir -p ~/workspace/scarthgap.TQ.ARM.BSP.0006
cd ~/workspace/scarthgap.TQ.ARM.BSP.0006

2. Create a local copy of ci-meta-tq

git clone --recurse-submodules https://github.com/tq-systems/ci-meta-tq.git

3. Checkout BSP release on new local branch.

cd ci-meta-tq
git checkout scarthgap.TQ.ARM.BSP.0006 -b scarthgap-tqma93xxla

4. Update git submodules:

git submodule sync
git submodule update --init

5. Setup local branch to track the remote branch.

git branch -u origin/scarthgap

6. Configure the Build for Linux Mainline or NXP Kernel:

The environment DISTRO and MACHINE3) have to be exported before initializing the build environment with the setup-environment script.

NXP Kernel:

export DISTRO=dumpling-wayland-nxp
export MACHINE=tqma93xxla-mba93xxla
source setup-environment tqma93xxla_build imx

Linux Mainline Kernel:

export DISTRO=dumpling-wayland
export MACHINE=tqma93xxla-mba93xxla
source setup-environment tqma93xxla_build mainline
Each time a new terminal is opened, the build environment must be reinitialised. The command described above is intended for the initial build space initialisation. To return to an existing buildspace open up a new terminal and navigate to the ci-meta-tq folder and execute the following command:
source setup-environment tqma93xxla_build  

7. Build an Image for STKa93xxLA:

Image with debug features/root login

bitbake tq-image-weston-debug

Image with IMAGE_FEATURES debug and debug-tweaks enabled to have an open root login for console and ssh for ease of development and testing.

Image without debug features/root login

bitbake tq-image-weston

Image without IMAGE_FEATURES debug and debug-tweaks enabled. A user login is not allowed with this image, if a login is required, please see poky documentation for extrausers.bbclass

For further information to the TQ image recipes, please refer to the section Image recipes from the meta-dumpling Yocto layer documentation.
meta-dumpling documentation

The resulting image is tmp/deploy/images/tqma93xxla-mba93xxla4)/tq-image-weston-tqma93xxla-mba93xxla5).wic


8. Write the Image6)7)

sudo dd if=tmp/deploy/images/tqma93xxla-mba93xxla/tq-image-weston-tqma93xxla-mba93xxla.wic of=/dev/<TARGET_DEVICE>
Please see Create SD Card with BSP Image for detailed instructions.

9. Boot the STKa93xxLA from SD card (cf. MBa93xxLA DIP switch settings) |

1)
i.e. value for MACHINE variable
2)
for testing purposes Yocto Project provides a ready to use virtual machine called Build Appliance
3)
valid machines are
tqma93xxla-mba93xxla
4)
valid machines are
tqma93xxla-mba93xxla
5)
valid machines are
tqma93xxla-mba93xxla
6)
valid machines are
tqma93xxla-mba93xxla
7)
TARGET_DEVICE has to be an SD card
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.