[oe-commits] org.oe.dev libgsmd: add support for fic-gta02
john_lee commit
oe at amethyst.openembedded.net
Fri Apr 25 15:34:07 UTC 2008
libgsmd: add support for fic-gta02
Author: john_lee at openmoko.com
Branch: org.openembedded.dev
Revision: af017fe79f8b912b23d5f41862d46c33df4db680
ViewMTN: http://monotone.openembedded.org/revision/info/af017fe79f8b912b23d5f41862d46c33df4db680
Files:
1
packages/gsm/files/fic-gta02
packages/gsm/files/fic-gta02/default
packages/gsm/files/fic-gta02/gsmd
packages/gsm/gsmd.inc
Diffs:
#
# mt diff -rd3443fe0b21c6c3757250bc0939a8a94a05faf31 -raf017fe79f8b912b23d5f41862d46c33df4db680
#
#
#
# add_dir "packages/gsm/files/fic-gta02"
#
# add_file "packages/gsm/files/fic-gta02/default"
# content [c89350b3fae103f5887154d11ad42bb49a7cced4]
#
# add_file "packages/gsm/files/fic-gta02/gsmd"
# content [7f2f07eee1fb5bb619f6b15e537a70b9ba9c8107]
#
# patch "packages/gsm/gsmd.inc"
# from [9ddb79e73fa5344cdebd3d8fd96e8acc67ea81f0]
# to [69249920053eb5816872a237e49b8a365ceac6e5]
#
============================================================
--- packages/gsm/files/fic-gta02/default c89350b3fae103f5887154d11ad42bb49a7cced4
+++ packages/gsm/files/fic-gta02/default c89350b3fae103f5887154d11ad42bb49a7cced4
@@ -0,0 +1,49 @@
+# gsmd This shell script configures for the gsmd init script.
+
+. /etc/init.d/functions
+
+case `machine_id` in
+ "gta01"|"gta02")
+ GSMD_OPTS="-s 115200 -F"
+ GSM_POW="/sys/bus/platform/devices/neo1973-pm-gsm.0/power_on"
+ GSM_RES="/sys/bus/platform/devices/neo1973-pm-gsm.0/reset"
+ GSM_DL="/sys/bus/platform/devices/neo1973-pm-gsm.0/download"
+ GSM_DEV="/dev/ttySAC0"
+ ;;
+ "htc_apache"|"htc_blueangel"|"htc_universal")
+ GSMD_OPTS="-s 115200 -F"
+ GSM_DEV="/dev/ttyS0"
+ ;;
+ "htc_himalaya")
+ GSMD_OPTS="-s 115200 -F"
+ GSM_DEV="/dev/ttyS2"
+ ;;
+ "htc_magician")
+ GSMD_OPTS="-s 115200 -F"
+ GSM_DEV="/dev/ttyS1"
+ ;;
+ "palm_treo_650")
+ GSMD_OPTS="-s 460800 -F -w 1"
+ GSM_DEV="/dev/ttyS0"
+ ;;
+ "motorola_ezx_platform")
+ GSMD_OPTS="-s 115200 -F -v ti"
+ GSM_DEV="/dev/mux0"
+ ;;
+ *)
+ # Unknown board
+
+ # If you must specify special options, uncomment and modify the next line
+ #GSMD_OPTS="-s 115200 -F"
+
+ # If your GSM device needs to be powered up, uncomment and modify the next line
+ #GSM_POW="/sys/bus/platform/devices/gta01-pm-gsm.0/power_on"
+
+ # If your GSM device then needs to be reset, uncomment and modify the next line
+ #GSM_RES="/sys/bus/platform/devices/gta01-pm-gsm.0/reset"
+
+ # This should be in a common /etc/default/serial, together with
+ # BT_DEV and IR_DEV for devices that have those on a serial port
+ #GSM_DEV="/dev/ttyS1"
+ ;;
+esac
============================================================
--- packages/gsm/files/fic-gta02/gsmd 7f2f07eee1fb5bb619f6b15e537a70b9ba9c8107
+++ packages/gsm/files/fic-gta02/gsmd 7f2f07eee1fb5bb619f6b15e537a70b9ba9c8107
@@ -0,0 +1,48 @@
+#! /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)
+ [ -n "$GSM_DL" ] && ( echo "1" >$GSM_DL; sleep 1 )
+ [ -n "$GSM_POW" ] && ( echo "0" >$GSM_POW; sleep 1 )
+ [ -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)
+ [ -n "$GSM_POW" ] && echo "0" >$GSM_POW
+
+ echo -n "Stopping GSM daemon: "
+ start-stop-daemon -K -x /usr/sbin/gsmd
+ 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
============================================================
--- packages/gsm/gsmd.inc 9ddb79e73fa5344cdebd3d8fd96e8acc67ea81f0
+++ packages/gsm/gsmd.inc 69249920053eb5816872a237e49b8a365ceac6e5
@@ -5,7 +5,7 @@ PV = "0.1+svnr${SRCREV}"
PROVIDES += "gsmd"
RPROVIDES_${PN} = "libgsmd0 libgsmd gsmd gsmd-devel"
PV = "0.1+svnr${SRCREV}"
-PR = "r40"
+PR = "r41"
SRC_URI = "svn://svn.openmoko.org/trunk/src/target;module=gsm;proto=http \
file://gsmd \
More information about the Openembedded-commits
mailing list