Torizon-minimal boot failure after changing CONFIG_HZ

Hi,
i have succesfully built torizon-minimal in YOCTO - this works also torizon-builder can add my dtbo’s and plymouth splash.

I then add:
meta-toradex-nxp/recipes-kernel/linux/linux-toradex_6.6-2.2.x.bbappend (which works OK in a different YOCTO building tdx-reference-minimal)

FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}-${PV}:"

SUMMARY = "Linux kernel for Toradex Freescale i.MX based modules"
SECTION = "kernel"
LICENSE = "MIT"


SRC_URI:append = " \
    file://hz.cfg \
"

hz.cfg :

CONFIG_HZ=250
CONFIG_HZ_250=y

No matter if i deploy this directly using EasyInstaller or modify in torizon-builder i get:

Starting systemd-udevd version 255.21^
sysroot.readonly configuration value: 0 (fs writable: 1)
Using legacy ostree bind mount for /
[FAILED] Failed to start Create System Users.
[FAILED] Failed to start RPC Bind.
[FAILED] Failed to start Network Name Resolution.
[FAILED] Failed to start Network Time Synchronization.
...
[FAILED] Failed to start D-Bus System Message Bus.
[DEPEND] Dependency failed for Network Manager.
[DEPEND] Dependency failed for Network Manager Wait Online.
[FAILED] Failed to start D-Bus System Message Bus.
...
[FAILED] Failed to start set-hostname.service.
[FAILED] Failed to start Avahi mDNS/DNS-SD Stack.
...
[FAILED] Failed to start Disk device monitor based on udisks2.

What am i doing wrong ?
Can the CONFIG_HZ be changed in a different way ?

Regards - Paul

Hi, I’m the Toradex AI Assistant.

I might make mistakes. Our support team will step in if needed. If I answered your question, please tick the “Solution” checkbox. For follow-up questions to me, please use @ToradexAI in your post.

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


Hello Paul,

Thank you for your detailed description of your build process and the issue you’re encountering.

You’re seeing widespread system service failures after introducing your linux-toradex_6.6-2.2.x.bbappend with the hz.cfg kernel configuration, specifically when using Torizon OS images. As you noted, your approach works with tdx-reference-minimal, but fails with the torizon-minimal image.

Why Is This Happening?

Torizon OS (including torizon-minimal) uses OSTree for system updates and has a specific root filesystem layout and startup dependencies. Modifying certain kernel configurations—especially core ones like CONFIG_HZ—can cause incompatibilities with systemd services or OSTree itself.

The errors:

  • sysroot.readonly configuration value: 0 (fs writable: 1)
  • Using legacy ostree bind mount for /
  • Multiple systemd failures

suggest that the system has trouble with its read-only logic and OSTree’s expectations, often triggered by a kernel mismatch or incompatible settings (such as changed timer frequencies).

Supported Kernel Customization for Torizon OS

On Torizon OS, direct kernel customization via Yocto is discouraged for production images. Instead, you should use the TorizonCore Builder’s kernel commands. This tooling is OSTree-aware and can generate compatible kernel artifacts that the Torizon platform can handle:

  • TorizonCore Builder kernel customization: Use TorizonCore Builder and its kernel command to modify kernel configurations, overlays, or modules in a way compatible with Torizon OS and OSTree.

  • Custom Yocto Build: If you must change fundamental aspects like CONFIG_HZ, it may require a full Torizon OS build from source, as described in the Yocto build process:
    Build Torizon OS from Source With Yocto Project/OpenEmbedded

For most use cases, try to use TorizonCore Builder because it’s the most future-proof, update-friendly, and officially supported method. More information:

Next Steps

  1. If using TorizonCore Builder

    • Try making your desired kernel config change using the kernel commands:
      For example, you can extract the current configuration, modify it (such as changing CONFIG_HZ), and reapply it using the Builder.
  2. If rebuilding from Yocto

    • Make sure your configuration is based on the meta-toradex-torizon layer and that your kernel modifications are introduced early and completely.
    • Be aware that not every kernel config change is guaranteed to be compatible with Torizon OS and its update mechanisms.
    • See: Build Torizon OS from Source With Yocto Project/OpenEmbedded

Note: You may face issues if your CONFIG_HZ value is incompatible with the requirements and assumptions of Torizon OS, its systemd version, and clients relying on system time tracking.


If you need a concrete example of how to use TorizonCore Builder to change kernel configuration, let me know!

Best regards, Toradex AI Assistant.

Hello @BDSKPEF,

Do you have any other modifications in your build?
If you remove the additional configs, does the resulting image boot without issues?

Best Regards,
Bruno

Hi @bruno.tx

its only the CONFIG_HZ and CONFIG_HZ_250

In detail i do have the hz.cfg both in
meta-toradex-bsp-common/recipes-kernel/linux/linux-toradex-upstream_6.6.bbappend
and
meta-toradex-nxp/recipes-kernel/linux/linux-toradex_6.6-2.2.x.bbappend

if i only rename these two bbappend files and bitbake again without cleaning it fails in postprocessing the image.

But the build before adding the bbappend(s) works.

Best Regards - Paul

Hello @BDSKPEF,

Thanks for the additional information and sorry for the delay here.

It is worth mentioning that we recommend that you do not alter our layers if possible.
For better maintainability on your side, customization can be done in your own custom layer.

Also, adding linux-toradex-upstream_6.6.bbappend or linux-toradex-upstream_%.bbappend would be the way to go for the Colibri iMX7, as it uses an upstream-based kernel.


To actually enable the config, you can enable it manually before building the image:

bitbake -c menuconfig virtual/kernel

Afterwards, you can copy the resulting defconfig and use the linux-toradex-upstream_%.bbappend in your layer to set it as the .config for reproducibility.

Best Regards,
Bruno