Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Damien Le Moal <dlemoal@kernel.org>,
	Dario Binacchi <dario.binacchi@amarulasolutions.com>,
	linux-amarula@amarulasolutions.com, buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v3 1/3] package/tinyinit: new package
Date: Tue, 27 Aug 2024 22:07:04 +0200	[thread overview]
Message-ID: <Zs4x6LWMJfdWqApz@landeda> (raw)
In-Reply-To: <20240823181741.499173f2@windsurf>

Thomas, All,

On 2024-08-23 18:17 +0200, Thomas Petazzoni spake thusly:
> On Thu, 22 Aug 2024 20:37:40 +0200
> Dario Binacchi <dario.binacchi@amarulasolutions.com> wrote:
[--SNIP--]
> We also need to change busybox.mk to ensure that tinyinit is built
> before Busybox:
> 
> # Packages that provide commands that may also be busybox applets:
> BUSYBOX_DEPENDENCIES = \
> 	...
> 	$(if $(BR2_PACKAGE_TINYINIT),tinyinit) \

Good catch! We also need that for tini, then.

> > diff --git a/package/tinyinit/Config.in b/package/tinyinit/Config.in
> > new file mode 100644
> > index 000000000000..2ceb8e191e23
> > --- /dev/null
> > +++ b/package/tinyinit/Config.in
> > @@ -0,0 +1,10 @@
> > +config BR2_PACKAGE_TINYINIT
> > +	bool "tinyinit"
> > +	depends on BR2_INIT_NONE
> > +	help
> > +	  A Linux tiny initialization script suitable for resource
> > +	  limited systems, which can be used as an alternative to the
> > +	  one provided by Busybox.
> > +
> > +comment "tinyinit needs BR2_INIT_NONE, i. e. no init system installed"
> > +	depends on !BR2_INIT_NONE
> I find this a bit odd. In the end, shouldn't we simply promote tinyinit
> as an init implementation, and have its own BR2_INIT_TINYINIT entry?

As Dario already pointed out, that was my suggestion to drop it from the
init selection.

The reasoning is that we need to know the init system when we need some
infra for it. For example, for busybox/sysvinit, we need to install init
scripts, for systemd, the units, and for openrc, the openrc "units".

And the "None" init choice really is "Custom", in that there is always a
PID-1 process, whether in a real system, a VM, or a container: it is the
first process that is started in that environment. Now, whether that
process is a real init system, a stub, or directly the final applicaiton,
it is still a PID-1, and thus treated as 'init' by the kernel.

The existing tini package is to be used a a PID-1 in containers (I use
it extensively in that situation) and it does not need any infra in
Buildroot (it can only spawn a single child and is a reaper); to my
eyes, tiny-init is also very simple and does not require any infra in
Buildroot. Both tini and tiny-init are cases for a "Custom" init
(currently labelled "None").

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  parent reply	other threads:[~2024-08-27 20:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-22 18:37 [Buildroot] [PATCH v3 0/3] tinyinit and stm32f746_disco_sd_defconfig Dario Binacchi
2024-08-22 18:37 ` [Buildroot] [PATCH v3 1/3] package/tinyinit: new package Dario Binacchi
2024-08-23 16:17   ` Thomas Petazzoni via buildroot
2024-08-25 15:06     ` Dario Binacchi
2024-08-27 20:07     ` Yann E. MORIN [this message]
2024-08-29 21:47       ` Thomas Petazzoni via buildroot
2024-08-30  7:32         ` Yann E. MORIN
2024-08-22 18:37 ` [Buildroot] [PATCH v3 2/3] configs/stm32f746_disco_sd: new defconfig Dario Binacchi
2024-08-23 16:20   ` Thomas Petazzoni via buildroot
2024-08-25 15:23     ` Dario Binacchi
2024-08-22 18:37 ` [Buildroot] [PATCH v3 3/3] board/canaan/k210-soc: use tinyinit as Linux init process Dario Binacchi
2024-08-23 16:11 ` [Buildroot] [PATCH v3 0/3] tinyinit and stm32f746_disco_sd_defconfig Thomas Petazzoni via buildroot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Zs4x6LWMJfdWqApz@landeda \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@buildroot.org \
    --cc=dario.binacchi@amarulasolutions.com \
    --cc=dlemoal@kernel.org \
    --cc=linux-amarula@amarulasolutions.com \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox