In this depmod wrapper script:
line 21 says:
FILESYMS=-F "${PKGDATA_DIR}/kernel-depmod/System.map-\$4"
which to me looks like it will try to execute the System.map file, instead of setting FILESYMS.
In fact, for me do_rootfs randomly started failing for a new VM build:
NOTE: Running depmodwrapper for /nvme/hannes/machinos-repro/build/tmp/work/qemuarm64-tdx-linux/tem-dev-image/1.0/rootfs/lib/modules/6.6.111-yocto-standard ...
ERROR: Kernel modules dependency generation failed
Some debugging reveals it actually tries to execute the System.map file, which fails with a Permission denied error; then I’m getting a segfault from depmod. Perhaps because I’m running into some edge case where not having the symbols causes a crash.
I’ve now added a BBMASK:
BBMASK += "meta-toradex-bsp-common/recipes-kernel/kmod/depmodwrapper-cross_%.bbappend"
and that fixed it for me
Hi, I’m the Toradex AI Assistant.
I might make mistakes or occasionally get you wrong. Our support team will step in if needed.
Thank you for reporting this issue with the depmodwrapper-cross script in meta-toradex-bsp-common. You’ve identified what appears to be a shell syntax error on line 21.
Issue Analysis
The line in question:
FILESYMS=-F "${PKGDATA_DIR}/kernel-depmod/System.map-\$4"
appears to have incorrect escaping. The \$4 should likely be $4 to properly reference the fourth positional parameter in the shell script. The backslash escape may be causing the shell to interpret this incorrectly, leading to the execution attempt you’re experiencing.
Your Workaround
Your BBMASK workaround is a valid temporary solution:
BBMASK += "meta-toradex-bsp-common/recipes-kernel/kmod/depmodwrapper-cross_%.bbappend"
This effectively disables the problematic .bbappend file and allows the build to proceed with the default depmod wrapper behavior.
Recommended Actions
-
Report this to Toradex: Since this appears to be a bug in the meta-toradex-bsp-common layer, please report it through the official channels:
-
Alternative Fix: Instead of masking the entire recipe, you could create your own .bbappend in a higher-priority layer that corrects the syntax error.
-
Verify Your Setup: To help with debugging, could you provide:
- Which Toradex BSP version are you using?
- Which hardware platform (e.g., Verdin iMX8M Plus, Colibri, etc.)?
- Which Yocto/Poky version?
You can gather this information using the tdx-info command on your module, as documented here.
The permission denied error followed by the segfault suggests that the malformed command is indeed attempting to execute the System.map file as a binary, which would fail and potentially leave depmod in an inconsistent state.
Best regards,
Toradex AI Assistant.
Did you like my answer?

If I answered your question, please tick the “Solution” checkbox.
For follow-up questions to me, please use @ToradexAI in your post.
Hello @hannes.winkler,
Are you sure it is trying to execute the system.map file?
From the mentioned .bbappend logic this is not something that should happen.
Maybe the permission denied is related to reading the file?
If that is the case, I would expect there to be some configuration issue related to users on the build machine.
Could you send more information about the bug and your build environment?
Best Regards,
Bruno