T1040 toolchain vtss issue

cancel
Showing results for 
Search instead for 
Did you mean: 

T1040 toolchain vtss issue

598 Views
Contributor IV

I have built a custom fsl-toolchain that includes l2switch, this by adding the following recipe to the new layer meta-fsl-custom

/meta-fsl-custom/images/fsl-toolchain-custom.bb:

require recipes-core/meta/meta-toolchain.bb

MULTILIBS_pn-${PN} = ""

TOOLCHAIN_NEED_CONFIGSITE_CACHE += "zlib"

TOOLCHAIN_TARGET_TASK += " \

    l2switch \

    i2c-tools \

    glib-2.0 \

    glib-2.0-dev \

    libcrypto \

    dtc-staticdev \

    libgomp \

    libgomp-dev \

    libgomp-staticdev \

    libstdc++-staticdev \

    ${TCLIBC}-staticdev \

    "

CORE_SPECIFIC = " \

    nativesdk-mux-server \

    nativesdk-pme-regex-analyzer \

"

CORE_SPECIFIC_ls102xa = ""

TOOLCHAIN_HOST_TASK += " \

    nativesdk-dtc \

    nativesdk-u-boot-mkimage \

    nativesdk-cst \

    nativesdk-e2fsprogs \

    ${CORE_SPECIFIC} \

"

TOOLCHAIN_HOST_TASK_append_e500v2 = " \

    nativesdk-boot-format \

    nativesdk-boot-format-config \

The toolchain generated by this recipe contains as expected the vtss header files and vtss libraries. However when I include the header vtss_api.h as recommended as follows

#include <vtss_api/vtss_api.h>

I get the following compile error

In file included from /local/ctrommel/hermes/file.c:4:0,

/home/ctrommel/QorIQ-SDK-V1.7/sysroots/ppce5500-fsl-linux/usr/include/vtss_api/vtss_api.h:35:21: fatal error: vtss_os.h: No such file or directory

#include <vtss_os.h>

Does a patch exist that fixes this issue?

Labels (1)
0 Kudos
5 Replies

30 Views
NXP TechSupport
NXP TechSupport

Hello Kees Trommel,

Please don't add "l2switch" to the toolchain recipe, "l2swtch" is a target package, no relationship with toolchain, please add it in the rootfs image recipe.

You could add "l2switch" in IMAGE_INSTALL variable of recipe fsl-image-core.bb, fsl-image-minimal.bb or fsl-image-flash.bb. Please refer to the recipe meta-fsl-networking/images/fsl-image-private.inc, "l2swtch" has been added for T104xRDB platform by default, fsl-image-core.bb recipe includes fsl-image-private.inc, so in SDK 1.7, if you build rootfs with "bitbake fsl-image-core", the generated rootfs image should include l2swith package.

IMAGE_INSTALL_append_t1040rdb = " \

        ar \

        ceetm \

        l2switch \

        uio-seville \

"

IMAGE_INSTALL_append_t1040rdb-64b = " \

        ar \

        ceetm \

        l2switch \

        uio-seville \

"


Have a great day,
Yiping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

30 Views
Contributor IV

Wang Yiping,

If I do not add l2switch to the tool chain recipe how can develop an (cross compiled) application that uses the L2 switch API provided by the SDK? An application using the L2 switch API must include "vtss_api.h" and without adding l2switch to the toolchain recipe this include file is not available.

Kees.

0 Kudos

30 Views
NXP TechSupport
NXP TechSupport

Hello Kees,

After execute "bitbake l2switch",  vtss_api.h will be deployed in sysroot folder in build_<platform>_release/tmp/sysroots/t1040d4rdb-64b/usr/include/vtss_api/.

The reasonable way is adding the following line in your application package recipe(.bb file), and Yocto will build l2swith first before building you application package.

"DEPENDS = "l2switch"


Have a great day,
Yiping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

30 Views
Contributor IV

Wang Yiping,

You assume now that my application is build from Yocto. This is not the case. If you build the application from Yocto you do not need the toolchain. However the application I am developing has is its own build environment and uses the tooclchain build from Yocto.

Kees.

0 Kudos

30 Views
NXP TechSupport
NXP TechSupport

Hello Kees,

Before compile your application, please execute "bitbake l2switch" first, the file vtss_api.h will be deployed in sysroot folder.

Then use the following command to compile your application, I use t1040d4rdb-64b platform as a example.

export PATH=<sdk_install_path>/build_t1040d4rdb-64b_release/tmp/sysroots/x86_64-linux/usr/bin/ppc64e5500-fsl-linux:$PATH

powerpc64-fsl-linux-gcc -mhard-float -m64 -mcpu=e5500 --sysroot="<yocto_install_path>/build_t1040d4rdb-64b_release/tmp/sysroots/t1040d4rdb-64b"  app.c -o app -I "<yocto_install_path>/build_t1040d4rdb-64b_release/tmp/sysroots/t1040d4rdb-64b/usr/include/vtss_api"


Have a great day,
Yiping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos