5 # ---- author : Bastian Spiegel <bs@tkscript.de>
6 # ---- legal : (c) 2013 by Bastian Spiegel.
7 # ---- Distributed under terms of the GNU GENERAL PUBLIC LICENSE (GPL). See
8 # ---- http://www.gnu.org/licenses/licenses.html#GPL or COPYING_GPL for further information.
10 # ---- info : This is part of the "c64_tools" package.
12 # ---- changed: 06Sep2013, 08Sep2013, 14Sep2013, 16Sep2013, 18Sep2013, 01Oct2013
19 # You need to be root in order to run this:
21 # $ sudo ./go64.sh [c64_load args] [c64_load dspimage pathname]
23 # Enable kernel module debug output by setting the C64_DEBUG variable
24 # before running this script:
26 # $ export C64_DEBUG=1
28 # To disable debug output, unset the variable:
32 # then re-run this script.
43 DSPIMAGE=/lib/dsp/core.out
45 # LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:./"
49 # args + DSP image pathname
54 if [ "x`echo $1 | cut -c -1`" = "x-" ]; then
58 # DSP image pathname only
63 if [ "x" != "x`/sbin/lsmod | grep c64`" -a -c /dev/c64 ] ; then
64 # don't reload or reinit, somebody may be using it
65 echo "module already loaded"
71 echo "Usage: sudo go64.sh [c64_load args] [c64_load dspimage pathname]"
79 # Unload kernel module if it's already loaded
80 if [ "x" != "x`/sbin/lsmod | grep c64`" ] ; then
88 if [ "x" != "x$C64_DEBUG" ]; then
89 KMODARGS="debug=$C64_DEBUG"
92 modprobe c64 $KMODARGS
98 # Grant everyone access to the c64 driver
103 # Load COFF2 DSP image and start the DSP
104 echo "go64.sh: ARGS=\"${ARGS}\" DSPIMAGE=\"${DSPIMAGE}\""
105 /usr/sbin/c64_load ${ARGS} ${DSPIMAGE}