Merge branch 'A867' of git://github.com/vpeter4/OpenELEC.tv

This commit is contained in:
Stephan Raue 2011-10-31 10:17:55 +01:00
commit 5668805a1f
13 changed files with 209 additions and 7 deletions

View File

@ -24,9 +24,24 @@
cd $PKG_BUILD
[ -z "$OBJDUMP" ] && OBJDUMP=${TARGET_PREFIX}objdump
[ -z "$ECHO" ] && ECHO=/bin/echo
# fix some directives after unpacking
sed -i "s|KDIR = .*|KDIR = $(kernel_path)|" Makefile
sed -i "s|KSRC = .*|KSRC = \$KDIR|" Makefile
sed -i "s|KINS = .*|KINS = \./modules|" Makefile
make CC=$CC
# ultraman: Original build module doesn't depends on dvb-usb module
# How to fix that? For now let's just modify .modinfo section in kernel module
# and depmod will pick up appropriate dependend modules
cp dvb-usb-af9035.ko dvb-usb-af9035.ko_orig
$OBJDUMP -s -j .modinfo dvb-usb-af9035.ko_orig | awk 'BEGIN{v=0;} /Contents/ {v=1; next;} {if (v==1) print $0;}' >new.modinfo1
cat new.modinfo1 | cut -c7-41 | awk '{printf($0);}' | sed 's/ //g;s/../\\\x&/g;' >new.modinfo2
$ECHO -ne `cat new.modinfo2` >new.modinfo3
cat new.modinfo3 | tr '\000' '\n' | awk '/^depends=/ {next;} {print $0;}' | tr '\n' '\000' >new.modinfo4
$ECHO -ne "depends=dvb-usb\0" >>new.modinfo4
$OBJCOPY --remove-section=.modinfo --add-section=.modinfo=new.modinfo4 --set-section-flags .modinfo=contents,alloc,load,readonly,data dvb-usb-af9035.ko_orig dvb-usb-af9035.ko
rm new.modinfo*

View File

@ -0,0 +1,42 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
. config/options $1
cd $PKG_BUILD
[ -z "$OBJDUMP" ] && OBJDUMP=${TARGET_PREFIX}objdump
[ -z "$ECHO" ] && ECHO=/bin/echo
make CC=$CC KSRC=$(kernel_path) KOBJ=$(kernel_path)
# ultraman: Original build module doesn't depends on dvb-usb module
# How to fix that? For now let's just modify .modinfo section in kernel module
# and depmod will pick up appropriate dependend modules
cp a867.ko a867.ko_orig
$OBJDUMP -s -j .modinfo a867.ko_orig | awk 'BEGIN{v=0;} /Contents/ {v=1; next;} {if (v==1) print $0;}' >new.modinfo1
cat new.modinfo1 | cut -c7-41 | awk '{printf($0);}' | sed 's/ //g;s/../\\\x&/g;' >new.modinfo2
$ECHO -ne `cat new.modinfo2` >new.modinfo3
cat new.modinfo3 | tr '\000' '\n' | awk '/^depends=/ {next;} {print $0;}' | tr '\n' '\000' >new.modinfo4
$ECHO -ne "depends=dvb-usb\0" >>new.modinfo4
$OBJCOPY --remove-section=.modinfo --add-section=.modinfo=new.modinfo4 --set-section-flags .modinfo=contents,alloc,load,readonly,data a867.ko_orig a867.ko
rm new.modinfo*

View File

@ -0,0 +1,33 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
. config/options $1
VER=`ls $BUILD/linux*/modules/lib/modules`
mkdir -p $INSTALL/lib/modules/$VER/a867
cp $PKG_BUILD/a867.ko $INSTALL/lib/modules/$VER/a867/
$ROOT/$TOOLCHAIN/sbin/depmod -b $INSTALL $VER > /dev/null
for i in `ls $INSTALL/lib/modules/*/modules.* | grep -v modules.dep | grep -v modules.alias | grep -v modules.symbols`; do
rm -f $i
done

View File

