diff options
-rw-r--r-- | packages/gsm/files/default | 8 | ||||
-rw-r--r-- | packages/gsm/files/fic-gta02/.mtn2git_empty | 0 | ||||
-rw-r--r-- | packages/gsm/files/fic-gta02/gsmd | 49 | ||||
-rw-r--r-- | packages/gsm/gsmd.inc | 1 | ||||
-rw-r--r-- | packages/gsm/libgsmd-devel_svn.bb | 2 | ||||
-rw-r--r-- | packages/gsm/libgsmd_svn.bb | 2 |
6 files changed, 60 insertions, 2 deletions
diff --git a/packages/gsm/files/default b/packages/gsm/files/default index 761100f702..d4014611d9 100644 --- a/packages/gsm/files/default +++ b/packages/gsm/files/default @@ -3,12 +3,18 @@ . /etc/init.d/functions case `cpuinfo_id` in - "GTA01"|"GTA02") + "GTA01") GSMD_OPTS="-s 115200 -F" GSM_POW="/sys/bus/platform/devices/gta01-pm-gsm.0/power_on" GSM_RES="/sys/bus/platform/devices/gta01-pm-gsm.0/reset" GSM_DEV="/dev/ttySAC0" ;; + "GTA02") + GSMD_OPTS="-s 115200 -F" + GSM_POW="/sys/bus/platform/devices/gta01-pm-gsm.0/power_on" + GSM_RES="/sys/bus/platform/devices/gta01-pm-gsm.0/reset" + GSM_DEV="/dev/ttySAC1" + ;; "HTC Apache"|"HTC Blueangel"|"HTC Universal") GSMD_OPTS="-s 115200 -F" GSM_DEV="/dev/ttyS0" diff --git a/packages/gsm/files/fic-gta02/.mtn2git_empty b/packages/gsm/files/fic-gta02/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/packages/gsm/files/fic-gta02/.mtn2git_empty diff --git a/packages/gsm/files/fic-gta02/gsmd b/packages/gsm/files/fic-gta02/gsmd new file mode 100644 index 0000000000..d8323e202c --- /dev/null +++ b/packages/gsm/files/fic-gta02/gsmd @@ -0,0 +1,49 @@ +#!/bin/sh +# +# gsmd This shell script starts and stops gsmd. +# +# chkconfig: 345 90 40 +# description: Gsmd manages access to a serial- or USB-connected GSM +# processname: gsmd + +PATH=/bin:/usr/bin:/sbin:/usr/sbin + +[ -f /etc/default/rcS ] && . /etc/default/rcS +[ -f /etc/default/gsmd ] && . /etc/default/gsmd + +case "$1" in + start) + stty -F "$GSM_DEV" -crtscts + [ -n "$GSM_POW" ] && ( echo "0" >$GSM_POW; sleep 1 ) + stty -F "$GSM_DEV" -echo + [ -n "$GSM_POW" ] && ( echo "1" >$GSM_POW; sleep 1 ) + [ -n "$GSM_RES" ] && ( echo "1" >$GSM_RES; sleep 1 ) + [ -n "$GSM_RES" ] && ( echo "0" >$GSM_RES; sleep 2 ) + + echo -n "Starting GSM daemon: " + start-stop-daemon -S -x /usr/sbin/gsmd -- gsmd -p $GSM_DEV $GSMD_OPTS >/tmp/gsm.log 2>&1 & + + if [ $? = 0 ]; then + echo "gsmd." + else + echo "(failed.)" + fi + ;; + stop) + echo -n "Stopping GSM daemon: " + start-stop-daemon -K -x /usr/sbin/gsmd + stty -F "$GSM_DEV" -crtscts + [ -n "$GSM_POW" ] && echo "0" >$GSM_POW + echo "gsmd." + ;; + restart|force-reload) + $0 stop + $0 start + ;; + *) + echo "Usage: /etc/init.d/gsmd {start|stop|restart|force-reload}" + exit 1 + ;; +esac + +exit 0 diff --git a/packages/gsm/gsmd.inc b/packages/gsm/gsmd.inc index c8167d648e..d14e1519dc 100644 --- a/packages/gsm/gsmd.inc +++ b/packages/gsm/gsmd.inc @@ -5,7 +5,6 @@ SECTION = "libs/gsm" PROVIDES += "gsmd" RPROVIDES_${PN} = "libgsmd0 libgsmd gsmd gsmd-devel" PV = "0.1+svnr${SRCREV}" -PR = "r39" SRC_URI = "svn://svn.openmoko.org/trunk/src/target;module=gsm;proto=http \ file://gsmd \ diff --git a/packages/gsm/libgsmd-devel_svn.bb b/packages/gsm/libgsmd-devel_svn.bb index d584e88d38..9449c9b3ef 100644 --- a/packages/gsm/libgsmd-devel_svn.bb +++ b/packages/gsm/libgsmd-devel_svn.bb @@ -3,6 +3,8 @@ CONFLICTNAME = "gsmd" require gsmd.inc +PR = "r40" + PROVIDES += "libgsmd" RPROVIDES_${PN}-tools = "lib${CONFLICTNAME}-tools" diff --git a/packages/gsm/libgsmd_svn.bb b/packages/gsm/libgsmd_svn.bb index 9d3ca19c04..59301e8366 100644 --- a/packages/gsm/libgsmd_svn.bb +++ b/packages/gsm/libgsmd_svn.bb @@ -3,3 +3,5 @@ CONFLICTNAME = "gsmd-devel" require gsmd.inc +PR = "r40" + |