Moderator Control Panel ]

Unable to compile SAA716x module

Unable to compile SAA716x module

Postby cdstealer » Sun Nov 27, 2011 5:57 am

Hi,
Just bought a TBS6280 as it had "linux" support. So I'm having an impossible task of trying to get 2 modules to compile against a 3.1.2 kernel. This is the error I get:
Code: Select All Code
# mv tbs62x0fe_driver.o.x86* v4l/
# ./v4l/tbs-x86_64.sh
TBS drivers configured for x86_64 platform.
# make
make -C /root/dvbt2/linux-tbs-drivers/v4l
make[1]: Entering directory `/root/dvbt2/linux-tbs-drivers/v4l'
./scripts/make_myconfig.pl
make[1]: Leaving directory `/root/dvbt2/linux-tbs-drivers/v4l'
make[1]: Entering directory `/root/dvbt2/linux-tbs-drivers/v4l'
perl scripts/make_config_compat.pl /lib/modules/3.1.2-gentoo/source ./.myconfig ./config-compat.h
creating symbolic links...
make -C firmware prep
make[2]: Entering directory `/root/dvbt2/linux-tbs-drivers/v4l/firmware'
make[2]: Leaving directory `/root/dvbt2/linux-tbs-drivers/v4l/firmware'
make -C firmware
make[2]: Entering directory `/root/dvbt2/linux-tbs-drivers/v4l/firmware'
  CC  ihex2fw
Generating vicam/firmware.fw
Generating dabusb/firmware.fw
Generating dabusb/bitstream.bin
Generating ttusb-budget/dspbootcode.bin
Generating cpia2/stv0672_vp4.bin
Generating av7110/bootcode.bin
make[2]: Leaving directory `/root/dvbt2/linux-tbs-drivers/v4l/firmware'
Kernel build directory is /lib/modules/3.1.2-gentoo/build
make -C /lib/modules/3.1.2-gentoo/build SUBDIRS=/root/dvbt2/linux-tbs-drivers/v4l  modules
make[2]: Entering directory `/usr/src/linux-3.1.2-gentoo'
  CC [M]  /root/dvbt2/linux-tbs-drivers/v4l/saa716x_pci.o
  CC [M]  /root/dvbt2/linux-tbs-drivers/v4l/saa716x_i2c.o
  CC [M]  /root/dvbt2/linux-tbs-drivers/v4l/saa716x_cgu.o
  CC [M]  /root/dvbt2/linux-tbs-drivers/v4l/saa716x_msi.o
  CC [M]  /root/dvbt2/linux-tbs-drivers/v4l/saa716x_dma.o
  CC [M]  /root/dvbt2/linux-tbs-drivers/v4l/saa716x_vip.o
  CC [M]  /root/dvbt2/linux-tbs-drivers/v4l/saa716x_aip.o
  CC [M]  /root/dvbt2/linux-tbs-drivers/v4l/saa716x_phi.o
  CC [M]  /root/dvbt2/linux-tbs-drivers/v4l/saa716x_boot.o
  CC [M]  /root/dvbt2/linux-tbs-drivers/v4l/saa716x_fgpi.o
  CC [M]  /root/dvbt2/linux-tbs-drivers/v4l/saa716x_adap.o
  CC [M]  /root/dvbt2/linux-tbs-drivers/v4l/saa716x_gpio.o
  CC [M]  /root/dvbt2/linux-tbs-drivers/v4l/saa716x_greg.o
  CC [M]  /root/dvbt2/linux-tbs-drivers/v4l/saa716x_spi.o
  CC [M]  /root/dvbt2/linux-tbs-drivers/v4l/saa716x_tbs.o
