Menu

Fedora 16 Howto

Help
2012-02-21
2013-04-25
  • Xavier Hourcade

    Xavier Hourcade - 2012-02-21

    Fedora 16 Howto

    Sorry for the duplicate, I realize this might be a better/more visible place than a Patch's comment.
    This is a complete, step-by-step how to, for Fedora 16, with optional steps such as generating documentation or applying including the small cumulative patch (as just submitted).

    Status
      3.2.6-3.fc16.x86_64 -> OK
      3.2.5-3.fc16.x86_64 -> OK
      3.2.3-2.fc16.x86_64 -> OK
      3.2.2-1.fc16.x86_64 -> OK
      3.2.1-3.fc16.x86_64 -> OK
      3.1.9-1.fc16.x86_64 -> OK
      3.1.6-2.fc16.x86_64 -> OK
      3.1.2-1.fc16.x86_64 -> OK
      3.1.0-7.fc16.x86_64 -> OK

    Steps
      First time on the system => start at 1, skip 4 5 and 9
      Updating module revision => start at 3
      After each kernel update => start at 3, then 8, 10 and following

    Notation
      $ means "as normal user"
      # means "as root"

    (- as root -)

    1 Install dev packages
      # yum install ctags doxygen gcc kernel-devel patch subversion

      Notes
        Required packages
          "subversion" to obtain and manage the module source
          "gcc" and "kernel-devel" to build the module
        Optional packages
          "ctags" to avoid any (non-fatal) build errors
          "doxygen" to generate the documentation
          "patch" to apply the suggested cumulative patch
      See also
      
    http://fedoraproject.org/wiki/Docs/CustomKernel#Building_Only_Kernel_Modules_.28Out_Of_Tree_Modules.29

    (- now as normal user -)

    2 Get Syntek driver source from its svn repository
      $ mkdir ~/hard-webcam_syntek-sourceforge
      $ cd    ~/hard-webcam_syntek-sourceforge
      $ svn co -r 104
    https://syntekdriver.svn.sourceforge.net/svnroot/syntekdriver/trunk/driver
     
      Accept permanently sourceforge SVN''s current fingerprint
        94:74:b3:a9:54:ce:dc:e5:0d:d6:cf:86:b1:40:5a:48:b9:ea:15:de
      which can be verified using any modern browser (see SSL certificate) at
        https://syntekdriver.svn.sourceforge.net/svnroot/syntekdriver/

    3 Get into driver directory
      $ cd ~/hard-webcam_syntek-sourceforge/driver

    4 Check if new revisions are available, eg. latest 3 log entries
      $ svn log -l 3

    5 Update Syntek driver source to eg. rev 104 and read README file!
      $ svn up -r 104 && svn revert *
      $ xdg-open README
     
    6 Get and apply cumulative patch to source tree
      $ wget
    https://sourceforge.net/tracker/download.php?group_id=178178&atid=884193&file_id=436367&aid=3490085
      $ patch -p0 -i rev-104.patches-02

    7 Generate documentation (optional), save and open it
      $ make -f Makefile.standalone doc
      (lots of warnings, can be ignored)
      $ cp -a ../doxygen ../rev-104+patches-02_doc
      $ xdg-open ../rev-104+patches-02_doc/html/index.html
      $ make -f Makefile.standalone cleandoc

    8 Compile kernel module
      $ make -f Makefile.standalone driver

    (- now as root -)

    9 Check whether previous module version is loaded, unload it
      # lsmod | grep stk11xx
      stk11xx   145286 0
      videodev  97776  1 stk11xx
      # rmmod stk11xx
      # dmesg | tail -n 20
       stk11xx: usb_stk11xx_exit: Syntek USB2.0 webcam driver
    shutdown
       usbcore: deregistering interface driver
    usb_stk11xx_driver
       stk11xx: Syntek USB2.0 Camera disconnected
       stk11xx: Syntek USB2.0 Camera release resources video
    device /dev/video0

    10 Install and load the new kernel module in the kernel tree
      # cd /home/YOURUSER/hard-webcam_syntek-sourceforge/driver/
      # make -f Makefile.standalone install
      # chmod 744 /lib/modules/`uname -r`/extra/stk11xx.ko

      This places a copy of file "stk11xx.ko" in /lib/modules/`uname -r`/extra
      then it updates system modules dep & map files cf. depmod
      then it changes permissions to allow users executing eg. modinfo

    11 Now load it
      # modprobe stk11xx

      Webcam's activity led just blinked

    (- now as normal user again -)

    12 Check module infos

      $ dmesg | tail -n 20

       stk11xx: Syntek USB2.0 webcam driver startup
       stk11xx: Copyright(C) 2006-2009 Nicolas VIVIEN
       stk11xx: Syntek USB2.0 - STK-1135 based webcam found.
       stk11xx: Syntek AVStream USB2.0 1.3M WebCam - Product ID
    0x6A31.
       stk11xx: Release: 0005
       stk11xx: Number of interfaces : 1
       stk11xx: Initialize USB2.0 Syntek Camera
       stk11xx: Check device return error (0x0201 = 0C) !
       stk11xx: Syntek USB2.0 Camera is ready
       stk11xx: Syntek USB2.0 Camera is now controlling video
    device /dev/video0
       usbcore: registered new interface driver
    usb_stk11xx_driver
       stk11xx: v2.2.0 : Syntek USB Video Camera

       Linux media interface: v0.10
       Linux video capture interface: v2.00
       stk11xx: Syntek USB Video Camera driver 2.2.0 (0x020200,
    rev.104 & patches 02) startup
       stk11xx: Copyright(C) 2006-2011 Nicolas VIVIEN
       stk11xx: http://sourceforge.net/projects/syntekdriver/
       stk11xx: Syntek USB2.0 - STK-1135 based webcam found.
       stk11xx: Syntek AVStream USB2.0 1.3M WebCam - Product ID
    0x6A31.
       stk11xx: Release: 0005
       stk11xx: Number of interfaces : 1
       stk11xx: Initialize USB2.0 Syntek Camera
       stk11xx: Check device return error (0x0201 = 0C) !
       stk11xx: Syntek USB2.0 Camera is ready
       stk11xx: Syntek USB2.0 Camera is now controlling video
    device /dev/video0
       usbcore: registered new interface driver
    usb_stk11xx_driver

      The "Check device return error" message may be ignored.
     
      $ modinfo stk11xx

      filename:       /lib/modules/3.2.6-3.fc16.x86_64/extra/stk11xx.ko
      description:    Syntek USB Video Camera
      author:         Nicolas VIVIEN
      license:        GPL
      alias:          usb:v05E1p0501d*dc*dsc*dp*ic*isc*ip*
     

      filename:       /lib/modules/3.2.6-3.fc16.x86_64/extra/stk11xx.ko
      url:            http://sourceforge.net/projects/syntekdriver/
      version:        2.2.0 (0x020200, rev.104 & patches 02)
      description:    Syntek USB Video Camera
      author:         Nicolas VIVIEN
      license:        GPL
      srcversion:     EE9F347CA01477ED1F1FC9A
      alias:          usb:v05E1p0501d*dc*dsc*dp*ic*isc*ip*
     

      depends:        videodev
      vermagic:       3.2.6-3.fc16.x86_64 SMP mod_unload
      parm:           fps:Frames per second  (int)
      parm:           hflip:Horizontal image flip (int)
      parm:           vflip:Vertical image flip (int)
      parm:           brightness:Brightness setting (int)
      parm:           whiteness:Whiteness setting (int)
      parm:           colour:Colour setting (int)
      parm:           contrast:Contrast setting (int)
      parm:           norm:Norm setting (0=NTSC, 1=PAL) (int)

    12 Keep the module safe, clean-up build tree
      (backup to a sibling directory named after revision, patch no. and kernel
    version)

      $ mkdir         ../rev-104_no-patches_kmod-`uname -r`
      $ cp stk11xx.ko ../rev-104_no-patches_kmod-`uname -r`

      $ mkdir         ../rev-104+patches-02_kmod-`uname -r`
      $ cp stk11xx.ko ../rev-104+patches-02_kmod-`uname -r`

      Clean-up temp compilation files in driver directory
      $ make -f Makefile.standalone clean

    13 Test the kernel module

      VLC captures the video stream fine (from "/dev/video0" here, see dmesg
    output above).
      Start Kopete, Settings>Configure (takes a long time to open)
    hit the Video tab and smile to yourself, "this is a start".
    Flips should now work as well as automatic corrections.
      guvcview, Google Talk plugin & Skype just work
      Double-check after reboot, led blinks twice before login screen, all
    work. 

    Thanks again Nicolas et al !

     

Log in to post a comment.