Toradex linux rebuilding when building TorizonCore with Yocto

I have an environment set up to build TorizonCore with yocto for Colibri iMX6ULL following the tutorial below:

I’m using the repo init command as below:

repo init -u https://git.toradex.com/toradex-manifest.git -b dunfell-5.x.y -m torizoncore/default.xml

Sometimes when I change something in my layer, eg my custom application, or even with no changes at all and rebuild the image with bitbake torizon-core-lite, the toradex linux gets downloaded and rebuilt again as well as kernel modules and etc.

For example:

Currently 1 running tasks (5807 of 5965) 97% |######################################################################################################################################################## |
0: linux-toradex-mainline-5.4.77+gitAUTOINC+3ade7cf22b_7aaf6c2823-r0 do_compile_kernelmodules - 2m42s (pid 473274)

I suspect that happens because when we source setup-environment, it in turn sources the setup-environment-internal which has the following inside:

# This is needed when building on integration. With use-head-next you
# always get the newest kernel. Without use-head-next your build may fail.
MACHINEOVERRIDES =. "use-head-next:"

Is that the expected behavior for dunfell-5.x.y and default.xml?

What should I do if I want to fix a specific linux version?

Greetings @giobauermeister,

Nice catch!

MACHINEOVERRIDES =. "use-head-next:" Definitely should not be getting set when using the default.xml.

I’ll report this to be fixed. For now just remove this from your conf/auto.conf file.

Best Regards,
Jeremias

I think the logic in the Torizon environment script is not compatible with recent versions of Google Repo. See the note on manifest.xml (it’s no longer a symlink to default.xml): Repo internal filesystem layout

Hi @tyler_ ,

You are correct this change in repo caused this issue for those who have a more recent version of repo on their build machines.

With that being said we just pushed a fix to the setup script:setup-environment-internal: fix issue when manifest.xml is not a symlink · toradex/meta-toradex-torizon@186d668 · GitHub

This fix should make it so that the setup script works properly for both new and old versions of repo.

Best Regards,
Jeremias