On Tue, Jul 04, 2006 at 11:54:50PM -0400, Michael Krufky wrote: > Andrew de Quincey wrote: > > >Well, the problem is I couldn't figure out a way in Kconfig to have the > >card drivers themselves _suggest_ which modules they required. I can use > >'select' to force a dependency, but that defeats the purpose really. > > > >One way is to add defaults into each frontend driver entry itself.. e.g. > >"default m if DVB_BUDGET_CI". But that then means every frontend then has > >to have such a line for every card which might use it. Seemed a bit > >horrible to me really, but its possible to do it. Is there a better way? > > > > > Here is an idea: > > config DVB_CARD_DRIVER1 > tristate "Example PCI / USB DVB Device Driver 1" > select DVB_USEFE_FRONTENDFOO > > config DVB_CARD_DRIVER2 > tristate "Example PCI / USB DVB Device Driver 2" > select DVB_USEFE_FRONTENDFOO > > config DVB_USEFE_FRONTENDFOO > bool > default n > > config DVB_FRONTENDFOO > tristate "Example Frontend" > depends on DVB_CORE > default m if DVB_USEFE_FRONTENDFOO > > This is exactly what you're asking for, except without the need for each > frontend driver to have a line for each card type that might use it. > > ...although we would also have to make sure that it would work for > non-modular kernel builds... In terms of userfriendlyness we should IMHO hide the ability to deselect frontends by default. Usually we should just build all frontend modules potentially needed by the selected card drivers. So people build more modules than they really need, but hey, most have already loads of modules which they don't need, especially if they use a distribution kernel. For advanced users we could add CONFIG_DVB_FE_CUSTOMIZE, then it's completely up to the user to select the correct modules. Note that CONFIG_DVB_FE_CUSTOMIZE would depend on DVB_CORE_ATTACH (unless you want to add #ifdef hell to the card drivers), but is a seperate concept (runtime overhead vs. build time overhead). > >>config DVB_CORE_ATTACH > >> bool "Load and attach frontend modules as needed" > >> depends on DVB_CORE we could stick a "depends on MODULES" in there > >> help > >> Remove the static dependency of DVB card drivers on all > >> frontend modules for all possible card variants. Instead, > >> allow the card drivers to only load the frontends modules on more typo: s/frontends/frontend/ > >> they require. This saves serveral KBytes of memory. > >> > >> If unsure say Y. > >> > >>(Note that there is no default, so that "make oldconfig" after > >>kernel upgrade asks the user for a a value.) > >> > >> > > > >Much better I would say. > > > > > > > but one typo: > > - they require. This saves serveral KBytes of memory. > + they require. This saves several KBytes of memory. Thanks, Johannes _______________________________________________ linux-dvb@xxxxxxxxxxx http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb