TQMa62xx - 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 TQMa62xx 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 gawk wget git diffstat unzip texinfo gcc build-essential chrpath socat cpio python3 python3-pip python3-pexpect xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa-dev libsdl1.2-dev xterm python3-subunit mesa-common-dev zstd liblz4-tool python3-pyelftools python3-jsonschema swig libgnutls28-dev yamllint
Install the required cross-compilers for ARM (32-bit R5) and AArch64 (64-bit A53) architectures:
sudo apt install gcc-arm-linux-gnueabihf gcc-aarch64-linux-gnu
Create a dedicated working directory for the compilation process and move into it:
mkdir tqma62xx cd tqma62xx
Setup Shell Environment
Export the required environment variables to simplify path management during compilation.
export UBOOT_DIR=/home/embedded/tqma62xx/u-boot-tqmaxx export K3IG_DIR=/home/embedded/tqma62xx/k3-image-gen export TFA_DIR=/home/embedded/tqma62xx/arm-trusted-firmware export OPTEE_DIR=/home/embedded/tqma62xx/optee_os
TI System Firmware (SYSFW)
Clone the Texas Instruments firmware repository and check out the validated release tag:
cd ~/tqma62xx git clone https://git.ti.com/git/processor-firmware/ti-linux-firmware.git cd ti-linux-firmware git checkout 12.00.00.27
k3-image-gen
Clone the TI K3 image generation utility repository:
cd ~/tqma62xx git clone https://git.ti.com/git/k3-image-gen/k3-image-gen.git
ARM Trusted Firmware (ATF)
Clone the official ATF repository, switch to the validated commit, and build the firmware for the K3 platform:
cd ~/tqma62xx git clone https://github.com/ARM-software/arm-trusted-firmware.git cd arm-trusted-firmware git checkout 76500ceaeefcda967d8a1f4e30bb04f9fe0425a2 make CROSS_COMPILE=aarch64-linux-gnu- ARCH=aarch64 PLAT=k3 TARGET_BOARD=lite SPD=opteed
OP-TEE OS
Clone the TI OP-TEE repository, switch to the validated commit, and compile the secure OS binaries:
cd ~/tqma62xx git clone https://git.ti.com/git/optee/ti-optee-os.git cd ti-optee-os git checkout f2a7ad0638aeff5243593b33cc56ad064cae7615 make PLATFORM=k3 CFG_ARM64_core=y CROSS_COMPILE=arm-linux-gnueabihf- CROSS_COMPILE64=aarch64-linux-gnu- PLATFORM=k3-am62x CFG_ARM64_core=y
U-Boot
Clone the TQ U-Boot repository and check out the specific BSP release branch. Symbolic links to the TI firmware directories are required before compilation:
cd ~/tqma62xx git clone https://github.com/tq-systems/u-boot-tqmaxx.git cd u-boot-tqmaxx git checkout ba233196ee92a301b910ea360c174033ac3b07b8 ln -s /home/embedded/tqma62xx/ti-linux-firmware/ti-dm/ ti-dm ln -s /home/embedded/tqma62xx/ti-linux-firmware/ti-sysfw/ ti-sysfw
First, build the R5 core (32-bit SPL) components:
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- tqma62xx_mba62xx_r5_defconfig O=$UBOOT_DIR/out/r5 make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- O=$UBOOT_DIR/out/r5
Second, build the A53 core (64-bit) components, incorporating the previously compiled ATF and OP-TEE binaries:
make ARCH=arm CROSS_COMPILE=aarch64-linux-gnu- tqma62xx_mba62xx_a53_defconfig O=$UBOOT_DIR/out/a53 make ARCH=arm CROSS_COMPILE=aarch64-linux-gnu- BL31=$TFA_DIR/build/k3/lite/release/bl31.bin TEE=$OPTEE_DIR/out/arm-plat-k3/core/tee-pager_v2.bin O=$UBOOT_DIR/out/a53
Deployment Binary Collection
Create a destination directory and collect all relevant bootloader binaries required for deployment:
mkdir ~/tqma62xx/u-boot-binaries/ cp $UBOOT_DIR/out/r5/tiboot3-am62x-gp-tqma62xx.bin ~/tqma62xx/u-boot-binaries/ cp $UBOOT_DIR/out/r5/tiboot3-am62x-hs-tqma62xx.bin ~/tqma62xx/u-boot-binaries/ cp $UBOOT_DIR/out/r5/tiboot3-am62x-hs-fs-tqma62xx.bin ~/tqma62xx/u-boot-binaries/ cp $UBOOT_DIR/out/r5/tiboot3-am62x-gp-tqma62xx.bin ~/tqma62xx/u-boot-binaries/tiboot3.bin cp $UBOOT_DIR/out/a53/u-boot.img ~/tqma62xx/u-boot-binaries/