From 746fa2064973f28f2954338193dc4494d318698b Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Wed, 15 Aug 2007 13:59:52 +0000 Subject: Move libgsmd from meta-extras to meta-openmoko git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2499 311d38ba-8fff-0310-9ca6-ca027cbcb966 --- meta-extras/packages/openmoko/libgsmd/default | 9 -- .../packages/openmoko/libgsmd/fic-gta01/default | 9 -- .../libgsmd/getopt-wait-interpreter-ready.patch | 57 ----------- meta-extras/packages/openmoko/libgsmd/gsmd | 106 --------------------- .../packages/openmoko/libgsmd/htcuniversal/default | 10 -- .../packages/openmoko/libgsmd/magician/default | 10 -- .../packages/openmoko/libgsmd/no-version.patch | 22 ----- .../packages/openmoko/libgsmd/tihtc-csq-fix.patch | 27 ------ .../openmoko/libgsmd/universal-wcdma.patch | 20 ---- meta-extras/packages/openmoko/libgsmd_svn.bb | 43 --------- meta-openmoko/packages/libgsmd/libgsmd/default | 9 ++ .../packages/libgsmd/libgsmd/fic-gta01/default | 9 ++ .../libgsmd/getopt-wait-interpreter-ready.patch | 57 +++++++++++ meta-openmoko/packages/libgsmd/libgsmd/gsmd | 106 +++++++++++++++++++++ .../packages/libgsmd/libgsmd/htcuniversal/default | 10 ++ .../packages/libgsmd/libgsmd/magician/default | 10 ++ .../packages/libgsmd/libgsmd/no-version.patch | 22 +++++ .../packages/libgsmd/libgsmd/tihtc-csq-fix.patch | 27 ++++++ .../packages/libgsmd/libgsmd/universal-wcdma.patch | 20 ++++ meta-openmoko/packages/libgsmd/libgsmd_svn.bb | 43 +++++++++ 20 files changed, 313 insertions(+), 313 deletions(-) delete mode 100644 meta-extras/packages/openmoko/libgsmd/default delete mode 100644 meta-extras/packages/openmoko/libgsmd/fic-gta01/default delete mode 100644 meta-extras/packages/openmoko/libgsmd/getopt-wait-interpreter-ready.patch delete mode 100644 meta-extras/packages/openmoko/libgsmd/gsmd delete mode 100644 meta-extras/packages/openmoko/libgsmd/htcuniversal/default delete mode 100644 meta-extras/packages/openmoko/libgsmd/magician/default delete mode 100644 meta-extras/packages/openmoko/libgsmd/no-version.patch delete mode 100644 meta-extras/packages/openmoko/libgsmd/tihtc-csq-fix.patch delete mode 100644 meta-extras/packages/openmoko/libgsmd/universal-wcdma.patch delete mode 100644 meta-extras/packages/openmoko/libgsmd_svn.bb create mode 100644 meta-openmoko/packages/libgsmd/libgsmd/default create mode 100644 meta-openmoko/packages/libgsmd/libgsmd/fic-gta01/default create mode 100644 meta-openmoko/packages/libgsmd/libgsmd/getopt-wait-interpreter-ready.patch create mode 100644 meta-openmoko/packages/libgsmd/libgsmd/gsmd create mode 100644 meta-openmoko/packages/libgsmd/libgsmd/htcuniversal/default create mode 100644 meta-openmoko/packages/libgsmd/libgsmd/magician/default create mode 100644 meta-openmoko/packages/libgsmd/libgsmd/no-version.patch create mode 100644 meta-openmoko/packages/libgsmd/libgsmd/tihtc-csq-fix.patch create mode 100644 meta-openmoko/packages/libgsmd/libgsmd/universal-wcdma.patch create mode 100644 meta-openmoko/packages/libgsmd/libgsmd_svn.bb diff --git a/meta-extras/packages/openmoko/libgsmd/default b/meta-extras/packages/openmoko/libgsmd/default deleted file mode 100644 index 161c97f5f..000000000 --- a/meta-extras/packages/openmoko/libgsmd/default +++ /dev/null @@ -1,9 +0,0 @@ -# gsmd This shell script configures for the gsmd init script. - -# 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" - -#GSM_DEV="/dev/ttyS1" diff --git a/meta-extras/packages/openmoko/libgsmd/fic-gta01/default b/meta-extras/packages/openmoko/libgsmd/fic-gta01/default deleted file mode 100644 index 1511376a6..000000000 --- a/meta-extras/packages/openmoko/libgsmd/fic-gta01/default +++ /dev/null @@ -1,9 +0,0 @@ -# gsmd This shell script configures for the gsmd init script. - -# 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" - -GSM_DEV="/dev/ttySAC0" diff --git a/meta-extras/packages/openmoko/libgsmd/getopt-wait-interpreter-ready.patch b/meta-extras/packages/openmoko/libgsmd/getopt-wait-interpreter-ready.patch deleted file mode 100644 index 52b0da118..000000000 --- a/meta-extras/packages/openmoko/libgsmd/getopt-wait-interpreter-ready.patch +++ /dev/null @@ -1,57 +0,0 @@ -Index: gsm/src/gsmd/gsmd.c -=================================================================== ---- gsm.orig/src/gsmd/gsmd.c 2007-06-03 11:57:43.000000000 +0200 -+++ gsm/src/gsmd/gsmd.c 2007-06-03 11:57:45.000000000 +0200 -@@ -311,6 +311,7 @@ - { "leak-report", 0, NULL, 'L' }, - { "vendor", 1, NULL, 'v' }, - { "machine", 1, NULL, 'm' }, -+ { "wait", 1, NULL, 'w' }, - { 0, 0, 0, 0 } - }; - -@@ -333,6 +334,7 @@ - "\t-l file\t--logfile file\tSpecify a logfile to log to\n" - "\t-v\t--vendor v\tSpecify GSM modem vendor plugin\n" - "\t-m\t--machine m\tSpecify GSM modem machine plugin\n" -+ "\t-w\t--wait m\tWait for the AT Interpreter Ready message\n" - ); - } - -@@ -362,6 +364,7 @@ - char *logfile = "syslog"; - char *vendor_name = NULL; - char *machine_name = NULL; -+ int wait = -1; - - signal(SIGTERM, sig_handler); - signal(SIGINT, sig_handler); -@@ -374,7 +377,7 @@ - print_header(); - - /*FIXME: parse commandline, set daemonize, device, ... */ -- while ((argch = getopt_long(argc, argv, "FVLdhp:s:l:v:m:", opts, NULL)) != -1) { -+ while ((argch = getopt_long(argc, argv, "FVLdhp:s:l:v:m:w:", opts, NULL)) != -1) { - switch (argch) { - case 'V': - /* FIXME */ -@@ -411,6 +414,9 @@ - case 'm': - machine_name = optarg; - break; -+ case 'w': -+ wait = atoi(optarg); -+ break; - } - } - -@@ -455,6 +461,9 @@ - exit(1); - } - -+ if (wait >= 0) -+ g.interpreter_ready = !wait; -+ - if (atcmd_init(&g, fd) < 0) { - fprintf(stderr, "can't initialize UART device\n"); - exit(1); diff --git a/meta-extras/packages/openmoko/libgsmd/gsmd b/meta-extras/packages/openmoko/libgsmd/gsmd deleted file mode 100644 index 5c78e8178..000000000 --- a/meta-extras/packages/openmoko/libgsmd/gsmd +++ /dev/null @@ -1,106 +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 - -# Source configuration -. /etc/default/gsmd - -# Source function library. -#. /etc/rc.d/init.d/functions - -RETVAL=0 -prog="gsmd" - -start() { - # Hack for broken uboot and/or kernel on the neo1973 - dmesg -n1 - - if [ -n "${GSM_POW}" ] - then - if [ -e "${GSM_POW}" ] - then - echo -n "Powering up GSM device..." - echo "1" > ${GSM_POW} - sleep 1 - echo "done" - else - echo "GSM device not found. Aborting startup" - return false - fi - fi - # Start daemons. - echo -n "Starting $prog: " - # We don't use the daemon function here because of a known bug - # in initlog -- it spuriously returns a nonzero status when - # starting daemons that fork themselves. See - # http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=130629 - # for discussion. Fortunately: - # - # 1. gsmd startup can't fail, or at least not in the absence of - # much larger resource-exhaustion problems that would be very obvious. - # - # 2. We don't need all the logging crud that daemon/initlog sets - # up -- gsmd does its own syslog calls. - # - if [ -e "${GSM_DEV}" ] - then - gsmd -p ${GSM_DEV} ${GSMD_OPTS} >/tmp/gsm.log 2>&1 & - echo "success" - else - # User needs to symlink ${GPS_DEV} to the right thing - echo "No ${GSM_DEV} device, aborting gsmd startup." - fi - RETVAL=$? - echo - [ $RETVAL -eq 0 ] && touch /var/lock/subsys/gsmd - return $RETVAL -} - -stop() { - # Stop daemons. - echo -n "Shutting down $prog: " - killall gsmd -# killproc gsmd - RETVAL=$? - echo - if [ $RETVAL -eq 0 ] - then - rm -f /var/lock/subsys/gsmd; - fi - return $RETVAL -} - -# See how we were called. -case "$1" in - start) - start - ;; - stop) - stop - ;; - restart|reload) - stop - start - RETVAL=$? - ;; - condrestart) - if [ -f /var/lock/subsys/gsmd ]; then - stop - start - RETVAL=$? - fi - ;; - status) -# status gsmd -# RETVAL=$? - ;; - *) - echo "Usage: $0 {start|stop|restart|condrestart|status}" - exit 1 -esac - -exit $RETVAL diff --git a/meta-extras/packages/openmoko/libgsmd/htcuniversal/default b/meta-extras/packages/openmoko/libgsmd/htcuniversal/default deleted file mode 100644 index b09d433d1..000000000 --- a/meta-extras/packages/openmoko/libgsmd/htcuniversal/default +++ /dev/null @@ -1,10 +0,0 @@ -# gsmd This shell script configures for the gsmd init script. - -GSMD_OPTS="-s 115200 -F -w 1" - -# 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" - -# this should be in a common /etc/default/serial, together -# with BT_DEV, and IR_DEV -GSM_DEV="/dev/ttyS0" diff --git a/meta-extras/packages/openmoko/libgsmd/magician/default b/meta-extras/packages/openmoko/libgsmd/magician/default deleted file mode 100644 index 523d0b947..000000000 --- a/meta-extras/packages/openmoko/libgsmd/magician/default +++ /dev/null @@ -1,10 +0,0 @@ -# gsmd This shell script configures for the gsmd init script. - -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" - -# this should be in a common /etc/default/serial, together -# with BT_DEV, and IR_DEV -GSM_DEV="/dev/ttyS1" diff --git a/meta-extras/packages/openmoko/libgsmd/no-version.patch b/meta-extras/packages/openmoko/libgsmd/no-version.patch deleted file mode 100644 index 1334b32a9..000000000 --- a/meta-extras/packages/openmoko/libgsmd/no-version.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- gsm.orig/src/gsmd/Makefil.am 2007-08-01 23:35:03.000000000 +0200 -+++ gsm/src/gsmd/Makefile.am 2007-08-01 23:35:15.000000000 +0200 -20c20 -< libgsmd_machine_generic_la_LDFLAGS = -module ---- -> libgsmd_machine_generic_la_LDFLAGS = -module -avoid-version -22c22 -< libgsmd_machine_tihtc_la_LDFLAGS = -module ---- -> libgsmd_machine_tihtc_la_LDFLAGS = -module -avoid-version -25c25 -< libgsmd_vendor_ti_la_LDFLAGS = -module ---- -> libgsmd_vendor_ti_la_LDFLAGS = -module -avoid-version -27c27 -< libgsmd_vendor_tihtc_la_LDFLAGS = -module ---- -> libgsmd_vendor_tihtc_la_LDFLAGS = -module -avoid-version -29c29 -< libgsmd_vendor_qc_la_LDFLAGS = -module ---- -> libgsmd_vendor_qc_la_LDFLAGS = -module -avoid-version diff --git a/meta-extras/packages/openmoko/libgsmd/tihtc-csq-fix.patch b/meta-extras/packages/openmoko/libgsmd/tihtc-csq-fix.patch deleted file mode 100644 index 3346d8580..000000000 --- a/meta-extras/packages/openmoko/libgsmd/tihtc-csq-fix.patch +++ /dev/null @@ -1,27 +0,0 @@ -Index: gsm/src/gsmd/vendor_tihtc.c -=================================================================== ---- gsm.orig/src/gsmd/vendor_tihtc.c 2007-06-03 16:26:39.000000000 +0200 -+++ gsm/src/gsmd/vendor_tihtc.c 2007-06-03 16:26:41.000000000 +0200 -@@ -90,6 +90,8 @@ - struct gsmd_evt_auxdata *aux; - struct gsmd_ucmd *ucmd = usock_build_event(GSMD_MSG_EVENT, GSMD_EVT_SIGNAL, - sizeof(*aux)); -+ static int rssi_table[] = { 0,5,10,15,20,25,99 }; -+ unsigned int i; - - DEBUGP("entering htccsq_parse param=`%s'\n", param); - if (!ucmd) -@@ -98,9 +100,10 @@ - - aux = (struct gsmd_evt_auxdata *) ucmd->buf; - -- /* FIXME: contains values 1-5, should be mapped to 0-31 somehow? */ -- /* 2 --> 11 */ -- aux->u.signal.sigq.rssi = atoi(buf); -+ i = atoi(buf); -+ if (i > 6) -+ i = 6; -+ aux->u.signal.sigq.rssi = rssi_table[atoi(buf)]; - aux->u.signal.sigq.ber = 99; - - DEBUGP("sending EVT_SIGNAL\n"); diff --git a/meta-extras/packages/openmoko/libgsmd/universal-wcdma.patch b/meta-extras/packages/openmoko/libgsmd/universal-wcdma.patch deleted file mode 100644 index 350b6aba4..000000000 --- a/meta-extras/packages/openmoko/libgsmd/universal-wcdma.patch +++ /dev/null @@ -1,20 +0,0 @@ -Index: gsm/src/gsmd/vendor_qc.c -=================================================================== ---- gsm.orig/src/gsmd/vendor_qc.c 2007-08-01 23:35:03.000000000 +0200 -+++ gsm/src/gsmd/vendor_qc.c 2007-08-01 23:35:15.000000000 +0200 -@@ -69,8 +69,15 @@ - return -EIO; - } - -+static int wcdma_parse(char *buf, int len, const char *param, -+ struct gsmd *gsmd) -+{ -+ return 0; -+} -+ - static const struct gsmd_unsolicit qc_unsolicit[] = { - { "@HTCCSQ", &htccsq_parse }, /* Signal Quality */ -+ { "[WCDMA]", &wcdma_parse }, /* ignore [WCDMA] messages */ - - /* FIXME: parse the below and generate the respective events */ - diff --git a/meta-extras/packages/openmoko/libgsmd_svn.bb b/meta-extras/packages/openmoko/libgsmd_svn.bb deleted file mode 100644 index 8cc6233aa..000000000 --- a/meta-extras/packages/openmoko/libgsmd_svn.bb +++ /dev/null @@ -1,43 +0,0 @@ -DESCRIPTION = "GSM libraries and daemons implementing the 07.10 specification" -HOMEPAGE = "http://www.openmoko.org" -LICENSE = "GPL" -SECTION = "libs/gsm" -PROVIDES += "gsmd" -PV = "0.0+svn${SRCDATE}" -PR = "r16" - -SRC_URI = "svn://svn.openmoko.org/trunk/src/target;module=gsm;proto=http \ - file://gsmd \ - file://default \ - file://getopt-wait-interpreter-ready.patch;patch=1 \ - file://tihtc-csq-fix.patch;patch=1 \ - file://universal-wcdma.patch;patch=1 \ - file://no-version.patch;patch=1" - -S = "${WORKDIR}/gsm" - -inherit autotools pkgconfig update-rc.d - -INITSCRIPT_NAME = "gsm" -INITSCRIPT_PARAMS = "defaults 35" - -do_stage() { - autotools_stage_all -} - -do_install_append() { - install -d ${D}/${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/gsmd ${D}/${sysconfdir}/init.d/gsm - install -d ${D}/${sysconfdir}/default - install ${WORKDIR}/default ${D}/${sysconfdir}/default/gsmd -} - -PACKAGES =+ "${PN}-tools gsmd gsmd-plugins" -RDEPENDS_${PN} = "gsmd" -RRECOMMENDS_gsmd = "gsmd-plugins" -FILES_${PN}-tools = "${bindir}/*" -FILES_gsmd = "${sbindir}/gsmd ${sysconfdir}" -FILES_gsmd-plugins = "${libdir}/gsmd/*.so*" -FILES_${PN}-dbg += "${libdir}/gsmd/.debug/*.so" - -PACKAGES_DYNAMIC = "libgsmd* gsmd" diff --git a/meta-openmoko/packages/libgsmd/libgsmd/default b/meta-openmoko/packages/libgsmd/libgsmd/default new file mode 100644 index 000000000..161c97f5f --- /dev/null +++ b/meta-openmoko/packages/libgsmd/libgsmd/default @@ -0,0 +1,9 @@ +# gsmd This shell script configures for the gsmd init script. + +# 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" + +#GSM_DEV="/dev/ttyS1" diff --git a/meta-openmoko/packages/libgsmd/libgsmd/fic-gta01/default b/meta-openmoko/packages/libgsmd/libgsmd/fic-gta01/default new file mode 100644 index 000000000..1511376a6 --- /dev/null +++ b/meta-openmoko/packages/libgsmd/libgsmd/fic-gta01/default @@ -0,0 +1,9 @@ +# gsmd This shell script configures for the gsmd init script. + +# 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" + +GSM_DEV="/dev/ttySAC0" diff --git a/meta-openmoko/packages/libgsmd/libgsmd/getopt-wait-interpreter-ready.patch b/meta-openmoko/packages/libgsmd/libgsmd/getopt-wait-interpreter-ready.patch new file mode 100644 index 000000000..52b0da118 --- /dev/null +++ b/meta-openmoko/packages/libgsmd/libgsmd/getopt-wait-interpreter-ready.patch @@ -0,0 +1,57 @@ +Index: gsm/src/gsmd/gsmd.c +=================================================================== +--- gsm.orig/src/gsmd/gsmd.c 2007-06-03 11:57:43.000000000 +0200 ++++ gsm/src/gsmd/gsmd.c 2007-06-03 11:57:45.000000000 +0200 +@@ -311,6 +311,7 @@ + { "leak-report", 0, NULL, 'L' }, + { "vendor", 1, NULL, 'v' }, + { "machine", 1, NULL, 'm' }, ++ { "wait", 1, NULL, 'w' }, + { 0, 0, 0, 0 } + }; + +@@ -333,6 +334,7 @@ + "\t-l file\t--logfile file\tSpecify a logfile to log to\n" + "\t-v\t--vendor v\tSpecify GSM modem vendor plugin\n" + "\t-m\t--machine m\tSpecify GSM modem machine plugin\n" ++ "\t-w\t--wait m\tWait for the AT Interpreter Ready message\n" + ); + } + +@@ -362,6 +364,7 @@ + char *logfile = "syslog"; + char *vendor_name = NULL; + char *machine_name = NULL; ++ int wait = -1; + + signal(SIGTERM, sig_handler); + signal(SIGINT, sig_handler); +@@ -374,7 +377,7 @@ + print_header(); + + /*FIXME: parse commandline, set daemonize, device, ... */ +- while ((argch = getopt_long(argc, argv, "FVLdhp:s:l:v:m:", opts, NULL)) != -1) { ++ while ((argch = getopt_long(argc, argv, "FVLdhp:s:l:v:m:w:", opts, NULL)) != -1) { + switch (argch) { + case 'V': + /* FIXME */ +@@ -411,6 +414,9 @@ + case 'm': + machine_name = optarg; + break; ++ case 'w': ++ wait = atoi(optarg); ++ break; + } + } + +@@ -455,6 +461,9 @@ + exit(1); + } + ++ if (wait >= 0) ++ g.interpreter_ready = !wait; ++ + if (atcmd_init(&g, fd) < 0) { + fprintf(stderr, "can't initialize UART device\n"); + exit(1); diff --git a/meta-openmoko/packages/libgsmd/libgsmd/gsmd b/meta-openmoko/packages/libgsmd/libgsmd/gsmd new file mode 100644 index 000000000..5c78e8178 --- /dev/null +++ b/meta-openmoko/packages/libgsmd/libgsmd/gsmd @@ -0,0 +1,106 @@ +#!/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 + +# Source configuration +. /etc/default/gsmd + +# Source function library. +#. /etc/rc.d/init.d/functions + +RETVAL=0 +prog="gsmd" + +start() { + # Hack for broken uboot and/or kernel on the neo1973 + dmesg -n1 + + if [ -n "${GSM_POW}" ] + then + if [ -e "${GSM_POW}" ] + then + echo -n "Powering up GSM device..." + echo "1" > ${GSM_POW} + sleep 1 + echo "done" + else + echo "GSM device not found. Aborting startup" + return false + fi + fi + # Start daemons. + echo -n "Starting $prog: " + # We don't use the daemon function here because of a known bug + # in initlog -- it spuriously returns a nonzero status when + # starting daemons that fork themselves. See + # http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=130629 + # for discussion. Fortunately: + # + # 1. gsmd startup can't fail, or at least not in the absence of + # much larger resource-exhaustion problems that would be very obvious. + # + # 2. We don't need all the logging crud that daemon/initlog sets + # up -- gsmd does its own syslog calls. + # + if [ -e "${GSM_DEV}" ] + then + gsmd -p ${GSM_DEV} ${GSMD_OPTS} >/tmp/gsm.log 2>&1 & + echo "success" + else + # User needs to symlink ${GPS_DEV} to the right thing + echo "No ${GSM_DEV} device, aborting gsmd startup." + fi + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && touch /var/lock/subsys/gsmd + return $RETVAL +} + +stop() { + # Stop daemons. + echo -n "Shutting down $prog: " + killall gsmd +# killproc gsmd + RETVAL=$? + echo + if [ $RETVAL -eq 0 ] + then + rm -f /var/lock/subsys/gsmd; + fi + return $RETVAL +} + +# See how we were called. +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart|reload) + stop + start + RETVAL=$? + ;; + condrestart) + if [ -f /var/lock/subsys/gsmd ]; then + stop + start + RETVAL=$? + fi + ;; + status) +# status gsmd +# RETVAL=$? + ;; + *) + echo "Usage: $0 {start|stop|restart|condrestart|status}" + exit 1 +esac + +exit $RETVAL diff --git a/meta-openmoko/packages/libgsmd/libgsmd/htcuniversal/default b/meta-openmoko/packages/libgsmd/libgsmd/htcuniversal/default new file mode 100644 index 000000000..b09d433d1 --- /dev/null +++ b/meta-openmoko/packages/libgsmd/libgsmd/htcuniversal/default @@ -0,0 +1,10 @@ +# gsmd This shell script configures for the gsmd init script. + +GSMD_OPTS="-s 115200 -F -w 1" + +# 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" + +# this should be in a common /etc/default/serial, together +# with BT_DEV, and IR_DEV +GSM_DEV="/dev/ttyS0" diff --git a/meta-openmoko/packages/libgsmd/libgsmd/magician/default b/meta-openmoko/packages/libgsmd/libgsmd/magician/default new file mode 100644 index 000000000..523d0b947 --- /dev/null +++ b/meta-openmoko/packages/libgsmd/libgsmd/magician/default @@ -0,0 +1,10 @@ +# gsmd This shell script configures for the gsmd init script. + +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" + +# this should be in a common /etc/default/serial, together +# with BT_DEV, and IR_DEV +GSM_DEV="/dev/ttyS1" diff --git a/meta-openmoko/packages/libgsmd/libgsmd/no-version.patch b/meta-openmoko/packages/libgsmd/libgsmd/no-version.patch new file mode 100644 index 000000000..1334b32a9 --- /dev/null +++ b/meta-openmoko/packages/libgsmd/libgsmd/no-version.patch @@ -0,0 +1,22 @@ +--- gsm.orig/src/gsmd/Makefil.am 2007-08-01 23:35:03.000000000 +0200 ++++ gsm/src/gsmd/Makefile.am 2007-08-01 23:35:15.000000000 +0200 +20c20 +< libgsmd_machine_generic_la_LDFLAGS = -module +--- +> libgsmd_machine_generic_la_LDFLAGS = -module -avoid-version +22c22 +< libgsmd_machine_tihtc_la_LDFLAGS = -module +--- +> libgsmd_machine_tihtc_la_LDFLAGS = -module -avoid-version +25c25 +< libgsmd_vendor_ti_la_LDFLAGS = -module +--- +> libgsmd_vendor_ti_la_LDFLAGS = -module -avoid-version +27c27 +< libgsmd_vendor_tihtc_la_LDFLAGS = -module +--- +> libgsmd_vendor_tihtc_la_LDFLAGS = -module -avoid-version +29c29 +< libgsmd_vendor_qc_la_LDFLAGS = -module +--- +> libgsmd_vendor_qc_la_LDFLAGS = -module -avoid-version diff --git a/meta-openmoko/packages/libgsmd/libgsmd/tihtc-csq-fix.patch b/meta-openmoko/packages/libgsmd/libgsmd/tihtc-csq-fix.patch new file mode 100644 index 000000000..3346d8580 --- /dev/null +++ b/meta-openmoko/packages/libgsmd/libgsmd/tihtc-csq-fix.patch @@ -0,0 +1,27 @@ +Index: gsm/src/gsmd/vendor_tihtc.c +=================================================================== +--- gsm.orig/src/gsmd/vendor_tihtc.c 2007-06-03 16:26:39.000000000 +0200 ++++ gsm/src/gsmd/vendor_tihtc.c 2007-06-03 16:26:41.000000000 +0200 +@@ -90,6 +90,8 @@ + struct gsmd_evt_auxdata *aux; + struct gsmd_ucmd *ucmd = usock_build_event(GSMD_MSG_EVENT, GSMD_EVT_SIGNAL, + sizeof(*aux)); ++ static int rssi_table[] = { 0,5,10,15,20,25,99 }; ++ unsigned int i; + + DEBUGP("entering htccsq_parse param=`%s'\n", param); + if (!ucmd) +@@ -98,9 +100,10 @@ + + aux = (struct gsmd_evt_auxdata *) ucmd->buf; + +- /* FIXME: contains values 1-5, should be mapped to 0-31 somehow? */ +- /* 2 --> 11 */ +- aux->u.signal.sigq.rssi = atoi(buf); ++ i = atoi(buf); ++ if (i > 6) ++ i = 6; ++ aux->u.signal.sigq.rssi = rssi_table[atoi(buf)]; + aux->u.signal.sigq.ber = 99; + + DEBUGP("sending EVT_SIGNAL\n"); diff --git a/meta-openmoko/packages/libgsmd/libgsmd/universal-wcdma.patch b/meta-openmoko/packages/libgsmd/libgsmd/universal-wcdma.patch new file mode 100644 index 000000000..350b6aba4 --- /dev/null +++ b/meta-openmoko/packages/libgsmd/libgsmd/universal-wcdma.patch @@ -0,0 +1,20 @@ +Index: gsm/src/gsmd/vendor_qc.c +=================================================================== +--- gsm.orig/src/gsmd/vendor_qc.c 2007-08-01 23:35:03.000000000 +0200 ++++ gsm/src/gsmd/vendor_qc.c 2007-08-01 23:35:15.000000000 +0200 +@@ -69,8 +69,15 @@ + return -EIO; + } + ++static int wcdma_parse(char *buf, int len, const char *param, ++ struct gsmd *gsmd) ++{ ++ return 0; ++} ++ + static const struct gsmd_unsolicit qc_unsolicit[] = { + { "@HTCCSQ", &htccsq_parse }, /* Signal Quality */ ++ { "[WCDMA]", &wcdma_parse }, /* ignore [WCDMA] messages */ + + /* FIXME: parse the below and generate the respective events */ + diff --git a/meta-openmoko/packages/libgsmd/libgsmd_svn.bb b/meta-openmoko/packages/libgsmd/libgsmd_svn.bb new file mode 100644 index 000000000..8cc6233aa --- /dev/null +++ b/meta-openmoko/packages/libgsmd/libgsmd_svn.bb @@ -0,0 +1,43 @@ +DESCRIPTION = "GSM libraries and daemons implementing the 07.10 specification" +HOMEPAGE = "http://www.openmoko.org" +LICENSE = "GPL" +SECTION = "libs/gsm" +PROVIDES += "gsmd" +PV = "0.0+svn${SRCDATE}" +PR = "r16" + +SRC_URI = "svn://svn.openmoko.org/trunk/src/target;module=gsm;proto=http \ + file://gsmd \ + file://default \ + file://getopt-wait-interpreter-ready.patch;patch=1 \ + file://tihtc-csq-fix.patch;patch=1 \ + file://universal-wcdma.patch;patch=1 \ + file://no-version.patch;patch=1" + +S = "${WORKDIR}/gsm" + +inherit autotools pkgconfig update-rc.d + +INITSCRIPT_NAME = "gsm" +INITSCRIPT_PARAMS = "defaults 35" + +do_stage() { + autotools_stage_all +} + +do_install_append() { + install -d ${D}/${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/gsmd ${D}/${sysconfdir}/init.d/gsm + install -d ${D}/${sysconfdir}/default + install ${WORKDIR}/default ${D}/${sysconfdir}/default/gsmd +} + +PACKAGES =+ "${PN}-tools gsmd gsmd-plugins" +RDEPENDS_${PN} = "gsmd" +RRECOMMENDS_gsmd = "gsmd-plugins" +FILES_${PN}-tools = "${bindir}/*" +FILES_gsmd = "${sbindir}/gsmd ${sysconfdir}" +FILES_gsmd-plugins = "${libdir}/gsmd/*.so*" +FILES_${PN}-dbg += "${libdir}/gsmd/.debug/*.so" + +PACKAGES_DYNAMIC = "libgsmd* gsmd" -- cgit v1.2.3