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: How To generate a Processor SDK LINUX AM62x from yocto using meta-toolchain-arago-tisdk

Part Number: AM625

Hello,

I need to generate the SDK linux for AM62x including the toolchain and all source needed to compile the linux kernel.

I use the SDK 09.02.01.02 and build the recipe meta-toolchain-arago-tisdk after I have build the recipe tisdk-default-image.

I installed it using the script deploy-ti/sdk/arago-2023.10-aarch64-linux-tisdk.sh.

When I have source the file /opt/arago-2023.10/environment-setup the toolchain is not found.

No file with prefix aarch64-none-linux-gnu- is avalaible in the /opt/arago-2023.10 directory.

How could I generate the setup file like ti-processor-sdk-linux-am62xx-evm-09.02.01.09-Linux-x86-Install.bin.

Regards,

Alexis.

  • Hi Alexis,

    I just kicked off a build to investigate, it'll take a bit go through. A toolchain should be part of a "toolchain" installer target one would assume.

    Regards, Andreas

  • Hi Alexis,

    I just built the meta-toolchain-arago-tisdk target from scratch for AM62x SDK v9.2, and then installed the resulting toolchain installer located at deploy-ti/sdk/arago-2023.10-aarch64-linux-tisdk.sh.

    Then, after sourcing the provided environment as per SDK documentation, I was able to find the 64-bit binary toolchains using the `which` command as follows:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    a0797059@dasso:~/tmp/arago-2023.10
    $ source environment-setup
    [linux-devkit]:~/tmp/arago-2023.10> echo $CC
    aarch64-oe-linux-gcc --sysroot=/home/a0797059/tmp/arago-2023.10/sysroots/aarch64-oe-linux
    [linux-devkit]:~/tmp/arago-2023.10> which $CC
    /home/a0797059/tmp/arago-2023.10/sysroots/x86_64-arago-linux/usr/bin/aarch64-oe-linux/aarch64-oe-linux-gcc
    [linux-devkit]:~/tmp/arago-2023.10> $CC --version
    aarch64-oe-linux-gcc (GCC) 11.4.0
    Copyright (C) 2021 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions. There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    [linux-devkit]:~/tmp/arago-2023.10>
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    You can see the relative path of the compiler binary is sysroots/x86_64-arago-linux/usr/bin/aarch64-oe-linux/aarch64-oe-linux-gcc. The compiler binary executable itself is named slightly different than from what you were looking for (reflecting it's an OE-built toolchain) but the point is this is the correct toolchain for working with SDK v9.2.

    Regards, Andreas

  • Hi Andreas,

    I find the toolchain prefix in a TI web site, ti should be wrong.

    But if I follow the SDK 09.02.01.02 documentation :

    https://software-dl.ti.com/processor-sdk-linux/esd/AM62X/09_02_01_09/exports/docs/linux/Foundational_Components_Kernel_Users_Guide.html?highlight=device%20tree#compiling-the-device-tree-binaries

    I can't build the kernel source because CROSS_COMPILE_64 is not defined by the setup-environment script.

    I done :

    $ CROSS_COMPILE_64="$CC"

    $ make ARCH=arm64 CROSS_COMPILE="$CROSS_COMPILE_64" distclean

    $ make ARCH=arm64 CROSS_COMPILE="$CROSS_COMPILE_64" defconfig ti_arm64_prune.config

    But I got the error : 

    HOSTCC  scripts/basic/fixdep
    In file included from /storage/opt/arago-2023.10/sysroots/aarch64-oe-linux/usr/include/features-time64.h:21:0,
                     from /storage/opt/arago-2023.10/sysroots/aarch64-oe-linux/usr/include/features.h:392,
                     from /storage/opt/arago-2023.10/sysroots/aarch64-oe-linux/usr/include/sys/types.h:25,
                     from scripts/basic/fixdep.c:92:
    /storage/opt/arago-2023.10/sysroots/aarch64-oe-linux/usr/include/bits/timesize.h:23:10: fatal error: bits/timesize-32.h: No such file or directory
     #include <bits/timesize-32.h>
              ^~~~~~~~~~~~~~~~~~~~
    compilation terminated.
    scripts/Makefile.host:111: recipe for target 'scripts/basic/fixdep' failed
    make[2]: *** [scripts/basic/fixdep] Error 1
    Makefile:639: recipe for target 'scripts_basic' failed
    make[1]: *** [scripts_basic] Error 2
    Makefile:369: recipe for target '__build_one_by_one' failed
    make: *** [__build_one_by_one] Error 2

    Could you give me the right method to build the SDK 09.02.01.02 kernel and device using the SDK generated.

    Regards,

    Alexis.

  • Hi,

    I also set the variables as below, but with the same error.

    export CROSS_COMPILE_64="${SDK_PATH_NATIVE}/usr/bin/aarch64-oe-linux/${TARGET_PREFIX}"
    export SYSROOT_64="${SDK_PATH_NATIVE}"
    export CC_64="${CROSS_COMPILE_64}gcc --sysroot=${SYSROOT_64}"

  • Hi Alexis,

    I can't build the kernel source because CROSS_COMPILE_64 is not defined by the setup-environment script.

    If you want to build the Kernel you should NOTsource the environment script, instead just use the toolchain binaries directly. You can setup CROSS_COMPILE_64 like shown on the top of the page here: https://software-dl.ti.com/processor-sdk-linux/esd/AM62X/09_02_01_09/exports/docs/linux/Overview/GCC_ToolChain.html#yocto-toolchain  (there's a note on that documentation page too regarding building the kernel).

    But I got the error : 

    HOSTCC  scripts/basic/fixdep
    In file included from /storage/opt/arago-2023.10/sysroots/aarch64-oe-linux/usr/include/features-time64.h:21:0,
                     from /storage/opt/arago-2023.10/sysroots/aarch64-oe-linux/usr/include/features.h:392,
                     from /storage/opt/arago-2023.10/sysroots/aarch64-oe-linux/usr/include/sys/types.h:25,
                     from scripts/basic/fixdep.c:92:
    /storage/opt/arago-2023.10/sysroots/aarch64-oe-linux/usr/include/bits/timesize.h:23:10: fatal error: bits/timesize-32.h: No such file or directory
     #include <bits/timesize-32.h>

    This is likely coming from having (re-)defined $CC when sourcing the cross toolchain environment. Again, don't do that for Kernel builds. It needs to access the host toolchain as-is. If things get redefined, this no longer works.

    Regards, Andreas

  • Hi Andreas,

    I build the kernel and the device tree without any errors.

    Thanks.

    Alexis.

  • Hi Alexis,

    glad to hear, also I do appreciate you closing the loop here.

    Regards, Andreas