Prev: [PATCH v3] of: Create asm-generic/of.h and provide default of_node_to_nid()
Next: [PATCH] Enable kdump with EFI boot
From: Sam Ravnborg on 26 Jul 2010 18:20 On Tue, Jul 20, 2010 at 04:37:06AM +1000, Stephen Rothwell wrote: > This is a fairly brute force approach to allowing a Kconfig "select" > to specify an excplicit value for the selected config sybmol. > > The syntax of select is changed to: > > "select" <symbol> [<expr>] ["if" expr] > > The approach taken is to add a list of <value, dependency expression> > pairs to the symbol and check them whenever the reverse depends (from > a current-style select) are checked. I do not see the need for this feature. I have read most of the postings in the defconfig battle and I saw Linus' select suggestion. But we can do almost all of this today (or tomorrow). Consider following Kconfig file: config USB_SUPPORT def_bool n config NET def_bool y source arch/x86/Kconfig We use the feature that we can specify the same config option several times. And the first default value that is "visible" will be used. So it allows us to enable and disable any option. And if we for example want to set a specific LOG_BUF_SHIFT we use the same trick: config LOG_BUF_SHIFT int default 14 Now in the original suggestion of Linus he used: KBUILD_KCONFIG=Mykconfig make allnoconfig And "allnoconfig" would make the modified defaults useless. But the soon-to-be-introduced alldefconfig is more sensible. alldefconfig uses default values for everything. So with alldefconfig I think we have all the features we need to create sensible default configs in the Kconfig language. And therefore I do not see the need for the extension to select. For the same reason I did not look closer at the implementation. Sam -- 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 26 Jul 2010 18:50 Hi Sam, On Mon, Jul 26, 2010 at 4:17 PM, Sam Ravnborg <sam(a)ravnborg.org> wrote: > On Tue, Jul 20, 2010 at 04:37:06AM +1000, Stephen Rothwell wrote: >> This is a fairly brute force approach to allowing a Kconfig "select" >> to specify an excplicit value for the selected config sybmol. >> >> The syntax of select is changed to: >> >> � � � "select" <symbol> [<expr>] ["if" expr] >> >> The approach taken is to add a list of <value, dependency expression> >> pairs to the symbol and check them whenever the reverse depends (from >> a current-style select) are checked. > > I do not see the need for this feature. > I have read most of the postings in the defconfig battle and > I saw Linus' select suggestion. > > But we can do almost all of this today (or tomorrow). > > Consider following Kconfig file: > > � �config USB_SUPPORT > � � � � � �def_bool n > > � �config NET > � � � � � �def_bool y > > � �source arch/x86/Kconfig > > We use the feature that we can specify the same > config option several times. > And the first default value that is "visible" > will be used. > > So it allows us to enable and disable any option. > > And if we for example want to set a specific LOG_BUF_SHIFT > we use the same trick: > > � �config LOG_BUF_SHIFT > � � � � � �int > � � � � � �default 14 Cute. I didn't know this was possible. I'll give it a try and see how it works for me. Do override config options also pickup select/depends constraints applied by later definitions? I think that would be necessary to kick out warnings when a defconfig selection isn't actually achievable. g. > > > Now in the original suggestion of Linus he used: > > � �KBUILD_KCONFIG=Mykconfig make allnoconfig > > And "allnoconfig" would make the modified defaults useless. > > But the soon-to-be-introduced alldefconfig is more sensible. > > alldefconfig uses default values for everything. I basically used defconfig in the prototype that I posted. I think it works well for me, and I've got it integrated into the build targets (just like Stephen's earlier patch) without having to do a KBUILD_KCONFIG trick. g. -- Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd. -- 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: Sam Ravnborg on 27 Jul 2010 02:50
> > Cute. I didn't know this was possible. I'll give it a try and see > how it works for me. Do override config options also pickup > select/depends constraints applied by later definitions? I think that > would be necessary to kick out warnings when a defconfig selection > isn't actually achievable. kconfig allows one to add more properties to a config symbol by defining the symbol again. So: config FOO bool prompt "foo prompt" default y help Help text Is the same as: config FOO bool config FOO prompt "foo prompt" config FOO default y config FOO help help text The abvoe four lines can be located in different files. And likewise kconfig allows the same property to be specified twice or more. So it is OK to say: config BAR tristate "bar prompt" default m default y Here kconfig just picks the first default is see. And the example in my original mail uses the feature that we can specify several defaults - and kconfig uses the first. For choices the same is possible but then you need to use a named choice - something that no one does today in the kernel. choice CHOICE_X86_CPU default M386 endchoice Here we change the default to M386 which becomes the selected if we use "alldefconfig". [Note: It does not work until we use named choices in arch/x86/Kconfig.cpu] > > > Now in the original suggestion of Linus he used: > > > > � �KBUILD_KCONFIG=Mykconfig make allnoconfig > > > > And "allnoconfig" would make the modified defaults useless. > > > > But the soon-to-be-introduced alldefconfig is more sensible. > > > > alldefconfig uses default values for everything. > > I basically used defconfig in the prototype that I posted. I think it > works well for me, and I've got it integrated into the build targets > (just like Stephen's earlier patch) without having to do a > KBUILD_KCONFIG trick. "defconfig" with an empty file gives same config as "alldefconfig" so it makes sense. But we wanted to drop the use of defconfig files in favour of files with Kconfig syntax. So alldefconfig is just a better fit here. [The above btw. also makes "savedefconfig" less usefull]. Sam -- 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/ |