diff options
author | Philipp Zabel <philipp.zabel@gmail.com> | 2007-08-23 08:32:02 +0000 |
---|---|---|
committer | Philipp Zabel <philipp.zabel@gmail.com> | 2007-08-23 08:32:02 +0000 |
commit | 1363271963ccfde056a039cd3db6c7b20afb0055 (patch) | |
tree | c77c474acee47e16ed543bbe13a2b0bbb25ce61c /packages/gsm | |
parent | b6d6e400005ee9a12a5c859609e3cb609c0d8dea (diff) |
libgsmd: combine machine specific configuration files, package plugin
debugging info - no machine specific (lib)gsmd packages anymore
Diffstat (limited to 'packages/gsm')
-rw-r--r-- | packages/gsm/files/default | 45 | ||||
-rw-r--r-- | packages/gsm/files/fic-gta01/.mtn2git_empty | 0 | ||||
-rw-r--r-- | packages/gsm/files/fic-gta01/default | 9 | ||||
-rw-r--r-- | packages/gsm/files/fix-mlbuf.patch | 50 | ||||
-rw-r--r-- | packages/gsm/files/htcuniversal/.mtn2git_empty | 0 | ||||
-rw-r--r-- | packages/gsm/files/htcuniversal/default | 10 | ||||
-rw-r--r-- | packages/gsm/files/magician/.mtn2git_empty | 0 | ||||
-rw-r--r-- | packages/gsm/files/magician/default | 10 | ||||
-rw-r--r-- | packages/gsm/libgsmd_svn.bb | 14 |
9 files changed, 47 insertions, 91 deletions
diff --git a/packages/gsm/files/default b/packages/gsm/files/default index 161c97f5fb..43f4a2db0d 100644 --- a/packages/gsm/files/default +++ b/packages/gsm/files/default @@ -1,9 +1,44 @@ # 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" +. /etc/init.d/functions -# 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" +case `cpuinfo_id` in + "GTA01", "GTA02") + GSMD_OPTS="-s 115200 -F" + GSM_POW="/sys/bus/platform/devices/gta01-pm-gsm.0/power_on" + GSM_DEV="/dev/ttySAC0" + ;; + "HTC Apache", "HTC Blueangel") + 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" + ;; + "HTC Universal") + GSMD_OPTS="-s 115200 -F -w 1" + GSM_DEV="/dev/ttyS0" + ;; + "Palm Treo 650") + GSMD_OPTS="-s 460800 -F -w 1" + GSM_DEV="/dev/ttyS0" + ;; + *) + # Unknown board -#GSM_DEV="/dev/ttyS1" + # 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" + + # 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 diff --git a/packages/gsm/files/fic-gta01/.mtn2git_empty b/packages/gsm/files/fic-gta01/.mtn2git_empty deleted file mode 100644 index e69de29bb2..0000000000 --- a/packages/gsm/files/fic-gta01/.mtn2git_empty +++ /dev/null diff --git a/packages/gsm/files/fic-gta01/default b/packages/gsm/files/fic-gta01/default deleted file mode 100644 index 1511376a6c..0000000000 --- a/packages/gsm/files/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/packages/gsm/files/fix-mlbuf.patch b/packages/gsm/files/fix-mlbuf.patch deleted file mode 100644 index ed4aa2519d..0000000000 --- a/packages/gsm/files/fix-mlbuf.patch +++ /dev/null @@ -1,50 +0,0 @@ -Index: gsm/src/gsmd/atcmd.c -=================================================================== ---- gsm/src/gsmd/atcmd.c (revision 2745) -+++ gsm/src/gsmd/atcmd.c (working copy) -@@ -370,8 +370,8 @@ - if (g->mlbuf_len) - g->mlbuf[g->mlbuf_len ++] = '\n'; - DEBUGP("Appending buf to mlbuf\n"); -- if (len > sizeof(g->mlbuf) - g->mlbuf_len) -- len = sizeof(g->mlbuf) - g->mlbuf_len; -+ if (len > MLPARSE_BUF_SIZE - g->mlbuf_len) -+ len = MLPARSE_BUF_SIZE - g->mlbuf_len; - memcpy(g->mlbuf + g->mlbuf_len, buf, len); - g->mlbuf_len += len; - -@@ -470,7 +470,7 @@ - if (cr) - len = cr - pos->cur; - else -- len = pos->buflen; -+ len = pos->buflen - 1; /* assuming zero-terminated strings */ - rc = write(fd, pos->cur, len); - if (rc == 0) { - gsmd_log(GSMD_ERROR, "write returns 0, aborting\n"); -@@ -480,8 +480,8 @@ - fd, rc); - return rc; - } -- if (cr && rc == len) -- rc ++; /* Skip the \n */ -+ if (!cr || rc == len) -+ rc ++; /* Skip the \n or \0 */ - pos->buflen -= rc; - pos->cur += rc; - write(fd, "\r", 1); -Index: gsm/src/gsmd/gsmd.c -=================================================================== ---- gsm/src/gsmd/gsmd.c (revision 2745) -+++ gsm/src/gsmd/gsmd.c (working copy) -@@ -301,6 +301,10 @@ - { - INIT_LLIST_HEAD(&g->users); - -+ g->mlbuf = talloc_array(gsmd_tallocs, unsigned char, MLPARSE_BUF_SIZE); -+ if (!g->mlbuf) -+ return -ENOMEM; -+ - return 0; - } - diff --git a/packages/gsm/files/htcuniversal/.mtn2git_empty b/packages/gsm/files/htcuniversal/.mtn2git_empty deleted file mode 100644 index e69de29bb2..0000000000 --- a/packages/gsm/files/htcuniversal/.mtn2git_empty +++ /dev/null diff --git a/packages/gsm/files/htcuniversal/default b/packages/gsm/files/htcuniversal/default deleted file mode 100644 index b09d433d1e..0000000000 --- a/packages/gsm/files/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/packages/gsm/files/magician/.mtn2git_empty b/packages/gsm/files/magician/.mtn2git_empty deleted file mode 100644 index e69de29bb2..0000000000 --- a/packages/gsm/files/magician/.mtn2git_empty +++ /dev/null diff --git a/packages/gsm/files/magician/default b/packages/gsm/files/magician/default deleted file mode 100644 index 523d0b9479..0000000000 --- a/packages/gsm/files/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/packages/gsm/libgsmd_svn.bb b/packages/gsm/libgsmd_svn.bb index 7f5daffc2c..b815a227b6 100644 --- a/packages/gsm/libgsmd_svn.bb +++ b/packages/gsm/libgsmd_svn.bb @@ -6,8 +6,6 @@ PROVIDES += "gsmd" PV = "0.1+svn${SRCDATE}" PR = "r20" -SRC_URI_OVERRIDES_PACKAGE_ARCH = "1" - SRC_URI = "svn://svn.openmoko.org/trunk/src/target;module=gsm;proto=http \ file://gsmd \ file://default" @@ -31,22 +29,24 @@ do_install_append() { PACKAGES =+ "${PN}-tools gsmd gsmd-plugins \ gsmd-plugin-machine-generic gsmd-plugin-machine-tihtc \ + gsmd-plugin-vendor-bcm \ gsmd-plugin-vendor-qc \ - gsmd-plugin-vendor-ti \ + gsmd-plugin-vendor-ti \ gsmd-plugin-vendor-tihtc \ - gsmd-plugin-vendor-bcm \ - " + " RDEPENDS_${PN} = "gsmd" RDEPENDS_gsmd-plugins = "gsmd-plugin-machine-generic \ gsmd-plugin-machine-tihtc \ + gsmd-plugin-vendor-bcm \ gsmd-plugin-vendor-qc \ gsmd-plugin-vendor-ti \ gsmd-plugin-vendor-tihtc \ - gsmd-plugin-vendor-bcm \ - " + " +RDEPENDS_gsmd = "initscripts" RRECOMMENDS_gsmd = "gsmd-plugins" +FILES_${PN}-dbg += "${libdir}/gsmd/.debug/*" FILES_${PN}-tools = "${bindir}/*" FILES_gsmd = "${sbindir}/gsmd ${sysconfdir}" FILES_gsmd-plugins = "" |