3

How can I install the driver to get my AverTV Hybrid Volar HX working on brand new Ubuntu 11.10 computer? I'am a newby in linux world but Ubuntu looks great. Please give me a hand!

RolandiXor
  • 51,797
bernd
  • 31

2 Answers2

1

This is for 64 bit drivers, but probably the same solution applies to the 32-bit version by just using x86 instead of x64 in filenames. The solution is inspired in the great work by the guys of linuxtv.org

  1. Create a directory called AverTVVolarHX in your home
  2. Download C038A827H826_Installer_x64_0.10-Beta_091126.zip from AverMedia WebSite to that directory
  3. Create in same directory patch file aver.patch:
    diff -Nr -u0 original/installer/installer.sh modified/installer/installer.sh
    --- original/installer/installer.sh     2009-11-13 11:47:33.000000000 +0100
    +++ modified/installer/installer.sh     2011-08-28 20:58:38.000000000 +0200
    @@ -177,13 +176,0 @@
    -       if [[ "$kversion" != "2" || "$kpatchlevel" != "6" ]]; then
    -               dialog --backtitle "$BACKTITLE" \
    -               --title "Kernel version error" \
    -               --msgbox "Installer cannot determine kernel version or the running kernel is not 2.6.x kernel. \n\
    -Installer will abort now.
    -" \
    -               10 $WIDTH
    -               log "generate_kdep_string: wrong kernel version ${kversion}.${kpatchlevel}.${ksublevel}. Abort."
    -        log_from_file $ksrc/Makefile #s016
    -        log_from_file $kobj/Makefile #s016
    -               exit
    -       fi
    -
    @@ -994,3 +980,0 @@
    -   # check if root
    -   log "check if root: EUID=$EUID"
    -   if [[ "$EUID" != "0" ]]; then
    @@ -998,9 +981,0 @@
    -       dialog --backtitle "$BACKTITLE" \
    -       --title "ERROR: " \
    -       --msgbox \
    -       "You must be root to run installer. \
    -\nPlease login as root or use 'su' or 'sudo' to abtain root privilege. \
    -\nInstaller will now abort." 10 $WIDTH
    -       clear
    -       exit
    -   fi
    diff -Nr -u0 original/installer/src/aver/osdep.c modified/installer/src/aver/osdep.c
    --- original/installer/src/aver/osdep.c 2009-11-13 11:54:56.000000000 +0100
    +++ modified/installer/src/aver/osdep.c 2011-08-28 20:19:19.000000000 +0200
    @@ -89 +88,0 @@
    -#include &ltlinux/smp_lock.h&gt
    @@ -435 +434 @@
    -               init_MUTEX(tmp);
    +               sema_init(tmp, 1);
    @@ -439 +438 @@
    -               init_MUTEX_LOCKED(tmp);
    +               sema_init(tmp, 0);
    @@ -1069,0 +1069 @@
    +static DEFINE_MUTEX(dvbdev_mutex);
    @@ -1072 +1072 @@
    -       lock_kernel();
    +       mutex_lock(&dvbdev_mutex);
    @@ -1077 +1077 @@
    -       unlock_kernel();
    +       mutex_unlock(&dvbdev_mutex);
    diff -Nr -u0 original/installer/src/aver/osdep_dvb.c modified/installer/src/aver/osdep_dvb.c
    --- original/installer/src/aver/osdep_dvb.c     2009-11-13 11:54:57.000000000 +0100
    +++ modified/installer/src/aver/osdep_dvb.c     2011-08-28 20:19:36.000000000 +0200
    @@ -79 +78,0 @@
    -#include &ltlinux/smp_lock.h&gt
    @@ -233 +232 @@
    -               init_MUTEX(&p-&gtfeedlock);
    +               sema_init(&p-&gtfeedlock, 1);
    diff -Nr -u0 original/installer/src/aver/osdep_th2.c modified/installer/src/aver/osdep_th2.c
    --- original/installer/src/aver/osdep_th2.c     2009-11-13 11:54:57.000000000 +0100
    +++ modified/installer/src/aver/osdep_th2.c     2011-08-28 20:20:00.000000000 +0200
    @@ -78 +77,0 @@
    -#include &ltlinux/smp_lock.h&gt
    @@ -80,0 +80 @@
    +#include "osdep.h"
    @@ -90 +90 @@
    -        lock_kernel();
    +        SysLockKernel();
    @@ -100 +100 @@
    -        unlock_kernel();
    +        SysUnlockKernel();
    diff -Nr -u0 original/installer/src/aver/osdep_v4l2.c modified/installer/src/aver/osdep_v4l2.c
    --- original/installer/src/aver/osdep_v4l2.c    2009-11-13 11:54:58.000000000 +0100
    +++ modified/installer/src/aver/osdep_v4l2.c    2011-08-28 20:20:19.000000000 +0200
    @@ -75,0 +76,2 @@
    +#define VFL_TYPE_VTX 3
    +
    @@ -84 +85,0 @@
    -#include &ltlinux/smp_lock.h&gt
  4. Open terminal
    $ cd ~/AverTVVolarHX
    $ unzip C038A827H826_Installer_x64_0.10-Beta_091126.zip
    $ cd H826D_Installer_x64_0.10-Beta
    $ tail -n +115 AVERMEDIA-Linux-x64-H826D-0.10-beta.sh | bzip2 -d | tar xf -
    $ patch -l -p1 &lt ../aver.patch
    $ cd installer
    $ ./installer.sh
  5. During the installation choose Expert Installation, select /home/&ltyouruser&gt/AverTVVolarHX as the directory for expert installation and finish installation (it just will output the module sources to /home/&ltyouruser&gt/AverTVVolarHX/H826D-expert-install)
  6. Now you need an hex editor, e.g. ghex, which is in the default repositories. Hex edit file /home/&ltyouruser&gt/AverTVVolarHX/H826D-expert-install/aver/osdep_dvb.o_shipped and replace param_array_get and param_array_set by param_array_ops
  7. Create in directory /home/&ltyouruser&gt/AverTVVolarHX/H826D-expert-install installer.sh:
    #!/bin/bash -i
    

    get absolute path of this script

    BASE=(cd \dirname $0`; pwd)`

    TARGET_DIR=/lib/modules/uname -r/kernel/drivers/media/dvb/dvb-usb

    if [[ "$EUID" != "0" ]]; then echo -e "You must be root to run installer. \nPlease login as root or use 'su' or 'sudo' to obtain root privileges. \nInstaller will now abort." exit fi

    cd "$BASE"

    make || { echo "make failed"; exit 1; }

    echo -e "\nCopying h826d.ko to $TARGET_DIR/h826d.ko" cp -r h826d.ko $TARGET_DIR/ || { echo "copy failed"; exit 1; }

    echo -e "\nCopying averusbh826d.ko to $TARGET_DIR/averusbh826d.ko" cp -r averusbh826d.ko $TARGET_DIR/ || { echo "copy failed"; exit 1; }

    echo -e "\nRunning depmod -a" depmod -a || { echo "depmod failed"; exit 1; }

    echo -e "\nCleaning" make clean || { echo "make clean failed"; exit 1; }

    echo -e "\nCompleted"

  8. Finally run installer.sh
    $ cd /home/&ltyouruser&gt/AverTVVolarHX/H826D-expert-install
    $ chmod +x installer.sh
    $ sudo ./installer.sh

The H826D-expert-install directory is the only thing you need for future recompilations, so save it somewhere else. The other files and dirs can now be safely deleted.

0

Please read this

Alok
  • 19