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.

AM625: Missing files in SDK build from meta-toolchain-arago-tisdk

Part Number: AM625

Hello,

I have tried to build SDK using 2 methodes from SDK 08.04.01.04 (dunfell) ;

1 - bibake image-base -c populate-sdk, with missing dependency atomic-dev in conf/local.conf

The SDK is generated, but hang during installation, there are some errors.

2- bitbake meta-toolchain-arago-tisdk, with TOOLCHAIN_TARGET_TASK customized with packages xenomai, chromium, apps, ...)

The installation is successfull.

I have 2 file: environment-setup and environment-setup-aarch64-linux, but none of the files allow me to build my applications.

I use the same source code for the apps that is successfully compiling using bitbake.

It seems some system header files are missing :

For environment-setup-aarch64-linux the error concerns <sys/mman.h>.

For environment-setup-aarch64-linux the error concerns <errno.h>

I use the following external toolchains :

https://nexus-energie.actiatelecom.fr/repository/tools/gcc/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu.tar.xz
https://nexus-energie.actiatelecom.fr/repository/tools/gcc/gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf.tar.xz


The sys/mman.h is not available in the /usr/local/arago-2021.09 directory on the host where the sdk is installed.

I tried to follow the thread : https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1202155/faq-am6x-am335x-am437x-using-a-yocto-internal-toolchain-for-target-image-builds-and-cross-development-sdk-installer-generation-with-yocto-dunfell-based-v8-x-sdks-for-sitara-mpus
But my SDK is sdk 8.4 not 8.5 as requested in the thread.

So could you tell me what is the best way to fix the issue:
1 - Force the patch on SDK 8.4
2 - Upgrade to 8.5
3 - Upgrade to 8.6
4 - Switch to kirkstone if it is a stable release ?

Could you tell me how to fix this issue, please ? ​

Best Regards,

Alexis.

  • Hi Alexis,

    I have 2 file: environment-setup and environment-setup-aarch64-linux, but none of the files allow me to build my applications.

    You need to use environment-setup when working with the meta-toolchain-arago-tisdk -based toolchain installer. You can remember you got the correct one because the command prompt will turn into [linux-devkit].

    I use the same source code for the apps that is successfully compiling using bitbake.

    It seems some system header files are missing :

    For environment-setup-aarch64-linux the error concerns <sys/mman.h>.

    For environment-setup-aarch64-linux the error concerns <errno.h>

    Are you saying when you search through the installed toolchain directories those header files are nowhere to be found? When I check the toolchain installer from the SDK v8.6 those files are in there.. see below. You should see something similar from the installer you created based on SDK v8.4 sources. Those are very basic header files.

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    a0797059@dasso:~/ti/ti-processor-sdk-linux-am62xx-evm-08.06.00.42/linux-devkit
    $ find . -name mman.h
    ./sysroots/aarch64-linux/usr/include/asm/mman.h
    ./sysroots/aarch64-linux/usr/include/sys/mman.h
    ./sysroots/aarch64-linux/usr/include/asm-generic/mman.h
    ./sysroots/aarch64-linux/usr/include/bits/mman.h
    ./sysroots/aarch64-linux/usr/include/linux/mman.h
    a0797059@dasso:~/ti/ti-processor-sdk-linux-am62xx-evm-08.06.00.42/linux-devkit
    $ find . -name errno.h
    ./sysroots/x86_64-arago-linux/usr/share/ti/cgt-pru/lib/src/errno.h
    ./sysroots/x86_64-arago-linux/usr/share/ti/cgt-pru/include/errno.h
    ./sysroots/x86_64-arago-linux/usr/share/ti/cgt-c6x/include/libcxx/errno.h
    ./sysroots/x86_64-arago-linux/usr/share/ti/cgt-c6x/include/errno.h
    ./sysroots/x86_64-arago-linux/usr/share/ti/gcc-arm-none-eabi/arm-none-eabi/include/sys/errno.h
    ./sysroots/x86_64-arago-linux/usr/share/ti/gcc-arm-none-eabi/arm-none-eabi/include/errno.h
    ./sysroots/aarch64-linux/usr/include/asm/errno.h
    ./sysroots/aarch64-linux/usr/include/sys/errno.h
    ./sysroots/aarch64-linux/usr/include/errno.h
    ./sysroots/aarch64-linux/usr/include/asm-generic/errno.h
    ./sysroots/aarch64-linux/usr/include/bits/errno.h
    ./sysroots/aarch64-linux/usr/include/linux/errno.h
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    This steps should work more or less for all TI Processor SDK Linux v8.x variants. Perhaps a patch may not be needed or doesn't apply cleanly, but those things should be easy to figure out if they occur. If you have a specific issue adopting this solution let me know and I can provide some additional guidance.

    So could you tell me what is the best way to fix the issue:
    1 - Force the patch on SDK 8.4
    2 - Upgrade to 8.5
    3 - Upgrade to 8.6
    4 - Switch to kirkstone if it is a stable release ?

    I wouldn't expect moving to 8.5 or 8.6 having any impact on your particular concern, as the "Yocto table stakes" should be more or less the same. What will be the main benefit of going to 8.5 or 8.6 will be the better and more robust support of AM62x device features mostly through updated Linux Kernel and U-Boot trees that are included. You can see the changes here:

    https://software-dl.ti.com/processor-sdk-linux/esd/AM62X/08_05_00_21/exports/docs/devices/AM62X/linux/Release_Specific_Release_Notes.html

    https://software-dl.ti.com/processor-sdk-linux/esd/AM62X/08_06_00_42/exports/docs/devices/AM62X/linux/Release_Specific_Release_Notes.html

    Regards, Andreas

  • Hi Andreas,

    Here is the search of the file in the SDK installation folder:

    # cd /usr/local/arago-2021.09

    # find . -name mman.h

    # find . -name errno.h

    ./sysroots/x86_64-arago-linux/usr/share/ti/cgt-pru/include/errno.h
    ./sysroots/x86_64-arago-linux/usr/share/ti/cgt-pru/lib/src/errno.h
    ./sysroots/x86_64-arago-linux/usr/share/ti/cgt-c6x/include/libcxx/errno.h
    ./sysroots/x86_64-arago-linux/usr/share/ti/cgt-c6x/include/errno.h
    ./sysroots/x86_64-arago-linux/usr/share/ti/gcc-arm-none-eabi/arm-none-eabi/include/sys/errno.h
    ./sysroots/x86_64-arago-linux/usr/share/ti/gcc-arm-none-eabi/arm-none-eabi/include/errno.h

    So there's nothing in sysroot directory.

    After executed : source /usr/local/arago-2021.09/environment-setup

    The prompt is unchanged, my shell is :

    $ echo $SHELL 

    /usr/bin/zsh

    Yesterday I launch to compilation of the SDK from fresh setup (docker Ubuntu 18.04.6 LTS) :

    1 - SDK 08.06 :

    ./oe-layertool-setup.sh -f configs/processor-sdk/processor-sdk-08.06.00-config.txt 

    MACHINE=am62xx-evm bitbake tisdk-base-image && MACHINE=am62xx-evm bitbake tisdk-base-image -c populate_sdk

    2 - SDK 08.05 :

    ./oe-layertool-setup.sh -f configs/processor-sdk/processor-sdk-08.05.00.21-config.txt

    git -C meta-arago am 0001-meta-toolchain-arago-fix-internal-toolchain-installe.patch
    git -C meta-arago am 0002-tisdk-default-image-Add-Qt5-to-generated-SDK-when-us.patch
    git -C meta-arm am 0001-optee-os_git.bb-Update-LIBGCC_LOCATE_CFLAGS-sysroot-.patch
    git -C meta-arm am 0002-optee-os-Add-missing-sysroot-compiler-flag.patch
    git -C meta-ti am 0001-optee-os-Fix-SRC_URI-to-allow-inherited-patch-to-get.patch

    There's no error when patch are applied.

    MACHINE=am62xx-evm bitbake tisdk-base-image && MACHINE=am62xx-evm bitbake tisdk-base-image -c populate_sdk

    For both I have the same error :

    ERROR: tisdk-base-image-1.0-r0.tisdk1 do_populate_sdk: Unable to install packages. Command '/workspace/tisdk/build/arago-tmp-external-arm-glibc/work/am62xx_evm-linux/tisdk-base-image/1.0-r0.tisdk1/recipe-sysroot-native/usr/bin/opkg --volatile-cache -f /workspace/tisdk/build/arago-tmp-external-arm-glibc/work/am62xx_evm-linux/tisdk-base-image/1.0-r0.tisdk1/opkg.conf -t /workspace/tisdk/build/arago-tmp-external-arm-glibc/work/am62xx_evm-linux/tisdk-base-image/1.0-r0.tisdk1/temp/ipktemp/ -o /workspace/tisdk/build/arago-tmp-external-arm-glibc/work/am62xx_evm-linux/tisdk-base-image/1.0-r0.tisdk1/sdk/image/tmp/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy/sysroots/aarch64-linux --force_postinstall --add-ignore-recommends ti-llvm3.6-dev --add-ignore-recommends opencl-monitor-dev --add-ignore-recommends libulm-dev --add-ignore-recommends gdbserver-c6x-dev --add-ignore-recommends coreutils --add-ignore-recommends coreutils-dev --add-ignore-recommends busybox-syslog install opkg packagegroup-arago-base packagegroup-arago-base-tisdk packagegroup-arago-console packagegroup-core-boot packagegroup-core-standalone-sdk-target psplash resize-rootfs run-postinsts systemd-initramfs target-sdk-provides-dummy' returned 1:
    Collected errors:
    * Solver encountered 1 problem(s):
    * Problem 1/1:
    * - nothing provides libatomic-dev needed by packagegroup-core-standalone-sdk-target-1.0-r8.0.aarch64
    *
    * Solution 1:
    * - do not ask to install a package providing packagegroup-core-standalone-sdk-target

    Disfavor package: busybox-syslog
    Disfavor package: coreutils-dev
    Disfavor package: coreutils


    ERROR: Logfile of failure stored in: /workspace/tisdk/build/arago-tmp-external-arm-glibc/work/am62xx_evm-linux/tisdk-base-image/1.0-r0.tisdk1/temp/log.do_populate_sdk.2568032
    ERROR: Task (/workspace/tisdk/sources/meta-arago/meta-arago-distro/recipes-core/images/tisdk-base-image.bb:do_populate_sdk) failed with exit code '1'

    Could you give me the history of the commands you executed step by step to make the SDK build from a fresh setup, please ?

    Could you also confirm the configuration to add to local.conf to add extra package sush as Xenomai.

    I spent to much time to debug the SDK, it is the fourth time I rebuild the SDK from scratch.

    So we need to figure out what the issue is coming from ?

    I really need to deliver a fully working SDK version 08.04.01.04, could you provide additional guidance. please.

    Thanks for your help,

    Best Regards,

    Alexis.

  • Hi Andreas,

    Could you answer as soon as possible to this thread, it blocks the deployment of the development tools (SDK) to our dev Team.

    Regards,

    Alexis.

  • The prompt is unchanged, my shell is :

    $ echo $SHELL 

    /usr/bin/zsh

    Can you configure using 'bash' as the system shells. It's one of the requirements for the build. Not sure how you ended up with 'zsh', usually Ubuntu default is 'dash' which doesn't work with our SDKs, causing very strange build issues. See here:

    https://software-dl.ti.com/processor-sdk-linux/esd/AM62X/08_04_01_09/exports/docs/linux/Overview_Building_the_SDK.html#prerequisites-one-time-setup

  • I really need to deliver a fully working SDK version 08.04.01.04, could you provide additional guidance. please.

    I'm setting up and kicking off a clean build using processor-sdk-08.04.01.09-config.txt (this is the latest version of the AM62x SDK v8.4.x you want) and will try generating the toolchain installer using the official bitbake meta-toolchain-arago-tisdk method first (with no added packages) and have a look at the header files and report back here in a bit.

    Regards, Andreas

  • Hi Alexis,

    I setup a clean environment, built the devkit installer, verified the header files you are looking for are there, the environment can be activated successfully, and everything is working including compiling a small program that accesses a definition from errno.h. Please find all the steps below.

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    a0797059@dasso:~/tisdk/am62xx-evm-test/build (master)
    $ MACHINE=am62xx-evm bitbake -k meta-toolchain-arago-tisdk
    NOTE: Your conf/bblayers.conf has been automatically updated.
    NOTE: Your conf/bblayers.conf has been automatically updated.
    <...>
    NOTE: Tasks Summary: Attempted 6195 tasks of which 4823 didn't need to be rerun and all succeeded.
    NOTE: Writing buildhistory
    NOTE: Writing buildhistory took: 6 seconds
    NOTE: Writing buildhistory
    NOTE: Writing buildhistory took: 1 seconds
    Summary: There were 2 WARNING messages shown.
    a0797059@dasso:~/tisdk/am62xx-evm-test/build (master)
    $ ll arago-tmp-external-arm-glibc/deploy/sdk/
    total 782848
    drwxrwxr-x 2 a0797059 a0797059 4096 Apr 18 08:14 ./
    drwxrwxr-x 6 a0797059 a0797059 4096 Apr 18 08:14 ../
    -rw-r--r-- 2 a0797059 a0797059 8106 Apr 18 08:11 arago-2021.09-aarch64-linux-tisdk.host.manifest
    -rw-r--r-- 2 a0797059 a0797059 801175336 Apr 18 08:13 arago-2021.09-aarch64-linux-tisdk.sh
    -rw-r--r-- 2 a0797059 a0797059 40397 Apr 18 08:08 arago-2021.09-aarch64-linux-tisdk.target.manifest
    -rw-r--r-- 2 a0797059 a0797059 395708 Apr 18 08:08 arago-2021.09-aarch64-linux-tisdk.testdata.json
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Note the 'sed' patch step in there is needed due to me installing this on Ubuntu 22.04, it is not relevant to the issue at hand, but may also be helpful if you give the installer to somebody that doesn't develop on Ubuntu 18.04, so I wanted to include it here too. See https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1108107/faq-am335x-am437x-am6x-can-i-use-processor-sdk-linux-v8-x-with-ubuntu-20-04-or-ubuntu-22-04/4119837#4119837 for more info on this.

    Regards, Andreas