I would like to create a new target based on core-image-minimal
and I would like to change the init system with systemd
over SysV init
. I would like my change to be permanent (nothing based on local.conf). How can I do this?
1 Answers
Edit: As Anders pointed out in the comments, i was wrong:
The available init systems are set in the local.conf, but you can indeed change the init system on a per image basis. In your case you want to change it in core-image-minimal
. This image installs packagegroup-core-boot
which sets
VIRTUAL-RUNTIME_init_manager ?= "sysvinit"
VIRTUAL-RUNTIME_initscripts ?= "initscripts"
You could create your own packagegroup-core-boot-systemd
where those variables are set to
VIRTUAL-RUNTIME_init_manager = "systemd"
VIRTUAL-RUNTIME_initscripts = ""
and install it to your target.
The configuration of the init system is a Distro Feature. That means it is not in the image recipe, but in the local.conf.
If you don't want to put the configuration in the local.conf, you could create a custom distro configuration with the settings in it. The only thing you have to change in the local.conf is the line
# DISTRO = poky
DISTRO = <custom-distro>
The reference manual has also a chapter on creating your own distro

- 900
- 11
- 27
-
No, the distro configuration is only to decide on which init system should be available. The image decides on which init system to use (of multiple ones are available). – Anders Dec 11 '16 at 08:34
-
@Anders yes you are right. I don't have access to my sources at the moment and i can't remember how exactly. I will happily edit my answer on Monday, or delete this one if you post a correct one. – Fl0v0 Dec 11 '16 at 09:11
-
3I think the best way is to point out the dev-manual : http://www.yoctoproject.org/docs/1.6/dev-manual/dev-manual.html#selecting-an-initialization-manager – Pouet_forever Dec 14 '16 at 07:54