libgsmd: combine machine specific configuration files, package plugin
authorPhilipp Zabel <philipp.zabel@gmail.com>
Thu, 23 Aug 2007 08:32:02 +0000 (08:32 +0000)
committerPhilipp Zabel <philipp.zabel@gmail.com>
Thu, 23 Aug 2007 08:32:02 +0000 (08:32 +0000)
debugging info - no machine specific (lib)gsmd packages anymore

packages/gsm/files/default
packages/gsm/files/fic-gta01/.mtn2git_empty [deleted file]
packages/gsm/files/fic-gta01/default [deleted file]
packages/gsm/files/fix-mlbuf.patch [deleted file]
packages/gsm/files/htcuniversal/.mtn2git_empty [deleted file]
packages/gsm/files/htcuniversal/default [deleted file]
packages/gsm/files/magician/.mtn2git_empty [deleted file]
packages/gsm/files/magician/default [deleted file]
packages/gsm/libgsmd_svn.bb

index 161c97f..43f4a2d 100644 (file)
@@ -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 (file)
index e69de29..0000000
diff --git a/packages/gsm/files/fic-gta01/default b/packages/gsm/files/fic-gta01/default
deleted file mode 100644 (file)
index 1511376..0000000
+++ /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 (file)
index ed4aa25..0000000
+++ /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 (file)
index e69de29..0000000
diff --git a/packages/gsm/files/htcuniversal/default b/packages/gsm/files/htcuniversal/default
deleted file mode 100644 (file)
index b09d433..0000000
+++ /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 (file)
index e69de29..0000000
diff --git a/packages/gsm/files/magician/default b/packages/gsm/files/magician/default
deleted file mode 100644 (file)
index 523d0b9..0000000
+++ /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"
index 7f5daff..b815a22 100644 (file)
@@ -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 = ""