* [patch] video/dvb: fix MEDIA_TUNER && FW_LOADER build error
@ 2008-05-20 19:34 Ingo Molnar
2008-05-25 19:30 ` Roman Zippel
0 siblings, 1 reply; 2+ messages in thread
From: Ingo Molnar @ 2008-05-20 19:34 UTC (permalink / raw)
To: Mauro Carvalho Chehab
Cc: linux-kernel, Michael Krufky, Patrick Boettcher, Sam Ravnborg
-tip testing found the following build failure:
LD .tmp_vmlinux1
drivers/built-in.o: In function `generic_set_freq':
tuner-xc2028.c:(.text+0xbd896): undefined reference to `request_firmware'
tuner-xc2028.c:(.text+0xbdd7a): undefined reference to `release_firmware'
drivers/built-in.o: In function `xc_load_fw_and_init_tuner':
xc5000.c:(.text+0xc68e6): undefined reference to `request_firmware'
xc5000.c:(.text+0xc6abe): undefined reference to `release_firmware'
with this config:
http://redhat.com/~mingo/misc/config-Tue_May_20_18_11_34_CEST_2008.bad
the reason is another kconfig tool bug that has to be worked around in
the driver's Kconfig file: if FW_LOADER is selected in a second
dependency, that is not properly propagated up the dependencies.
in this case, FW_LOADER is selected from MEDIA_TUNER_XC2028:
config MEDIA_TUNER_XC2028
tristate "XCeive xc2028/xc3028 tuners"
depends on VIDEO_MEDIA && I2C
depends on HOTPLUG
select FW_LOADER
which got selected by MEDIA_TUNER:
config MEDIA_TUNER
tristate
default VIDEO_MEDIA && I2C
depends on VIDEO_MEDIA && I2C
select FW_LOADER if !MEDIA_TUNER_CUSTOMIZE && HOTPLUG
but the kconfig tool did not pick up this second-order dependency and
allowed CONFIG_FW_LOADER=m to be selected - in which case the build
fails.
the workaround i found was to move the select of FW_LOADER one level up,
so that the buggy kconfig tool can notice it and can act appropriately.
This problem can probably be worked around in other ways as well, i went
for the minimal fix.
Obviously, the kconfig tool should be fixed, it is not reasonable to
expect driver authors to do manual dependency resolution (that kconfig
itself already does) and uglify the Kconfig files. The kconfig tool did
nothing to warn about this situation and did not prevent this faulty
.config from being constructed.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
drivers/media/common/tuners/Kconfig | 1 +
1 file changed, 1 insertion(+)
Index: linux/drivers/media/common/tuners/Kconfig
===================================================================
--- linux.orig/drivers/media/common/tuners/Kconfig
+++ linux/drivers/media/common/tuners/Kconfig
@@ -21,6 +21,7 @@ config MEDIA_TUNER
tristate
default VIDEO_MEDIA && I2C
depends on VIDEO_MEDIA && I2C
+ select FW_LOADER if !MEDIA_TUNER_CUSTOMIZE && HOTPLUG
select MEDIA_TUNER_XC2028 if !MEDIA_TUNER_CUSTOMIZE && HOTPLUG
select MEDIA_TUNER_XC5000 if !MEDIA_TUNER_CUSTOMIZE && HOTPLUG
select MEDIA_TUNER_MT20XX if !MEDIA_TUNER_CUSTOMIZE
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [patch] video/dvb: fix MEDIA_TUNER && FW_LOADER build error
2008-05-20 19:34 [patch] video/dvb: fix MEDIA_TUNER && FW_LOADER build error Ingo Molnar
@ 2008-05-25 19:30 ` Roman Zippel
0 siblings, 0 replies; 2+ messages in thread
From: Roman Zippel @ 2008-05-25 19:30 UTC (permalink / raw)
To: Ingo Molnar
Cc: Mauro Carvalho Chehab, linux-kernel, Michael Krufky,
Patrick Boettcher, Sam Ravnborg
Hi,
On Tue, 20 May 2008, Ingo Molnar wrote:
> the workaround i found was to move the select of FW_LOADER one level up,
> so that the buggy kconfig tool can notice it and can act appropriately.
> This problem can probably be worked around in other ways as well, i went
> for the minimal fix.
>
> Obviously, the kconfig tool should be fixed, it is not reasonable to
> expect driver authors to do manual dependency resolution (that kconfig
> itself already does) and uglify the Kconfig files. The kconfig tool did
> nothing to warn about this situation and did not prevent this faulty
> .config from being constructed.
If you had bothered to ask me, I could have told you that the answer is
rather simple: if you have problems with select, don't use it.
drivers/media/ is abusing select quite heavily, so it's no surprise it's
getting out of control, the patch below gets rid of select in the tuners
directory, others should be done in a similiar way.
One could now argue that this sort of thing could be done simpler, then
I'll agree, but select isn't the answer.
bye, Roman
---
drivers/media/common/tuners/Kconfig | 91 ++++++++++++++----------------------
1 file changed, 37 insertions(+), 54 deletions(-)
Index: linux-2.6/drivers/media/common/tuners/Kconfig
===================================================================
--- linux-2.6.orig/drivers/media/common/tuners/Kconfig
+++ linux-2.6/drivers/media/common/tuners/Kconfig
@@ -17,22 +17,9 @@ config MEDIA_ATTACH
If unsure say Y.
-config MEDIA_TUNER
- tristate
- default VIDEO_MEDIA && I2C
- depends on VIDEO_MEDIA && I2C
- select MEDIA_TUNER_XC2028 if !MEDIA_TUNER_CUSTOMIZE && HOTPLUG
- select MEDIA_TUNER_XC5000 if !MEDIA_TUNER_CUSTOMIZE && HOTPLUG
- select MEDIA_TUNER_MT20XX if !MEDIA_TUNER_CUSTOMIZE
- select MEDIA_TUNER_TDA8290 if !MEDIA_TUNER_CUSTOMIZE
- select MEDIA_TUNER_TEA5761 if !MEDIA_TUNER_CUSTOMIZE
- select MEDIA_TUNER_TEA5767 if !MEDIA_TUNER_CUSTOMIZE
- select MEDIA_TUNER_SIMPLE if !MEDIA_TUNER_CUSTOMIZE
- select MEDIA_TUNER_TDA9887 if !MEDIA_TUNER_CUSTOMIZE
-
menuconfig MEDIA_TUNER_CUSTOMIZE
bool "Customize analog and hybrid tuner modules to build"
- depends on MEDIA_TUNER
+ depends on VIDEO_MEDIA
help
This allows the user to deselect tuner drivers unnecessary
for their hardware from the build. Use this option with care
@@ -42,122 +29,118 @@ menuconfig MEDIA_TUNER_CUSTOMIZE
If unsure say N.
-if MEDIA_TUNER_CUSTOMIZE
-
config MEDIA_TUNER_SIMPLE
- tristate "Simple tuner support"
+ tristate "Simple tuner support" if MEDIA_TUNER_CUSTOMIZE
depends on VIDEO_MEDIA && I2C
select MEDIA_TUNER_TDA9887
- default m if MEDIA_TUNER_CUSTOMIZE
+ default y
help
Say Y here to include support for various simple tuners.
-config MEDIA_TUNER_TDA8290
- tristate "TDA 8290/8295 + 8275(a)/18271 tuner combo"
- depends on VIDEO_MEDIA && I2C
- select MEDIA_TUNER_TDA827X
- select MEDIA_TUNER_TDA18271
- default m if MEDIA_TUNER_CUSTOMIZE
- help
- Say Y here to include support for Philips TDA8290+8275(a) tuner.
-
config MEDIA_TUNER_TDA827X
- tristate "Philips TDA827X silicon tuner"
+ tristate "Philips TDA827X silicon tuner" if MEDIA_TUNER_CUSTOMIZE && DVB_FE_CUSTOMISE
depends on VIDEO_MEDIA && I2C
- default m if DVB_FE_CUSTOMISE
+ default DVB_CAPTURE_DRIVERS
help
A DVB-T silicon tuner module. Say Y when you want to support this tuner.
config MEDIA_TUNER_TDA18271
- tristate "NXP TDA18271 silicon tuner"
+ tristate "NXP TDA18271 silicon tuner" if MEDIA_TUNER_CUSTOMIZE && DVB_FE_CUSTOMISE
depends on VIDEO_MEDIA && I2C
- default m if DVB_FE_CUSTOMISE
+ default DVB_CAPTURE_DRIVERS
help
A silicon tuner module. Say Y when you want to support this tuner.
+config MEDIA_TUNER_TDA8290
+ tristate "TDA 8290/8295 + 8275(a)/18271 tuner combo" if MEDIA_TUNER_CUSTOMIZE
+ depends on VIDEO_MEDIA && I2C
+ depends on MEDIA_TUNER_TDA827X && MEDIA_TUNER_TDA18271
+ default y
+ help
+ Say Y here to include support for Philips TDA8290+8275(a) tuner.
+
config MEDIA_TUNER_TDA9887
- tristate "TDA 9885/6/7 analog IF demodulator"
+ tristate "TDA 9885/6/7 analog IF demodulator" if MEDIA_TUNER_CUSTOMIZE
depends on VIDEO_MEDIA && I2C
- default m if MEDIA_TUNER_CUSTOMIZE
+ default y
help
Say Y here to include support for Philips TDA9885/6/7
analog IF demodulator.
config MEDIA_TUNER_TEA5761
- tristate "TEA 5761 radio tuner (EXPERIMENTAL)"
+ tristate "TEA 5761 radio tuner (EXPERIMENTAL)" if MEDIA_TUNER_CUSTOMIZE
depends on VIDEO_MEDIA && I2C
depends on EXPERIMENTAL
- default m if MEDIA_TUNER_CUSTOMIZE
+ default y
help
Say Y here to include support for the Philips TEA5761 radio tuner.
config MEDIA_TUNER_TEA5767
- tristate "TEA 5767 radio tuner"
+ tristate "TEA 5767 radio tuner" if MEDIA_TUNER_CUSTOMIZE
depends on VIDEO_MEDIA && I2C
- default m if MEDIA_TUNER_CUSTOMIZE
+ default y
help
Say Y here to include support for the Philips TEA5767 radio tuner.
config MEDIA_TUNER_MT20XX
- tristate "Microtune 2032 / 2050 tuners"
+ tristate "Microtune 2032 / 2050 tuners" if MEDIA_TUNER_CUSTOMIZE
depends on VIDEO_MEDIA && I2C
- default m if MEDIA_TUNER_CUSTOMIZE
+ default y
help
Say Y here to include support for the MT2032 / MT2050 tuner.
config MEDIA_TUNER_MT2060
- tristate "Microtune MT2060 silicon IF tuner"
+ tristate "Microtune MT2060 silicon IF tuner" if MEDIA_TUNER_CUSTOMIZE && DVB_FE_CUSTOMISE
depends on VIDEO_MEDIA && I2C
- default m if DVB_FE_CUSTOMISE
+ default DVB_CAPTURE_DRIVERS
help
A driver for the silicon IF tuner MT2060 from Microtune.
config MEDIA_TUNER_MT2266
- tristate "Microtune MT2266 silicon tuner"
+ tristate "Microtune MT2266 silicon tuner" if MEDIA_TUNER_CUSTOMIZE && DVB_FE_CUSTOMISE
depends on VIDEO_MEDIA && I2C
- default m if DVB_FE_CUSTOMISE
+ default DVB_CAPTURE_DRIVERS
help
A driver for the silicon baseband tuner MT2266 from Microtune.
config MEDIA_TUNER_MT2131
- tristate "Microtune MT2131 silicon tuner"
+ tristate "Microtune MT2131 silicon tuner" if MEDIA_TUNER_CUSTOMIZE && DVB_FE_CUSTOMISE
depends on VIDEO_MEDIA && I2C
- default m if DVB_FE_CUSTOMISE
+ default DVB_CAPTURE_DRIVERS
help
A driver for the silicon baseband tuner MT2131 from Microtune.
config MEDIA_TUNER_QT1010
- tristate "Quantek QT1010 silicon tuner"
+ tristate "Quantek QT1010 silicon tuner" if MEDIA_TUNER_CUSTOMIZE && DVB_FE_CUSTOMISE
depends on VIDEO_MEDIA && I2C
- default m if DVB_FE_CUSTOMISE
+ default DVB_CAPTURE_DRIVERS
help
A driver for the silicon tuner QT1010 from Quantek.
config MEDIA_TUNER_XC2028
- tristate "XCeive xc2028/xc3028 tuners"
+ tristate "XCeive xc2028/xc3028 tuners" if MEDIA_TUNER_CUSTOMIZE
depends on VIDEO_MEDIA && I2C
depends on HOTPLUG
select FW_LOADER
- default m if MEDIA_TUNER_CUSTOMIZE
+ default y
help
Say Y here to include support for the xc2028/xc3028 tuners.
config MEDIA_TUNER_XC5000
- tristate "Xceive XC5000 silicon tuner"
+ tristate "Xceive XC5000 silicon tuner" if MEDIA_TUNER_CUSTOMIZE
depends on VIDEO_MEDIA && I2C
depends on HOTPLUG
select FW_LOADER
- default m if DVB_FE_CUSTOMISE
+ default y
help
A driver for the silicon tuner XC5000 from Xceive.
This device is only used inside a SiP called togther with a
demodulator for now.
config MEDIA_TUNER_MXL5005S
- tristate "MaxLinear MSL5005S silicon tuner"
+ tristate "MaxLinear MSL5005S silicon tuner" if MEDIA_TUNER_CUSTOMIZE && DVB_FE_CUSTOMISE
depends on VIDEO_MEDIA && I2C
- default m if DVB_FE_CUSTOMISE
+ default DVB_CAPTURE_DRIVERS
help
A driver for the silicon tuner MXL5005S from MaxLinear.
-endif # MEDIA_TUNER_CUSTOMIZE
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-05-25 19:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-20 19:34 [patch] video/dvb: fix MEDIA_TUNER && FW_LOADER build error Ingo Molnar
2008-05-25 19:30 ` Roman Zippel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox