cancel
Showing results for 
Search instead for 
Did you mean: 

How to use sysvinit in Yocto

Yby.1
Associate

I want to use sysinitv instead of systemd . When I add DISTRO_FEATURES_remove = "systemd" in Distro conf ,bitbake stopped whit ERROR: /home/st/openstlinux-5.10-dunfell-mp1-21-11-17/layers/meta-openembedded/meta-initramfs/recipes-core/packagegroups/packagegroup-meta-initramfs.bb: Please ensure that your setting of VIRTUAL-RUNTIME_init_manager (systemd) matches the entries enabled in DISTRO_FEATURES

ERROR: Failed to parse recipe: /home/st/openstlinux-5.10-dunfell-mp1-21-11-17/layers/meta-openembedded/meta-initramfs/recipes-core/packagegroups/packagegroup-meta-initramfs.bb

1 ACCEPTED SOLUTION

Accepted Solutions
Erwan SZYMANSKI
ST Employee

Hello @Yby.1​ 

Please, from your main source folder, go to: layers/openembedded-core/meta/conf/distro/

In this folder you will find a file named defaultsetup.conf.

This file contains the following line :

INIT_MANAGER ??= "none"

What happens here is that, if you do not define another thing instead of none, Yocto will take systemd as Init Manager by default. However you can replace this "none" by "sysvinit".

If you do that, Yocto will include variables presents in ./include/init-manager-sysvinit.inc

content :

# Use sysvinit for system initialization

DISTRO_FEATURES_append = " sysvinit"

DISTRO_FEATURES_BACKFILL_CONSIDERED_append = " systemd"

VIRTUAL-RUNTIME_init_manager ??= "sysvinit"

VIRTUAL-RUNTIME_initscripts ??= "initscripts"

VIRTUAL-RUNTIME_login_manager ??= "busybox"

Of course you can define these variables in you local.conf file to compile with Bitbake if you prefer. This is just another way to do it.

Hope this information will help you.

Regards.

Erwan.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

View solution in original post

2 REPLIES 2
Erwan SZYMANSKI
ST Employee

Hello @Yby.1​ 

Please, from your main source folder, go to: layers/openembedded-core/meta/conf/distro/

In this folder you will find a file named defaultsetup.conf.

This file contains the following line :

INIT_MANAGER ??= "none"

What happens here is that, if you do not define another thing instead of none, Yocto will take systemd as Init Manager by default. However you can replace this "none" by "sysvinit".

If you do that, Yocto will include variables presents in ./include/init-manager-sysvinit.inc

content :

# Use sysvinit for system initialization

DISTRO_FEATURES_append = " sysvinit"

DISTRO_FEATURES_BACKFILL_CONSIDERED_append = " systemd"

VIRTUAL-RUNTIME_init_manager ??= "sysvinit"

VIRTUAL-RUNTIME_initscripts ??= "initscripts"

VIRTUAL-RUNTIME_login_manager ??= "busybox"

Of course you can define these variables in you local.conf file to compile with Bitbake if you prefer. This is just another way to do it.

Hope this information will help you.

Regards.

Erwan.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
frenchie68
Associate II

Awesome!