This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM62A7: Yocto build issue with SDK 9.0

Part Number: AM62A7

We are build SDK9.0 yocto for AM62A7 evk and facing below issue

when building tisdk-edgeai-image the binaries deployed in images folder are for tisdk-default-image

also below error was shown when building image

ERROR: ti-edgeai-firmware-AUTOINC+1319f46f38-r0 do_install: ExecutionError('/home/user/yocto/AM62A7-Linux6.1/oe-layersetup/build/arago-tmp-default-glibc/work/am62axx_evm-oe-linux/ti-edgeai-firmware/AUTOINC+1319f46f38-r0/temp/run.do_install.3704254', 1, None, None)
ERROR: Logfile of failure stored in: /home/user/yocto/AM62A7-Linux6.1/oe-layersetup/build/arago-tmp-default-glibc/work/am62axx_evm-oe-linux/ti-edgeai-firmware/AUTOINC+1319f46f38-r0/temp/log.do_install.3704254
Log data follows:
| DEBUG: Executing python function extend_recipe_sysroot
| NOTE: Direct dependencies are ['/home/user/yocto/AM62A7-Linux6.1/oe-layersetup/sources/oe-core/meta/recipes-devtools/opkg-utils/opkg-utils_0.5.0.bb:do_populate_sysroot', '/home/user/yocto/AM62A7-Linux6.1/oe-layersetup/sources/oe-core/meta/recipes-devtools/quilt/quilt-native_0.67.bb:do_populate_sysroot', 'virtual:native:/home/user/yocto/AM62A7-Linux6.1/oe-layersetup/sources/meta-ti/meta-ti-bsp/recipes-ti/secdev/ti-k3-secdev_git.bb:do_populate_sysroot', 'virtual:native:/home/user/yocto/AM62A7-Linux6.1/oe-layersetup/sources/oe-core/meta/recipes-connectivity/openssl/openssl_3.0.9.bb:do_populate_sysroot', 'virtual:native:/home/user/yocto/AM62A7-Linux6.1/oe-layersetup/sources/oe-core/meta/recipes-devtools/patch/patch_2.7.6.bb:do_populate_sysroot', 'virtual:native:/home/user/yocto/AM62A7-Linux6.1/oe-layersetup/sources/oe-core/meta/recipes-devtools/pseudo/pseudo_git.bb:do_populate_sysroot']
| NOTE: Installed into sysroot: []
| NOTE: Skipping as already exists in sysroot: ['opkg-utils', 'quilt-native', 'ti-k3-secdev-native', 'openssl-native', 'patch-native', 'pseudo-native', 'gcc-runtime', 'glibc', 'perl-native', 'libtool-native', 'attr-native', 'linux-libc-headers', 'libgcc', 'make-native', 'zlib-native', 'xz-native', 'gdbm-native', 'texinfo-dummy-native', 'gettext-minimal-native']
| DEBUG: Python function extend_recipe_sysroot finished
| DEBUG: Executing shell function do_install
| /home/user/yocto/AM62A7-Linux6.1/oe-layersetup/build/arago-tmp-default-glibc/work/am62axx_evm-oe-linux/ti-edgeai-firmware/AUTOINC+1319f46f38-r0/git//vx_app_rtos_linux_mcu1_0.out: No such file or directory
| 806B928F207F0000:error:80000002:system library:file_ctrl:No such file or directory:../openssl-3.0.9/crypto/bio/bss_file.c:297:calling fopen(/home/user/yocto/AM62A7-Linux6.1/oe-layersetup/build/arago-tmp-default-glibc/work/am62axx_evm-oe-linux/ti-edgeai-firmware/AUTOINC+1319f46f38-r0/git//vx_app_rtos_linux_mcu1_0.out, r)
| 806B928F207F0000:error:10080002:BIO routines:file_ctrl:system lib:../openssl-3.0.9/crypto/bio/bss_file.c:300:
| cat: /home/user/yocto/AM62A7-Linux6.1/oe-layersetup/build/arago-tmp-default-glibc/work/am62axx_evm-oe-linux/ti-edgeai-firmware/AUTOINC+1319f46f38-r0/git//vx_app_rtos_linux_mcu1_0.out: No such file or directory
| Error checking x509 extension section v3_ca
| 80CB477FFC7E0000:error:07800079:common libcrypto routines:ossl_hexstr2buf_sep:hex string too short:../openssl-3.0.9/crypto/o_str.c:195:
| 80CB477FFC7E0000:error:068000B2:asn1 encoding routines:asn1_str2type:illegal hex:../openssl-3.0.9/crypto/asn1/asn1_gen.c:695:string=
| 80CB477FFC7E0000:error:11000074:X509 V3 routines:v3_generic_extension:extension value error:../openssl-3.0.9/crypto/x509/v3_conf.c:256:value=SEQUENCE:sysfw_image_integrity
| cat: /home/user/yocto/AM62A7-Linux6.1/oe-layersetup/build/arago-tmp-default-glibc/work/am62axx_evm-oe-linux/ti-edgeai-firmware/AUTOINC+1319f46f38-r0/git//vx_app_rtos_linux_mcu1_0.out: No such file or directory
| /home/user/yocto/AM62A7-Linux6.1/oe-layersetup/build/arago-tmp-default-glibc/work/am62axx_evm-oe-linux/ti-edgeai-firmware/AUTOINC+1319f46f38-r0/git//vx_app_rtos_linux_c7x_1.out: No such file or directory
| 800B68C24A7F0000:error:80000002:system library:file_ctrl:No such file or directory:../openssl-3.0.9/crypto/bio/bss_file.c:297:calling fopen(/home/user/yocto/AM62A7-Linux6.1/oe-layersetup/build/arago-tmp-default-glibc/work/am62axx_evm-oe-linux/ti-edgeai-firmware/AUTOINC+1319f46f38-r0/git//vx_app_rtos_linux_c7x_1.out, r)
| 800B68C24A7F0000:error:10080002:BIO routines:file_ctrl:system lib:../openssl-3.0.9/crypto/bio/bss_file.c:300:
| cat: /home/user/yocto/AM62A7-Linux6.1/oe-layersetup/build/arago-tmp-default-glibc/work/am62axx_evm-oe-linux/ti-edgeai-firmware/AUTOINC+1319f46f38-r0/git//vx_app_rtos_linux_c7x_1.out: No such file or directory
| Error checking x509 extension section v3_ca
| 803B41401C7F0000:error:07800079:common libcrypto routines:ossl_hexstr2buf_sep:hex string too short:../openssl-3.0.9/crypto/o_str.c:195:
| 803B41401C7F0000:error:068000B2:asn1 encoding routines:asn1_str2type:illegal hex:../openssl-3.0.9/crypto/asn1/asn1_gen.c:695:string=
| 803B41401C7F0000:error:11000074:X509 V3 routines:v3_generic_extension:extension value error:../openssl-3.0.9/crypto/x509/v3_conf.c:256:value=SEQUENCE:sysfw_image_integrity
| cat: /home/user/yocto/AM62A7-Linux6.1/oe-layersetup/build/arago-tmp-default-glibc/work/am62axx_evm-oe-linux/ti-edgeai-firmware/AUTOINC+1319f46f38-r0/git//vx_app_rtos_linux_c7x_1.out: No such file or directory
| install: cannot stat '/home/user/yocto/AM62A7-Linux6.1/oe-layersetup/build/arago-tmp-default-glibc/work/am62axx_evm-oe-linux/ti-edgeai-firmware/AUTOINC+1319f46f38-r0/git//vx_app_rtos_linux_mcu1_0.out': No such file or directory
| WARNING: /home/user/yocto/AM62A7-Linux6.1/oe-layersetup/build/arago-tmp-default-glibc/work/am62axx_evm-oe-linux/ti-edgeai-firmware/AUTOINC+1319f46f38-r0/temp/run.do_install.3704254:156 exit 1 from 'install -m 0644 /home/user/yocto/AM62A7-Linux6.1/oe-layersetup/build/arago-tmp-default-glibc/work/am62axx_evm-oe-linux/ti-edgeai-firmware/AUTOINC+1319f46f38-r0/git/${FW_DIR}/${FW_NAME} /home/user/yocto/AM62A7-Linux6.1/oe-layersetup/build/arago-tmp-default-glibc/work/am62axx_evm-oe-linux/ti-edgeai-firmware/AUTOINC+1319f46f38-r0/image${INSTALL_FW_DIR}'
| WARNING: Backtrace (BB generated script):
| 	#1: do_install, /home/user/yocto/AM62A7-Linux6.1/oe-layersetup/build/arago-tmp-default-glibc/work/am62axx_evm-oe-linux/ti-edgeai-firmware/AUTOINC+1319f46f38-r0/temp/run.do_install.3704254, line 156
| 	#2: main, /home/user/yocto/AM62A7-Linux6.1/oe-layersetup/build/arago-tmp-default-glibc/work/am62axx_evm-oe-linux/ti-edgeai-firmware/AUTOINC+1319f46f38-r0/temp/run.do_install.3704254, line 165
NOTE: Deferred task mc:k3r5:virtual:native:/home/user/yocto/AM62A7-Linux6.1/oe-layersetup/sources/oe-core/meta/recipes-devtools/python/python3-jsonpointer_2.2.bb:do_populate_sysroot now buildable
ERROR: Task (/home/user/yocto/AM62A7-Linux6.1/oe-layersetup/sources/meta-edgeai/recipes-tisdk/ti-psdk-rtos/ti-edgeai-firmware.bb:do_install) failed with exit code '1'

How to resolve the compilation error?

  • Hi!

    are you building on an Ubuntu 22.04 machine as recommended in the SDK docs? If not can you try this? Even if you did, can you try a new/different machine?

    Also, can you confirm/double check that you followed all(!) of the setup/pre-requisite steps documented at https://software-dl.ti.com/jacinto7/esd/processor-sdk-linux-edgeai/AM62AX/09_00_00/exports/docs/linux/Overview_Building_the_SDK.html#prerequisites-one-time-setup?

    Regards, Andreas

  • Hi Andreas,

    We are using Ubuntu 20.04 machine for compilation.

    After adding below 2 lines in ti-edgeai-firmware.bb file compilation issue is resolved but the name of the rootfs built is tisdk-default image and not the tisdk-edgeai image.

    FW_DIR ??= "${PLAT_SFX}/vision_apps_eaik"

    INSTALL_FW_DIR ??= "${nonarch_base_libdir}/firmware/vision_apps_eaik/"

    All the steps and host packages are installed in the host machine referring the link

  • Hi,

    I was building for am62axx-evm and I faced the same issue. With some poking around, I was able to resolve the issue by adding these 2 lines in the recipe file "~tisdk\sources\meta-edgeai\recipes-tisdk\ti-psdk-rtos\ti-edgeai-firmware.bb" :

    FW_DIR:am62axx = "${PLAT_SFX}/vision_apps_eaik"
    INSTALL_FW_DIR:am62axx = "${nonarch_base_libdir}/firmware/vision_apps_eaik/"

    These should work. If they don't, please tweak these accordingly.

    Best regards,
    Aiyappa

  • Hi Andreas,

    There is a bit of confusion in the documentation given in below link

    https://software-dl.ti.com/jacinto7/esd/processor-sdk-linux-edgeai/AM62AX/09_00_00/exports/docs/linux/Overview_Building_the_SDK.html

    The build steps shows to download the configs/processor-sdk/processor-sdk-08.06.00-config.txt file but under yocto layer configuration it mentions to download processor-sdk-analytics-09.00.00-config.txt file

    Which one should we use to build for SDK 9.0?

  • Are you able to build tisdk-edgeai file system using yocto?

    the generated file system lists as tisdk-default image under deploy directory

  • There is a bit of confusion in the documentation given in below link

    https://software-dl.ti.com/jacinto7/esd/processor-sdk-linux-edgeai/AM62AX/09_00_00/exports/docs/linux/Overview_Building_the_SDK.html

    The build steps shows to download the configs/processor-sdk/processor-sdk-08.06.00-config.txt file but under yocto layer configuration it mentions to download processor-sdk-analytics-09.00.00-config.txt file

    Which one should we use to build for SDK 9.0?

    I agree, this is not 100% clear. You for sure will want to use the processor-sdk-analytics-09.00.00-config.txt configuration file, as referenced from the Yocto layer configuration link in that section of the docs.

    Are you able to build tisdk-edgeai file system using yocto?

    the generated file system lists as tisdk-default image under deploy directory

    For AM62A, what you want to build to get started with the device and the SK board is the all-encompassing tisdk-edgeai-image image. It should generate image files/tarballs etc. with the same base name but I've not tried it myself. I'm kicking off a test build right now and report back when it is done.

    Regards, Andreas

  • Hi Vinay,

    I have built tisdk-base-image since a minimal file systme was enough for me. 

    Like you pointed out the documentation is sometimes not updated. So, we need to use it more as a guide and tweak the commands accordingly.
    I used this command for configuring:
    ./oe-layertool-setup.sh -f configs/processor-sdk/processor-sdk-09.00.00-config.txt

    I built it on Ubuntu 22.04.1 LTS. I only faced the "ti-edgeai-firmware" problem. After fixing that build succeeded.

    Best regards,
    Aiyappa

  • Hi Aiyappa,

    I built it on Ubuntu 22.04.1 LTS. I only faced the "ti-edgeai-firmware" problem. After fixing that build succeeded.

    How did you fix this?

    My test build just finished, and I believe I ran into the same issue as OP/Vinay:

    <...snip...>
    NOTE: Tasks Summary: Attempted 11329 tasks of which 10202 didn't need to be rerun and 2 failed.
    NOTE: Writing buildhistory
    NOTE: Writing buildhistory took: 5 seconds
    NOTE: Writing buildhistory
    NOTE: Writing buildhistory took: 2 seconds
    
    Summary: 2 tasks failed:
      /home/a0797059/tisdk/am62axx-evm/sources/meta-edgeai/recipes-tisdk/ti-psdk-rtos/ti-edgeai-firmware.bb:do_install
      /home/a0797059/tisdk/am62axx-evm/sources/meta-edgeai/recipes-tisdk/edgeai-components/edgeai-tiovx-kernels.bb:do_compile
    Summary: There were 8 WARNING messages.
    Summary: There were 2 ERROR messages, returning a non-zero exit code.
    a0797059@dasso:~/tisdk/am62axx-evm/build (master)

    Regards, Andreas

  • Hey Andreas,

    Sorry about the problem. I added these 2 lines in the file "~tisdk\sources\meta-edgeai\recipes-tisdk\ti-psdk-rtos\ti-edgeai-firmware.bb" :

    FW_DIR:am62axx = "${PLAT_SFX}/vision_apps_eaik"
    INSTALL_FW_DIR:am62axx = "${nonarch_base_libdir}/firmware/vision_apps_eaik/"

    You can refer to my file here:
    https://drive.google.com/file/d/1juitwXgnSeE7ursYGWtJOgwsYReO1dbV/view?usp=drive_link

    Please search for "aiyps" in the file.

    Good luck.

    Best regards,
    Aiyappa

  • All,

    I've since talked to the development team, and they said one step in the build documentation was missed. They are updating the documentation, but below is what I was given as the proper steps. Will try those out myself as well to double-check and confirm.

    $ git clone https://git.ti.com/git/arago-project/oe-layersetup.git tisdk
    $ cd tisdk
    $ ./oe-layertool-setup.sh -f configs/processor-sdk-analytics/processor-sdk-analytics-09.00.00-config.txt
    $ cd build
    $ . conf/setenv
    $ echo 'EDGEAI_BRAND = "edgeai"' >> conf/local.conf
    $ MACHINE=am62axx-evm bitbake -k tisdk-edgeai-image

    Regards, Andreas

  • Hi Andreas,

    After adding the following changes tisdk-edgeai-firmware package issue is resolved but edgeai-tiovx-kernels.bb package does not build properly

    it shows some undefined reference to function colorConvert_U8toNV12_i8u_o8u_armv8 added in the latest commit, kindly refer below commit

    https://git.ti.com/cgit/edgeai/edgeai-tiovx-kernels/commit/?h=develop&id=048bb17ccee321d1dab0752e61be953f7b04e396

    Is there any fix to build edgeai-tiovx-kernels package?

  • Vinay, Aiyappa,

    after some debugging I found there was an error in the build steps provided earlier. The "edgeai branding" needs to be applied to conf/local.conf, NOT conf/layers.conf. I've updated the build steps accordingly.

    Also, I confirmed that we must build using configs/processor-sdk-analytics/processor-sdk-analytics-09.00.00-config.txt, NOT the other configuration file for layer setup.

    With both changes and trying clean builds however I'm still seeing a single error message (progress!). However debugging this some and making some change I was not able to resolve this quickly. The remaining error is shown below. I'll file an internal issue report and continue working this with the development team and report back here asap.

    Remaining error:

    /home/a0797059/tisdk/am62axx-evm/build/arago-tmp-default-glibc/work/aarch64-oe-linux/ti-vision-apps/1.0-r0_edgeai_0/repo/sdk_builder yocto_build
    make: *** /home/a0797059/tisdk/am62axx-evm/build/arago-tmp-default-glibc/work/aarch64-oe-linux/ti-vision-apps/1.0-r0_edgeai_0/repo/sdk_builder: No such file or directory.  Stop.
    ERROR: oe_runmake failed
    
    <...snip...>
    
    NOTE: Writing buildhistory
    NOTE: Writing buildhistory took: 4 seconds
    NOTE: Writing buildhistory
    NOTE: Writing buildhistory took: 2 seconds
    
    Summary: 1 task failed:
      /home/a0797059/tisdk/am62axx-evm/sources/meta-edgeai/recipes-tisdk/ti-psdk-rtos/ti-vision-apps.bb:do_compile
    Summary: There were 6 WARNING messages.
    Summary: There were 2 ERROR messages, returning a non-zero exit code.

    Regards, Andreas

  • Hi Andreas,

    Any update on the issue?

  • Hi Vinay,

    I'm supposed to have a joint debug session with the responsible developer today. Will keep this thread updated with any results, if any. I want to understand this (and fix, as needed) as much as you do so stay tuned.

    Regards, Andreas

  • Hi Vinay,

    I had a debug session today with the developer and we were able to figure out what was going on, and come up with a way to fix it. Somehow the ti-vision-apps recipe-related sources which are fetched via `repo` can get stale/out of sync, leading to an invalid/old source snapshot. I suspect this may have happened by having used an incorrect oe-layertool-setup.sh tool config initially on a given system (remember, the correct one for AM62A is configs/processor-sdk-analytics/processor-sdk-analytics-09.00.00-config.txt), or perhaps for some other reason.

    To solve this issue, please try the following two steps:

    1. Manually clean the recipe and any shared state and build artifacts via MACHINE=am62axx-evm bitbake -c cleanall ti-vision-apps
    2. Manually delete all download artifacts, like this (make sure to use the correct path to your specific download folder!) rm -rvf ../../downloads/repo*

    As a corrective action we'll be trying to make the build process more robust by improving the fetch mechanism for this particular recipe, this effort is internally tracked as SITSW-2887.

    Regards, Andreas