* Change (and remove unused) init system on a per-image basis #yocto #bitbake #systemd #sysvinit
@ 2021-03-24 14:12 lel
2021-03-24 18:25 ` [yocto] " Khem Raj
0 siblings, 1 reply; 2+ messages in thread
From: lel @ 2021-03-24 14:12 UTC (permalink / raw)
To: yocto
[-- Attachment #1: Type: text/plain, Size: 1166 bytes --]
Hi all,
I would like to change the init system (systemd / SysVinit) on a per-image basis.
Therefore I added both "systemd" and "sysvinit" to my DISTRO_FEATURES.
I set this inside my *image-systemd.bb* to make sure that systemd is available as a distro feature:
REQUIRED_DISTRO_FEATURES = "systemd"
Now I want to prevent the "unused" init system (in this case sysvinit) from being added to the rootfs.
Therefore I tried something like this inside my *distro.conf* :
DISTRO_FEATURES_BACKFILL_CONSIDERED = "${@bb.utils.contains('REQUIRED_DISTRO_FEATURES', 'systemd', 'sysvinit', '', d)}"
As expected, this leads into the following. So far so good:
$ bitbake image-systemd -e | grep DISTRO_FEATURES_BACKFILL_CONSIDERED=
DISTRO_FEATURES_BACKFILL_CONSIDERED="sysvinit"
But the final rootfs still contains sysvinit scripts (/etc/init.d/*)
Now the strange thing:
If I instead do this inside my *distro.conf* , /etc/init.d is not being created, exactly as I wanted:
DISTRO_FEATURES_BACKFILL_CONSIDERED="sysvinit"
So I don't really understand why this solution doesn't work.
Any help would be appreciated.
Thanks and Regards,
Stefan
[-- Attachment #2: Type: text/html, Size: 1728 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [yocto] Change (and remove unused) init system on a per-image basis #yocto #bitbake #systemd #sysvinit
2021-03-24 14:12 Change (and remove unused) init system on a per-image basis #yocto #bitbake #systemd #sysvinit lel
@ 2021-03-24 18:25 ` Khem Raj
0 siblings, 0 replies; 2+ messages in thread
From: Khem Raj @ 2021-03-24 18:25 UTC (permalink / raw)
To: lel, yocto
you are better off by having two different DISTROs like poky and
poky-altcfg is.
On 3/24/21 7:12 AM, lel@iesy.com wrote:
> Hi all,
>
> I would like to change the init system (systemd / SysVinit) on a
> per-image basis.
> Therefore I added both "systemd" and "sysvinit" to my DISTRO_FEATURES.
>
> I set this inside my *image-systemd.bb* to make sure that systemd is
> available as a distro feature:
>
> REQUIRED_DISTRO_FEATURES = "systemd"
>
>
> Now I want to prevent the "unused" init system (in this case sysvinit)
> from being added to the rootfs.
> Therefore I tried something like this inside my *distro.conf*:
>
> DISTRO_FEATURES_BACKFILL_CONSIDERED = "${@bb.utils.contains('REQUIRED_DISTRO_FEATURES', 'systemd', 'sysvinit', '', d)}"
>
>
> As expected, this leads into the following. So far so good:
>
> $ bitbake image-systemd -e | grep DISTRO_FEATURES_BACKFILL_CONSIDERED=
> DISTRO_FEATURES_BACKFILL_CONSIDERED="sysvinit"
>
> But the final rootfs still contains sysvinit scripts (/etc/init.d/*)
>
> Now the strange thing:
> If I instead do this inside my *distro.conf*, /etc/init.d is not being
> created, exactly as I wanted:
>
> DISTRO_FEATURES_BACKFILL_CONSIDERED="sysvinit"
>
>
> So I don't really understand why this solution doesn't work.
> Any help would be appreciated.
>
>
> Thanks and Regards,
> Stefan
>
>
>
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-03-24 18:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-24 14:12 Change (and remove unused) init system on a per-image basis #yocto #bitbake #systemd #sysvinit lel
2021-03-24 18:25 ` [yocto] " Khem Raj
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.