How to build Yocto Image for TI TDA4?

In order to build a Yocto image for TI’s TDA4 with Hailo support please follow these instructions.

Build env: Ubuntu 20.04

tested release version:

TI SDK: 09.00.01.03

Hailo meta: Hailort 4.17, Tappas 3.28

Yocto version: Kirkstone

Relevant link for TI’s site:
https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1281833/faq-processor-sdk-j784s4-how-do-i-build-yocto-images-and-packages-for-j7-devices

  1. Download the SDK installer

J721e: https://www.ti.com/tool/download/PROCESSOR-SDK-LINUX-J721E/09.00.01.03

  1. Run the installer binary

  2. Run the following commands:

3.1. cd <sdk-path>

3.2. rm -rf yocto-build

3.3. sudo apt-get update

3.4.

sudo apt-get -f -y install \
git build-essential diffstat texinfo gawk chrpath socat doxygen \
dos2unix python3 bison flex libssl-dev u-boot-tools mono-devel \
mono-complete curl python3-distutils repo pseudo python3-sphinx \
g++-multilib libc6-dev-i386 jq git-lfs pigz zstd liblz4-tool \
cpio file zstd lz4

3.5. *select “No” when asked to use dash

3.6. sudo dpkg-reconfigure dash

3.7. git clone https://git.ti.com/git/arago-project/oe-layersetup.git yocto-build

3.8. cd yocto-build

3.9. ./oe-layertool-setup.sh -f configs/processor-sdk-analytics/processor-sdk-analytics-09.02.00-config.txt

3.10. cd build

3.11. . conf/setenv

3.12. *: “adas” if building the tisdk-adas-image, “edgeai” if building the tisdk-edgeai-image

echo 'EDGEAI_BRAND = "edgeai"' >> conf/bblayers.conf

3.13. *in case first build fails due to volkan, please run the build again.

3.14. MACHINE=j721e-evm bitbake -k tisdk-default-image

  1. Add the Hailo level

4.1. Under conf/bblayers.conf add

BBLAYERS += ” ${BSPDIR}/sources/meta-hailo/meta-hailo-accelerator \

${BSPDIR}/sources/meta-hailo/meta-hailo-libhailort”

BBLAYERS += ”${BSPDIR}/sources/meta-hailo/meta-hailo-tappas”

4.2. under conf/local.conf add:

IMAGE_INSTALL:append = ” hailo-firmware libhailort hailortcli hailo-pci libgsthailo”

IMAGE_INSTALL:append = ” libgsthailotools tappas-apps hailo-post-processes”

4.3. Add meta-hailo under sources directory

git clone https://github.com/hailo-ai/meta-hailo.git -b kirkstone ../sources/meta-hailo

4.4. In latest release (V3.28.1) there is an issue with the tappas-apps_3.28.1.bb which can be worked around as followed:

python () {
#if 'imx8' in d.getVar('MACHINE'):
d.setVar('REQS_FILE', d.getVar('REQS_IMX8_FILE'))
d.setVar('ARM_APPS_DIR', d.getVar('IMX8_DIR'))
#else:
# d.setVar('REQS_FILE', d.getVar('REQS_HAILO15_FILE'))
# d.setVar('ARM_APPS_DIR', d.getVar('HAILO15_DIR'))
# d.appendVar('DEPENDS', " libgstmedialib xtensor")
}

4.5. Rebuild the image

MACHINE=j721e-evm bitbake -k tisdk-default-image

The generated wic file can be found under:

yocto-build/build/arago-tmp-default-glibc/work/j721e_evm-oe-linux/tisdk-default-image/1.0-r0_tisdk_5_edgeai_0/deploy-tisdk-default-image-image-complete/tisdk-default-image-j721e-evm-20240523163735.rootfs.wic.xz

2 Likes