Prev: [RFC PATCH] Kconfig: Enable Kconfig fragments to be used for defconfig
Next: Kconfig: Enable Kconfig fragments to be used for defconfig
From: Grant Likely on 16 Jul 2010 14:30 On Fri, Jul 16, 2010 at 12:19 PM, Nicolas Pitre <nico(a)fluxnic.net> wrote: > On Fri, 16 Jul 2010, Grant Likely wrote: > >> On Fri, Jul 16, 2010 at 10:03 AM, Catalin Marinas >> <catalin.marinas(a)arm.com> wrote: >> > On Wed, 2010-07-14 at 00:04 +0100, Grant Likely wrote: >> >> - It still doesn't resolve dependencies. �A solver would help with this. >> >> � For the time being I work around the problem by running the generated >> >> � config through 'oldconfig' and looking for differences. �If the files >> >> � differ (ignoring comments and generateconfig_* options) after oldconfig, >> >> � then the <board>_defconfig target returns a failure. �(but leaves the >> >> � new .config intact so the user can resolve it with menuconfig). �This >> >> � way at least the user is told when a Kconfig fragment is invalid. >> > >> > It's not a solver but I'm pushing a patch to warn on selecting symbols >> > with unmet dependencies so that you can select further symbols (manual >> > solving). The patch is in linux-next but you also can grab it from: >> > >> > http://git.kernel.org/?p=linux/kernel/git/cmarinas/linux-2.6-cm.git;a=commitdiff_plain;h=5d87db2d2a332784bbf2b1ec3e141486f4d41d6f >> >> sfr and I were talking about your patch the other day. �Just warning >> on incomplete dependencies is enough to make it actually workable for >> me (without my ugly post-processing step). �I was very happy to hear >> that it is in linux-next. >> >> Last missing piece is being able to do "select FOO = n", which Stephen >> is currently working on. > > Instead of (or in addition to) warning for incomplete > dependencies, I'd much prefer if the prerequisites were recursively > selected automatically. �This way if some options are moved inside a > submenu at some point with a config symbol for that subcategory > (e.g. CONFIG_NETDEV_1000), or if the subsystem is reorganized into > submodules that are required for some driver to work, then my > config will still be fine. > > For example, if I want CONFIG_MTD_CMDLINE_PARTS=y, the system may be > smart enough to notice and automatically enable CONFIG_MTD and > CONFIG_MTD_PARTITIONS without having to carry those in the defconfig. I fully agree. However, the warnings make the system work now while we wait for a full solver to be implemented. g. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Grant Likely on 16 Jul 2010 15:00 On Fri, Jul 16, 2010 at 12:30 PM, Russell King - ARM Linux <linux(a)arm.linux.org.uk> wrote: > On Fri, Jul 16, 2010 at 02:19:31PM -0400, Nicolas Pitre wrote: >> For example, if I want CONFIG_MTD_CMDLINE_PARTS=y, the system may be >> smart enough to notice and automatically enable CONFIG_MTD and >> CONFIG_MTD_PARTITIONS without having to carry those in the defconfig. > > How do you sort out something like this: > > config FOO > � � � �bool "Foo" > � � � �depends on (A && B) || C > > Do you enable A and B, A, B and C or just C? > > Bear in mind that A could be 'X86', 'M68K' or any other arch specific > symbol. > > I prefer the warning method because it prompts you to investigate what's > changed and sort out the problem by ensuring that the appropriate symbols > are also selected. �The automatic selection of dependencies method carries > the risk that it'll do the wrong thing with the above scenario. Good point. g. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Linus Torvalds on 16 Jul 2010 15:00 On Fri, Jul 16, 2010 at 11:40 AM, Nicolas Pitre <nico(a)fluxnic.net> wrote: > > DOH. Well, it's possible that the correct approach is a mixture. Automatically do the trivial cases (recursive selects, dependencies that are simple or of the form "x && y" etc), and warn about the cases that aren't trivial (where "not trivial" may not necessarily be about fundamentally ambiguous ones, but just "complex enough that I won't even try"). Maybe a full "solver" is unnecessary, for example, but just a simple "automatically enable the direct dependencies and scream when it's not simple any more" would take care of 99% of the common cases, and then warn when it needs some manual help. So it's not a strict "one or the other" issue. The solution could be "some of both". Linus -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Grant Likely on 16 Jul 2010 16:20 On Fri, Jul 16, 2010 at 2:09 PM, Catalin Marinas <catalin.marinas(a)arm.com> wrote: > On Fri, 2010-07-16 at 19:46 +0100, Linus Torvalds wrote: >> On Fri, Jul 16, 2010 at 11:40 AM, Nicolas Pitre <nico(a)fluxnic.net> wrote: >> > >> > DOH. >> >> Well, it's possible that the correct approach is a mixture. >> >> Automatically do the trivial cases (recursive selects, dependencies >> that are simple or of the form "x && y" etc), and warn about the cases >> that aren't trivial (where "not trivial" may not necessarily be about >> fundamentally ambiguous ones, but just "complex enough that I won't >> even try"). > > There is still a risk with this approach when the Kconfig isn't entirely > correct. For example, on ARM we have (I pushed a patch already): > > config CPU_32v6K > � � � �depends on CPU_V6 > > config CPU_V7 > � � � �select CPU_32v6K > > In this simple approach, we end up selecting CPU_V6 when we only need > CPU_V7. There other places like this in the kernel. > > Of course, kbuild could still warn but if people rely on this feature to > select options automatically I suspect they would ignore the warnings. In my first patch, I made Kconfig problems errors instead of warnings. That would prevent people from ignoring them. g. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Grant Likely on 16 Jul 2010 16:40
On Fri, Jul 16, 2010 at 2:29 PM, Nicolas Pitre <nico(a)fluxnic.net> wrote: > On Fri, 16 Jul 2010, Grant Likely wrote: > >> On Fri, Jul 16, 2010 at 2:09 PM, Catalin Marinas >> <catalin.marinas(a)arm.com> wrote: >> > On Fri, 2010-07-16 at 19:46 +0100, Linus Torvalds wrote: >> >> On Fri, Jul 16, 2010 at 11:40 AM, Nicolas Pitre <nico(a)fluxnic.net> wrote: >> >> > >> >> > DOH. >> >> >> >> Well, it's possible that the correct approach is a mixture. >> >> >> >> Automatically do the trivial cases (recursive selects, dependencies >> >> that are simple or of the form "x && y" etc), and warn about the cases >> >> that aren't trivial (where "not trivial" may not necessarily be about >> >> fundamentally ambiguous ones, but just "complex enough that I won't >> >> even try"). >> > >> > There is still a risk with this approach when the Kconfig isn't entirely >> > correct. For example, on ARM we have (I pushed a patch already): >> > >> > config CPU_32v6K >> > � � � �depends on CPU_V6 >> > >> > config CPU_V7 >> > � � � �select CPU_32v6K >> > >> > In this simple approach, we end up selecting CPU_V6 when we only need >> > CPU_V7. There other places like this in the kernel. >> > >> > Of course, kbuild could still warn but if people rely on this feature to >> > select options automatically I suspect they would ignore the warnings. >> >> In my first patch, I made Kconfig problems errors instead of warnings. >> �That would prevent people from ignoring them. > > ACK. It would also flush out any current Kconfig dependency issues. g. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |