Set the following variables in your distribution configuration file as follows:
DISTRO_FEATURES_append = " systemd" VIRTUAL-RUNTIME_init_manager = "systemd"
You can also prevent the sysvinit
distribution feature from
being automatically enabled as follows:
DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
Doing so removes any redundant sysvinit
scripts.
For information on the backfill variable, see
DISTRO_FEATURES_BACKFILL_CONSIDERED
in the Yocto Project Reference Manual.