libgsmd: Sync with OE.dev
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4539 311d38ba-8fff-0310-9ca6-ca027cbcb966
This commit is contained in:
parent
691f2eb576
commit
39eb232793
|
@ -2,30 +2,36 @@
|
|||
|
||||
. /etc/init.d/functions
|
||||
|
||||
case `cpuinfo_id` in
|
||||
"GTA01"|"GTA02")
|
||||
case `machine_id` in
|
||||
"gta01"|"gta02")
|
||||
GSMD_OPTS="-s 115200 -F"
|
||||
if [ -d '/sys/bus/platform/devices/gta01-pm-gsm.0' ] ; then
|
||||
GSM_POW="/sys/bus/platform/devices/gta01-pm-gsm.0/power_on"
|
||||
GSM_RES="/sys/bus/platform/devices/gta01-pm-gsm.0/reset"
|
||||
else
|
||||
GSM_POW="/sys/bus/platform/devices/neo1973-pm-gsm.0/power_on"
|
||||
GSM_RES="/sys/bus/platform/devices/neo1973-pm-gsm.0/reset"
|
||||
fi
|
||||
GSM_DEV="/dev/ttySAC0"
|
||||
GSM_DL="/sys/devices/platform/neo1973-pm-gsm.0/download"
|
||||
;;
|
||||
"HTC Apache"|"HTC Blueangel"|"HTC Universal")
|
||||
"htc_apache"|"htc_blueangel"|"htc_universal")
|
||||
GSMD_OPTS="-s 115200 -F"
|
||||
GSM_DEV="/dev/ttyS0"
|
||||
;;
|
||||
"HTC Himalaya")
|
||||
"htc_himalaya")
|
||||
GSMD_OPTS="-s 115200 -F"
|
||||
GSM_DEV="/dev/ttyS2"
|
||||
;;
|
||||
"HTC Magician")
|
||||
"htc_magician")
|
||||
GSMD_OPTS="-s 115200 -F"
|
||||
GSM_DEV="/dev/ttyS1"
|
||||
;;
|
||||
"Palm Treo 650")
|
||||
"palm_treo_650")
|
||||
GSMD_OPTS="-s 460800 -F -w 1"
|
||||
GSM_DEV="/dev/ttyS0"
|
||||
;;
|
||||
"Motorola Ezx Platform")
|
||||
"motorola_ezx_platform")
|
||||
GSMD_OPTS="-s 115200 -F -v ti"
|
||||
GSM_DEV="/dev/mux0"
|
||||
;;
|
|
@ -19,7 +19,7 @@ case "$1" in
|
|||
[ -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 &
|
||||
start-stop-daemon -S -x /usr/sbin/gsmd -- gsmd -p $GSM_DEV $GSMD_OPTS -d -l syslog
|
||||
|
||||
if [ $? = 0 ]; then
|
||||
echo "gsmd."
|
|
@ -5,7 +5,7 @@ SECTION = "libs/gsm"
|
|||
PROVIDES += "gsmd"
|
||||
RPROVIDES_${PN} = "libgsmd0 libgsmd gsmd gsmd-devel"
|
||||
PV = "0.1+svnr${SRCREV}"
|
||||
PR = "r37"
|
||||
PR = "r44"
|
||||
|
||||
SRC_URI = "svn://svn.openmoko.org/trunk/src/target;module=gsm;proto=http \
|
||||
file://gsmd \
|
||||
|
@ -31,23 +31,29 @@ do_install_append() {
|
|||
install ${WORKDIR}/default ${D}/${sysconfdir}/default/gsmd
|
||||
}
|
||||
|
||||
PACKAGES =+ "${PN}-tools \
|
||||
${BASEPN}-plugins \
|
||||
${BASEPN}-plugin-machine-generic \
|
||||
${BASEPN}-plugin-machine-tihtc \
|
||||
${BASEPN}-plugin-vendor-bcm \
|
||||
${BASEPN}-plugin-vendor-qc \
|
||||
${BASEPN}-plugin-vendor-ti \
|
||||
${BASEPN}-plugin-vendor-tihtc \
|
||||
"
|
||||
PACKAGES =+ "\
|
||||
${PN}-tools \
|
||||
${BASEPN}-plugins \
|
||||
${BASEPN}-plugin-machine-generic \
|
||||
${BASEPN}-plugin-machine-tihtc \
|
||||
${BASEPN}-plugin-machine-gta01 \
|
||||
${BASEPN}-plugin-vendor-bcm \
|
||||
${BASEPN}-plugin-vendor-qc \
|
||||
${BASEPN}-plugin-vendor-ti \
|
||||
${BASEPN}-plugin-vendor-tihtc \
|
||||
"
|
||||
|
||||
RDEPENDS_${BASEPN}-plugins = "${BASEPN}-plugin-machine-generic \
|
||||
${BASEPN}-plugin-machine-tihtc \
|
||||
${BASEPN}-plugin-vendor-bcm \
|
||||
${BASEPN}-plugin-vendor-qc \
|
||||
${BASEPN}-plugin-vendor-ti \
|
||||
${BASEPN}-plugin-vendor-tihtc \
|
||||
"
|
||||
ALLOW_EMPTY_${BASEPN}-plugin-machine-gta01 = "1"
|
||||
|
||||
RDEPENDS_${BASEPN}-plugins = "\
|
||||
${BASEPN}-plugin-machine-generic \
|
||||
${BASEPN}-plugin-machine-tihtc \
|
||||
${BASEPN}-plugin-machine-gta01 \
|
||||
${BASEPN}-plugin-vendor-bcm \
|
||||
${BASEPN}-plugin-vendor-qc \
|
||||
${BASEPN}-plugin-vendor-ti \
|
||||
${BASEPN}-plugin-vendor-tihtc \
|
||||
"
|
||||
|
||||
RDEPENDS_${PN} += "update-rc.d initscripts"
|
||||
RRECOMMENDS_${PN} += "${BASEPN}-plugins"
|
||||
|
@ -57,6 +63,7 @@ FILES_${PN}-tools = "${bindir}/*"
|
|||
FILES_${BASEPN}-plugins = ""
|
||||
FILES_${BASEPN}-plugin-machine-generic = "${libdir}/gsmd/libgsmd-machine_generic.so*"
|
||||
FILES_${BASEPN}-plugin-machine-tihtc = "${libdir}/gsmd/libgsmd-machine_tihtc.so*"
|
||||
FILES_${BASEPN}-plugin-machine-gta01 = "${libdir}/gsmd/libgsmd-machine_gta01.so*"
|
||||
FILES_${BASEPN}-plugin-vendor-qc = "${libdir}/gsmd/libgsmd-vendor_qc.so*"
|
||||
FILES_${BASEPN}-plugin-vendor-bcm = "${libdir}/gsmd/libgsmd-vendor_bcm.so*"
|
||||
FILES_${BASEPN}-plugin-vendor-ti = "${libdir}/gsmd/libgsmd-vendor_ti.so*"
|
||||
|
@ -71,6 +78,7 @@ RCONFLICTS_${BASEPN} = "${CONFLICTNAME}"
|
|||
RCONFLICTS_${BASEPN}-plugins = "${CONFLICTNAME}-plugins"
|
||||
RCONFLICTS_${BASEPN}-plugin-machine-generic = "${CONFLICTNAME}-plugin-machine-generic"
|
||||
RCONFLICTS_${BASEPN}-plugin-machine-tihtc = "${CONFLICTNAME}-plugin-machine-tihtc"
|
||||
RCONFLICTS_${BASEPN}-plugin-machine-gta01 = "${CONFLICTNAME}-plugin-machine-gta01"
|
||||
RCONFLICTS_${BASEPN}-plugin-vendor-qc = "${CONFLICTNAME}-plugin-vendor-qc"
|
||||
RCONFLICTS_${BASEPN}-plugin-vendor-bcm = "${CONFLICTNAME}-plugin-vendor-bcm"
|
||||
RCONFLICTS_${BASEPN}-plugin-vendor-ti = "${CONFLICTNAME}-plugin-vendor-ti"
|
||||
|
@ -81,6 +89,7 @@ RPROVIDES_${BASEPN} = "${CONFLICTNAME}"
|
|||
RPROVIDES_${BASEPN}-plugins = "${CONFLICTNAME}-plugins"
|
||||
RPROVIDES_${BASEPN}-plugin-machine-generic = "${CONFLICTNAME}-plugin-machine-generic"
|
||||
RPROVIDES_${BASEPN}-plugin-machine-tihtc = "${CONFLICTNAME}-plugin-machine-tihtc"
|
||||
RPROVIDES_${BASEPN}-plugin-machine-gta01 = "${CONFLICTNAME}-plugin-machine-gta01"
|
||||
RPROVIDES_${BASEPN}-plugin-vendor-qc = "${CONFLICTNAME}-plugin-vendor-qc"
|
||||
RPROVIDES_${BASEPN}-plugin-vendor-bcm = "${CONFLICTNAME}-plugin-vendor-bcm"
|
||||
RPROVIDES_${BASEPN}-plugin-vendor-ti = "${CONFLICTNAME}-plugin-vendor-ti"
|
|
@ -1,49 +0,0 @@
|
|||
#!/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
|
Loading…
Reference in New Issue