Possible to use sysvinit on yocto?

For your yocto builds, is it possible to use sysvinit or mdev-busybox? I’ve tried INIT_MANAGER = “sysvinit” and INIT_MANAGER = “mdev-busybox” in my local.conf, but it seems systemd is still installed and active when I build and load the image.

I’m targeting the 6.6.1 branch, MACHINE ?= “verdin-imx8mp”, and using core-image-minimal.

Hi, I’m the Toradex AI Assistant. I’m in early beta, and I would appreciate your feedback.
The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Switching from systemd to sysvinit or mdev-busybox in Yocto builds involves more than just setting the INIT_MANAGER variable in your local.conf file. The Yocto Project allows for the customization of the init system, but this requires a few additional steps and considerations, especially since systemd is the default init system for many Yocto Project layers and recipes.

For the 6.6.1 branch targeting the Verdin iMX8MP with a core-image-minimal, you’ll need to ensure that your layer configurations and package selections explicitly support and include sysvinit or mdev-busybox, and exclude systemd. Here are some steps to guide you:

  1. Modify the DISTRO_FEATURES: Ensure that systemd is removed from DISTRO_FEATURES and that sysvinit is added. This might look something like:

    DISTRO_FEATURES_remove = "systemd"
    DISTRO_FEATURES_append = " sysvinit"

    For mdev-busybox, ensuring mdev is part of DISTRO_FEATURES might be necessary, depending on your specific requirements and setup.

  2. Package Conflicts: You may need to resolve package conflicts manually. Systemd and sysvinit (or mdev-busybox) can conflict, so you might need to adjust your image recipes to explicitly exclude systemd packages and include the correct versions of sysvinit or busybox providing mdev.

  3. Adjust Image Recipes: For a custom init system, you might need to create or modify an image recipe to ensure it includes the necessary packages for sysvinit or mdev-busybox and excludes any systemd-specific configurations or packages.

  4. Verify Dependencies: Some packages might depend on systemd. You’ll need to ensure that alternatives or modifications are made to accommodate the absence of systemd, which could involve patching packages or using alternative versions.

  5. Testing and Validation: After making these changes, thorough testing and validation are crucial to ensure that your system boots and operates as expected with sysvinit or mdev-busybox.

Remember, these changes can significantly alter the behavior and compatibility of your system. It’s essential to test thoroughly in your specific application context to ensure stability and functionality.

Best regards,
Toradex AI Assistant

Please, also check if these links can help you solve your problem:

TorizonCore Builder Tool - Customizing Torizon OS Images | Toradex Developer Center.

Greetings @dtuckerfp,

May I ask what your exact goal here is? I assume our default reference image settings are not sufficient to meet your requirements?

As for the actual issue you should be able to customize Yocto for sysvinit or whatever init manager you want. By default in our Yocto builds, as you already know we use systemd in our images.

In your post I see you’re setting INIT_MANAGER already. But as the Toradex AI suggested, perhaps something in DISTRO_FEATURES is overriding this setting. You mentioned the image recipe you’re building, but you didn’t state what you set the DISTRO to for your build.

Best Regards,