From a4baaced3ef1b254090d1597e9a627628d5c8c14 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Mon, 30 Dec 2019 13:29:09 +0100 Subject: [PATCH] dvbhdhomerun: drop unused, broken package The dvbhdhomerun kernel driver has been broken for almost 4 years and isn't used by LE builds since 7.90.001 - see https://github.com/LibreELEC/LibreELEC.tv/pull/183 As no one complained about it let's drop the package. Signed-off-by: Matthias Reichl --- .../linux-drivers/dvbhdhomerun/package.mk | 46 ------------ .../patches/dvbhdhomerun-001-conf_file.patch | 52 ------------- .../dvbhdhomerun-002-auto_detect.patch | 34 --------- ...erun_discover_find_devices_custom_v2.patch | 12 --- .../patches/dvbhdhomerun-linux-3.8.4.patch | 22 ------ .../patches/dvbhdhomerun-linux-4.2.patch | 73 ------------------- 6 files changed, 239 deletions(-) delete mode 100644 packages/linux-drivers/dvbhdhomerun/package.mk delete mode 100644 packages/linux-drivers/dvbhdhomerun/patches/dvbhdhomerun-001-conf_file.patch delete mode 100644 packages/linux-drivers/dvbhdhomerun/patches/dvbhdhomerun-002-auto_detect.patch delete mode 100644 packages/linux-drivers/dvbhdhomerun/patches/dvbhdhomerun-hdhomerun_discover_find_devices_custom_v2.patch delete mode 100644 packages/linux-drivers/dvbhdhomerun/patches/dvbhdhomerun-linux-3.8.4.patch delete mode 100644 packages/linux-drivers/dvbhdhomerun/patches/dvbhdhomerun-linux-4.2.patch diff --git a/packages/linux-drivers/dvbhdhomerun/package.mk b/packages/linux-drivers/dvbhdhomerun/package.mk deleted file mode 100644 index 948c48e140..0000000000 --- a/packages/linux-drivers/dvbhdhomerun/package.mk +++ /dev/null @@ -1,46 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-or-later -# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv) -# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv) - -PKG_NAME="dvbhdhomerun" -PKG_VERSION="20130704" -PKG_SHA256="1af817b85b163f3c6c3a9a07410f54875e74513c197709638b4922165e894f54" -PKG_LICENSE="GPL" -PKG_SITE="http://sourceforge.net/projects/dvbhdhomerun/" -PKG_URL="${DISTRO_SRC}/${PKG_NAME}-${PKG_VERSION}.tar.xz" -#PKG_URL="$SOURCEFORGE_SRC/project/dvbhdhomerun/${PKG_NAME}_${PKG_VERSION}.tar.gz" -#PKG_DEPENDS_TARGET="toolchain linux libhdhomerun" -PKG_NEED_UNPACK="$LINUX_DEPENDS" -PKG_LONGDESC="A linux DVB driver for the HDHomeRun TV tuner (http://www.silicondust.com)." -PKG_IS_KERNEL_PKG="yes" - -configure_package() { - PKG_CMAKE_SCRIPT="${PKG_BUILD}/userhdhomerun/CMakeLists.txt" -} - -pre_configure_target() { - # use it here to be sure libhdhomerun is already built - PKG_CMAKE_OPTS_TARGET="-DLIBHDHOMERUN_PATH=$(ls -d $BUILD/libhdhomerun-*/)" - - # absolute path - LIBHDHOMERUN_PATH=$(ls -d $BUILD/libhdhomerun-*/) - sed -i "s|SET(LIBHDHOMERUN_PATH .*)|SET(LIBHDHOMERUN_PATH $LIBHDHOMERUN_PATH)|g" ../userhdhomerun/CMakeLists.txt - sed -i "s|/etc/dvbhdhomerun|/tmp/dvbhdhomerun|g" ../userhdhomerun/hdhomerun_tuner.cpp - sed -i "s|/etc/dvbhdhomerun|/tmp/dvbhdhomerun|g" ../userhdhomerun/hdhomerun_controller.cpp -} - -pre_make_target() { - ( cd ../kernel - LDFLAGS="" make dvb_hdhomerun KERNEL_DIR=$(kernel_path) - fix_module_depends dvb_hdhomerun_core.ko "dvb_core" - ) -} - -makeinstall_target() { - cd $PKG_BUILD - mkdir -p $INSTALL/$(get_full_module_dir)/hdhomerun - cp kernel/*.ko $INSTALL/$(get_full_module_dir)/hdhomerun/ - - mkdir -p $INSTALL/usr/bin - cp -PR .$TARGET_NAME/userhdhomerun $INSTALL/usr/bin -} diff --git a/packages/linux-drivers/dvbhdhomerun/patches/dvbhdhomerun-001-conf_file.patch b/packages/linux-drivers/dvbhdhomerun/patches/dvbhdhomerun-001-conf_file.patch deleted file mode 100644 index d93002d43f..0000000000 --- a/packages/linux-drivers/dvbhdhomerun/patches/dvbhdhomerun-001-conf_file.patch +++ /dev/null @@ -1,52 +0,0 @@ -diff -uNr dvbhdhomerun-0.0.15-orig/userhdhomerun/conf_inifile.cpp dvbhdhomerun-0.0.15/userhdhomerun/conf_inifile.cpp ---- dvbhdhomerun-0.0.15-orig/userhdhomerun/conf_inifile.cpp 2013-02-17 22:37:34.000000000 +0100 -+++ dvbhdhomerun-0.0.15/userhdhomerun/conf_inifile.cpp 2013-03-02 10:23:46.000000000 +0100 -@@ -8,6 +8,38 @@ - - 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) - { - m_sectionKeyValue.clear(); -@@ -17,7 +49,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"; - } diff --git a/packages/linux-drivers/dvbhdhomerun/patches/dvbhdhomerun-002-auto_detect.patch b/packages/linux-drivers/dvbhdhomerun/patches/dvbhdhomerun-002-auto_detect.patch deleted file mode 100644 index 9a926b9960..0000000000 --- a/packages/linux-drivers/dvbhdhomerun/patches/dvbhdhomerun-002-auto_detect.patch +++ /dev/null @@ -1,34 +0,0 @@ -diff -uNr dvbhdhomerun-0.0.15-orig/userhdhomerun/hdhomerun_tuner.cpp dvbhdhomerun-0.0.15/userhdhomerun/hdhomerun_tuner.cpp ---- dvbhdhomerun-0.0.15-orig/userhdhomerun/hdhomerun_tuner.cpp 2013-02-17 22:37:34.000000000 +0100 -+++ dvbhdhomerun-0.0.15/userhdhomerun/hdhomerun_tuner.cpp 2013-03-02 10:25:15.000000000 +0100 -@@ -97,12 +97,28 @@ - string type(tmp); - LOG() << "Type of device: " << type << endl; - if(type == "hdhomerun_dvbt") { -- LOG() << "Notice, setting to DVB-C!! Use /etc/dvbhdhomerun to change that." << endl; -- 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; diff --git a/packages/linux-drivers/dvbhdhomerun/patches/dvbhdhomerun-hdhomerun_discover_find_devices_custom_v2.patch b/packages/linux-drivers/dvbhdhomerun/patches/dvbhdhomerun-hdhomerun_discover_find_devices_custom_v2.patch deleted file mode 100644 index 4ecdee3253..0000000000 --- a/packages/linux-drivers/dvbhdhomerun/patches/dvbhdhomerun-hdhomerun_discover_find_devices_custom_v2.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur dvbhdhomerun-20130704/userhdhomerun/hdhomerun_controller.cpp dvbhdhomerun-20130704.patch/userhdhomerun/hdhomerun_controller.cpp ---- dvbhdhomerun-20130704/userhdhomerun/hdhomerun_controller.cpp 2013-02-17 22:37:34.000000000 +0100 -+++ dvbhdhomerun-20130704.patch/userhdhomerun/hdhomerun_controller.cpp 2015-09-23 14:13:00.659818567 +0200 -@@ -71,7 +71,7 @@ - // ...really fragile API design... - memset(devices, 0, sizeof(devices)); - -- int numOfDevices = hdhomerun_discover_find_devices_custom(0, HDHOMERUN_DEVICE_TYPE_TUNER, HDHOMERUN_DEVICE_ID_WILDCARD, devices, m_maxDevices); -+ int numOfDevices = hdhomerun_discover_find_devices_custom_v2(0, HDHOMERUN_DEVICE_TYPE_TUNER, HDHOMERUN_DEVICE_ID_WILDCARD, devices, m_maxDevices); - LOG() << "Num of devices = " << numOfDevices << endl; - - if(numOfDevices == 0) { diff --git a/packages/linux-drivers/dvbhdhomerun/patches/dvbhdhomerun-linux-3.8.4.patch b/packages/linux-drivers/dvbhdhomerun/patches/dvbhdhomerun-linux-3.8.4.patch deleted file mode 100644 index ccde5f0e40..0000000000 --- a/packages/linux-drivers/dvbhdhomerun/patches/dvbhdhomerun-linux-3.8.4.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/kernel/dvb_hdhomerun_init.c b/kernel/dvb_hdhomerun_init.c -index d02a322..bd97d5e 100644 ---- a/kernel/dvb_hdhomerun_init.c -+++ b/kernel/dvb_hdhomerun_init.c -@@ -143,7 +143,7 @@ static int dvb_hdhomerun_stop_feed(struct dvb_demux_feed *feed) - return ret; - } - --static int __devinit dvb_hdhomerun_register(struct dvb_hdhomerun *hdhomerun) -+static int dvb_hdhomerun_register(struct dvb_hdhomerun *hdhomerun) - { - struct dvb_adapter *dvb_adapter; - struct dvb_demux *dvbdemux; -@@ -284,7 +284,7 @@ static void dvb_hdhomerun_unregister(struct dvb_hdhomerun *hdhomerun) - } - - --static int __devinit dvb_hdhomerun_probe(struct platform_device *plat_dev) -+static int dvb_hdhomerun_probe(struct platform_device *plat_dev) - { - int ret; - struct dvb_hdhomerun *hdhomerun; diff --git a/packages/linux-drivers/dvbhdhomerun/patches/dvbhdhomerun-linux-4.2.patch b/packages/linux-drivers/dvbhdhomerun/patches/dvbhdhomerun-linux-4.2.patch deleted file mode 100644 index d0ecedc543..0000000000 --- a/packages/linux-drivers/dvbhdhomerun/patches/dvbhdhomerun-linux-4.2.patch +++ /dev/null @@ -1,73 +0,0 @@ -From 198aef39dee0357524c88ecc0665312c2c72a0d9 Mon Sep 17 00:00:00 2001 -From: HappyHeyoka -Date: Sat, 25 Jul 2015 19:47:50 +1000 -Subject: [PATCH] Track changes to kernel include 'dvb_frontend.h' where - fe_status_t has gone in line with kernel coding style. Changes should be - backwards compatible (famous last words) - ---- - kernel/dvb_hdhomerun_control_messages.h | 2 +- - kernel/dvb_hdhomerun_fe.c | 6 +++--- - userhdhomerun/hdhomerun_control.cpp | 4 ++-- - 3 files changed, 6 insertions(+), 6 deletions(-) - -diff --git a/kernel/dvb_hdhomerun_control_messages.h b/kernel/dvb_hdhomerun_control_messages.h -index 45230b1..c22fc80 100644 ---- a/kernel/dvb_hdhomerun_control_messages.h -+++ b/kernel/dvb_hdhomerun_control_messages.h -@@ -60,7 +60,7 @@ struct dvbhdhomerun_control_mesg { - unsigned int type; - union { - unsigned int frequency; -- fe_status_t fe_status; -+ enum fe_status frontend_status; - int16_t signal_strength; - struct dmx_pes_filter_params dmx_pes_filter; - struct hdhomerun_dvb_demux_feed demux_feed; -diff --git a/kernel/dvb_hdhomerun_fe.c b/kernel/dvb_hdhomerun_fe.c -index a96799b..58be54c 100644 ---- a/kernel/dvb_hdhomerun_fe.c -+++ b/kernel/dvb_hdhomerun_fe.c -@@ -49,7 +49,7 @@ struct dvb_hdhomerun_fe_state { - - extern int hdhomerun_debug_mask; - --static int dvb_hdhomerun_fe_read_status(struct dvb_frontend* fe, fe_status_t* status) -+static int dvb_hdhomerun_fe_read_status(struct dvb_frontend* fe, enum fe_status* status) - { - struct dvbhdhomerun_control_mesg mesg; - struct dvb_hdhomerun_fe_state* state = fe->demodulator_priv; -@@ -60,7 +60,7 @@ static int dvb_hdhomerun_fe_read_status(struct dvb_frontend* fe, fe_status_t* st - mesg.id = state->id; - hdhomerun_control_post_and_wait(&mesg); - -- *status = mesg.u.fe_status; -+ *status = mesg.u.frontend_status; - - return 0; - } -@@ -203,7 +203,7 @@ static int dvb_hdhomerun_fe_tune(struct dvb_frontend *fe, bool re_tune, - #else - static int dvb_hdhomerun_fe_tune(struct dvb_frontend *fe, struct dvb_frontend_parameters *params, - #endif -- unsigned int mode_flags, unsigned int *delay, fe_status_t *status) -+ unsigned int mode_flags, unsigned int *delay, enum fe_status *status) - { - int ret; - DEBUG_FUNC(1); -diff --git a/userhdhomerun/hdhomerun_control.cpp b/userhdhomerun/hdhomerun_control.cpp -index 63b12f8..912b49d 100644 ---- a/userhdhomerun/hdhomerun_control.cpp -+++ b/userhdhomerun/hdhomerun_control.cpp -@@ -219,9 +219,9 @@ void Control::FE_READ_Status(struct dvbhdhomerun_control_mesg& _mesg) - - HdhomerunTuner* tuner = m_hdhomerun->GetTuner(_mesg.id); - if(tuner) { -- fe_status_t status = (fe_status_t)tuner->ReadStatus(); -+ fe_status status = (fe_status)tuner->ReadStatus(); - -- _mesg.u.fe_status = status; -+ _mesg.u.frontend_status = status; - } - else { - ERR() << "Tuner id does not exist!" << _mesg.id << endl;