mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-27 20:56:55 +00:00
linux: HDHomeRun TV tuner DVB driver
and belonging addon
This commit is contained in:
parent
25872552c3
commit
a76fa009f8
@ -179,13 +179,15 @@ fix_module_depends() {
|
|||||||
# modify .modinfo section in kernel module to depends on other required modules
|
# modify .modinfo section in kernel module to depends on other required modules
|
||||||
local MODULE="$1"
|
local MODULE="$1"
|
||||||
local DEPENDS="$2"
|
local DEPENDS="$2"
|
||||||
|
local OLD_DEPENDS=""
|
||||||
cp ${MODULE} ${MODULE}_orig
|
cp ${MODULE} ${MODULE}_orig
|
||||||
$OBJDUMP -s -j .modinfo ${MODULE}_orig | awk 'BEGIN{v=0;} /Contents/ {v=1; next;} {if (v==1) print $0;}' >new.modinfo1
|
$OBJDUMP -s -j .modinfo ${MODULE}_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
|
cat new.modinfo1 | cut -c7-41 | awk '{printf($0);}' | sed 's/ //g;s/../\\\x&/g;' >new.modinfo2
|
||||||
/bin/echo -ne `cat new.modinfo2` >new.modinfo3
|
/bin/echo -ne `cat new.modinfo2` | tr '\000' '\n' >new.modinfo3
|
||||||
cat new.modinfo3 | tr '\000' '\n' | awk '/^depends=/ {next;} {print $0;}' | tr '\n' '\000' >new.modinfo4
|
cat new.modinfo3 | awk '/^depends=/ {next;} {print $0;}' | tr '\n' '\000' >new.modinfo
|
||||||
/bin/echo -ne "depends=$DEPENDS\0" >>new.modinfo4
|
OLD_DEPENDS=$(awk '{FS="="} /depends=/ {print $2}' new.modinfo3)
|
||||||
$OBJCOPY --remove-section=.modinfo --add-section=.modinfo=new.modinfo4 --set-section-flags .modinfo=contents,alloc,load,readonly,data ${MODULE}_orig ${MODULE}
|
[ -n "$OLD_DEPENDS" ] && DEPENDS="$OLD_DEPENDS,$DEPENDS"
|
||||||
|
/bin/echo -ne "depends=$DEPENDS\0" >>new.modinfo
|
||||||
|
$OBJCOPY --remove-section=.modinfo --add-section=.modinfo=new.modinfo --set-section-flags .modinfo=contents,alloc,load,readonly,data ${MODULE}_orig ${MODULE}
|
||||||
rm new.modinfo*
|
rm new.modinfo*
|
||||||
}
|
}
|
||||||
|
|
||||||
|
13
packages/3rdparty/driver/dvbhdhomerun/build
vendored
Executable file
13
packages/3rdparty/driver/dvbhdhomerun/build
vendored
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
. config/options $1
|
||||||
|
|
||||||
|
# absolute path
|
||||||
|
LIBHDHOMERUN_PATH=$(ls -d $ROOT/$BUILD/libhdhomerun_*/)
|
||||||
|
|
||||||
|
cd $PKG_BUILD/userhdhomerun
|
||||||
|
|
||||||
|
sed -i "s|SET(LIBHDHOMERUN_PATH .*)|SET(LIBHDHOMERUN_PATH $LIBHDHOMERUN_PATH)|g" CMakeLists.txt
|
||||||
|
sed -i "s|/etc/dvbhdhomerun|/tmp/dvbhdhomerun|g" hdhomerun_tuner.cpp
|
||||||
|
|
||||||
|
make LDFLAGS="-lpthread"
|
35
packages/3rdparty/driver/dvbhdhomerun/meta
vendored
Normal file
35
packages/3rdparty/driver/dvbhdhomerun/meta
vendored
Normal 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="dvbhdhomerun"
|
||||||
|
PKG_VERSION="0.0.9"
|
||||||
|
PKG_REV="1"
|
||||||
|
PKG_ARCH="any"
|
||||||
|
PKG_LICENSE="GPL"
|
||||||
|
PKG_SITE="http://sourceforge.net/projects/dvbhdhomerun/"
|
||||||
|
PKG_URL="http://downloads.sourceforge.net/project/dvbhdhomerun/${PKG_NAME}_${PKG_VERSION}.tar.gz"
|
||||||
|
PKG_DEPENDS=""
|
||||||
|
PKG_BUILD_DEPENDS="toolchain libhdhomerun"
|
||||||
|
PKG_PRIORITY="optional"
|
||||||
|
PKG_SECTION="driver/dvb"
|
||||||
|
PKG_SHORTDESC="A linux DVB driver and userspace application for the HDHomeRun TV tuner (http://www.silicondust.com)."
|
||||||
|
PKG_LONGDESC="A linux DVB driver and userspace application for the HDHomeRun TV tuner (http://www.silicondust.com)."
|
||||||
|
PKG_IS_ADDON="no"
|
||||||
|
PKG_AUTORECONF="no"
|
51
packages/3rdparty/driver/dvbhdhomerun/patches/dvbhdhomerun-0.0.9-001-conf_file.patch
vendored
Normal file
51
packages/3rdparty/driver/dvbhdhomerun/patches/dvbhdhomerun-0.0.9-001-conf_file.patch
vendored
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
diff -uNr dvbhdhomerun-0.0.9-orig/userhdhomerun/conf_inifile.cpp dvbhdhomerun-0.0.9/userhdhomerun/conf_inifile.cpp
|
||||||
|
--- dvbhdhomerun-0.0.9-orig/userhdhomerun/conf_inifile.cpp 2011-03-06 21:00:01.000000000 +0100
|
||||||
|
+++ dvbhdhomerun-0.0.9/userhdhomerun/conf_inifile.cpp 2011-12-20 23:21:46.000000000 +0100
|
||||||
|
@@ -8,6 +8,37 @@
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
+// http://stackoverflow.com/questions/6089231/getting-std-ifstream-to-handle-lf-cr-and-crlf
|
||||||
|
+std::istream& safeGetline(std::istream& is, std::string& t)
|
||||||
|
+{
|
||||||
|
+ t.clear();
|
||||||
|
+
|
||||||
|
+ // The characters in the stream are read one-by-one using a std::streambuf.
|
||||||
|
+ // That is faster than reading them one-by-one using the std::istream.
|
||||||
|
+ // Code that uses streambuf this way must be guarded by a sentry object.
|
||||||
|
+ // The sentry object performs various tasks,
|
||||||
|
+ // such as thread synchronization and updating the stream state.
|
||||||
|
+
|
||||||
|
+ std::istream::sentry se(is);
|
||||||
|
+ std::streambuf* sb = is.rdbuf();
|
||||||
|
+
|
||||||
|
+ for(;;) {
|
||||||
|
+ int c = sb->sbumpc();
|
||||||
|
+ switch (c) {
|
||||||
|
+ case '\r':
|
||||||
|
+ c = sb->sgetc();
|
||||||
|
+ if(c == '\n')
|
||||||
|
+ sb->sbumpc();
|
||||||
|
+ return is;
|
||||||
|
+ case '\n':
|
||||||
|
+ case EOF:
|
||||||
|
+ return is;
|
||||||
|
+ default:
|
||||||
|
+ t += (char)c;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
bool ConfIniFile::OpenIniFile(const string& _filename)
|
||||||
|
{
|
||||||
|
ifstream conffile;
|
||||||
|
@@ -15,7 +46,8 @@
|
||||||
|
if(conffile.is_open()) {
|
||||||
|
string line;
|
||||||
|
string section;
|
||||||
|
- while(getline(conffile, line)) {
|
||||||
|
+ //while(getline(conffile, line)) {
|
||||||
|
+ while(safeGetline(conffile, line)) {
|
||||||
|
if(line.empty()) {
|
||||||
|
//LOG() << " ignore, empty";
|
||||||
|
}
|
34
packages/3rdparty/driver/dvbhdhomerun/patches/dvbhdhomerun-0.0.9-002-auto_detect.patch
vendored
Normal file
34
packages/3rdparty/driver/dvbhdhomerun/patches/dvbhdhomerun-0.0.9-002-auto_detect.patch
vendored
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
diff -uNr dvbhdhomerun-0.0.9-orig/userhdhomerun/hdhomerun_tuner.cpp dvbhdhomerun-0.0.9/userhdhomerun/hdhomerun_tuner.cpp
|
||||||
|
--- dvbhdhomerun-0.0.9-orig/userhdhomerun/hdhomerun_tuner.cpp 2011-03-06 21:00:01.000000000 +0100
|
||||||
|
+++ dvbhdhomerun-0.0.9/userhdhomerun/hdhomerun_tuner.cpp 2011-12-21 09:12:03.000000000 +0100
|
||||||
|
@@ -80,11 +80,29 @@
|
||||||
|
string type(tmp);
|
||||||
|
LOG() << "Type of device: " << type << endl;
|
||||||
|
if(type == "hdhomerun_dvbt") {
|
||||||
|
- m_type = HdhomerunTuner::DVBC;
|
||||||
|
+ m_type = HdhomerunTuner::DVBT;
|
||||||
|
}
|
||||||
|
else if(type == "hdhomerun_atsc") {
|
||||||
|
m_type = HdhomerunTuner::ATSC;
|
||||||
|
}
|
||||||
|
+ else if(type == "hdhomerun3_dvbt") {
|
||||||
|
+ m_type = HdhomerunTuner::DVBT;
|
||||||
|
+ }
|
||||||
|
+ else if(type.find("dvbt") != string::npos) {
|
||||||
|
+ m_type = HdhomerunTuner::DVBT;
|
||||||
|
+ }
|
||||||
|
+ else if(type.find("dvbc") != string::npos) {
|
||||||
|
+ m_type = HdhomerunTuner::DVBC;
|
||||||
|
+ }
|
||||||
|
+ else if(type.find("atsc") != string::npos) {
|
||||||
|
+ m_type = HdhomerunTuner::ATSC;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (m_type != HdhomerunTuner::NOT_SET) {
|
||||||
|
+ LOG() << "Auto detecting tuner type set to \"" << type
|
||||||
|
+ << "\" based on auto detecting" << endl;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
ERR() << "get_model_str from HDHomeRun failed!" << endl;
|
7
packages/3rdparty/lib/libhdhomerun/build
vendored
Executable file
7
packages/3rdparty/lib/libhdhomerun/build
vendored
Executable file
@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
. config/options $1
|
||||||
|
|
||||||
|
cd $PKG_BUILD
|
||||||
|
|
||||||
|
make CROSS_COMPILE=$TARGET_PREFIX
|
35
packages/3rdparty/lib/libhdhomerun/meta
vendored
Normal file
35
packages/3rdparty/lib/libhdhomerun/meta
vendored
Normal 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="libhdhomerun"
|
||||||
|
PKG_VERSION="20111025"
|
||||||
|
PKG_REV="1"
|
||||||
|
PKG_ARCH="any"
|
||||||
|
PKG_LICENSE="LGPL"
|
||||||
|
PKG_SITE="http://www.silicondust.com/products/hdhomerun/dvbt/"
|
||||||
|
PKG_URL="http://download.silicondust.com/hdhomerun/${PKG_NAME}_${PKG_VERSION}.tgz"
|
||||||
|
PKG_DEPENDS=""
|
||||||
|
PKG_BUILD_DEPENDS="toolchain"
|
||||||
|
PKG_PRIORITY="optional"
|
||||||
|
PKG_SECTION="driver"
|
||||||
|
PKG_SHORTDESC="The library provides functionality to setup the HDHomeRun, change channels, setup PID filtering, get signal quality and so on."
|
||||||
|
PKG_LONGDESC="The library provides functionality to setup the HDHomeRun, change channels, setup PID filtering, get signal quality and so on."
|
||||||
|
PKG_IS_ADDON="no"
|
||||||
|
PKG_AUTORECONF="no"
|
6
packages/3rdparty/lib/libhdhomerun/rename
vendored
Executable file
6
packages/3rdparty/lib/libhdhomerun/rename
vendored
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
. config/options $1
|
||||||
|
|
||||||
|
cd $BUILD
|
||||||
|
mv ${PKG_NAME} ${PKG_NAME}_${PKG_VERSION}
|
33
packages/addons/driver/hdhomerun/addon
Executable file
33
packages/addons/driver/hdhomerun/addon
Executable 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
|
||||||
|
|
||||||
|
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/config/
|
||||||
|
cp -P $PKG_DIR/config/* $ADDON_BUILD/$PKG_ADDON_ID/config/
|
||||||
|
|
||||||
|
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/bin/
|
||||||
|
cp -Pa $BUILD/dvbhdhomerun-*/userhdhomerun/build/userhdhomerun $ADDON_BUILD/$PKG_ADDON_ID/bin/
|
||||||
|
cp -Pa $BUILD/libhdhomerun_*/hdhomerun_config $ADDON_BUILD/$PKG_ADDON_ID/bin/
|
||||||
|
|
||||||
|
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/lib/
|
||||||
|
cp -Pa $BUILD/libhdhomerun_*/libhdhomerun.so $ADDON_BUILD/$PKG_ADDON_ID/lib/
|
2
packages/addons/driver/hdhomerun/changelog.txt
Normal file
2
packages/addons/driver/hdhomerun/changelog.txt
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
2.0.0
|
||||||
|
- initial version of HDHomeRun driver
|
16
packages/addons/driver/hdhomerun/config/dvbhdhomerun.sample
Normal file
16
packages/addons/driver/hdhomerun/config/dvbhdhomerun.sample
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#
|
||||||
|
# /tmp/dvbhdhomerun
|
||||||
|
#
|
||||||
|
# Types can any of:
|
||||||
|
# DVB-C
|
||||||
|
# DVB-T
|
||||||
|
# ATSC
|
||||||
|
|
||||||
|
# You can change the tuner type for each tuner on your HDHomeRun by
|
||||||
|
# exchanging the 1210E3DC-X with the serial number of your tuner:
|
||||||
|
|
||||||
|
#[12109F6E-0]
|
||||||
|
#tuner_type=DVB-T
|
||||||
|
|
||||||
|
#[12109F6E-1]
|
||||||
|
#tuner_type=DVB-T
|
@ -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
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
# this script is executed when userhdhomerun program is started
|
||||||
|
while [ -z "$(pidof userhdhomerun)" ]; do
|
||||||
|
usleep 200000
|
||||||
|
done
|
||||||
|
usleep 500000
|
||||||
|
|
||||||
|
# restart the services
|
||||||
|
killall tvheadend
|
||||||
|
while [ -n "$(pidof tvheadend)" ]; do
|
||||||
|
usleep 200000
|
||||||
|
done
|
||||||
|
tvheadend.service
|
BIN
packages/addons/driver/hdhomerun/icon/icon.png
Normal file
BIN
packages/addons/driver/hdhomerun/icon/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.7 KiB |
36
packages/addons/driver/hdhomerun/meta
Normal file
36
packages/addons/driver/hdhomerun/meta
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
################################################################################
|
||||||
|
# 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="hdhomerun"
|
||||||
|
PKG_VERSION="1.90"
|
||||||
|
PKG_REV="4"
|
||||||
|
PKG_ARCH="any"
|
||||||
|
PKG_LICENSE="GPL"
|
||||||
|
PKG_SITE="http://www.silicondust.com/products/hdhomerun/dvbt/"
|
||||||
|
PKG_URL=""
|
||||||
|
PKG_DEPENDS=""
|
||||||
|
PKG_BUILD_DEPENDS="toolchain libhdhomerun dvbhdhomerun"
|
||||||
|
PKG_PRIORITY="optional"
|
||||||
|
PKG_SECTION="driver/dvb"
|
||||||
|
PKG_SHORTDESC="A linux DVB driver for the HDHomeRun (http://www.silicondust.com)."
|
||||||
|
PKG_LONGDESC="A linux DVB driver for the HDHomeRun (http://www.silicondust.com)."
|
||||||
|
PKG_IS_ADDON="yes"
|
||||||
|
PKG_ADDON_TYPE="xbmc.service"
|
||||||
|
PKG_AUTORECONF="no"
|
62
packages/addons/driver/hdhomerun/source/bin/hdhomerun.service
Executable file
62
packages/addons/driver/hdhomerun/source/bin/hdhomerun.service
Executable file
@ -0,0 +1,62 @@
|
|||||||
|
#!/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
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
ADDON_NAME="driver.dvb.hdhomerun"
|
||||||
|
ADDON_DIR="$HOME/.xbmc/addons/$ADDON_NAME"
|
||||||
|
ADDON_HOME="$HOME/.xbmc/userdata/addon_data/$ADDON_NAME"
|
||||||
|
|
||||||
|
mkdir -p $ADDON_HOME
|
||||||
|
|
||||||
|
if [ ! -f "$ADDON_HOME/dvbhdhomerun.sample" ]; then
|
||||||
|
cp $ADDON_DIR/config/* $ADDON_HOME/
|
||||||
|
fi
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH=$ADDON_DIR/lib:$LD_LIBRARY_PATH
|
||||||
|
|
||||||
|
if [ -z "$(pidof userhdhomerun)" ]; then
|
||||||
|
rm -f /tmp/dvbhdhomerun
|
||||||
|
[ -f $ADDON_HOME/dvbhdhomerun ] && ln -s $ADDON_HOME/dvbhdhomerun /tmp/dvbhdhomerun
|
||||||
|
|
||||||
|
modprobe dvb_hdhomerun
|
||||||
|
modprobe dvb_hdhomerun_fe
|
||||||
|
|
||||||
|
mkdir -p /var/log/
|
||||||
|
rm -f /var/log/dvbhdhomerun.log
|
||||||
|
|
||||||
|
cd $ADDON_DIR/bin
|
||||||
|
userhdhomerun -f
|
||||||
|
sh $ADDON_HOME/userhdhomerun-started.sh >/dev/null 2>&1 &
|
||||||
|
|
||||||
|
(
|
||||||
|
sleep 3
|
||||||
|
|
||||||
|
sn_old="dummy"
|
||||||
|
[ -f $ADDON_HOME/serial-number.txt ] && sn_old=$(cat $ADDON_HOME/serial-number.txt)
|
||||||
|
|
||||||
|
sn_new=$(grep "Name of device: " /var/log/dvbhdhomerun.log)
|
||||||
|
|
||||||
|
if [ "$sn_new" != "$sn_old" ]; then
|
||||||
|
grep "Name of device: " /var/log/dvbhdhomerun.log >$ADDON_HOME/serial-number.txt
|
||||||
|
fi
|
||||||
|
)&
|
||||||
|
|
||||||
|
fi
|
32
packages/addons/driver/hdhomerun/source/default.py
Executable file
32
packages/addons/driver/hdhomerun/source/default.py
Executable file
@ -0,0 +1,32 @@
|
|||||||
|
################################################################################
|
||||||
|
# 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
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
import xbmcaddon
|
||||||
|
|
||||||
|
__scriptname__ = "Driver for the HDHomeRun TV tuner"
|
||||||
|
__author__ = "OpenELEC"
|
||||||
|
__url__ = "http://www.openelec.tv"
|
||||||
|
__settings__ = xbmcaddon.Addon(id='driver.dvb.hdhomerun')
|
||||||
|
__cwd__ = __settings__.getAddonInfo('path')
|
||||||
|
__path__ = xbmc.translatePath( os.path.join( __cwd__, 'bin', "hdhomerun.service") )
|
||||||
|
|
||||||
|
os.system(__path__)
|
48
packages/addons/driver/hdhomerun/source/sleep.d/hdhomerun.power
Executable file
48
packages/addons/driver/hdhomerun/source/sleep.d/hdhomerun.power
Executable file
@ -0,0 +1,48 @@
|
|||||||
|
#!/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
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
. /etc/profile
|
||||||
|
|
||||||
|
LOCKDIR="/var/lock/"
|
||||||
|
LOCKFILE="hdhomerun"
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
hibernate|suspend)
|
||||||
|
if [ -n "$(pidof userhdhomerun)" ]; then
|
||||||
|
progress "Shutting down HDHomeRun driver for suspending..."
|
||||||
|
mkdir -p "$LOCKDIR"
|
||||||
|
touch "$LOCKDIR/$LOCKFILE"
|
||||||
|
killall userhdhomerun
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
thaw|resume)
|
||||||
|
if [ -f "$LOCKDIR/$LOCKFILE" ]; then
|
||||||
|
progress "Restarting HDHomeRun driver for wakeup..."
|
||||||
|
hdhomerun.service
|
||||||
|
rm -rf "$LOCKDIR/$LOCKFILE"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
*) exit $NA
|
||||||
|
;;
|
||||||
|
esac
|
10
packages/linux-drivers/hdhomerun-driver/build
Executable file
10
packages/linux-drivers/hdhomerun-driver/build
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
. config/options $1
|
||||||
|
|
||||||
|
$SCRIPTS/unpack dvbhdhomerun
|
||||||
|
|
||||||
|
cd $BUILD/dvbhdhomerun-*/kernel
|
||||||
|
|
||||||
|
make dvb_hdhomerun KERNEL_DIR=$(kernel_path)
|
||||||
|
fix_module_depends dvb_hdhomerun_core.ko "dvb_core"
|
28
packages/linux-drivers/hdhomerun-driver/install
Executable file
28
packages/linux-drivers/hdhomerun-driver/install
Executable file
@ -0,0 +1,28 @@
|
|||||||
|
#!/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/hdhomerun
|
||||||
|
cp $BUILD/dvbhdhomerun-*/kernel/*.ko $INSTALL/lib/modules/$VER/hdhomerun/
|
35
packages/linux-drivers/hdhomerun-driver/meta
Normal file
35
packages/linux-drivers/hdhomerun-driver/meta
Normal 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="hdhomerun-driver"
|
||||||
|
PKG_VERSION="0.0.9"
|
||||||
|
PKG_REV="1"
|
||||||
|
PKG_ARCH="any"
|
||||||
|
PKG_LICENSE="GPL"
|
||||||
|
PKG_SITE="http://sourceforge.net/projects/dvbhdhomerun/"
|
||||||
|
PKG_URL=""
|
||||||
|
PKG_DEPENDS=""
|
||||||
|
PKG_BUILD_DEPENDS="toolchain linux"
|
||||||
|
PKG_PRIORITY="optional"
|
||||||
|
PKG_SECTION="driver/dvb"
|
||||||
|
PKG_SHORTDESC="A linux DVB driver for the HDHomeRun TV tuner (http://www.silicondust.com)."
|
||||||
|
PKG_LONGDESC="A linux DVB driver for the HDHomeRun TV tuner (http://www.silicondust.com)."
|
||||||
|
PKG_IS_ADDON="no"
|
||||||
|
PKG_AUTORECONF="no"
|
@ -160,7 +160,7 @@
|
|||||||
# e.g. ADDITIONAL_DRIVERS="asix-ax887xx AF9035"
|
# e.g. ADDITIONAL_DRIVERS="asix-ax887xx AF9035"
|
||||||
ADDITIONAL_DRIVERS="asix-ax887xx bcm_sta"
|
ADDITIONAL_DRIVERS="asix-ax887xx bcm_sta"
|
||||||
if [ "$PVR" = yes ]; then
|
if [ "$PVR" = yes ]; then
|
||||||
ADDITIONAL_DRIVERS="$ADDITIONAL_DRIVERS AF9035 A867 aver_h826d RTL2832"
|
ADDITIONAL_DRIVERS="$ADDITIONAL_DRIVERS AF9035 A867 aver_h826d RTL2832 hdhomerun-driver"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# build with network support (yes / no)
|
# build with network support (yes / no)
|
||||||
|
@ -160,7 +160,7 @@
|
|||||||
# e.g. ADDITIONAL_DRIVERS="asix-ax887xx AF9035"
|
# e.g. ADDITIONAL_DRIVERS="asix-ax887xx AF9035"
|
||||||
ADDITIONAL_DRIVERS="asix-ax887xx"
|
ADDITIONAL_DRIVERS="asix-ax887xx"
|
||||||
if [ "$PVR" = yes ]; then
|
if [ "$PVR" = yes ]; then
|
||||||
ADDITIONAL_DRIVERS="$ADDITIONAL_DRIVERS AF9035 A867 aver_h826d RTL2832"
|
ADDITIONAL_DRIVERS="$ADDITIONAL_DRIVERS AF9035 A867 aver_h826d RTL2832 hdhomerun-driver"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# build with network support (yes / no)
|
# build with network support (yes / no)
|
||||||
|
@ -160,7 +160,7 @@
|
|||||||
# e.g. ADDITIONAL_DRIVERS="asix-ax887xx AF9035"
|
# e.g. ADDITIONAL_DRIVERS="asix-ax887xx AF9035"
|
||||||
ADDITIONAL_DRIVERS="asix-ax887xx"
|
ADDITIONAL_DRIVERS="asix-ax887xx"
|
||||||
if [ "$PVR" = yes ]; then
|
if [ "$PVR" = yes ]; then
|
||||||
ADDITIONAL_DRIVERS="$ADDITIONAL_DRIVERS AF9035 A867 aver_h826d RTL2832"
|
ADDITIONAL_DRIVERS="$ADDITIONAL_DRIVERS AF9035 A867 aver_h826d RTL2832 hdhomerun-driver"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# build with network support (yes / no)
|
# build with network support (yes / no)
|
||||||
|
@ -160,7 +160,7 @@
|
|||||||
# e.g. ADDITIONAL_DRIVERS="asix-ax887xx AF9035"
|
# e.g. ADDITIONAL_DRIVERS="asix-ax887xx AF9035"
|
||||||
ADDITIONAL_DRIVERS="asix-ax887xx"
|
ADDITIONAL_DRIVERS="asix-ax887xx"
|
||||||
if [ "$PVR" = yes ]; then
|
if [ "$PVR" = yes ]; then
|
||||||
ADDITIONAL_DRIVERS="$ADDITIONAL_DRIVERS AF9035 A867 aver_h826d RTL2832"
|
ADDITIONAL_DRIVERS="$ADDITIONAL_DRIVERS AF9035 A867 aver_h826d RTL2832 hdhomerun-driver"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# build with network support (yes / no)
|
# build with network support (yes / no)
|
||||||
|
@ -160,7 +160,7 @@
|
|||||||
# e.g. ADDITIONAL_DRIVERS="asix-ax887xx AF9035"
|
# e.g. ADDITIONAL_DRIVERS="asix-ax887xx AF9035"
|
||||||
ADDITIONAL_DRIVERS="asix-ax887xx"
|
ADDITIONAL_DRIVERS="asix-ax887xx"
|
||||||
if [ "$PVR" = yes ]; then
|
if [ "$PVR" = yes ]; then
|
||||||
ADDITIONAL_DRIVERS="$ADDITIONAL_DRIVERS AF9035 A867 aver_h826d RTL2832"
|
ADDITIONAL_DRIVERS="$ADDITIONAL_DRIVERS AF9035 A867 aver_h826d RTL2832 hdhomerun-driver"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# build with network support (yes / no)
|
# build with network support (yes / no)
|
||||||
|
@ -160,7 +160,7 @@
|
|||||||
# e.g. ADDITIONAL_DRIVERS="asix-ax887xx AF9035"
|
# e.g. ADDITIONAL_DRIVERS="asix-ax887xx AF9035"
|
||||||
ADDITIONAL_DRIVERS="asix-ax887xx"
|
ADDITIONAL_DRIVERS="asix-ax887xx"
|
||||||
if [ "$PVR" = yes ]; then
|
if [ "$PVR" = yes ]; then
|
||||||
ADDITIONAL_DRIVERS="$ADDITIONAL_DRIVERS AF9035 A867 aver_h826d RTL2832"
|
ADDITIONAL_DRIVERS="$ADDITIONAL_DRIVERS AF9035 A867 aver_h826d RTL2832 hdhomerun-driver"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# build with network support (yes / no)
|
# build with network support (yes / no)
|
||||||
|
@ -160,7 +160,7 @@
|
|||||||
# e.g. ADDITIONAL_DRIVERS="asix-ax887xx AF9035"
|
# e.g. ADDITIONAL_DRIVERS="asix-ax887xx AF9035"
|
||||||
ADDITIONAL_DRIVERS="asix-ax887xx"
|
ADDITIONAL_DRIVERS="asix-ax887xx"
|
||||||
if [ "$PVR" = yes ]; then
|
if [ "$PVR" = yes ]; then
|
||||||
ADDITIONAL_DRIVERS="$ADDITIONAL_DRIVERS AF9035 A867 aver_h826d RTL2832"
|
ADDITIONAL_DRIVERS="$ADDITIONAL_DRIVERS AF9035 A867 aver_h826d RTL2832 hdhomerun-driver"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# build with network support (yes / no)
|
# build with network support (yes / no)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user