From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Arnout Vandecappelle <arnout@mind.be>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
Thierry Bultel <thierry.bultel@linatsea.fr>,
buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 3/3] fs/dracut: new fs type
Date: Sat, 18 Dec 2021 14:16:28 +0100 [thread overview]
Message-ID: <20211218131628.GJ2603@scaer> (raw)
In-Reply-To: <28def8c0-8d05-015e-e9b2-a25b31d9237b@mind.be>
Arnout, Thierry, All,
On 2021-12-17 19:05 +0100, Arnout Vandecappelle spake thusly:
> >>>+if BR2_TARGET_ROOTFS_DRACUT
> >>>+config BR2_TARGET_ROOTFS_DRACUT_CONF_FILE
> >>>+ string "configuration file"
> >> Is there a possibility for a default configuration file?
> >Would that really make sense ? What would be default the expected packages
> >in the ram disk ?
> Yeah, OK, good point...
Agreed, there can't be a reasonable default.
> >Notice that the content of the config file strongly depends on the init
> >system (dracut being mostly
> >thought for systemd, but I use it with busybox/init.d in my case).
> >But I agree that I must add an error in the .mk when the file is not
> >specified/does not exist
Yes, catching that nicely would be better. What we usually do is:
ifeq ($(BR_DUILDING).$(BR2_TARGET_ROOTFS_DRACUT_CONF_FILE),y.)
$(error No file specified in BR2_TARGET_ROOTFS_DRACUT_CONF_FILE)
endif
And if the file is missing, then presumably dracut will exit in error,
which is sufficient for me.
> [snip]
> >>>+# devtmpfs does not get automounted when initramfs is used.
> >>>+# Add a pre-init script to mount it before running init
> >>>+# We must have /dev/console very early, even before /init runs,
> >>>+# for stdin/stdout/stderr
> >>>+define ROOTFS_DRACUT_ADD_INIT
> >>>+ if [ ! -e $(TARGET_DIR)/init ]; then \
> >>>+ $(INSTALL) -m 0755 fs/cpio/init $(TARGET_DIR)/init; \
> >>>+ fi
> >>>+ mkdir -p $(TARGET_DIR)/dev
> >>>+ mknod -m 0622 $(TARGET_DIR)/dev/console c 5 1
> >>>+endef
> >>>+
> >>>+endif # BR2_ROOTFS_DEVICE_CREATION_STATIC
> >>
> >> The above is the same logic as in cpio.mk. It would be better if we
> >>could refactor that to a common place.
> >
> >I definitively agree, that is what I said myself. But what is the most
> >appropriate place to put it ?
>
> I wouldn't be opposed to putting it in fs/common.mk. Yann, what do you think?
Not sure. Usually, we try not to comonalise things until we have at
least a few users.
In this case, it is very improbably that we have enough users to
warrant common code, so duplication is still OK in my opinion.
However...
> I am, however, thinking something else as well. What does the dracut fs
> produce? Is it a cpio image? If so, then it might be a good idea to instead
> make this a suboption of cpio. This, in turn, would make it possible to use
> dracut for an initramfs.
This was to be my proposal too: extends the existing fs/cpio to
optionally use dracut to prepare the file list.
I was wondering why we did not just hand over such a list to cpio
(replacing the existing 'find'). But dracut is more than jsut a file
list: it presumably knows how to handle library dependencies (NEEDED)
and follows recursively, and similarly for kernel modules. Otherwise,
dracut would be of very little interest...
(I see that Thierry also replied, but I was not on Cc so I nearly missed
it... I'll reply further to Thierry message in a moment...)
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
next prev parent reply other threads:[~2021-12-18 13:16 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-15 18:00 [Buildroot] [PATCH 1/3] package/cross-ldd: new package Thierry Bultel
2021-12-15 18:00 ` [Buildroot] [PATCH 2/3] package/dracut: new host package Thierry Bultel
2021-12-16 20:35 ` Arnout Vandecappelle
2021-12-15 18:00 ` [Buildroot] [PATCH 3/3] fs/dracut: new fs type Thierry Bultel
2021-12-16 20:49 ` Arnout Vandecappelle
2021-12-17 11:04 ` Thierry Bultel
2021-12-17 18:05 ` Arnout Vandecappelle
2021-12-17 21:50 ` Thierry Bultel
2021-12-18 13:22 ` Yann E. MORIN
2021-12-18 16:07 ` Thierry Bultel
2021-12-18 13:16 ` Yann E. MORIN [this message]
2021-12-19 6:55 ` Thierry Bultel
2021-12-19 8:23 ` Yann E. MORIN
2021-12-20 22:02 ` Arnout Vandecappelle
2021-12-20 22:10 ` Thierry Bultel
2021-12-16 20:31 ` [Buildroot] [PATCH 1/3] package/cross-ldd: new package Arnout Vandecappelle
2021-12-17 10:10 ` Thierry Bultel
2021-12-17 17:54 ` Arnout Vandecappelle
[not found] <20211215173411.274024-1-thierry.bultel@linatsea.fr>
2021-12-15 17:34 ` [Buildroot] [PATCH 3/3] fs/dracut: new fs type Thierry Bultel
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=20211218131628.GJ2603@scaer \
--to=yann.morin.1998@free.fr \
--cc=arnout@mind.be \
--cc=buildroot@buildroot.org \
--cc=thierry.bultel@linatsea.fr \
--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