public inbox for docs@lists.yoctoproject.org
 help / color / mirror / Atom feed
* [PATCH] init-manager-none.inc: have no init manager
       [not found] <175A0DD84C89F64A.26969@lists.openembedded.org>
@ 2023-04-28  9:06 ` michael.opdenacker
  2023-05-02 14:14   ` [OE-core] " Alexandre Belloni
  0 siblings, 1 reply; 4+ messages in thread
From: michael.opdenacker @ 2023-04-28  9:06 UTC (permalink / raw)
  To: openembedded-core; +Cc: docs, Michael Opdenacker

From: Michael Opdenacker <michael.opdenacker@bootlin.com>

This fixes the issue that setting INIT_MANAGER to "none"
produces a system with sysvinit.

As the name suggests, this produces a system without
an init manager (no systemd, no sysvinit, no BusyBox init, no
/etc/inittab). There isn't any login manager either.
The kernel just starts /bin/sh in the console.

Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
---
 meta/conf/distro/include/init-manager-none.inc | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/meta/conf/distro/include/init-manager-none.inc b/meta/conf/distro/include/init-manager-none.inc
index bbedf898f7..56d2b0f406 100644
--- a/meta/conf/distro/include/init-manager-none.inc
+++ b/meta/conf/distro/include/init-manager-none.inc
@@ -1,3 +1,4 @@
-VIRTUAL-RUNTIME_init_manager ??= "sysvinit"
-VIRTUAL-RUNTIME_initscripts ??= "initscripts"
-VIRTUAL-RUNTIME_login_manager ??= "busybox"
+DISTRO_FEATURES_BACKFILL_CONSIDERED:append = " systemd sysvinit"
+VIRTUAL-RUNTIME_init_manager ??= ""
+VIRTUAL-RUNTIME_initscripts ??= ""
+VIRTUAL-RUNTIME_login_manager ??= ""
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [OE-core] [PATCH] init-manager-none.inc: have no init manager
  2023-04-28  9:06 ` [PATCH] init-manager-none.inc: have no init manager michael.opdenacker
@ 2023-05-02 14:14   ` Alexandre Belloni
  2023-05-02 14:17     ` Michael Opdenacker
  2023-05-02 14:18     ` [docs] " Richard Purdie
  0 siblings, 2 replies; 4+ messages in thread
From: Alexandre Belloni @ 2023-05-02 14:14 UTC (permalink / raw)
  To: michael.opdenacker; +Cc: openembedded-core, docs

Hello,

This causes the following error:

https://autobuilder.yoctoproject.org/typhoon/#/builders/47/builds/7035/steps/12/logs/stdio

This is the expected behaviour of the patch but doesn't fit with what
this particular build (qemuarm-oecore) is testing as we can't run
testimage without an init. I'm wondering what should be the proper
course of action here.


On 28/04/2023 11:06:02+0200, Michael Opdenacker via lists.openembedded.org wrote:
> From: Michael Opdenacker <michael.opdenacker@bootlin.com>
> 
> This fixes the issue that setting INIT_MANAGER to "none"
> produces a system with sysvinit.
> 
> As the name suggests, this produces a system without
> an init manager (no systemd, no sysvinit, no BusyBox init, no
> /etc/inittab). There isn't any login manager either.
> The kernel just starts /bin/sh in the console.
> 
> Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
> ---
>  meta/conf/distro/include/init-manager-none.inc | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/meta/conf/distro/include/init-manager-none.inc b/meta/conf/distro/include/init-manager-none.inc
> index bbedf898f7..56d2b0f406 100644
> --- a/meta/conf/distro/include/init-manager-none.inc
> +++ b/meta/conf/distro/include/init-manager-none.inc
> @@ -1,3 +1,4 @@
> -VIRTUAL-RUNTIME_init_manager ??= "sysvinit"
> -VIRTUAL-RUNTIME_initscripts ??= "initscripts"
> -VIRTUAL-RUNTIME_login_manager ??= "busybox"
> +DISTRO_FEATURES_BACKFILL_CONSIDERED:append = " systemd sysvinit"
> +VIRTUAL-RUNTIME_init_manager ??= ""
> +VIRTUAL-RUNTIME_initscripts ??= ""
> +VIRTUAL-RUNTIME_login_manager ??= ""
> -- 
> 2.34.1
> 

> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#180524): https://lists.openembedded.org/g/openembedded-core/message/180524
> Mute This Topic: https://lists.openembedded.org/mt/98554799/3617179
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alexandre.belloni@bootlin.com]
> -=-=-=-=-=-=-=-=-=-=-=-
> 


-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [OE-core] [PATCH] init-manager-none.inc: have no init manager
  2023-05-02 14:14   ` [OE-core] " Alexandre Belloni
@ 2023-05-02 14:17     ` Michael Opdenacker
  2023-05-02 14:18     ` [docs] " Richard Purdie
  1 sibling, 0 replies; 4+ messages in thread
From: Michael Opdenacker @ 2023-05-02 14:17 UTC (permalink / raw)
  To: Alexandre Belloni; +Cc: openembedded-core, docs

Hi Alex,

On 02.05.23 at 16:14, Alexandre Belloni wrote:
> Hello,
>
> This causes the following error:
>
> https://autobuilder.yoctoproject.org/typhoon/#/builders/47/builds/7035/steps/12/logs/stdio
>
> This is the expected behaviour of the patch but doesn't fit with what
> this particular build (qemuarm-oecore) is testing as we can't run
> testimage without an init. I'm wondering what should be the proper
> course of action here.


Thanks for the report!
Maybe another option is to remove the "none" option, as someone also 
suggested, as it is currently identical to the "sysvinit" option.

Any further thoughts?
Thanks again
Michael.

-- 
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [docs] [OE-core] [PATCH] init-manager-none.inc: have no init manager
  2023-05-02 14:14   ` [OE-core] " Alexandre Belloni
  2023-05-02 14:17     ` Michael Opdenacker
@ 2023-05-02 14:18     ` Richard Purdie
  1 sibling, 0 replies; 4+ messages in thread
From: Richard Purdie @ 2023-05-02 14:18 UTC (permalink / raw)
  To: alexandre.belloni, michael.opdenacker; +Cc: openembedded-core, docs

On Tue, 2023-05-02 at 16:14 +0200, Alexandre Belloni via
lists.yoctoproject.org wrote:
> Hello,
> 
> This causes the following error:
> 
> https://autobuilder.yoctoproject.org/typhoon/#/builders/47/builds/7035/steps/12/logs/stdio
> 
> This is the expected behaviour of the patch but doesn't fit with what
> this particular build (qemuarm-oecore) is testing as we can't run
> testimage without an init. I'm wondering what should be the proper
> course of action here.
> 

INIT_MANAGER didn't used to be a variable and therefore could in theory
be unset. The "none" configuration was designed to cause the system to
fall back to the original behaviour. OE-Core's "nodistro" uses the
fallback.

We could decide just to require this variable to be set to something
but this could potentially conflict with people setting up their init
system "manually" within their own distro.

It is a bit tricky to know what to do in situations like these.
INIT_MANAGER was added to try and help people avoid needing to repeat
certain config fragments.

Cheers,

Richard



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-05-02 14:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <175A0DD84C89F64A.26969@lists.openembedded.org>
2023-04-28  9:06 ` [PATCH] init-manager-none.inc: have no init manager michael.opdenacker
2023-05-02 14:14   ` [OE-core] " Alexandre Belloni
2023-05-02 14:17     ` Michael Opdenacker
2023-05-02 14:18     ` [docs] " Richard Purdie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox