TechNexion / meta-tn-imx-bsp

TechNexion BSP Layer for i.MX Yocto Project
MIT License
6 stars 11 forks source link

Remove `${BSPDIR}` variable expansion from tn-base.inc #22

Open lgrosz opened 8 months ago

lgrosz commented 8 months ago

Hi, I was wondering if we could get line 28 of tn-base.inc removed, or at least adjusted in a good way? It assumes a directory structure of sources which may not be correct for everyone (it certainly wasn't for me). If BSPDIR is not set, then the OVERRIDES variable incorrectly expands, causing several random issues when it comes to building recipes.

ray-chang commented 8 months ago

@lgrosz

Thanks for the feedback. This line of code is simply to add the VizionSDK package to the destination image file. This package is used in TechNexion camera development. If you don't use it, of course, you can remove the whole line.

Or you can find your absolute path by using the following command.

$ bitbake imx-image-full -e | grep ^BBLAYERS= BBLAYERS=" /home/jenkins/server/yocto/nxp/yocto_4.2_mickledore_6.1.55/sources/poky/meta /home/jenkins/server/yocto/nxp/yocto_4.2_mickledore_6.1.55/sources/poky/meta-poky /home/jenkins/server/yocto/nxp/yocto_4.2_mickledore_6.1.55/sources/meta-openembedded/meta-oe /home/jenkins/server/yocto/nxp/yocto_4.2_mickledore_6.1.55/sources/meta-openembedded/meta-multimedia /home/jenkins/server/yocto/nxp/yocto_4.2_mickledore_6.1.55/sources/meta-openembedded/meta-python /home/jenkins/server/yocto/nxp/yocto_4.2_mickledore_6.1.55/sources/meta-freescale /home/jenkins/server/yocto/nxp/yocto_4.2_mickledore_6.1.55/sources/meta-freescale-3rdparty /home/jenkins/server/yocto/nxp/yocto_4.2_mickledore_6.1.55/sources/meta-freescale-distro /home/jenkins/server/yocto/nxp/yocto_4.2_mickledore_6.1.55/sources/meta-imx/meta-bsp /home/jenkins/server/yocto/nxp/yocto_4.2_mickledore_6.1.55/sources/meta-imx/meta-sdk /home/jenkins/server/yocto/nxp/yocto_4.2_mickledore_6.1.55/sources/meta-imx/meta-ml /home/jenkins/server/yocto/nxp/yocto_4.2_mickledore_6.1.55/sources/meta-imx/meta-v2x /home/jenkins/server/yocto/nxp/yocto_4.2_mickledore_6.1.55/sources/meta-nxp-demo-experience /home/jenkins/server/yocto/nxp/yocto_4.2_mickledore_6.1.55/sources/meta-arm/meta-arm /home/jenkins/server/yocto/nxp/yocto_4.2_mickledore_6.1.55/sources/meta-arm/meta-arm-toolchain /home/jenkins/server/yocto/nxp/yocto_4.2_mickledore_6.1.55/sources/meta-security /home/jenkins/server/yocto/nxp/yocto_4.2_mickledore_6.1.55/sources/meta-security/meta-tpm /home/jenkins/server/yocto/nxp/yocto_4.2_mickledore_6.1.55/sources/meta-security/meta-parsec /home/jenkins/server/yocto/nxp/yocto_4.2_mickledore_6.1.55/sources/meta-browser/meta-chromium /home/jenkins/server/yocto/nxp/yocto_4.2_mickledore_6.1.55/sources/meta-clang /home/jenkins/server/yocto/nxp/yocto_4.2_mickledore_6.1.55/sources/meta-openembedded/meta-gnome /home/jenkins/server/yocto/nxp/yocto_4.2_mickledore_6.1.55/sources/meta-openembedded/meta-networking /home/jenkins/server/yocto/nxp/yocto_4.2_mickledore_6.1.55/sources/meta-openembedded/meta-filesystems /home/jenkins/server/yocto/nxp/yocto_4.2_mickledore_6.1.55/sources/meta-qt6 /home/jenkins/server/yocto/nxp/yocto_4.2_mickledore_6.1.55/sources/meta-virtualization /home/jenkins/server/yocto/nxp/yocto_4.2_mickledore_6.1.55/sources/meta-tn-imx-bsp /home/jenkins/server/yocto/nxp/yocto_4.2_mickledore_6.1.55/sources/meta-tn-wifi /home/jenkins/server/yocto/nxp/yocto_4.2_mickledore_6.1.55/sources/meta-tn-vizionsdk /home/jenkins/server/yocto/nxp/yocto_4.2_mickledore_6.1.55/sources/meta-nxp-nfc "

And copied to this line.

OVERRIDES:append = "${@':tn-vizionsdk' if bb.utils.contains_any('TARGET_ARCH', 'arm64 aarch64', True, False, d) and bb.utils.contains('BBLAYERS', '/home/jenkins/server/yocto/nxp/yocto_4.2_mickledore_6.1.55/sources/meta-tn-vizionsdk', True, False, d) else ''}"

BR, Ray

lgrosz commented 8 months ago

Thanks for the quick response, @ray-chang . Since I don't use the camera, I was able to just set BSPDIR="", but it took a while to figure out why that was required. Just wanted to raise the issue so you guys were aware. Thank you for maintaining the layer!

lgrosz commented 3 weeks ago

Would it be possible to introduce a MACHINE_FEATURE followed by modifying the appropriate TOOLCHAIN_*_TASK variable and forgo BSPDIR altogether? I was trying to create a new layer that didn't use the setup scripts and ran into the same build issues that made to create this issue the first time.

lgrosz commented 3 weeks ago

30 provides a quick patch/workaround but not a solution to the fundamental issue.