![Mauro Carvalho Chehab](/assets/img/avatar_default.png)
There are a large number of reports that the media build is
not compiling when some drivers are compiled as builtin, while
the needed frontends are compiled as module.
On the last one of such reports:
From: kbuild test robot <fengguang.wu@intel.com>
Subject: saa7134-dvb.c:undefined reference to `zl10039_attach'
The .config file has:
CONFIG_VIDEO_SAA7134=y
CONFIG_VIDEO_SAA7134_DVB=y
# CONFIG_MEDIA_ATTACH is not set
CONFIG_DVB_ZL10039=m
And it produces all those errors:
drivers/built-in.o: In function `set_type':
tuner-core.c:(.text+0x2f263e): undefined reference to `tea5767_attach'
tuner-core.c:(.text+0x2f273e): undefined reference to `tda9887_attach'
drivers/built-in.o: In function `tuner_probe':
tuner-core.c:(.text+0x2f2d20): undefined reference to `tea5767_autodetection'
drivers/built-in.o: In function `av7110_attach':
av7110.c:(.text+0x330bda): undefined reference to `ves1x93_attach'
av7110.c:(.text+0x330bf7): undefined reference to `stv0299_attach'
av7110.c:(.text+0x330c63): undefined reference to `tda8083_attach'
av7110.c:(.text+0x330d09): undefined reference to `ves1x93_attach'
av7110.c:(.text+0x330d33): undefined reference to `tda8083_attach'
av7110.c:(.text+0x330d5d): undefined reference to `stv0297_attach'
av7110.c:(.text+0x330dbe): undefined reference to `stv0299_attach'
drivers/built-in.o: In function `tuner_attach_dtt7520x':
ngene-cards.c:(.text+0x3381cb): undefined reference to `dvb_pll_attach'
drivers/built-in.o: In function `demod_attach_lg330x':
ngene-cards.c:(.text+0x33828a): undefined reference to `lgdt330x_attach'
drivers/built-in.o: In function `demod_attach_stv0900':
ngene-cards.c:(.text+0x3383d5): undefined reference to `stv090x_attach'
drivers/built-in.o: In function `cineS2_probe':
ngene-cards.c:(.text+0x338b7f): undefined reference to `drxk_attach'
drivers/built-in.o: In function `configure_tda827x_fe':
saa7134-dvb.c:(.text+0x346ae7): undefined reference to `tda10046_attach'
drivers/built-in.o: In function `dvb_init':
saa7134-dvb.c:(.text+0x347283): undefined reference to `mt352_attach'
saa7134-dvb.c:(.text+0x3472cd): undefined reference to `mt352_attach'
saa7134-dvb.c:(.text+0x34731c): undefined reference to `tda10046_attach'
saa7134-dvb.c:(.text+0x34733c): undefined reference to `tda10046_attach'
saa7134-dvb.c:(.text+0x34735c): undefined reference to `tda10046_attach'
saa7134-dvb.c:(.text+0x347378): undefined reference to `tda10046_attach'
saa7134-dvb.c:(.text+0x3473db): undefined reference to `tda10046_attach'
drivers/built-in.o:saa7134-dvb.c:(.text+0x347502): more undefined references to `tda10046_attach' follow
drivers/built-in.o: In function `dvb_init':
saa7134-dvb.c:(.text+0x347812): undefined reference to `mt352_attach'
saa7134-dvb.c:(.text+0x347951): undefined reference to `mt312_attach'
saa7134-dvb.c:(.text+0x3479a9): undefined reference to `mt312_attach'
>> saa7134-dvb.c:(.text+0x3479c1): undefined reference to `zl10039_attach'
This is happening because a builtin module can't use directly a symbol
found on a module. By enabling CONFIG_MEDIA_ATTACH, the configuration
becomes valid, as dvb_attach() macro loads the module if needed, making
the symbol available to the builtin module.
While this bug started to appear after the patches that use IS_DEFINED
macro (like changeset 7b34be71db
), this
bug is a way ancient than that.
The thing is that, before the IS_DEFINED() patches, the logic used to be:
&& defined(MODULE))
struct dvb_frontend *zl10039_attach(struct dvb_frontend *fe,
u8 i2c_addr,
struct i2c_adapter *i2c);
static inline struct dvb_frontend *zl10039_attach(struct dvb_frontend *fe,
u8 i2c_addr,
struct i2c_adapter *i2c)
{
printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
return NULL;
}
The above code, with the .config file used, was evoluting to FALSE
(instead of TRUE as it should be, as CONFIG_DVB_ZL10039 is 'm'),
and were adding the static inline code at saa7134-dvb, instead
of the external call. So, while it weren't producing any compilation
error, the code weren't working either.
So, as the overhead for using CONFIG_MEDIA_ATTACH is minimal, just
enable it, if MODULES is defined.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
239 lines
7.1 KiB
Plaintext
239 lines
7.1 KiB
Plaintext
# Analog TV tuners, auto-loaded via tuner.ko
|
|
config MEDIA_TUNER
|
|
tristate
|
|
depends on (MEDIA_ANALOG_TV_SUPPORT || MEDIA_RADIO_SUPPORT) && I2C
|
|
default y
|
|
select MEDIA_TUNER_XC2028 if MEDIA_SUBDRV_AUTOSELECT
|
|
select MEDIA_TUNER_XC5000 if MEDIA_SUBDRV_AUTOSELECT
|
|
select MEDIA_TUNER_XC4000 if MEDIA_SUBDRV_AUTOSELECT
|
|
select MEDIA_TUNER_MT20XX if MEDIA_SUBDRV_AUTOSELECT
|
|
select MEDIA_TUNER_TDA8290 if MEDIA_SUBDRV_AUTOSELECT
|
|
select MEDIA_TUNER_TEA5761 if MEDIA_SUBDRV_AUTOSELECT && MEDIA_RADIO_SUPPORT
|
|
select MEDIA_TUNER_TEA5767 if MEDIA_SUBDRV_AUTOSELECT && MEDIA_RADIO_SUPPORT
|
|
select MEDIA_TUNER_SIMPLE if MEDIA_SUBDRV_AUTOSELECT
|
|
select MEDIA_TUNER_TDA9887 if MEDIA_SUBDRV_AUTOSELECT
|
|
select MEDIA_TUNER_MC44S803 if MEDIA_SUBDRV_AUTOSELECT
|
|
|
|
menu "Customize TV tuners"
|
|
visible if !MEDIA_SUBDRV_AUTOSELECT
|
|
depends on MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT || MEDIA_RADIO_SUPPORT
|
|
|
|
config MEDIA_TUNER_SIMPLE
|
|
tristate "Simple tuner support"
|
|
depends on MEDIA_SUPPORT && I2C
|
|
select MEDIA_TUNER_TDA9887
|
|
default m if !MEDIA_SUBDRV_AUTOSELECT
|
|
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 MEDIA_SUPPORT && I2C
|
|
select MEDIA_TUNER_TDA827X
|
|
select MEDIA_TUNER_TDA18271
|
|
default m if !MEDIA_SUBDRV_AUTOSELECT
|
|
help
|
|
Say Y here to include support for Philips TDA8290+8275(a) tuner.
|
|
|
|
config MEDIA_TUNER_TDA827X
|
|
tristate "Philips TDA827X silicon tuner"
|
|
depends on MEDIA_SUPPORT && I2C
|
|
default m if !MEDIA_SUBDRV_AUTOSELECT
|
|
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"
|
|
depends on MEDIA_SUPPORT && I2C
|
|
default m if !MEDIA_SUBDRV_AUTOSELECT
|
|
help
|
|
A silicon tuner module. Say Y when you want to support this tuner.
|
|
|
|
config MEDIA_TUNER_TDA9887
|
|
tristate "TDA 9885/6/7 analog IF demodulator"
|
|
depends on MEDIA_SUPPORT && I2C
|
|
default m if !MEDIA_SUBDRV_AUTOSELECT
|
|
help
|
|
Say Y here to include support for Philips TDA9885/6/7
|
|
analog IF demodulator.
|
|
|
|
config MEDIA_TUNER_TEA5761
|
|
tristate "TEA 5761 radio tuner"
|
|
depends on MEDIA_SUPPORT && I2C
|
|
default m if !MEDIA_SUBDRV_AUTOSELECT
|
|
help
|
|
Say Y here to include support for the Philips TEA5761 radio tuner.
|
|
|
|
config MEDIA_TUNER_TEA5767
|
|
tristate "TEA 5767 radio tuner"
|
|
depends on MEDIA_SUPPORT && I2C
|
|
default m if !MEDIA_SUBDRV_AUTOSELECT
|
|
help
|
|
Say Y here to include support for the Philips TEA5767 radio tuner.
|
|
|
|
config MEDIA_TUNER_MT20XX
|
|
tristate "Microtune 2032 / 2050 tuners"
|
|
depends on MEDIA_SUPPORT && I2C
|
|
default m if !MEDIA_SUBDRV_AUTOSELECT
|
|
help
|
|
Say Y here to include support for the MT2032 / MT2050 tuner.
|
|
|
|
config MEDIA_TUNER_MT2060
|
|
tristate "Microtune MT2060 silicon IF tuner"
|
|
depends on MEDIA_SUPPORT && I2C
|
|
default m if !MEDIA_SUBDRV_AUTOSELECT
|
|
help
|
|
A driver for the silicon IF tuner MT2060 from Microtune.
|
|
|
|
config MEDIA_TUNER_MT2063
|
|
tristate "Microtune MT2063 silicon IF tuner"
|
|
depends on MEDIA_SUPPORT && I2C
|
|
default m if !MEDIA_SUBDRV_AUTOSELECT
|
|
help
|
|
A driver for the silicon IF tuner MT2063 from Microtune.
|
|
|
|
config MEDIA_TUNER_MT2266
|
|
tristate "Microtune MT2266 silicon tuner"
|
|
depends on MEDIA_SUPPORT && I2C
|
|
default m if !MEDIA_SUBDRV_AUTOSELECT
|
|
help
|
|
A driver for the silicon baseband tuner MT2266 from Microtune.
|
|
|
|
config MEDIA_TUNER_MT2131
|
|
tristate "Microtune MT2131 silicon tuner"
|
|
depends on MEDIA_SUPPORT && I2C
|
|
default m if !MEDIA_SUBDRV_AUTOSELECT
|
|
help
|
|
A driver for the silicon baseband tuner MT2131 from Microtune.
|
|
|
|
config MEDIA_TUNER_QT1010
|
|
tristate "Quantek QT1010 silicon tuner"
|
|
depends on MEDIA_SUPPORT && I2C
|
|
default m if !MEDIA_SUBDRV_AUTOSELECT
|
|
help
|
|
A driver for the silicon tuner QT1010 from Quantek.
|
|
|
|
config MEDIA_TUNER_XC2028
|
|
tristate "XCeive xc2028/xc3028 tuners"
|
|
depends on MEDIA_SUPPORT && I2C
|
|
default m if !MEDIA_SUBDRV_AUTOSELECT
|
|
help
|
|
Say Y here to include support for the xc2028/xc3028 tuners.
|
|
|
|
config MEDIA_TUNER_XC5000
|
|
tristate "Xceive XC5000 silicon tuner"
|
|
depends on MEDIA_SUPPORT && I2C
|
|
default m if !MEDIA_SUBDRV_AUTOSELECT
|
|
help
|
|
A driver for the silicon tuner XC5000 from Xceive.
|
|
This device is only used inside a SiP called together with a
|
|
demodulator for now.
|
|
|
|
config MEDIA_TUNER_XC4000
|
|
tristate "Xceive XC4000 silicon tuner"
|
|
depends on MEDIA_SUPPORT && I2C
|
|
default m if !MEDIA_SUBDRV_AUTOSELECT
|
|
help
|
|
A driver for the silicon tuner XC4000 from Xceive.
|
|
This device is only used inside a SiP called together with a
|
|
demodulator for now.
|
|
|
|
config MEDIA_TUNER_MXL5005S
|
|
tristate "MaxLinear MSL5005S silicon tuner"
|
|
depends on MEDIA_SUPPORT && I2C
|
|
default m if !MEDIA_SUBDRV_AUTOSELECT
|
|
help
|
|
A driver for the silicon tuner MXL5005S from MaxLinear.
|
|
|
|
config MEDIA_TUNER_MXL5007T
|
|
tristate "MaxLinear MxL5007T silicon tuner"
|
|
depends on MEDIA_SUPPORT && I2C
|
|
default m if !MEDIA_SUBDRV_AUTOSELECT
|
|
help
|
|
A driver for the silicon tuner MxL5007T from MaxLinear.
|
|
|
|
config MEDIA_TUNER_MC44S803
|
|
tristate "Freescale MC44S803 Low Power CMOS Broadband tuners"
|
|
depends on MEDIA_SUPPORT && I2C
|
|
default m if !MEDIA_SUBDRV_AUTOSELECT
|
|
help
|
|
Say Y here to support the Freescale MC44S803 based tuners
|
|
|
|
config MEDIA_TUNER_MAX2165
|
|
tristate "Maxim MAX2165 silicon tuner"
|
|
depends on MEDIA_SUPPORT && I2C
|
|
default m if !MEDIA_SUBDRV_AUTOSELECT
|
|
help
|
|
A driver for the silicon tuner MAX2165 from Maxim.
|
|
|
|
config MEDIA_TUNER_TDA18218
|
|
tristate "NXP TDA18218 silicon tuner"
|
|
depends on MEDIA_SUPPORT && I2C
|
|
default m if !MEDIA_SUBDRV_AUTOSELECT
|
|
help
|
|
NXP TDA18218 silicon tuner driver.
|
|
|
|
config MEDIA_TUNER_FC0011
|
|
tristate "Fitipower FC0011 silicon tuner"
|
|
depends on MEDIA_SUPPORT && I2C
|
|
default m if !MEDIA_SUBDRV_AUTOSELECT
|
|
help
|
|
Fitipower FC0011 silicon tuner driver.
|
|
|
|
config MEDIA_TUNER_FC0012
|
|
tristate "Fitipower FC0012 silicon tuner"
|
|
depends on MEDIA_SUPPORT && I2C
|
|
default m if !MEDIA_SUBDRV_AUTOSELECT
|
|
help
|
|
Fitipower FC0012 silicon tuner driver.
|
|
|
|
config MEDIA_TUNER_FC0013
|
|
tristate "Fitipower FC0013 silicon tuner"
|
|
depends on MEDIA_SUPPORT && I2C
|
|
default m if !MEDIA_SUBDRV_AUTOSELECT
|
|
help
|
|
Fitipower FC0013 silicon tuner driver.
|
|
|
|
config MEDIA_TUNER_TDA18212
|
|
tristate "NXP TDA18212 silicon tuner"
|
|
depends on MEDIA_SUPPORT && I2C
|
|
default m if !MEDIA_SUBDRV_AUTOSELECT
|
|
help
|
|
NXP TDA18212 silicon tuner driver.
|
|
|
|
config MEDIA_TUNER_E4000
|
|
tristate "Elonics E4000 silicon tuner"
|
|
depends on MEDIA_SUPPORT && I2C
|
|
default m if !MEDIA_SUBDRV_AUTOSELECT
|
|
help
|
|
Elonics E4000 silicon tuner driver.
|
|
|
|
config MEDIA_TUNER_FC2580
|
|
tristate "FCI FC2580 silicon tuner"
|
|
depends on MEDIA_SUPPORT && I2C
|
|
default m if !MEDIA_SUBDRV_AUTOSELECT
|
|
help
|
|
FCI FC2580 silicon tuner driver.
|
|
|
|
config MEDIA_TUNER_TUA9001
|
|
tristate "Infineon TUA 9001 silicon tuner"
|
|
depends on MEDIA_SUPPORT && I2C
|
|
default m if !MEDIA_SUBDRV_AUTOSELECT
|
|
help
|
|
Infineon TUA 9001 silicon tuner driver.
|
|
|
|
config MEDIA_TUNER_IT913X
|
|
tristate "ITE Tech IT913x silicon tuner"
|
|
depends on MEDIA_SUPPORT && I2C
|
|
default m if !MEDIA_SUBDRV_AUTOSELECT
|
|
help
|
|
ITE Tech IT913x silicon tuner driver.
|
|
|
|
config MEDIA_TUNER_R820T
|
|
tristate "Rafael Micro R820T silicon tuner"
|
|
depends on MEDIA_SUPPORT && I2C
|
|
default m if !MEDIA_SUBDRV_AUTOSELECT
|
|
help
|
|
Rafael Micro R820T silicon tuner driver.
|
|
endmenu
|