In file included from /root/dvbt2/linux-tbs-drivers/v4l/saa716x_tbs.c:50:0:
/root/dvbt2/linux-tbs-drivers/v4l/isl6423.h:56:9: error: expected ';', ',' or ')' before 'int'
/root/dvbt2/linux-tbs-drivers/v4l/saa716x_tbs.c: In function 'saa716x_tbs6925_frontend_attach':
/root/dvbt2/linux-tbs-drivers/v4l/saa716x_tbs.c:1020:7: warning: assignment from incompatible pointer type
/root/dvbt2/linux-tbs-drivers/v4l/saa716x_tbs.c: In function 'saa716x_tbs6984_frontend_attach':
/root/dvbt2/linux-tbs-drivers/v4l/saa716x_tbs.c:1093:3: error: implicit declaration of function 'isl6423_attach'
/root/dvbt2/linux-tbs-drivers/v4l/saa716x_tbs.c: In function 'saa716x_tbs6992_frontend_attach':
/root/dvbt2/linux-tbs-drivers/v4l/saa716x_tbs.c:1204:9: warning: assignment from incompatible pointer type
make[3]: *** [/root/dvbt2/linux-tbs-drivers/v4l/saa716x_tbs.o] Error 1
make[2]: *** [_module_/root/dvbt2/linux-tbs-drivers/v4l] Error 2
make[2]: Leaving directory `/usr/src/linux-3.1.2-gentoo'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/root/dvbt2/linux-tbs-drivers/v4l'
make: *** [all] Error 2


So, I've downloaded the Kernel-3X driver, the dvbt2 drivers and unpacked, then run the script to configure for an x86_64 system and then run make. Looks like I'm not going to get much joy with this.. anyone had this at all?

lspci gives the following information:
Code: Select All Code
01:00.0 Multimedia controller [0480]: Philips Semiconductors Device [1131:7160] (rev 03)
        Subsystem: Device [6280:0011]
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0, Cache Line Size: 32 bytes
        Interrupt: pin A routed to IRQ 10
        Region 0: Memory at fbb00000 (64-bit, non-prefetchable) [size=1M]
        Capabilities: [40] MSI: Enable- Count=1/32 Maskable- 64bit+
                Address: 0000000000000000  Data: 0000
        Capabilities: [50] Express (v1) Endpoint, MSI 00
                DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <256ns, L1 <1us
                        ExtTag- AttnBtn- AttnInd- PwrInd- RBE- FLReset-
                DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
                        RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop-
                        MaxPayload 128 bytes, MaxReadReq 128 bytes
                DevSta: CorrErr- UncorrErr+ FatalErr- UnsuppReq+ AuxPwr- TransPend-
                LnkCap: Port #1, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0 <4us, L1 <64us
                        ClockPM- Surprise- LLActRep- BwNot-
                LnkCtl: ASPM Disabled; RCB 128 bytes Disabled- Retrain- CommClk-
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk- DLActive- BWMgmt- ABWMgmt-
        Capabilities: [74] Power Management version 2
                Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot-,D3cold-)
                Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
        Capabilities: [80] Vendor Specific Information: Len=50 <?>
        Capabilities: [100 v1] Vendor Specific Information: ID=0000 Rev=0 Len=088 <?>


uname gives:
Code: Select All Code
Linux mediafukka 3.1.2-gentoo #7 SMP PREEMPT Sat Nov 26 17:59:59 GMT 2011 x86_64 Intel(R) Core(TM) i5 CPU 650 @ 3.20GHz GenuineIntel GNU/Linux


I'm also using version x86_64-pc-linux-gnu-4.5.3 of gcc. I have tried compiling with both gcc 4.3.6 and 4.6.1 and kernel 2.6.38 with the same results :(

Any advice would be great. TIA
cdstealer
 
Posts: 2
Joined: Sun Nov 27, 2011 5:43 am

Re: Unable to compile SAA716x module

Postby cody » Mon Nov 28, 2011 2:47 am

hi, first of all thank you for following the steps to report the problem in a proper way as per the new instruction posted here few days ago, which are supposed to benefit both sides and hopefully results in more efficient technical support - you're the first customer using them!

back to the problem - i can suggest two possible solutions for the issue:

1) "the workaround" : as how i call it suggests, it doesn't involve finding what really causes the problem and fixing it, because in properly configured building environment the error you're getting can't happen (i will elaborate why in point 2, i.e. "the real fix"), but still it will allow you to build the driver and use it with 6280. also, this workaround will destroy support for TBS 6984 and 6992 in the driver, which at least in you case doesn't really matter, because you don't have such hardware. what you need to do is very simple:

* open file 'linux-tbs-drivers/linux/drivers/media/dvb/frontends/isl6423.h' in your favorite text editor (e.g. 'vi') and at the end of line 55 put ',' (comma) - after that it should look like this:

Code: Select All Code
#else
static inline struct dvb_frontend *isl6423_attach(struct dvb_frontend *fe,
                    struct i2c_adapter *i2c,
                    const struct isl6423_config *config,
                    int nr)


then execute 'make' again and i expect it will build and then you can install the driver and use it.

2) "the real fix" : as how i call it suggests that is supposed to really answer the question why the problem happened, because without any doubt something is wrong in the configuration of your building environment, because the mistake, which is explained in point 1) is left exactly on purpose to generate error and prevent you to build the driver, because if you build in such case, when line 55 is used then it won't work with 6984 and 6992.

so, as i've just mentioned the "," in line 55 of '/usr/src/linux-tbs-drivers/v4l/isl6423.h' is missing on purpose - exactly to prevent to build the driver in such case, because if you look at the meaning of the code if line 55 of 'isl6423.h' is included then it means the ISL6423 driver is disabled, because the isl6423_attach() function is replaced with the fake one, which is defined after line 55:

{
printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__);
return NULL;
}
if ISL6423 driver is not disabled in the building process, which should be always the default case, then line 55 of of 'isl6423.h' should never being included. in other words driver build with line 55 of 'isl6423.h' included won't work with 6984 and 6992 - i don't know for sure why in your case that line is not included during the building process, but most likely building ISL6423 driver is disabled in your environment - for example maybe you used 'make menuconfig' and disabled to build all driver you think you don't need and as result manually disable building ISL6423 driver, because line 55 of 'isl6423.h' is included when the following check fails:

Code: Select All Code
#if defined(CONFIG_DVB_ISL6423) || (defined(CONFIG_DVB_ISL6423_MODULE) && defined(MODULE))


in other words the proper and real fix is to investigate why in your environment that fails and fix it.

so, the problem you're having is not some general issue with the drivers - in fact i can't see way it could happen if you follow the installation instructions from the READMEs, which ensure by default ISL6423 driver is not disabled - it's necessary, but something related to how you set your building environment. i hope that information would help you - i'm quite sure 1) will work and 2) is better but it depends on you - to find out why ISL6423 driver building is disabled in your environment.
cody
 
Posts: 627
Joined: Tue Apr 13, 2010 11:20 pm

Re: Unable to compile SAA716x module

Postby cdstealer » Mon Nov 28, 2011 3:11 am

Hi Cody,
Many thanks for you reply and detailed explanation. I enabled the isl6423 driver, saved the config and then did a clean build. Everything built successfully. Loaded the modules and the card is now detected and active. :D So it was basically me missing a driver!!! Thank you very much for a quick response and your time. Your procedure for reporting the issue was also nice to deal with. :)

Cheers
Steve
cdstealer
 
Posts: 2
Joined: Sun Nov 27, 2011 5:43 am

Re: Unable to compile SAA716x module

Postby cody » Mon Nov 28, 2011 3:28 am

hi Steve, no problem, i'm glad i was able to help. BTW, here:

http://www.filesonic.com/file/4025095005

i uploaded the latest FreeviewHD (aka DVB-T2) modules. i hope soon i will find spare time to merge Freeview (aka DVB-T) and FreeviewHD drivers in one driver that can seamlessly switch between the two modes. i also hope the new way of problem reporting will help, because currently with Linux supports due to many reasons it's huge tradeoff between working on improving the existing drivers/developing new drivers and the support work.
cody
 
Posts: 627
Joined: Tue Apr 13, 2010 11:20 pm


Return to Linux

Who is online

Users browsing this forum: No registered users and 7 guests

cron