我该如何安装 AverTV Hybrid Volar HX?

我该如何安装 AverTV Hybrid Volar HX?

如何安装驱动程序以使我的 AverTV Hybrid Volar HX 在全新 Ubuntu 11.10 计算机上运行?我是 Linux 世界的新手,但 Ubuntu 看起来很棒。请帮我一下!

答案1

这是针对 64 位驱动程序的,但可能同样的解决方案也适用于 32 位版本,只需在文件名中使用 x86 而不是 x64 即可。该解决方案的灵感来自linuxtv.org

  1. 在您的主目录中创建一个名为 AverTVVolarHX 的目录
  2. 从以下位置下载 C038A827H826_Installer_x64_0.10-Beta_091126.zip圆刚网站到该目录
  3. 在同一目录中创建补丁文件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 <linux/smp_lock.h>
    @@ -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 <linux/smp_lock.h>
    @@ -233 +232 @@
    -               init_MUTEX(&p->feedlock);
    +               sema_init(&p->feedlock, 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 <linux/smp_lock.h>
    @@ -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 <linux/smp_lock.h>
  4. 打开终端
    $ 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 < ../aver.patch
    $ cd installer
    $ ./installer.sh
  5. 安装过程中选择专家安装,选择/home/<youruser>/AverTVVolarHX作为专家安装目录并完成安装(它只会将模块源输出到/home/<youruser>/AverTVVolarHX/H826D-expert-install)
  6. 现在你需要一个十六进制编辑器,例如 ghex,它位于默认存储库中。十六进制编辑文件 /home/<youruser>/AverTVVolarHX/H826D-expert-install/aver/osdep_dvb.o_shipped,并用 param_array_ops 替换 param_array_get 和 param_array_set
  7. 在目录 /home/<youruser>/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. 最后运行installer.sh
    $ cd /home/<youruser>/AverTVVolarHX/H826D-expert-install
    $ chmod +x installer.sh
    $ sudo ./installer.sh

H826D-expert-install 目录是您未来重新编译所需的唯一内容,因此请将其保存到其他地方。现在可以安全地删除其他文件和目录。

答案2

相关内容