Table of Contents

TQMa8MPxS - YOCTO Linux BSP documentation


Build Bootstream manually

Prerequisites

In preparation for this guide, ensure the development host is set up correctly. With the following instructions, the bootstream for the TQMa8MPxS can be built manually on an Ubuntu 24.04 host system.

Manual compilation workflow

Compiling U-Boot and assembling the bootstream

To get started, the required host toolchain packages and utilities must be installed on the development host:

sudo apt install device-tree-compiler zlib1g-dev gcc-aarch64-linux-gnu bison flex

Create a dedicated working directory for the compilation process and move into it:

mkdir bootstream
cd bootstream

ARM Trusted Firmware (ATF)

Clone the TQ ATF repository, check out the validated commit, and build the required bl31.bin binary:

git clone https://github.com/tq-systems/atf.git
cd atf
git checkout 6dca42494cb9c5535cb1e90f748b476d0c65f76f

make CROSS_COMPILE=aarch64-linux-gnu- PLAT=imx8mp bl31
cd ..

NXP Firmware IMX

Download the matching NXP firmware container and extract the mandatory DDR PHY initialization blobs.

IMPORTANT: The NXP End User License Agreement (EULA) must be accepted during the execution of the binary script package.
mkdir firmware-imx
cd firmware-imx
wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.22.bin
chmod +x firmware-imx-8.22.bin
./firmware-imx-8.22.bin
cd ..

U-Boot

Clone the TQ U-Boot repository, switch to the specified hardware release commit, and build the bootloader package using the specific board defconfig:

git clone https://github.com/tq-systems/u-boot-tqmaxx.git
cd u-boot-tqmaxx
git checkout ca97a60386585c0708dc46950dc32d2496219738

make tqma8mpxs_multi_mb_smarc_2_defconfig
make BL31=../atf/build/imx8mp/release/bl31.bin CROSS_COMPILE=aarch64-linux-gnu-
cd ..

Image Assembly (imx-mkimage)

To generate the final bootable container file, clone the imx-mkimage tool utility and collect all previously built artifacts into the correct SoC target folder:

git clone https://github.com/nxp-imx/imx-mkimage.git
cd imx-mkimage
git checkout 81fca6434be0610f3f9216a762aadc4dc3e8d8db

cp ../u-boot-tqmaxx/arch/arm/dts/imx8mp-tqma8mpqs-mb-smarc-2.dtb ./iMX8M
cp ../u-boot-tqmaxx/u-boot-nodtb.bin ./iMX8M
cp ../u-boot-tqmaxx/spl/u-boot-spl.bin ./iMX8M
cp ../u-boot-tqmaxx/tools/mkimage ./iMX8M/mkimage_uboot
cp ../atf/build/imx8mp/release/bl31.bin ./iMX8M
cp ../firmware-imx/firmware-imx-8.22/firmware/ddr/synopsys/lpddr4_pmu* ./iMX8M

cd iMX8M
ln -s imx8mp-tqma8mpqs-mb-smarc-2.dtb imx8mp-evk.dtb
touch tee.bin
cd ..

Now execute the final packaging step to compile the flashable stream target:

make SOC=iMX8MP EXT_DTB=imx8mp-tqma8mpqs-mb-smarc-2 BL32=none flash_evk
The generated deployment binary file will be located directly within the build directory structure upon successful completion.
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.