Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] Re: loading modules at startup



the script needs all dvb-modules in /lib/modules/VERSION/dvb while VERSION is 
to be replaced with your kernel version (the value which is returned from 
'uname -r')...
u can use "make install" in the dvb driver directory and either alter the 
Makefile to copy the files into that directory or manually copy the files 
from /lib/modules/dvb into /lib/modules/VERSION/dvb
as far as i recall the driver will look for the firmware ("Root" and "Dpram") 
in /lib/DVB (on my system i changed this to /usr/lib/dvb, as this is where 
the suse rpm puts em) so u will have to copy those files from the av7110 
subdirectory there

the driver can then be loaded with ".../init.d/dvb start" and unloaded with 
".../init.d/dvb stop"

hope i didnt forget anything!!

aike

#! /bin/sh
# Copyright (c) 1995-2000 SuSE GmbH Nuernberg, Germany.
#
# Author: Kurt Garloff <feedback@suse.de>
# (modified for NEWSTRUCT by Aike J Sommer) ;-)
#
# init.d/dvb
#
#   and symbolic its link
#
# /sbin/rcdvb
#
# System startup script for the nessus backend nessusd
#
### BEGIN INIT INFO
# Provides: dvb
# Required-Start: $syslog
# Required-Stop:  $syslog
# Default-Start:  3 5
# Default-Stop:   0 1 2 6
# Description:    Loads the drivers for DVB cards
### END INIT INFO

# Source SuSE config
. /etc/rc.config


# Shell functions sourced from /etc/rc.status:
#      rc_check         check and set local and overall rc status
#      rc_status        check and set local and overall rc status
#      rc_status -v     ditto but be verbose in local rc status
#      rc_status -v -r  ditto and clear the local rc status
#      rc_failed        set local and overall rc status to failed
#      rc_failed <num>  set local and overall rc status to <num><num>
#      rc_reset         clear local rc status (overall remains)
#      rc_exit          exit appropriate to overall rc status
. /etc/rc.status

# First reset status of this service
rc_reset

# Return values acc. to LSB for all commands but status:
# 0 - success
# 1 - generic or unspecified error
# 2 - invalid or excess argument(s)
# 3 - unimplemented feature (e.g. "reload")
# 4 - insufficient privilege
# 5 - program is not installed
# 6 - program is not configured
# 7 - program is not running
#
# Note that starting an already running service, stopping
# or restarting a not-running service as well as the restart
# with force-reload (in case signalling is not supported) are
# considered a success.

#vdr_bin=/usr/local/bin/runvdr

case "$1" in
    start)
        echo -n "Starting DVB"
        ## Start daemon with startproc(8). If this fails
        ## the echo return value is set appropriate.

        # NOTE: startproc return 0, even if service is
        # already running to match LSB spec.
        moddir=/lib/modules/`uname -r`/dvb
        #insmod $moddir/dvbdev.o
        #modprobe i2c-core
        modprobe videodev
        insmod $moddir/dvb-core.o
        insmod $moddir/alps_bsru6.o
        insmod $moddir/alps_bsrv2.o
        insmod $moddir/alps_tdmb7.o
        insmod $moddir/alps_tdlb7.o
        insmod $moddir/grundig_29504-401.o
        insmod $moddir/grundig_29504-491.o
        #insmod $moddir/dvb_filter.o
        #insmod $moddir/dmxdev.o
        #insmod $moddir/VES1893.o
        insmod $moddir/ves1820.o
        #insmod $moddir/L64781.o
        #insmod $moddir/SP8870.o debug=1
        #insmod $moddir/tda8083.o
        #insmod $moddir/stv0299.o
        #insmod $moddir/tuner.o
        #insmod $moddir/saa7146_core.o mode=0
        #insmod $moddir/saa7146_v4l.o
        #insmod $moddir/dvb_demux.o
        #insmod $moddir/dvb_frontend.o
        #test "$DVB_SOUND_CHIP" = "crystal" && sndopt="adac=1"
        #insmod $moddir/dvb_net.o
        #insmod $moddir/dvb.o init_chan=2 pids_off=0 ${sndopt}
        modprobe input
        modprobe evdev
        insmod $moddir/dvb-ttpci.o init_vpid=0x00a2 init_apid=0x0060

#        startproc -u ajs -g users $vdr_bin > /video/log

        # Remember status and be verbose
        rc_status -v
        ;;
    stop)
        echo -n "Shutting down DVB"
        ## Stop daemon with killproc(8) and if this fails
        ## set echo the echo return value.

#        killall -TERM runvdr
#        killall -TERM vdr

        rmmod dvb-ttpci
        rmmod evdev
        rmmod input
        rmmod ves1820
        rmmod grundig_29504-491
        rmmod grundig_29504-401
        rmmod alps_tdlb7
        rmmod alps_tdmb7
        rmmod alps_bsrv2
        rmmod alps_bsru6
        rmmod dvb-core
        rmmod videodev

        # Remember status and be verbose
        rc_status -v
        ;;
    try-restart)
        ## Stop the service and if this succeeds (i.e. the
        ## service was running before), start it again.
        ## Note: try-restart is not (yet) part of LSB (as of 0.7.5)
        $0 status >/dev/null &&  $0 restart

        # Remember status and be quiet
        rc_status
        ;;
    restart)
        ## Stop the service and regardless of whether it was
        ## running or not, start it again.
        $0 stop
        $0 start

        # Remember status and be quiet
        rc_status
        ;;
    force-reload)
        ## Signal the daemon to reload its config. Most daemons
        ## do this on signal 1 (SIGHUP).
        ## If it does not support it, restart.

        echo -n "Reload service DVB"
        ## if it supports it:
        #killproc -HUP $FOO_BIN
        #touch /var/run/FOO.pid
        #rc_status -v

        ## Otherwise:
        $0 stop  &&  $0 start
        rc_status
        ;;
    reload)
        ## Like force-reload, but if daemon does not support
        ## signalling, do nothing (!)

        # If it supports signalling:
        #echo -n "Reload service FOO"
        #killproc -HUP $FOO_BIN
        #touch /var/run/FOO.pid
        #rc_status -v

        ## Otherwise if it does not support reload:
        rc_failed 3
        rc_status -v
        ;;
    status)
        echo -n "Checking for DVB: "
        ## Check status with checkproc(8), if process is running
        ## checkproc will return with exit status 0.

        # Status has a slightly different for the status command:
        # 0 - service running
        # 1 - service dead, but /var/run/  pid  file exists
        # 2 - service dead, but /var/lock/ lock file exists
        # 3 - service not running

        # NOTE: checkproc returns LSB compliant status values.
        /sbin/lsmod|grep -q ^dvb || rc_failed 3
        rc_status -v
        ;;
    *)
        echo "Usage: $0 
{start|stop|status|try-restart|restart|force-reload|reload}"
        exit 1
        ;;
esac
rc_exit



Mit freundlichen GrĂ¼ssen

-- 

Aike Sommer
Key Technical

Mobil: +49 ( 1 78 ) 8 45 50 71
E-Mail: asommer@as-media.com

AS Media GbR
Freiherr-vom-Stein-Str. 34a
D-58089 Hagen
FreeCall: (0800) 2 76 33 42
Telefax: (0700) 02 76 33 42
http://www.as-media.com


--
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index