From 5859f663815115c5eca5bb5a9f253dfb15cb8cfc Mon Sep 17 00:00:00 2001 From: peter Date: Fri, 18 Nov 2011 20:18:01 +0100 Subject: [PATCH] Linux TBS tuner drivers --- .../linux-drivers/linux-tbs-drivers/build | 30 ++++++++++++++++ .../linux-drivers/linux-tbs-drivers/install | 31 ++++++++++++++++ packages/linux-drivers/linux-tbs-drivers/meta | 35 ++++++++++++++++++ .../linux-drivers/linux-tbs-drivers/unpack | 36 +++++++++++++++++++ projects/Fusion/options | 2 +- projects/Generic/options | 2 +- projects/Generic_OSS/options | 2 +- projects/ION/options | 2 +- projects/Intel/options | 2 +- projects/Ultra/options | 2 +- 10 files changed, 138 insertions(+), 6 deletions(-) create mode 100755 packages/linux-drivers/linux-tbs-drivers/build create mode 100755 packages/linux-drivers/linux-tbs-drivers/install create mode 100644 packages/linux-drivers/linux-tbs-drivers/meta create mode 100755 packages/linux-drivers/linux-tbs-drivers/unpack diff --git a/packages/linux-drivers/linux-tbs-drivers/build b/packages/linux-drivers/linux-tbs-drivers/build new file mode 100755 index 000000000..8feacb242 --- /dev/null +++ b/packages/linux-drivers/linux-tbs-drivers/build @@ -0,0 +1,30 @@ +#!/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 $BUILD/${PKG_NAME}-${PKG_VERSION}/linux-tbs-drivers + +[ "$TARGET_ARCH" = "i386" ] && ./v4l/tbs-x86_r3.sh +[ "$TARGET_ARCH" = "x86_64" ] && ./v4l/tbs-x86_64.sh + +make DIR=$(kernel_path) diff --git a/packages/linux-drivers/linux-tbs-drivers/install b/packages/linux-drivers/linux-tbs-drivers/install new file mode 100755 index 000000000..58a3301fb --- /dev/null +++ b/packages/linux-drivers/linux-tbs-drivers/install @@ -0,0 +1,31 @@ +#!/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/tbs +find $BUILD/${PKG_NAME}-${PKG_VERSION}/linux-tbs-drivers/ -name \*.ko -exec cp {} $INSTALL/lib/modules/$VER/tbs \; + +mkdir -p $INSTALL/usr/lib/firmware/ +cp $BUILD/${PKG_NAME}-${PKG_VERSION}/*.fw $INSTALL/usr/lib/firmware/ diff --git a/packages/linux-drivers/linux-tbs-drivers/meta b/packages/linux-drivers/linux-tbs-drivers/meta new file mode 100644 index 000000000..e87676c8a --- /dev/null +++ b/packages/linux-drivers/linux-tbs-drivers/meta @@ -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="linux-tbs-drivers" +PKG_VERSION="111115" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://www.tbsdtv.com/english/Download.html" +PKG_URL="http://www.tbsdtv.com/download/common/${PKG_NAME}_${PKG_VERSION}.zip" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain linux" +PKG_PRIORITY="optional" +PKG_SECTION="driver" +PKG_SHORTDESC="Linux TBS tuner drivers" +PKG_LONGDESC="Linux TBS tuner drivers" +PKG_IS_ADDON="no" +PKG_AUTORECONF="no" diff --git a/packages/linux-drivers/linux-tbs-drivers/unpack b/packages/linux-drivers/linux-tbs-drivers/unpack new file mode 100755 index 000000000..a9d3af2b9 --- /dev/null +++ b/packages/linux-drivers/linux-tbs-drivers/unpack @@ -0,0 +1,36 @@ +#!/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 + +ZIP_PKG="`echo $PKG_URL | sed 's%.*/\(.*\)$%\1%'`" + +mkdir -p $BUILD/${PKG_NAME}-${PKG_VERSION} + +# unzip main archive +unzip $SOURCES/$1/$ZIP_PKG -d $BUILD/${PKG_NAME}-${PKG_VERSION} >/dev/null 2>&1 +# extract .tar.bz2 +tar xjf $BUILD/${PKG_NAME}-${PKG_VERSION}/linux-tbs-drivers.tar.bz2 -C $BUILD/${PKG_NAME}-${PKG_VERSION} +# fix permissions +chmod -R u+rwX $BUILD/${PKG_NAME}-${PKG_VERSION}/linux-tbs-drivers/* +# fix typo +sed -i 's|tbs5880trl|tbs5880ctrl|g' $BUILD/${PKG_NAME}-${PKG_VERSION}/linux-tbs-drivers/v4l/tbs-x86_64.sh diff --git a/projects/Fusion/options b/projects/Fusion/options index 9f50fdb78..304119268 100755 --- a/projects/Fusion/options +++ b/projects/Fusion/options @@ -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 a867_drv aver_h826d" + ADDITIONAL_DRIVERS="asix-ax887xx AF9035 a867_drv aver_h826d linux-tbs-drivers" # build with network support (yes / no) NETWORK="yes" diff --git a/projects/Generic/options b/projects/Generic/options index d1bfa313b..a5727cf96 100755 --- a/projects/Generic/options +++ b/projects/Generic/options @@ -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 a867_drv aver_h826d" + ADDITIONAL_DRIVERS="asix-ax887xx AF9035 a867_drv aver_h826d linux-tbs-drivers" # build with network support (yes / no) NETWORK="yes" diff --git a/projects/Generic_OSS/options b/projects/Generic_OSS/options index 57887cf8f..2e896d002 100755 --- a/projects/Generic_OSS/options +++ b/projects/Generic_OSS/options @@ -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 a867_drv aver_h826d" + ADDITIONAL_DRIVERS="asix-ax887xx AF9035 a867_drv aver_h826d linux-tbs-drivers" # build with network support (yes / no) NETWORK="yes" diff --git a/projects/ION/options b/projects/ION/options index 737a6d1b8..7d887ea13 100755 --- a/projects/ION/options +++ b/projects/ION/options @@ -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 a867_drv aver_h826d" + ADDITIONAL_DRIVERS="asix-ax887xx AF9035 a867_drv aver_h826d linux-tbs-drivers" # build with network support (yes / no) NETWORK="yes" diff --git a/projects/Intel/options b/projects/Intel/options index 329a066a5..c624e06ab 100755 --- a/projects/Intel/options +++ b/projects/Intel/options @@ -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 a867_drv aver_h826d" + ADDITIONAL_DRIVERS="asix-ax887xx AF9035 a867_drv aver_h826d linux-tbs-drivers" # build with network support (yes / no) NETWORK="yes" diff --git a/projects/Ultra/options b/projects/Ultra/options index d9f110b8f..c3764d9ce 100755 --- a/projects/Ultra/options +++ b/projects/Ultra/options @@ -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 a867_drv aver_h826d" + ADDITIONAL_DRIVERS="asix-ax887xx AF9035 a867_drv aver_h826d linux-tbs-drivers" # build with network support (yes / no) NETWORK="yes"