Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add Sundtek DVB driver

 * todo: fix warning ine makefile (i do not know how)

git-svn-id: file:///var/svn/freetz/trunk@9590 149334a1-2f27-0410-a3b9-fc62619ac1e6
  • Loading branch information...
commit 1f3525bdb08411bf14447ca03e2d9386e8cb1a58 1 parent 21c1b5e
cuma authored
View
1  CHANGELOG
@@ -101,6 +101,7 @@ Latest changes:
* smartmontools 5.43
* smstools3 3.1.14
* smusbutil 1.1
+ * Sundtek DVB driver 121113.174818
* unfs3 0.9.22
- Updated tools and hooks:
View
3  STARTLEVEL
@@ -55,6 +55,7 @@ quagga STARTLEVEL=82
#Misc
php STARTLEVEL=90 # before lighttpd
+sundtek STARTLEVEL=90 # before rrdstats
-# grep STARTLEVEL `find . -name *.mk` |sed 's/ #/\t#/g;s/.*\///g;s/.mk:\$(PKG)_/\t/g' |sort -k2
+# grep STARTLEVEL `find . -name *.mk` |sed 's/ #/\t#/g;s/.*\///g;s/.mk:\$(PKG)_/\t/g' |sort -k2
View
1  make/Config.in
@@ -194,6 +194,7 @@ source make/sqlite/Config.in
source make/sshfs-fuse/Config.in
source make/streamripper/Config.in
source make/subversion/Config.in
+source make/sundtek/Config.in
source make/synce-dccm/Config.in
source make/synce-serial/Config.in
source make/tcp_wrappers/Config.in
View
5 make/rrdstats/Config.in
@@ -47,11 +47,10 @@ config FREETZ_PACKAGE_RRDSTATS_SEGMENTLOAD
whole cable internet segment.
config FREETZ_PACKAGE_RRDSTATS_SEGMENTLOAD_SUNDTEK
-# bool "Sundtek DVB driver"
- bool
+ bool "Sundtek DVB driver"
depends on FREETZ_PACKAGE_RRDSTATS_SEGMENTLOAD
default n
-# select FREETZ_PACKAGE_SUNDTEK
+ select FREETZ_PACKAGE_SUNDTEK
help
Selects Sundtek DVB driver.
View
11 make/sundtek/Config.in
@@ -0,0 +1,11 @@
+config FREETZ_PACKAGE_SUNDTEK
+ bool "Sundtek DVB driver 121113.174818"
+ default n
+ help
+ Sundtek closed-source linux driver daemon & client.
+
+comment "CAUTION: With kernel 2.6.19 your RAM will be eaten"
+depends on FREETZ_PACKAGE_SUNDTEK && FREETZ_KERNEL_VERSION_2_6_19
+comment "up within 12h, see http://freetz.org/ticket/472"
+depends on FREETZ_PACKAGE_SUNDTEK && FREETZ_KERNEL_VERSION_2_6_19
+
View
8 make/sundtek/files/.language
@@ -0,0 +1,8 @@
+languages
+{ de en }
+default
+{ en }
+files
+{
+ usr/lib/cgi-bin/sundtek.cgi
+}
View
7 make/sundtek/files/root/etc/default.sundtek/sundtek.cfg
@@ -0,0 +1,7 @@
+export SUNDTEK_ENABLED='no'
+export SUNDTEK_CONFIG='--loglevel=off
+--mode=DVBC
+--crc=off
+--nullpackets=off
+--enablenetwork=off
+'
View
76 make/sundtek/files/root/etc/init.d/rc.sundtek
@@ -0,0 +1,76 @@
+#!/bin/sh
+
+DAEMON=sundtek
+DAEMON_LONG_NAME="Sundtek DVB"
+DAEMON_BIN=mediasrv
+DAEMON_CHECK=mediasrv
+. /etc/init.d/modlibrc
+
+DAEMON_BIN_CONFIG=mediaclient
+
+
+start() {
+ modlib_startdaemon $DAEMON_BIN -d -l /var/log/sundtek.log
+}
+
+startdaemon_post() {
+ [ -z "$SUNDTEK_CONFIG" ] && return
+ #wait for device
+ local cnt=0
+ while [ $( $DAEMON_BIN_CONFIG -e 2>/dev/null|wc -l) -le 1 ]; do
+ let cnt++
+ echo -n "."
+ [ $cnt -gt 99 ] && return 1
+ sleep 1
+ done
+ #set configuration
+ echo "$SUNDTEK_CONFIG" |
+ while IFS= read -r line; do
+ [ -z "$line" -o "${line#\#}" != "${line#;}" ] && continue
+ $DAEMON_BIN_CONFIG $line >/dev/null
+ done
+ echo -n " "
+}
+
+stop() {
+ $DAEMON_BIN_CONFIG --shutdown >/dev/null
+ #wait for shutdown
+ local cnt=0
+ while pidof $DAEMON_BIN >/dev/null; do
+ let cnt++
+ [ $cnt -gt 17 ] && return 1
+ sleep 1
+ done
+}
+
+case $1 in
+ ""|load)
+ modreg cgi $DAEMON "$DAEMON_LONG_NAME"
+ modreg daemon $DAEMON
+
+ modlib_start $SUNDTEK_ENABLED
+ ;;
+ unload)
+ modunreg daemon $DAEMON
+ modunreg cgi $DAEMON
+ modlib_stop
+ ;;
+ start)
+ modlib_start
+ ;;
+ stop)
+ modlib_stop
+ ;;
+ restart)
+ modlib_restart
+ ;;
+ status)
+ modlib_status
+ ;;
+ *)
+ echo "Usage: $0 [load|unload|start|stop|restart|status]" 1>&2
+ exit 1
+ ;;
+esac
+
+exit 0
View
44 make/sundtek/files/root/usr/lib/cgi-bin/sundtek.cgi
@@ -0,0 +1,44 @@
+#!/bin/sh
+
+
+. /usr/lib/libmodcgi.sh
+
+check "$SUNDTEK_ENABLED" yes:auto "*":man
+
+sec_begin '$(lang de:"Starttyp" en:"Start type")'
+cat << EOF
+<p>
+<input id="e1" type="radio" name="enabled" value="yes"$auto_chk><label for="e1"> $(lang de:"Automatisch" en:"Automatic")</label>
+<input id="e2" type="radio" name="enabled" value="no"$man_chk><label for="e2"> $(lang de:"Manuell" en:"Manual")</label>
+</p>
+EOF
+sec_end
+
+sec_begin '$(lang de:"Informationen" en:"Informations")'
+
+echo "$(lang de:"Treiberversion" en:"Driver version"):"
+echo -n '<pre><FONT SIZE=-1>'
+mediasrv --build 2>&1 | html
+echo '</FONT></pre>'
+
+if [ "$(/etc/init.d/rc.sundtek status 2>/dev/null)" == "running" ]; then
+
+ echo "$(lang de:"Unterst&uuml;tzte Hardware" en:"Supported hardware"):"
+ echo -n '<pre><FONT SIZE=-1>'
+ mediaclient --enumdevices 2>&1 | grep -C1 'SERIAL' | html
+ echo '</FONT></pre>'
+
+ echo "$(lang de:"Verbundene Clients" en:"Connected clients"):"
+ echo -n '<pre><FONT SIZE=-1>'
+ mediaclient --lc 2>&1 | grep -vE '^\*|^ *$' | html
+ echo '</FONT></pre>'
+
+fi
+sec_end
+
+sec_begin '$(lang de:"Konfiguration" en:"Configuration")'
+cat << EOF
+$(lang de:"Parameter f&uuml;r 'mediaclient' (einer pro Zeile)" en:"Parameters for 'mediaclient' (one per row)")
+<p><textarea name="config" rows="9" cols="59" maxlength="255">$(html "$SUNDTEK_CONFIG")</textarea></p>
+EOF
+sec_end
View
39 make/sundtek/sundtek.mk
@@ -0,0 +1,39 @@
+$(call PKG_INIT_BIN,121113.174818)
+$(PKG)_SOURCE:=sundtek_installer_$($(PKG)_VERSION).sh
+$(PKG)_SOURCE_MD5:=fdc3d8d1abb3213a759ce73fa2e83136
+$(PKG)_SOURCE_DIR:=$(SOURCE_DIR)/$(pkg)-$($(PKG)_VERSION)
+$(PKG)_SITE:=http://www.sundtek.de/media/
+
+$(PKG)_STARTLEVEL=90 # before rrdstats
+
+$(PKG)_BINARIES_ALL := mediasrv mediaclient libmediaclient.so
+$(PKG)_BINARIES_PATH := bin/ bin/ lib/
+$(PKG)_BINARIES := $(join $($(PKG)_BINARIES_PATH),$($(PKG)_BINARIES_ALL))
+$(PKG)_BINARIES_BUILD_DIR := $($(PKG)_BINARIES:%=$($(PKG)_DIR)/opt/%)
+$(PKG)_BINARIES_TARGET_DIR := $($(PKG)_BINARIES:%=$($(PKG)_DEST_DIR)/usr/%)
+
+$(PKG_SOURCE_DOWNLOAD)
+$(PKG_UNPACKED)
+$(PKG_CONFIGURED_NOP)
+
+$($(PKG)_DIR)/.unpacked:
+ payload="$$(cat $(DL_DIR)/$(SUNDTEK_SOURCE) | sed -rn 's!^_SIZE=(.*)!\1!p')" ;\
+ dd if=$(DL_DIR)/$(SUNDTEK_SOURCE) skip=1 bs=$$payload |\
+ tar Oxz $(if $(FREETZ_TARGET_ARCH_LE),mipselbcm,openwrtmipsr2)/installer.tar.gz |\
+ tar xz -C $(SUNDTEK_DIR)
+ @touch $@
+
+$($(PKG)_BINARIES_BUILD_DIR): $($(PKG)_DIR)/.unpacked
+ @chmod 755 $(SUNDTEK_BINARIES_BUILD_DIR)
+
+$($(PKG)_BINARIES_TARGET_DIR): $($(PKG)_DEST_DIR)/usr/%: $($(PKG)_DIR)/opt/%
+ $(INSTALL_FILE)
+
+$(pkg):
+
+$(pkg)-precompiled: $($(PKG)_BINARIES_TARGET_DIR)
+
+$(pkg)-clean:
+
+$(PKG_FINISH)
+
Please sign in to comment.
Something went wrong with that request. Please try again.