From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 3/3] New <pkg>-update-last-config-fragment target in pkg-kconfig.mk
Date: Tue, 31 Jul 2018 09:53:43 +0200 [thread overview]
Message-ID: <20180731095343.3440afc1@windsurf> (raw)
In-Reply-To: <OFD5432E43.3E2246DD-ONC12582DB.0025E0A8-C12582DB.002A82C6@local-dmz.de>
Hello Marcel,
On Tue, 31 Jul 2018 09:44:19 +0200, Marcel Patzlaff wrote:
> Hello Thomas,
> > On my side, I find the semantic of "let's update the _last_ fragment"
> > to be a bit weird and complex to understand. Why the last one, and not
> > any other ?
> >
> > I'm not sure it's possible to have something that updates fragments
> > with a sensible semantic.
>
> Well, it should just reflect what the merge_config script does: the last
> file in the list of files to be merged always overrides settings done in
> files before. So this means, that the last fragment is basically the
> most significate one.
Fragments are not about "priority", they are typically about splitting
by topic different aspects. So it is not because the last fragment
overrides the configuration options of other fragments that a
configuration change you just did to enable driver FOO should go in the
last fragment.
> When I think about it, this should also be documented somewhere. Because
> the result with configuration fragments A, B, C could be different than
> B, A, C for example. So it should definitely be told, that the order of
> fragments matters and that the fragments are best used to specialise the
> configuration of other "layers" before.
This can be documented in the Config.in help text of the
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES option (ditto for U-Boot, etc.).
> > However, what would be useful would be a way to dump the difference
> > between the current configuration, and what the combination of the
> > defconfig+fragments provide.
> >
> > I.e, you start Buildroot with omap2plus_defconfig + some specific
> > fragments as the kernel configuration.
> >
> > You run "make linux-show-config-diff", which returns empty.
> >
> > Then you tweak the configuration with "make linux-menuconfig", and run
> > "make linux-show-config-diff", which shows you the lines that you need
> > to put in one of your fragments to preserve the configuration tweaks
> > you have done.
> >
> > Of course, the name "linux-show-config-diff" is just made up here, and
> > some more thought is needed to find a good name. But overall, I
> > believe the semantic would be much clearer, and doesn't make any
> > assumption on whether we have one or several fragments, and whether
> > the last fragment or any other fragment needs to be updated.
> >
> > What do you think about this? Would this also fill your needs?
>
> Despite the fact, that you now have to put this diff manually somewhere
> it would not change things. Because this diff, as I pointed out above,
> is in general only useful for the last fragment.
Not at all, as explained above. You enabled driver FOO, it may need to
go to the last fragment, or potentially to any other fragment, it
really depends on how the fragments are organized.
> Updating any other fragment in the list would require either to have no
> dependencies between fragments at all (too restrictive at least for my
> use cases and also I'm not sure that this is feasible) or to have a deep
> understanding of the dependencies.
When someone is using fragments, then they understand what they mean to
split the configuration in different snippets. People who don't
understand that will typically use a single monolithic .config file.
> From my perspective, neither option is that encouraging, so I do not
> want to propose a way to update any fragment other than the last one.
My position is that updating anything is not correct, because you
cannot know whether it is the last fragment or any of the other
fragment that needs to be updated. The only sane semantic is to show
what the differences are, and let the user figure out where these
configuration differences should be propagated.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2018-07-31 7:53 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-30 15:51 [Buildroot] [PATCH 0/3] Buildroot: Target to update config fragments in kconfig based packages Marcel Patzlaff
2018-07-30 15:51 ` [Buildroot] [PATCH 1/3] Support script for defconfig comparison Marcel Patzlaff
2018-07-30 15:51 ` [Buildroot] [PATCH 2/3] Refactoring of pkg-kconfig.mk to increase re-usability Marcel Patzlaff
2018-07-30 15:51 ` [Buildroot] [PATCH 3/3] New <pkg>-update-last-config-fragment target in pkg-kconfig.mk Marcel Patzlaff
2018-07-30 21:46 ` Thomas Petazzoni
2018-07-31 7:44 ` [Buildroot] Antwort: " Marcel Patzlaff
2018-07-31 7:53 ` Thomas Petazzoni [this message]
2018-07-31 8:43 ` Marcel Patzlaff
2018-07-31 15:49 ` [Buildroot] " Yann E. MORIN
2018-08-14 14:27 ` Thomas Petazzoni
2018-08-14 15:29 ` Yann E. MORIN
2018-08-14 23:20 ` Arnout Vandecappelle
2018-08-15 12:04 ` Thomas Petazzoni
2018-08-15 16:16 ` Yann E. MORIN
2018-08-15 17:35 ` Thomas Petazzoni
2018-08-15 20:29 ` Yann E. MORIN
2018-08-15 22:15 ` 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=20180731095343.3440afc1@windsurf \
--to=thomas.petazzoni@bootlin.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