Yocto bblayers.conf keeps getting over written

I am currently testing the latest DISTRO torizon-rt build. I am using WSL2 as my build host.

Here is my build configuration:

Build Configuration:
BB_VERSION = “2.8.1”
BUILD_SYS = “x86_64-linux”
NATIVELSBSTRING = “universal”
TARGET_SYS = “aarch64-tdx-linux”
MACHINE = “toradex-smarc-imx95”
DISTRO = “torizon-rt”
DISTRO_VERSION = “7.4.0-devel-20251104152221+build.0”
TUNE_FEATURES = “aarch64 crypto cortexa55”
TARGET_FPU = “”
meta-toradex-torizon = “HEAD:57033a2a510b6b3709984e2253bc14fc64cf5579”
meta-toradex-security = “HEAD:bcc6224be6cb6598cfe601d63b5bd3b6aaf47471”
meta-toradex-distro = “HEAD:8274ba890f0462d8e707af39c459fcb18080a95a”
meta-toradex-bsp-common = “HEAD:bf9b67ca1dae378c612ba9fc89e491a11b314e05”
meta-tpm = “HEAD:bc865c5276c2ab4031229916e8d7c20148dfbac3”
meta-oe
meta-networking
meta-filesystems
meta-python
meta-perl = “HEAD:15e18246dd0c0585cd1515a0be8ee5e2016d1329”
meta-virtualization = “HEAD:af1db2042caf8021d767dce1b26c08b59b96f3d1”
meta-updater = “HEAD:b275153c9c8ea09e27d41db9f2faba3ebf92d2c2”
meta-cyclonedx = “HEAD:0f4bb59c5c07e66812ae9f8e0aa629f44e80619e”
meta-acontis = “main:3c2b55341fc5a1e2d1e4800ef89f996c5bbc7757”
meta-toradex-nxp = “HEAD:5aaa24b977db19e5096ade3e0258db19933aba16”
meta-freescale = “HEAD:62423c69631d7f7cffe2bd20997412d76caa94ef”
meta-freescale-3rdparty = “HEAD:70c83e96c7f75e73245cb77f1b0cada9ed4bbc6d”
meta-yocto-bsp
meta-poky = “HEAD:3ff7ca786732390cd56ae92ff4a43aba46a1bf2e”
meta-security = “HEAD:bc865c5276c2ab4031229916e8d7c20148dfbac3”
meta-toradex-ti = “HEAD:0e50c759b1e509c2b97b305916702acad3a7f734”
meta-arm-toolchain
meta-arm = “HEAD:0f1e7bf92c89759f0ab74cfa5be4ee47b092ad46”
meta-ti-bsp
meta-ti-extras = “HEAD:f7cd5f92135bd53a843b188bce559ec894425766”
meta = “HEAD:649147913e89cd8f7390cb17cd0be94c9710ffa6”

With this configuration I have added 1 new layer manually editing the file and it builds fine with the following command.

bitbake torizon-minimal

Now shutdown and come back the next day and use the following command again like I originally did.

MACHINE=toradex-smarc-imx95 DISTRO=torizon-rt source setup-environment build

The build/conf/bblayers.conf file keeps getting overwritten with the default file. But the bulid/conf/local.conf file is left intact with my changes.

I would expect the bblayers.conf file would be left intact also and not overwritten with the default file again.

Where am I supposed to make my changes to be persistent with the bblayers.conf.

Hi, I’m the Toradex AI Assistant.

I might make mistakes or occasionally get you wrong. Our support team will step in if needed.


I don’t have specific information about persistent layer configuration for the bblayers.conf file in the provided sources. The sources focus on building Torizon OS from source and using TorizonCore Builder for customization, but don’t address the specific issue of maintaining custom layers across environment setups.

The sources show the basic setup process using the setup-environment script(1), but don’t cover how to make custom layer additions persistent when re-running the environment setup command.

For this specific question about maintaining custom layers in bblayers.conf across environment setups, I’d recommend checking these potentially relevant sources:

Would you like me to try to provide a general answer based on my knowledge of Yocto Project practices instead?

Best regards, Toradex AI Assistant.


Did you like my answer? :+1: :-1:

If I answered your question, please tick the “Solution” checkbox.

For follow-up questions to me, please use @ToradexAI in your post.

Greetings @pachanga,

I see you run the setup-environment script every time, I suspect this is why.

This eventually invokes this script in meta-toradex-torizon, specifically take a look at this line: meta-toradex-torizon/scripts/lib/setup-devices/setup-environment-toradex at scarthgap-7.x.y · torizon/meta-toradex-torizon · GitHub

It always copies the default/template bblayers.conf. I suppose a more proper behavior would be to only copy the template file if bblayers.conf does not already exist, similar to what we do for local.conf.

So yeah, basically you could modify the script I linked in your local copy of meta-toradex-torizon to change this behavior for your needs. If you are up to it we also take contributions on the Github repo for meta-toradex-torizon as well.

Best Regards,
Jeremias