Has anyone compied the techwell drivers on ubuntu 14.04 lts?

A place for discussion of topics that are not specific to ZoneMinder. This could include Linux, Video4Linux, CCTV cameras or any other topic.
Post Reply
User avatar
kingofkya
Posts: 1110
Joined: Mon Mar 26, 2007 6:07 am
Location: Las Vegas, Nevada

Has anyone compied the techwell drivers on ubuntu 14.04 lts?

Post by kingofkya »

I cant seam to get it to work, this driver used to be super simple to compile:(



And its seams the gitorious site is haveing issues not sure if that is still the right place to get the drivers:
gitorious.org/tw68/

Anyway i made a copy In case anyone needs it / the site goes away.
kneale.us/tw68-tw68-v2.tar.gz



Code: Select all

68-tw68-v2# make
make -C /lib/modules/3.16.0-30-generic/build M=/home/travis/tw68-tw68-v2 modules
make[1]: Entering directory `/usr/src/linux-headers-3.16.0-30-generic'
  CC [M]  /home/travis/tw68-tw68-v2/tw68-core.o
In file included from /home/travis/tw68-tw68-v2/tw68-core.c:43:0:
/home/travis/tw68-tw68-v2/tw68.h:512:43: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before âtw68_pci_tblâ
 extern struct pci_device_id __devinitdata tw68_pci_tbl[];
                                           ^
/home/travis/tw68-tw68-v2/tw68-core.c:514:23: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before âmust_configure_manuallyâ
 static void __devinit must_configure_manually(void)
                       ^
/home/travis/tw68-tw68-v2/tw68-core.c: In function âvdev_initâ:
/home/travis/tw68-tw68-v2/tw68-core.c:591:5: error: âstruct video_deviceâ has no member named âparentâ
  vfd->parent  = &dev->pci->dev;
     ^
/home/travis/tw68-tw68-v2/tw68-core.c: At top level:
/home/travis/tw68-tw68-v2/tw68-core.c:654:22: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before âtw68_initdevâ
 static int __devinit tw68_initdev(struct pci_dev *pci_dev,
                      ^
/home/travis/tw68-tw68-v2/tw68-core.c:910:23: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â before âtw68_finidevâ
 static void __devexit tw68_finidev(struct pci_dev *pci_dev)
                       ^
/home/travis/tw68-tw68-v2/tw68-core.c:1058:14: error: âtw68_pci_tblâ undeclared here (not in a function)
  .id_table = tw68_pci_tbl,
              ^
/home/travis/tw68-tw68-v2/tw68-core.c:1059:13: error: âtw68_initdevâ undeclared here (not in a function)
  .probe   = tw68_initdev,
             ^
/home/travis/tw68-tw68-v2/tw68-core.c:1060:2: error: implicit declaration of function â__devexit_pâ [-Werror=implicit-function-declaration]
  .remove   = __devexit_p(tw68_finidev),
  ^
/home/travis/tw68-tw68-v2/tw68-core.c:1060:26: error: âtw68_finidevâ undeclared here (not in a function)
  .remove   = __devexit_p(tw68_finidev),
                          ^
/home/travis/tw68-tw68-v2/tw68-core.c:93:21: warning: âtw68_devcountâ defined but not used [-Wunused-variable]
 static unsigned int tw68_devcount;      /* curr tot num of devices present */
                     ^
/home/travis/tw68-tw68-v2/tw68-core.c:368:12: warning: âtw68_hw_init1â defined but not used [-Wunused-function]
 static int tw68_hw_init1(struct tw68_dev *dev)
            ^
/home/travis/tw68-tw68-v2/tw68-core.c:491:12: warning: âtw68_hw_init2â defined but not used [-Wunused-function]
 static int tw68_hw_init2(struct tw68_dev *dev)
            ^
/home/travis/tw68-tw68-v2/tw68-core.c:503:12: warning: âtw68_hwfiniâ defined but not used [-Wunused-function]
 static int tw68_hwfini(struct tw68_dev *dev)
            ^
/home/travis/tw68-tw68-v2/tw68-core.c:542:20: warning: âtw68_irqâ defined but not used [-Wunused-function]
 static irqreturn_t tw68_irq(int irq, void *dev_id)
                    ^
/home/travis/tw68-tw68-v2/tw68-core.c:579:29: warning: âvdev_initâ defined but not used [-Wunused-function]
 static struct video_device *vdev_init(struct tw68_dev *dev,
                             ^
/home/travis/tw68-tw68-v2/tw68-core.c:599:13: warning: âtw68_unregister_videoâ defined but not used [-Wunused-function]
 static void tw68_unregister_video(struct tw68_dev *dev)
             ^
/home/travis/tw68-tw68-v2/tw68-core.c:626:13: warning: âmpeg_ops_attachâ defined but not used [-Wunused-function]
 static void mpeg_ops_attach(struct tw68_mpeg_ops *ops,
             ^
/home/travis/tw68-tw68-v2/tw68-core.c:642:13: warning: âmpeg_ops_detachâ defined but not used [-Wunused-function]
 static void mpeg_ops_detach(struct tw68_mpeg_ops *ops,
             ^
cc1: some warnings being treated as errors
make[2]: *** [/home/travis/tw68-tw68-v2/tw68-core.o] Error 1
make[1]: *** [_module_/home/travis/tw68-tw68-v2] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.16.0-30-generic'
make: *** [all] Error 2
User avatar
asker
Posts: 1553
Joined: Sun Mar 01, 2015 12:12 pm

Re: Has anyone compied the techwell drivers on ubuntu 14.04

Post by asker »

I have zero idea but I took a look anyway ;-)

a) The code uses __dev* initializers - they are no longer used in later linux kernels

To fix it, add this to tw68.h right at the top

Code: Select all

#define __devinit
#define __devinitdata
#define __devexit
#define __devexitdata
#define __devexit_p
b) Next up, certain structures have changed in newer library versions.
Edit tw68-core.c:line 591, change "parent" to "dev_parent" (that's the new name)

Code: Select all

 vfd->dev_parent  = &dev->pci->dev;
c) Finally, edit tw68-video.c: line 2079
comment out .current_norm --> that field does not exist anymore in V4L

now make and it will compile.

Whether it works or not, I haven't a clue :-)
I no longer work on zmNinja, zmeventnotification, pyzm or mlapi. I may respond on occasion based on my available time/interest.

Please read before posting:
How to set up logging properly
How to troubleshoot and report - ES
How to troubleshoot and report - zmNinja
ES docs
zmNinja docs
Post Reply