From 50a65e61d6242e91f6ee076faf8d45f6f63254dc Mon Sep 17 00:00:00 2001 From: peter Date: Mon, 10 Oct 2011 11:30:25 +0200 Subject: [PATCH] AF9035 driver --- packages/linux-drivers/AF9035_2.6.38/build | 32 +++++++++++++++++ packages/linux-drivers/AF9035_2.6.38/install | 38 ++++++++++++++++++++ packages/linux-drivers/AF9035_2.6.38/meta | 35 ++++++++++++++++++ projects/Ultra/options | 2 +- tools/mkpkg/mkpkg_driver_af9035 | 34 ++++++++++++++++++ 5 files changed, 140 insertions(+), 1 deletion(-) create mode 100755 packages/linux-drivers/AF9035_2.6.38/build create mode 100755 packages/linux-drivers/AF9035_2.6.38/install create mode 100755 packages/linux-drivers/AF9035_2.6.38/meta create mode 100755 tools/mkpkg/mkpkg_driver_af9035 diff --git a/packages/linux-drivers/AF9035_2.6.38/build b/packages/linux-drivers/AF9035_2.6.38/build new file mode 100755 index 0000000000..9eb2940283 --- /dev/null +++ b/packages/linux-drivers/AF9035_2.6.38/build @@ -0,0 +1,32 @@ +#!/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 + +# 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 diff --git a/packages/linux-drivers/AF9035_2.6.38/install b/packages/linux-drivers/AF9035_2.6.38/install new file mode 100755 index 0000000000..53864eed26 --- /dev/null +++ b/packages/linux-drivers/AF9035_2.6.38/install @@ -0,0 +1,38 @@ +#!/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/kernel/drivers/media/dvb/dvb-usb/ +mkdir -p $INSTALL/lib/modules/$VER/kernel/drivers/media/common/tuners/ +mkdir -p $INSTALL/lib/modules/$VER/kernel/drivers/media/dvb/frontends/ + +cp $PKG_BUILD/dvb-usb-af9035.ko $INSTALL/lib/modules/$VER/kernel/drivers/media/dvb/dvb-usb/ +cp $PKG_BUILD/tua9001.ko $INSTALL/lib/modules/$VER/kernel/drivers/media/common/tuners/ +cp $PKG_BUILD/af9033.ko $INSTALL/lib/modules/$VER/kernel/drivers/media/dvb/frontends/ + +$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 diff --git a/packages/linux-drivers/AF9035_2.6.38/meta b/packages/linux-drivers/AF9035_2.6.38/meta new file mode 100755 index 0000000000..d052b3d4c2 --- /dev/null +++ b/packages/linux-drivers/AF9035_2.6.38/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="AF9035_2.6.38" +PKG_VERSION="1.0" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://www.abclinuxu.cz/hardware/pridavne-karty/televizni-karty/dvb-t/usb/aver-tv-volar-hd-a835" +PKG_URL="http://dl.dropbox.com/u/8224157/OpenELEC-Ultra/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain linux busybox-hosttools" +PKG_PRIORITY="optional" +PKG_SECTION="driver" +PKG_SHORTDESC="AF9035 driver: Afa Technologies Inc. AF9035A USB Device" +PKG_LONGDESC="AF9035 driver: Afa Technologies Inc. AF9035A USB Device" +PKG_IS_ADDON="no" +PKG_AUTORECONF="no" diff --git a/projects/Ultra/options b/projects/Ultra/options index 8878924975..13859bcd83 100644 --- a/projects/Ultra/options +++ b/projects/Ultra/options @@ -141,7 +141,7 @@ # asix-ax887xx: Asix AX887xx USB LAN Driver # Space separated list is supported, # e.g. ADDITIONAL_DRIVERS="asix-ax887xx" - ADDITIONAL_DRIVERS="asix-ax887xx" + ADDITIONAL_DRIVERS="asix-ax887xx AF9035_2.6.38" # build with network support (yes / no) NETWORK="yes" diff --git a/tools/mkpkg/mkpkg_driver_af9035 b/tools/mkpkg/mkpkg_driver_af9035 new file mode 100755 index 0000000000..2cfadd43ef --- /dev/null +++ b/tools/mkpkg/mkpkg_driver_af9035 @@ -0,0 +1,34 @@ +#!/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 +################################################################################ + +echo "getting sources..." + + if [ ! -f AF9035_2.6.38.tar.bz2 ]; then + wget -O AF9035_2.6.38.tar.bz2 http://xgazza.altervista.org/Linux/DVB/Drivers/AF9035_2.6.38.tar.bz2 + fi + + tar xjf AF9035_2.6.38.tar.bz2 + echo "renaming folder name..." + mv AF9035_2.6.38 AF9035_2.6.38-1.0 + echo "packing sources..." + tar czf AF9035_2.6.38-1.0.tar.gz AF9035_2.6.38-1.0 + echo "remove temporary sourcedir..." + rm -rf AF9035_2.6.38-1.0