Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] fs/cpio: add option to manually specify file list
Date: Mon, 1 Jan 2018 15:47:24 +0100	[thread overview]
Message-ID: <20180101154724.10ad21fc@windsurf> (raw)
In-Reply-To: <20180101132242.GB24931@scaer>

Hello,

On Mon, 1 Jan 2018 14:22:42 +0100, Yann E. MORIN wrote:

> > So I'm inclined to just apply this, as it may be useful for some users.
> > If you don't voice a concern within the next days, I'll apply.  
> 
> I don't like this much, in fact.
> 
> In such a case, I would say that the initramfs filesystem is a different
> system, and thus should be built with a different .config.
> 
> Basically, what I do in this situation:
> 
>   - have a first .config for kernel+modules + initramfs, and with a
>     post-build script that:
>     1. copy all the kernel modules "somewhere",
>     2. trim the kernel modules that end up in the initramfs, to keep
>        just what is needed to boot;
> 
>   - have a second .config with just userland, plus a post-build script
>     that vampirises the kernel modules from "somwehere" (as saved above)
> 
> Of course, the "somewhere" is agreed on because I know it.
> 
> Besides, this is much more flexible than what this patch proposes.
> 
> Really, the core of the issue is to believe that the two systems are
> one. They are not: they are two different systems.

On the other hand, the initramfs is very often a subset of the complete
root filesystem, and being able to generate an image of this subset
directly from the same configuration as the full-blown system is
definitely a nice thing.

I agree that a separate configuration to build the initramfs is more
flexible, but it also has its drawbacks (to handle kernel modules, as
you mentioned, but also in terms of rebuilding the toolchain if you're
using an internal toolchain). One example where it might be annoying to
have a separate configuration is if you have a single package that
builds both a kernel module and a user-space counterpart.

So yeah, Seamus proposal is not ideal in terms of flexibility, but it
does solve one common use-case with little complexity.

Again, I'm not 100% convinced either, so it's good to have this
discussion.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

  reply	other threads:[~2018-01-01 14:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Multiple root filesystems for single kernel/toolchain>
2017-10-26 19:16 ` [Buildroot] [PATCH 0/1] fs/cpio: add option to manually specify file list Seamus Connor
2017-10-26 19:16   ` [Buildroot] [PATCH 1/1] " Seamus Connor
2017-10-26 20:13     ` Seamus Connor
2018-01-01 11:54     ` Thomas Petazzoni
2018-01-01 13:22       ` Yann E. MORIN
2018-01-01 14:47         ` Thomas Petazzoni [this message]
2018-02-06 14:55           ` Sam Voss
2018-02-06 23:30           ` Arnout Vandecappelle
2018-02-16 22:51     ` Thomas Petazzoni

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=20180101154724.10ad21fc@windsurf \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /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