@ -0,0 +1,35 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
PKG_NAME="a867_drv"
PKG_VERSION="v1.0.28"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="http://www.avermedia.com/Product/ProductDetail.aspx?Id=516&tab=APDriver"
PKG_URL="http://www.avermedia.com/avertv/Upload/Download/${PKG_NAME}_${PKG_VERSION}.tar.bz2"
PKG_DEPENDS=""
PKG_BUILD_DEPENDS="toolchain linux busybox-hosttools"
PKG_PRIORITY="optional"
PKG_SECTION="driver"
PKG_SHORTDESC="AVerTV Volar HD Nano A867R driver"
PKG_LONGDESC="AVerTV Volar HD Nano A867R driver"
PKG_IS_ADDON="no"
PKG_AUTORECONF="no"

View File

@ -0,0 +1,75 @@
diff -Nur a867_drv_v1.0.28/af903x-drv.c a867_drv_v1.0.28_modif//af903x-drv.c
--- a867_drv_v1.0.28/af903x-drv.c 2010-11-10 04:46:22.000000000 +0100
+++ a867_drv_v1.0.28_modif//af903x-drv.c 2011-07-24 11:41:45.162923006 +0200
@@ -1103,8 +1103,8 @@
PDC->StreamType = StreamType_DVBT_DATAGRAM;
PDC->UsbCtrlTimeOut = 1;
- init_MUTEX(&PDC->powerLock);
- init_MUTEX(&PDC->tunerLock);
+ sema_init(&PDC->powerLock,1);
+ sema_init(&PDC->tunerLock,1);
PDC->power_use_count = 0;
PDC->idVendor = udev->descriptor.idVendor;
@@ -1116,7 +1116,7 @@
PDC->fc[0].AVerFlags = 0x00;
PDC->fc[1].AVerFlags = 0x00;
- init_MUTEX(&PDC->regLock);
+ sema_init(&PDC->regLock,1);
}
else {
PDC->UsbCtrlTimeOut = 5;
diff -Nur a867_drv_v1.0.28/af903x-fe.c a867_drv_v1.0.28_modif//af903x-fe.c
--- a867_drv_v1.0.28/af903x-fe.c 2010-11-10 04:46:22.000000000 +0100
+++ a867_drv_v1.0.28_modif//af903x-fe.c 2011-07-24 11:43:58.543584444 +0200
@@ -1,5 +1,5 @@
#include <linux/sched.h>
-#include <linux/smp_lock.h>
+//#include <linux/smp_lock.h>
#include <linux/list.h>
#include <linux/module.h>
#include <linux/version.h>
@@ -678,7 +678,7 @@
deb_data("- Enter %s Function -\n",__FUNCTION__);
if( !state ) return -1;
- lock_kernel();
+ //lock_kernel();
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,61)
daemonize();
sigfillset(&current->blocked);
@@ -689,7 +689,7 @@
#endif
siginitsetinv(&current->blocked, sigmask(SIGKILL)|sigmask(SIGINT)|\
sigmask(SIGTERM));
- unlock_kernel();
+ //unlock_kernel();
while(!state->thread_should_stop && !signal_pending(current)) {
diff -Nur a867_drv_v1.0.28/af903x.h a867_drv_v1.0.28_modif//af903x.h
--- a867_drv_v1.0.28/af903x.h 2010-11-10 04:46:22.000000000 +0100
+++ a867_drv_v1.0.28_modif//af903x.h 2011-07-24 11:42:54.563267143 +0200
@@ -9,7 +9,7 @@
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/kref.h>
-#include <linux/smp_lock.h>
+//#include <linux/smp_lock.h>
#include <linux/usb.h>
#include <asm/uaccess.h>
#include <dvb-usb.h>
diff -Nur a867_drv_v1.0.28/usb2impl.c a867_drv_v1.0.28_modif//usb2impl.c
--- a867_drv_v1.0.28/usb2impl.c 2010-11-10 10:27:27.000000000 +0100
+++ a867_drv_v1.0.28_modif//usb2impl.c 2011-07-24 11:43:09.915343276 +0200
@@ -10,7 +10,7 @@
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/kref.h>
-#include <linux/smp_lock.h>
+//#include <linux/smp_lock.h>
#include <linux/usb.h>
#include <asm/uaccess.h>
#include <linux/device.h>

View File

@ -0,0 +1,2 @@
http://www.aviolat-chauffage.ch/~xens/wordpress/?p=229
http://www.aviolat-chauffage.ch/~xens/files/a867_drv_v1.0.28_BKL_removal.patch.tar.gz

2
projects/ATV/options Normal file → Executable file
View File

@ -150,7 +150,7 @@
# asix-ax887xx: Asix AX887xx USB LAN Driver
# Space separated list is supported,
# e.g. ADDITIONAL_DRIVERS="asix-ax887xx AF9035"
ADDITIONAL_DRIVERS="asix-ax887xx AF9035 bcm_sta"
ADDITIONAL_DRIVERS="asix-ax887xx AF9035 bcm_sta a867_drv"
# build with network support (yes / no)
NETWORK="yes"

2
projects/Fusion/options Normal file → Executable file
View File

@ -150,7 +150,7 @@
# asix-ax887xx: Asix AX887xx USB LAN Driver
# Space separated list is supported,
# e.g. ADDITIONAL_DRIVERS="asix-ax887xx AF9035"
ADDITIONAL_DRIVERS="asix-ax887xx AF9035"
ADDITIONAL_DRIVERS="asix-ax887xx AF9035 a867_drv"
# build with network support (yes / no)
NETWORK="yes"

2
projects/Generic/options Normal file → Executable file
View File

@ -150,7 +150,7 @@
# asix-ax887xx: Asix AX887xx USB LAN Driver
# Space separated list is supported,
# e.g. ADDITIONAL_DRIVERS="asix-ax887xx AF9035"
ADDITIONAL_DRIVERS="asix-ax887xx AF9035"
ADDITIONAL_DRIVERS="asix-ax887xx AF9035 a867_drv"
# build with network support (yes / no)
NETWORK="yes"

2
projects/Generic_OSS/options Normal file → Executable file
View File

@ -150,7 +150,7 @@
# asix-ax887xx: Asix AX887xx USB LAN Driver
# Space separated list is supported,
# e.g. ADDITIONAL_DRIVERS="asix-ax887xx AF9035"
ADDITIONAL_DRIVERS="asix-ax887xx AF9035"
ADDITIONAL_DRIVERS="asix-ax887xx AF9035 a867_drv"
# build with network support (yes / no)
NETWORK="yes"

2
projects/ION/options Normal file → Executable file
View File

@ -150,7 +150,7 @@
# asix-ax887xx: Asix AX887xx USB LAN Driver
# Space separated list is supported,
# e.g. ADDITIONAL_DRIVERS="asix-ax887xx AF9035"
ADDITIONAL_DRIVERS="asix-ax887xx AF9035"
ADDITIONAL_DRIVERS="asix-ax887xx AF9035 a867_drv"
# build with network support (yes / no)
NETWORK="yes"

2
projects/Intel/options Normal file → Executable file
View File

@ -150,7 +150,7 @@
# asix-ax887xx: Asix AX887xx USB LAN Driver
# Space separated list is supported,
# e.g. ADDITIONAL_DRIVERS="asix-ax887xx AF9035"
ADDITIONAL_DRIVERS="asix-ax887xx AF9035"
ADDITIONAL_DRIVERS="asix-ax887xx AF9035 a867_drv"
# build with network support (yes / no)
NETWORK="yes"

2
projects/Ultra/options Normal file → Executable file
View File

@ -150,7 +150,7 @@
# asix-ax887xx: Asix AX887xx USB LAN Driver
# Space separated list is supported,
# e.g. ADDITIONAL_DRIVERS="asix-ax887xx AF9035"
ADDITIONAL_DRIVERS="asix-ax887xx AF9035"
ADDITIONAL_DRIVERS="asix-ax887xx AF9035 a867_drv"
# build with network support (yes / no)
NETWORK="yes"