How to do it...

To configure your system to use systemd, you need to add the systemd distribution feature to your project by adding the following to your distribution's configuration file, under sources/poky/meta-poky/conf/distro/poky.conf for the default Poky distribution, or locally in your project's conf/local.conf file:

DISTRO_FEATURES_append = " systemd" 
Note that the space is required after the starting quote.
VIRTUAL-RUNTIME_init_manager = "systemd" 

This configuration example allows you to define a main image with systemd and a rescue image with sysvinit, providing it does not use the VIRTUAL-RUNTIME_init_manager variable. Hence, the rescue image cannot use the packagegroup-core-boot or packagegroup-core-full-cmdline recipes.

To remove sysvinit completely from your system, you would do the following:

DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit" 
VIRTUAL-RUNTIME_initscripts = "" 

Feature backfilling is the automatic extension of machine and distribution features to keep backward compatibility. The sysvinit distribution feature is automatically filled in, so to remove it we need to blacklist it by adding it to the DISTRO_FEATURES_BACKFILL_CONSIDERED variable as shown earlier.

If you are using an existing project and you change the DISTRO_FEATURES variable as explained earlier, you will need to remove the tmp directory and build from the sstate-cache or the build will fail.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset