All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thierry Bultel <thierry.bultel@linatsea.fr>
To: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>, buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v3 2/3] package/dracut: new host package
Date: Thu, 6 Jan 2022 16:56:52 +0100	[thread overview]
Message-ID: <a8d51eae-95d2-ee31-6622-4cde984f07ac@linatsea.fr> (raw)
In-Reply-To: <20220106161347.014794a6@windsurf>



Le 06/01/2022 à 16:13, Thomas Petazzoni a écrit :
> On Thu, 6 Jan 2022 15:56:32 +0100
> Thierry Bultel <thierry.bultel@linatsea.fr> wrote:
>
>> Keeping in mind that systemd is the officially supported init system by
>> dracut, there is no extra work
>> for it. However, I brought support for busybox init, through the above
>> dracut module (05busybox-buildroot).
>> Adding support for the other ones could be done later, so I suggest we
>> simply disable dracut when the
>> init system is not supported; by adding
>>
>>       depends on !BR2_INIT_SYSV
>>       depends on !BR2_INIT_OPENRC
>>
>> in Config.in.host; with the appropriate comment. Does that sound
>> acceptable ?
> But is it just the init system that requires those special dracut
> "modules" ? Or other aspects of the system will also require some
> special modules ?

The dracut modules are used at build time.
The rule is that any file that is expected in the dracut image must be 
handled
by a dracut module. For instance,
"host/lib/dracut/modules.d/00bash"
"host/lib/dracut/modules.d/50sshd" work out of the box.

The implicitely loaded "90kernel-modules" (that check modules 
dependencies to one another,
and to firmwares) also work fine.

But nothing handles /etc/init.d/rcS, typically.
And all the wanted init scripts (/etc/init.d/S40network is a good example)
must be taken individually.
A huge work would be to contribute to dracut to bring whole support for 
initd
scripts, but I think it is out of the scope.

Another reason to write a module is when dracut does not support the 
feature, yet,
for instance, I had to write one for hostapd. Apparently it is not a 
common case
to have the wifi in an initramfs, but for a recovery system, that makes 
more sense.

Adding support for SYSV or OPENRC basically consists in writing the 
appropriate rules
in new modules to bring the expected files to the filesystem, nothing more.

By the way, my suggestion to use "depends on !xxx" directives cannot
work because it does an "unmet direct dependency detected", since
BR2_PACKAGE_HOST_DRACUT is selected by BR2_TARGET_ROOTFS_CPIO_DRACUT

I am a little bit confused about how to solve that properly.

Thierry

> Thomas


_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2022-01-06 15:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-23 11:13 [Buildroot] [PATCH v3 1/3] package/cross-ldd: new package Thierry Bultel
2021-12-23 11:13 ` [Buildroot] [PATCH v3 2/3] package/dracut: new host package Thierry Bultel
2022-01-05 23:16   ` Yann E. MORIN
2022-01-06 14:56     ` Thierry Bultel
2022-01-06 15:13       ` Thomas Petazzoni
2022-01-06 15:56         ` Thierry Bultel [this message]
2021-12-23 11:13 ` [Buildroot] [PATCH v3 3/3] fs/cpio: new option to use dracut tool Thierry Bultel
2022-01-06 10:31   ` Yann E. MORIN
2022-01-06 13:48     ` Thierry Bultel
2022-01-05 22:29 ` [Buildroot] [PATCH v3 1/3] package/cross-ldd: new package Yann E. MORIN

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=a8d51eae-95d2-ee31-6622-4cde984f07ac@linatsea.fr \
    --to=thierry.bultel@linatsea.fr \
    --cc=buildroot@buildroot.org \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=yann.morin.1998@free.fr \
    /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 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.