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.

AM62L-PROCESSOR-SDK: Cross Compiller Building

Part Number: AM62L-PROCESSOR-SDK
Other Parts Discussed in Thread: AM62L

Tool/software:

Hello ,

Could you please help me in the cross compiler building procedure for AM62L3 Compilation. I have been using the Cross compiler which was already shared in the SDK. I have already gone throgh the yocto-compilation document in the TI -official website,Could'nt find anything related to cross compiller building procedure.It would be helpfull if you can share the commands for this .


--Dheeraj

  • I have been using the Cross compiler which was already shared in the SDK
    ,Could'nt find anything related to cross compiller building procedure.

    Can you please explain in more detail what you are looking for? Using the cross-toolchain to compile a C program for running on the target? If so you can check out the following section in our AM62L Linux Academy: https://dev.ti.com/tirex/explore/node?node=A__ARdZ9-YYY.Y9pn3zXklOSA__AM62L-ACADEMY__6F61DO6__LATEST

    Regards, Andreas

  • Hi ,

    Im actually looking for the toolchain which can be used for stand-alone compilatin. While working in TI am62 i found a the cross-compiler/toolchain from the yocto while compiling for "tisdk-core-bundle" .
    Similarly is there any image which has to be compiled in yocto to get the cross-compiller.Will this provide the required cross-compiler-

    meta-toolchain-arago-tisdk?

  • rom the yocto while compiling for "tisdk-core-bundle" .
    Similarly is there any image which has to be compiled in yocto to get the cross-compiller.Will this provide the required cross-compiler-

    meta-toolchain-arago-tisdk?

    Don't use "tisdk-core-bundle", the main intent for this is for us here at TI to build the full SDK. You can certainly build this and inspect it to re-create our SDK build process but this is not what you usually want as a customer. What you want is one of two things:

    • rootfs / SD card images (like tisdk-default-image)
    • The cross toolchain, which is meta-toolchain-arago-tisdk

    Regards, Andreas

  • Hi Andreas,

    Thank You i have succesfully compilled the cross-compiller and working fine.But i need to get the prebuilt-binaries folder from the sdk which i guess can be compilled through tisdk-core-bundle.But is there any changes that has to be done for the customised Machine ? . I have added another configuration which will properly compile the tisdk-default-image binaries.But not the tisdk-core-bundle. I will attach the errors i observed, could you please guide me what i'm missing here.


    --Regards,
    Dheeraj K

  • But i need to get the prebuilt-binaries folder from the sdk which i guess can be compilled through tisdk-core-bundle.

    As hinted at before usually as a user of Yocto you would build one of the rootfs images. This will also populate all kinds of image-related artifacts (like U-Boot and firmware binaries, for example) into the build output folder. Check out the contents of `build/deploy-ti/images/am62lxx-evm/*` after building the `tisdk-default-image` for example. Again, do not build the `tisdk-core-bundle`, this is not needed/recommended.

    What specifically do you need from the prebuilt binaries folder of the SDK installer?

    What are you trying to customize and what do you want to deploy your build outputs to (board, boot media, etc.)?

    Regards, Andreas

  • Hi Andreas, 

    I have compiled for a new machine with respect to our customized board . After doing some changes in the bb file i was able to achieve the "tisdk-core-bundle" tar file with the prebuit binaries for our board which is what i wanted . But the thing is inside the board-support directory i could be able to see only the trusted-firmaware (with my changes) and optee only. U-boot as well as linux source with my changes was missing .But the tisdk-default-image had all my changes applied and booted the board successfully.

    What changes i have to do to get the source inside the board-support.

    --Dheeraj K

  • I'm currently traveling international for business. Please allow a few days for a response.

  • Hi Andreas,

    Just following up—any updates on this, or are you still traveling? No rush if you're still on the road; just wanted to check in.

  • .But the tisdk-default-image had all my changes applied and booted the board successfully.

    That's great !!

    i was able to achieve the "tisdk-core-bundle"

    Why are you still trying to build this?? This build target is not recommended/needed, it is only used at TI as part of the scripting used to create the full TI SDK installer. A consumer of our SOC/SDK offering does not need to create/build the full TI SDK installer.

    Regards, Andreas

  • Hi Andreas,

    I am building the tisdk-core-bundle because it includes all the required prebuilt binaries as well as the corresponding source code, including my custom changes. This bundle is essential when delivering to others, as it allows me to provide both the binaries and the modified source code along with the custom board.

    However, after applying my changes, I noticed that the Linux and U-Boot source code was missing from the board-support directory. This is why I'm focusing on properly building the tisdk-core-bundle to ensure everything is included for delivery.

  • I'm on PTO this week, will need be picking up E2E support again next week. Thanks.

  • Hi Andreas,

    Any updates?

  • Hi Dheeraj,
    I just noticed this thread was still open. Please let me know if this still needs attention, or if/how you resolved this.

    Regards, Andreas

  • Hi Andreas, 

    I have tried but still i was unable to get the complete source using tisdk-core-bundle image.During AM62A Processor yocto build i was able to get the source of atf,opte,u-boot & kernel with my updated changes to the evk source. So i wanted to replicate the same here in am62l. 


    As you can see i have generated my custom binaries.


    But not the complete source of this (kernel & u-boot is missing )


    It would be really helpfull if you can help me solve this.

  • Hi Dheeraj,

    today I setup and started a Yocto build for the tisdk-core-bundle target to see if I can re-create the issue but it hasn't completed during my workday.

    Just to confirm, you are using the latest SDK / Yocto baseline for AM62L v11.00.15.05 (using processor-sdk-11.00.15.05-am62lxx-config.txt as per SDK docs), correct?

    We have holiday weekend now here in the U.S. so I'll pick this back up next week.

    Regards, Andreas

  • Hi ,

    AM62L v11.00.15.05 (using processor-sdk-11.00.15.05-am62lxx-config.txt  - Yes 
    Okay will be waiting for your response.

    Regards, 
    Dheeraj K

  • Hi Dheeraj,

    AM62L v11.00.15.05 (using processor-sdk-11.00.15.05-am62lxx-config.txt  - Yes 
    Okay will be waiting for your response.

    I finished building the `tisdk-core-bundle` target for that SDK without any issues and can confirm that the generated `tisdk-core-bundle-am62lxx-evm.tar.xz` tarball contains both the Linux and U-Boot sources in the included `board-support/` folder.

    Let me experiment with this to see if I can create a working example that shows same but using a custom machine.

    Regards, Andreas

  • Let me experiment with this to see if I can create a working example that shows same but using a custom machine.

    So I added a custom machine, as shown below, and re-built the `tisdk-core-bundle` target, and the U-Boot and Kernel sources were included as expected.

    # Changes to `meta-ti` below
    a0797059@jiji:~/tisdk/am62lxx-evm/sources/meta-ti (HEAD detached at 11.00.15)
    $ git diff --cached
    diff --git a/meta-ti-bsp/conf/machine/am62lxx-custom.conf b/meta-ti-bsp/conf/machine/am62lxx-custom.conf
    new file mode 100644
    index 00000000..251001b0
    --- /dev/null
    +++ b/meta-ti-bsp/conf/machine/am62lxx-custom.conf
    @@ -0,0 +1,20 @@
    +#@TYPE: Machine
    +#@NAME: AM62L CUSTOM
    +#@DESCRIPTION: Machine configuration for a AM62L CUSTOM board
    +
    +require conf/machine/include/am62lxx.inc
    +require conf/machine/include/ti-extras.inc
    +
    +IMAGE_FSTYPES += "ubifs ubi"
    +
    +MKUBIFS_ARGS ?= "-F -m 4096 -e 258048 -c 8500"
    +
    +UBINIZE_ARGS ?= "-m 4096 -p 256KiB -s 1024 -O 1024"
    +
    +KERNEL_DEVICETREE_PREFIX = " \
    +    ti/k3-am62l \
    +"
    +
    +KERNEL_DEVICETREE = ""
    +
    +UBOOT_MACHINE = "am62lx_evm_defconfig"
    
    # Changes to `meta-tisdk` below
    a0797059@jiji:~/tisdk/am62lxx-evm/sources/meta-tisdk (HEAD detached at 11.00.15.05)
    $ git diff --cached
    diff --git a/meta-ti-foundational/recipes-graphics/emptty/emptty_%.bbappend b/meta-ti-foundational/recipes-graphics/emptty/emptty_%.bbappend
    index ded95b0..80dc18d 100644
    --- a/meta-ti-foundational/recipes-graphics/emptty/emptty_%.bbappend
    +++ b/meta-ti-foundational/recipes-graphics/emptty/emptty_%.bbappend
    @@ -8,6 +8,7 @@ SYSTEMD_AUTO_ENABLE:${PN}:am62xxsip-evm = "disable"
    
     # Always disable emptty for AM62L
     SYSTEMD_AUTO_ENABLE:${PN}:am62lxx-evm = "disable"
    +SYSTEMD_AUTO_ENABLE:${PN}:am62lxx-custom = "disable"
    
     # Always disable emptty for AM64X
    -SYSTEMD_AUTO_ENABLE:${PN}:am64xx-evm = "disable"
    \ No newline at end of file
    +SYSTEMD_AUTO_ENABLE:${PN}:am64xx-evm = "disable"
    diff --git a/meta-ti-foundational/recipes-tisdk/tisdk-uenv/tisdk-uenv/am62lxx-custom/uEnv-am62l-sk.txt b/meta-ti-foundational/recipes-tisdk/tisdk-uenv/tisdk-uenv/am62lxx-custom/uEnv-am62l-sk.txt
    new file mode 100644
    index 0000000..cf1ed12
    --- /dev/null
    +++ b/meta-ti-foundational/recipes-tisdk/tisdk-uenv/tisdk-uenv/am62lxx-custom/uEnv-am62l-sk.txt
    @@ -0,0 +1,11 @@
    +# This uEnv.txt file can contain additional environment settings that you
    +# want to set in U-Boot at boot time.  This can be simple variables such
    +# as the serverip or custom variables.  The format of this file is:
    +#    variable=value
    +# NOTE: This file will be evaluated after the bootcmd is run and the
    +#       bootcmd must be set to load this file if it exists (this is the
    +#       default on all newer U-Boot images.  This also means that some
    +#       variables such as bootdelay cannot be changed by this file since
    +#       it is not evaluated until the bootcmd is run.
    +
    +optargs=vt.global_cursor_default=0

    Check for U-Boot and Kernel source files after building  the `tisdk-core-bundle` target:

    # Create text document with list of files in the archive that was generated
    a0797059@jiji:~/tisdk/am62lxx-evm/build (master)
    $ tar -tvf deploy-ti/images/am62lxx-custom/tisdk-core-bundle-am62lxx-custom.tar.xz > tisdk-core-bundle-am62lxx-custom.tar.xz.txt
    
    # Check for U-Boot sources
    a0797059@jiji:~/tisdk/am62lxx-evm/build (master)
    $ grep ti-u-boot- tisdk-core-bundle-am62lxx-custom.tar.xz.txt | head
    drwxr-xr-x 0/0               0 2018-03-09 06:34 ./board-support/ti-u-boot-2025.01+git/
    -rw-r--r-- 0/0           25723 2018-03-09 06:34 ./board-support/ti-u-boot-2025.01+git/.azure-pipelines.yml
    -rw-r--r-- 0/0             814 2018-03-09 06:34 ./board-support/ti-u-boot-2025.01+git/.checkpatch.conf
    -rw-r--r-- 0/0              50 2018-03-09 06:34 ./board-support/ti-u-boot-2025.01+git/.get_maintainer.conf
    -rw-r--r-- 0/0              32 2018-03-09 06:34 ./board-support/ti-u-boot-2025.01+git/.get_maintainer.ignore
    drwxr-xr-x 0/0               0 2018-03-09 06:34 ./board-support/ti-u-boot-2025.01+git/.git/
    -rw-r--r-- 0/0              34 2018-03-09 06:34 ./board-support/ti-u-boot-2025.01+git/.git/HEAD
    drwxr-xr-x 0/0               0 2018-03-09 06:34 ./board-support/ti-u-boot-2025.01+git/.git/branches/
    -rw-r--r-- 0/0             355 2018-03-09 06:34 ./board-support/ti-u-boot-2025.01+git/.git/config
    -rw-r--r-- 0/0              73 2018-03-09 06:34 ./board-support/ti-u-boot-2025.01+git/.git/description
    
    # Check for Kernel sources
    a0797059@jiji:~/tisdk/am62lxx-evm/build (master)
    $ grep ti-linux-kernel- tisdk-core-bundle-am62lxx-custom.tar.xz.txt | head
    
    drwxr-xr-x 0/0               0 2018-03-09 06:34 ./board-support/ti-linux-kernel-6.12.24+git-ti/
    -rw-r--r-- 0/0           22878 2018-03-09 06:34 ./board-support/ti-linux-kernel-6.12.24+git-ti/.clang-format
    -rw-r--r-- 0/0             335 2018-03-09 06:34 ./board-support/ti-linux-kernel-6.12.24+git-ti/.clippy.toml
    -rw-r--r-- 0/0              59 2018-03-09 06:34 ./board-support/ti-linux-kernel-6.12.24+git-ti/.cocciconfig
    -rw-r--r-- 0/0             575 2018-03-09 06:34 ./board-support/ti-linux-kernel-6.12.24+git-ti/.editorconfig
    -rw-r--r-- 0/0             194 2018-03-09 06:34 ./board-support/ti-linux-kernel-6.12.24+git-ti/.get_maintainer.ignore
    drwxr-xr-x 0/0               0 2018-03-09 06:34 ./board-support/ti-linux-kernel-6.12.24+git-ti/.git/
    -rw-r--r-- 0/0              32 2018-03-09 06:34 ./board-support/ti-linux-kernel-6.12.24+git-ti/.git/HEAD
    drwxr-xr-x 0/0               0 2018-03-09 06:34 ./board-support/ti-linux-kernel-6.12.24+git-ti/.git/branches/
    -rw-r--r-- 0/0             363 2018-03-09 06:34 ./board-support/ti-linux-kernel-6.12.24+git-ti/.git/config

    Can you see if you can re-create this?
    There might be something off with the way the your custom machine was added to the Yocto sources.

    Regards, Andreas

  • Hi , 

    After doing the similar changes, I observed that I am able to retrieve the U-Boot and Kernel source code correctly when no modifications are made. However, once I add my custom patch to the respective source components via recipes-bsp/ or recipes-kernel/, I am no longer able to extract or view the full source code using the tisdk-core-bundle.

    Despite this, I can confirm that the patch is being applied correctly, as the changes are visible in the work/ directory and reflected in the generated binaries.

  • However, once I add my custom patch to the respective source components via recipes-bsp/ or recipes-kernel/, I am no longer able to extract or view the full source code using the tisdk-core-bundle.

    If you can provide a patch (can be a dummy patch, without any of your IP if you like) and steps of how to integrate it into the Yocto source tree I can have a look to see what might be going wrong.

    Regards, Andreas

  • Sure, could you create a dummy patch that simply adds a new defconfig file and updates the defconfig name that the kernel should use for compilation? Additionally, you can modify a printk statement in the board file to ensure the patch results in a visible change and confirms that it gets applied. As for integrating the patch, you can create a new layer — for example, meta-dummy — and add the appropriate conf/layer.conf inside it, similar to how you’ve already added the "am62lx-custom" layer. Then, place the patch inside a recipes-kernel/linux/ directory under meta-dummy, and name it to match the .bb or .bbappend file you're patching. This structure ensures Yocto can pick up and apply the patch during the build process.

    The bb file should like this .




    Regards, 
    Dheeraj K

  • HI Andreas, 

    Any updates.?

  • Hi Dheeraj,

    a working example was already provided. Beyond that what I was trying to offer is to have a look as to why your (different) implementation still fails and for that I will need your help to create a minimal test case that recreates your specific problem that I can easily apply to the official source tree and witness the behavior. Only this way I can be sure I'm actually looking at the problem you see, in a time-efficient manner. Note that this is already going beyond the scope of what we would typically support here on the forum.

    Regards, Andreas