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.

AM6442: Yocto SDK generation and adding/removing libraries

Part Number: AM6442
Other Parts Discussed in Thread: OMAPL138

Hi,

I am trying to generate an SDK archive, which I can transfer to other developers, so they can develop and build with the correct libraries for the target system.
I have seen that Arago TI does not support the command:

MACHINE=am64xx-evm bitbake -c populate_sdk

And instead I use the command:

MACHINE=am64xx-evm bitbake meta-toolchain-arago-tisdk

I have received a large output image in:

./build/deploy/sdk/arago-2021.09-aarch64-linux-tisdk.sh

This image seems a bit excessively big, and does not seem to be synched to my target filesystem and libraries.
It seems for the most part the same toolchain SDK is generated for all the supported target images.

I would like to modify the SDK toolchain recipe to be more synchronized with my target image.
Whether its adding new libraries, or removing existing ones that i do not require (remove alsa-dev, qt, and more if possible)

I have not seen an official (or unofficial) TI guide on doing this.
Can you please specify the correct procedure?

Some possibilities I am considering are:

  1. Modifying TISDK_TOOLCHAIN_BASE_TARGET & TISDK_TOOLCHAIN_BASE_TARGET from some recipe
  2. Modifying TOOLCHAIN_TARGET_TASK & TOOLCHAIN_HOST_TASK from some recipe
  3. Modifying packagegroup-arago-toolchain-tisdk-target.bb or other toolchain recipe using .bbappend

Thank you, Ben S.

  • Hello Ben,

    Our Yocto owner is on vacation the rest of this week. Please ping the thread if you have not received a response by next week.

    Regards,

    Nick

  • Bumping the thread for an official reply, thank you.

  • Hi Ben, I'm back in the office but working through a sizable backlog of tasks. Will try to get to this before the end of the week or early next week.

  • Hi Andreas, we are also interested in the answer to this.

  • Should be able to get to this soon, thanks,

  • I see two toolchains support in TI Yocto SDK:

    bitbake meta-toolchain-arago (from: ./meta-arago/meta-arago-extras/recipes-core/meta/meta-toolchain-arago.bb)
    bitbake meta-toolchain-arago-tisdk (from: ./meta-arago/meta-arago-distro/recipes-core/meta/meta-toolchain-arago-tisdk.bb)

    The basic toolchain (meta-toolchain-arago) has:

    TOOLCHAIN_HOST_TASK ?= "nativesdk-packagegroup-sdk-host"
    TOOLCHAIN_HOST_TASK += "nativesdk-buildtools-perl-dummy"
    TOOLCHAIN_HOST_TASK += "packagegroup-cross-canadian-${MACHINE}"
    TOOLCHAIN_TARGET_TASK ?= "packagegroup-arago-standalone-sdk-target"

    All the TOOLCHAIN_HOST_TASK are the basic packages provided by openembedded-core.
    The TOOLCHAIN_TARGET_TASK  package is provided by arago and includes a few basic recipes

    The more encompassing toolchain (meta-toolchain-arago-tisdk) has various other libraries included for the SDK:

    TISDK_TOOLCHAIN_BASE_TARGET = "\
        packagegroup-arago-standalone-sdk-target \
        packagegroup-arago-tisdk-multimedia-sdk-target \
    "

    TISDK_TOOLCHAIN_EXTRA_TARGET = "\
        packagegroup-arago-tisdk-connectivity-sdk-target \
        packagegroup-arago-tisdk-crypto-sdk-target \
    "
    TISDK_TOOLCHAIN_EXTRA_TARGET_keystone = ""
    TISDK_TOOLCHAIN_EXTRA_TARGET_omapl138 = ""

    RDEPENDS_${PN} = "\
        ${@bb.utils.contains('MACHINE_FEATURES','gpu','packagegroup-arago-qte-toolchain-target','',d)} \
        ${@bb.utils.contains('MACHINE_FEATURES','gpu','packagegroup-arago-tisdk-gtk-sdk-target','',d)} \
        ${TISDK_TOOLCHAIN_BASE_TARGET} \
        ${TISDK_TOOLCHAIN_EXTRA_TARGET} \
        ${@bb.utils.contains('MACHINE_FEATURES','gpu','packagegroup-arago-tisdk-graphics-sdk-target','',d)} \
        ${@['','packagegroup-arago-tisdk-opencl-sdk-target'][oe.utils.all_distro_features(d, 'opencl', True, False) and bb.utils.contains('MACHINE_FEATURES', 'dsp', True, False, d)]} \
        packagegroup-arago-tisdk-addons-sdk-target \
    "

    But importantly it also includes the packagegroup-arago-standalone-sdk-target recipes.

    I think a good solution would be to make a packagegroup-arago-standalone-sdk-target.bbappend recipes. e.g:

    my-board-layer/packagegroups/packagegroup-arago-standalone-sdk-target.bbappend

    In that recipe we can use RDEPENDS_${PN}_append and RDEPENDS_${PN}_remove to add and remove packages and libraries.
    It should take effect TOOLCHAIN_TARGET_TASK for both toolchains. Although if we want to remove some of the toolchain SDK recipes we may need to create another append file for that task.

    I am still not satisfied with the final size of the SDK, but it is outside the scope of this thread, and probably not relevant to TI yocto layer anyways.
    Even for the minimal toolchain, we get self extracting .sh file that is about 750mb, which after extraction to the filesystem is about 5gb.
    I see the kernel source code alone is about 1 gb, and the cross-canadian toolchain and the files it produces amounts to about 3-4 gb.
    I am not sure if there is any way to avoid the enormous size that the cross-canadian toolchain recipe produces.

  • In that recipe we can use RDEPENDS_${PN}_append and RDEPENDS_${PN}_remove to add and remove packages and libraries.
    It should take effect TOOLCHAIN_TARGET_TASK for both toolchains. Although if we want to remove some of the toolchain SDK recipes we may need to create another append file for that task.

    I was not able to look into this more deeply yet but thanks for sharing your findings here. Yes append/remove to the runtime-depends variable is one way but you can also extend the recipe itself using a .bbappend file, this way you can leave the original recipe intact...

    .bbappend file allows your layer to make additions or changes to the content of another layer's recipe without having to copy the other recipe into your layer. Your .bbappend file resides in your layer, while the main .bb recipe file to which you are appending Metadata resides in a different layer.

    I am still not satisfied with the final size of the SDK

    While I do agree that the size of those installers is rather large given what little they actually seem to do I've since come to accept that this is a more or less universal thing (just think of some SDK packages for MCUs that are several GB in size, to generate code for a 128KB Flash device!). "Luckily" modern PC/infrastructure has grown along with this trend so those large file sizes usually don't pose an issue. Do you have a specific concern handling those large files / SDKs?

    Regards, Andreas

  • I have not seen an official (or unofficial) TI guide on doing this.
    Can you please specify the correct procedure?

    Also thanks for the suggestion, I've added a note to our backlog, I agree this is absolutely something we should document. I was already planning for a basic guide that covers some of the common modifications/tweaks one wants to do to our Yocto-based SDKs especially as one builds their own system. There's plenty of information to be found by searching the E2E here but I think this should not be the only resource this is documented, especially for such a complex topic.

    Thanks, Andreas