Send commitlog mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.openmoko.org/mailman/listinfo/commitlog
or, via email, send a message with subject or body 'help' to
        [EMAIL PROTECTED]

You can reach the person managing the list at
        [EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of commitlog digest..."
Today's Topics:

   1. r3556 - trunk/src/target/gsm/src/libgsmd ([EMAIL PROTECTED])
   2. r3557 - in trunk/src/target/gsm: include/gsmd include/libgsmd
      src/gsmd src/libgsmd src/util ([EMAIL PROTECTED])
   3. r3558 - trunk/src/target/gsm/src/gsmd ([EMAIL PROTECTED])
   4. r3559 - in developers/john_lee/toolkit: . bin scripts
      ([EMAIL PROTECTED])
--- Begin Message ---
Author: tick
Date: 2007-12-04 08:17:13 +0100 (Tue, 04 Dec 2007)
New Revision: 3556

Modified:
   trunk/src/target/gsm/src/libgsmd/libgsmd_passthrough.c
Log:
gsmd: libgsmd-tool will crash under atcmd mode (sean_chiang)


Modified: trunk/src/target/gsm/src/libgsmd/libgsmd_passthrough.c
===================================================================
--- trunk/src/target/gsm/src/libgsmd/libgsmd_passthrough.c      2007-12-04 
03:17:20 UTC (rev 3555)
+++ trunk/src/target/gsm/src/libgsmd/libgsmd_passthrough.c      2007-12-04 
07:17:13 UTC (rev 3556)
@@ -83,7 +83,7 @@
        if (rc < sizeof(*rgmh) + rgmh->len)
                return -EINVAL;
 
-       rx[*--rx_len] = 0;
+       rx[(*rx_len)-1] = 0;
        if (rgmh->len < *rx_len)
                *rx_len = rgmh->len;
        memcpy(rx, rx_buf, *rx_len);




--- End Message ---
--- Begin Message ---
Author: tick
Date: 2007-12-04 08:22:17 +0100 (Tue, 04 Dec 2007)
New Revision: 3557

Modified:
   trunk/src/target/gsm/include/gsmd/usock.h
   trunk/src/target/gsm/include/libgsmd/voicecall.h
   trunk/src/target/gsm/src/gsmd/usock.c
   trunk/src/target/gsm/src/libgsmd/libgsmd_voicecall.c
   trunk/src/target/gsm/src/util/shell.c
Log:
gsmd: Provide Current Call status (sean_chiang)


Modified: trunk/src/target/gsm/include/gsmd/usock.h
===================================================================
--- trunk/src/target/gsm/include/gsmd/usock.h   2007-12-04 07:17:13 UTC (rev 
3556)
+++ trunk/src/target/gsm/include/gsmd/usock.h   2007-12-04 07:22:17 UTC (rev 
3557)
@@ -41,8 +41,46 @@
        GSMD_VOICECALL_DTMF     = 4,
        GSMD_VOICECALL_VOL_SET  = 5,
        GSMD_VOICECALL_VOL_GET  = 6,
+       GSMD_VOICECALL_GET_STAT = 7,
 };
 
+
+/*  call direction from 3GPP TS 07.07, Clause 7.17 */
+enum gsmd_call_dire {
+       GSMD_CALL_DIRE_MO       = 0,
+       GSMD_CALL_DIRE_MT       = 1,
+};
+
+/*  call state from 3GPP TS 07.07, Clause 7.17 */
+enum gsmd_call_stat {
+       GSMD_CALL_STAT_ACTIVE   = 0,
+       GSMD_CALL_STAT_HELD     = 1,
+       GSMD_CALL_STAT_DIALING  = 2,
+       GSMD_CALL_STAT_ALERTING = 3,
+       GSMD_CALL_STAT_INCOMING = 4,
+       GSMD_CALL_STAT_WAITING  = 5,
+};
+
+/*  call mode from 3GPP TS 07.07, Clause 7.17 */
+enum gsmd_call_mode {
+       GSMD_CALL_MODE_VOICE            = 0,
+       GSMD_CALL_MODE_DATA             = 1,
+       GSMD_CALL_MODE_FAX              = 2,
+       GSMD_CALL_MODE_VOICE_DATA       = 3,
+       GSMD_CALL_MODE_VOICE_DATA_ALT   = 4,
+       GSMD_CALL_MODE_VOICE_FAX_ALT    = 5,    
+       GSMD_CALL_MODE_DATA_VOICE       = 6,
+       GSMD_CALL_MODE_DATA_VOICE_ALT   = 7,
+       GSMD_CALL_MODE_FAX_VOICE_ALT    = 8,
+       GSMD_CALL_MODE_UNKNOWN          = 9,
+};
+
+/*  multiparty(conference) from 3GPP TS 07.07, Clause 7.17 */
+enum gsmd_call_mpty {
+       GSMD_CALL_MPTY_NO       = 0,
+       GSMD_CALL_MPTY_YES      = 1,
+};
+
 /* Handset / MT related commands */
 enum gsmd_msg_phone_type {
        GSMD_PHONE_VOLUME       = 1,
@@ -308,6 +346,19 @@
        struct gsmd_addr addr;
 } __attribute__ ((packed));
 
+/* call status from 3GPP TS 07.07 clause 07.17 */
+struct gsmd_call_status {
+       int8_t idx;
+       u_int8_t dir;
+       u_int8_t stat;
+       u_int8_t mode;
+       u_int8_t mpty;
+       char number[GSMD_ADDR_MAXLEN+1];        
+       u_int8_t type;
+       char alpha[8+1];
+       int is_last;    
+} __attribute__ ((packed));
+
 #define GSMD_PIN_MAXLEN                8
 struct gsmd_pin {
        enum gsmd_pin_type type;

Modified: trunk/src/target/gsm/include/libgsmd/voicecall.h
===================================================================
--- trunk/src/target/gsm/include/libgsmd/voicecall.h    2007-12-04 07:17:13 UTC 
(rev 3556)
+++ trunk/src/target/gsm/include/libgsmd/voicecall.h    2007-12-04 07:22:17 UTC 
(rev 3557)
@@ -18,4 +18,7 @@
 /* Send DTMF character during voice call */
 extern int lgsm_voice_dtmf(struct lgsm_handle *lh, char dtmf_char);
 
+/* Get call status */
+extern int lgsm_voice_get_status(struct lgsm_handle *lh); 
+
 #endif

Modified: trunk/src/target/gsm/src/gsmd/usock.c
===================================================================
--- trunk/src/target/gsm/src/gsmd/usock.c       2007-12-04 07:17:13 UTC (rev 
3556)
+++ trunk/src/target/gsm/src/gsmd/usock.c       2007-12-04 07:22:17 UTC (rev 
3557)
@@ -114,6 +114,92 @@
        gu->subscriptions = *evtmask;
 }
 
+static int voicecall_get_stat_cb(struct gsmd_atcmd *cmd, void *ctx, char 
*resp) 
+{
+       struct gsmd_user *gu = ctx;
+       struct gsmd_call_status gcs;
+       struct gsm_extrsp *er;
+
+       DEBUGP("resp: %s\n", resp);
+
+       er = extrsp_parse(cmd, resp);
+
+       if ( !er )
+               return -ENOMEM;
+
+       gcs.is_last = (cmd->ret == 0 || cmd->ret == 4)? 1:0;
+       
+       if ( !strncmp(resp, "OK", 2) ) {
+               /* No existing call */
+               gcs.idx = 0;
+       }
+       else if ( !strncmp(resp, "+CME", 4) ) {
+               /* +CME ERROR: <err> */
+               DEBUGP("+CME error\n");
+               gcs.idx = 0 - atoi(strpbrk(resp, "0123456789"));
+       }
+       else if ( er->num_tokens == 7 &&
+                       er->tokens[0].type == GSMD_ECMD_RTT_NUMERIC &&
+                       er->tokens[1].type == GSMD_ECMD_RTT_NUMERIC &&
+                       er->tokens[2].type == GSMD_ECMD_RTT_NUMERIC &&
+                       er->tokens[3].type == GSMD_ECMD_RTT_NUMERIC && 
+                       er->tokens[4].type == GSMD_ECMD_RTT_NUMERIC &&
+                       er->tokens[5].type == GSMD_ECMD_RTT_STRING &&
+                       er->tokens[6].type == GSMD_ECMD_RTT_NUMERIC ) {
+               /*
+                * [+CLCC: <id1>,<dir>,<stat>,<mode>,<mpty>[,
+                * <number>,<type>[,<alpha>]]
+                * [<CR><LF>+CLCC: <id2>,<dir>,<stat>,<mode>,<mpty>[,
+                * <number>,<type>[,<alpha>]]
+                * [...]]]
+                */
+
+               gcs.idx = er->tokens[0].u.numeric;
+               gcs.dir = er->tokens[1].u.numeric;
+               gcs.stat = er->tokens[2].u.numeric;
+               gcs.mode = er->tokens[3].u.numeric;
+               gcs.mpty = er->tokens[4].u.numeric;
+               strcpy(gcs.number, er->tokens[5].u.string);
+               gcs.type = er->tokens[6].u.numeric;
+       }
+       else if ( er->num_tokens == 8 &&
+                       er->tokens[0].type == GSMD_ECMD_RTT_NUMERIC &&
+                       er->tokens[1].type == GSMD_ECMD_RTT_NUMERIC &&
+                       er->tokens[2].type == GSMD_ECMD_RTT_NUMERIC &&
+                       er->tokens[3].type == GSMD_ECMD_RTT_NUMERIC && 
+                       er->tokens[4].type == GSMD_ECMD_RTT_NUMERIC &&
+                       er->tokens[5].type == GSMD_ECMD_RTT_STRING &&
+                       er->tokens[6].type == GSMD_ECMD_RTT_NUMERIC &&
+                       er->tokens[7].type == GSMD_ECMD_RTT_STRING ) {
+
+               /*
+                * [+CLCC: <id1>,<dir>,<stat>,<mode>,<mpty>[,
+                * <number>,<type>[,<alpha>]]
+                * [<CR><LF>+CLCC: <id2>,<dir>,<stat>,<mode>,<mpty>[,
+                * <number>,<type>[,<alpha>]]
+                * [...]]]
+                */
+
+               gcs.idx = er->tokens[0].u.numeric;
+               gcs.dir = er->tokens[1].u.numeric;
+               gcs.stat = er->tokens[2].u.numeric;
+               gcs.mode = er->tokens[3].u.numeric;
+               gcs.mpty = er->tokens[4].u.numeric;
+               strcpy(gcs.number, er->tokens[5].u.string);
+               gcs.type = er->tokens[6].u.numeric;
+               strncpy(gcs.alpha, er->tokens[7].u.string, 8+1);
+       }
+       else {
+               DEBUGP("Invalid Input : Parse error\n");
+               return -EINVAL;
+       }
+       
+       talloc_free(er);
+
+       return gsmd_ucmd_submit(gu, GSMD_MSG_VOICECALL, GSMD_VOICECALL_GET_STAT,
+                       cmd->id, sizeof(gcs), &gcs);
+}
+
 static int usock_rcv_voicecall(struct gsmd_user *gu, struct gsmd_msg_hdr *gph,
                                int len)
 {
@@ -121,7 +207,7 @@
        struct gsmd_addr *ga;
        struct gsmd_dtmf *gd;
        int atcmd_len;
-
+               
        switch (gph->msg_subtype) {
        case GSMD_VOICECALL_DIAL:
                if (len < sizeof(*gph) + sizeof(*ga))
@@ -168,6 +254,12 @@
 
                sprintf(cmd->buf, "AT+VTS=%c;", gd->dtmf[0]);
                break;
+       case GSMD_VOICECALL_GET_STAT:
+               cmd = atcmd_fill("AT+CLCC", 7+1, &voicecall_get_stat_cb, 
+                                gu, gph->id, NULL);
+               if (!cmd)
+                       return -ENOMEM;
+               break;
        default:
                return -EINVAL;
        }
@@ -731,7 +823,7 @@
                gp.index = 0;
        }
        else if ( !strncmp(resp, "+CME", 4) ) {
-               DEBUGP("== +CME error\n");
+               DEBUGP("+CME error\n");
                /* +CME ERROR: 21 */
                gp.index = 0 - atoi(strpbrk(resp, "0123456789"));
        }
@@ -782,7 +874,7 @@
                gps.pb.index = 0;
        }
        else if ( !strncmp(resp, "+CME", 4) ) {
-               DEBUGP("== +CME error\n");
+               DEBUGP("+CME error\n");
                /* +CME ERROR: 21 */
                gps.pb.index = 0 - atoi(strpbrk(resp, "0123456789"));
        }

Modified: trunk/src/target/gsm/src/libgsmd/libgsmd_voicecall.c
===================================================================
--- trunk/src/target/gsm/src/libgsmd/libgsmd_voicecall.c        2007-12-04 
07:17:13 UTC (rev 3556)
+++ trunk/src/target/gsm/src/libgsmd/libgsmd_voicecall.c        2007-12-04 
07:22:17 UTC (rev 3557)
@@ -95,3 +95,8 @@
        /* FIXME: we need to pass along the parameter */
        return lgsm_send_simple(lh, GSMD_MSG_VOICECALL, GSMD_VOICECALL_VOL_SET);
 }
+
+int lgsm_voice_get_status(struct lgsm_handle *lh)
+{
+       return lgsm_send_simple(lh, GSMD_MSG_VOICECALL, 
GSMD_VOICECALL_GET_STAT);
+}

Modified: trunk/src/target/gsm/src/util/shell.c
===================================================================
--- trunk/src/target/gsm/src/util/shell.c       2007-12-04 07:17:13 UTC (rev 
3556)
+++ trunk/src/target/gsm/src/util/shell.c       2007-12-04 07:22:17 UTC (rev 
3557)
@@ -387,6 +387,37 @@
        return 0;
 }
 
+static int call_msghandler(struct lgsm_handle *lh, struct gsmd_msg_hdr *gmh)
+{
+       struct gsmd_call_status *gcs;
+
+       switch (gmh->msg_subtype) {
+       case GSMD_VOICECALL_GET_STAT:
+               gcs = (struct  gsmd_call_status*) ((char *)gmh + sizeof(*gmh));
+               
+               if (gcs->idx > 0)
+                       printf("%d, %d, %d, %d, %d, %s, %d\n",
+                                       gcs->idx, gcs->dir,
+                                       gcs->stat, gcs->mode,
+                                       gcs->mpty, gcs->number,
+                                       gcs->type);
+               else if (gcs->idx < 0)
+                       /* If index < 0, error happens */
+                       printf("+CME ERROR %d\n", (0-(gcs->idx)));
+               else
+                       /* No existing call */
+                       printf("Doesn't exist\n");
+
+               if (gcs->is_last)
+                       pending_responses --;
+               break;
+       default:
+               return -EINVAL;
+       }
+       pending_responses --;
+       return 0;
+}
+
 static const struct msghandler_s {
        int type;
        lgsm_msg_handler *fn;
@@ -397,6 +428,7 @@
        { GSMD_MSG_NETWORK,     net_msghandler },
        { GSMD_MSG_PHONE,       phone_msghandler },
        { GSMD_MSG_PIN,         pin_msghandler },
+       { GSMD_MSG_VOICECALL,   call_msghandler },
 
        { 0, 0 }
 };
@@ -437,6 +469,7 @@
                "\tsc\tSMS Show Service Centre\n"
                "\tsC\tSMS Set Service Centre (sC=number)\n"
                "\tim\tGet imsi\n"
+               "\tcs\tGet Call status\n"
                "\tq\tQuit\n"
                );
 }
@@ -724,6 +757,10 @@
                                printf("Modem Power Off\n");
                                lgsm_modem_power(lgsmh, 0);
                                pending_responses ++;
+                       } else if ( !strncmp(buf, "cs", 2)) {
+                               printf("List current call status\n");
+                               lgsm_voice_get_status(lgsmh);
+                               pending_responses ++;
                        } else {
                                printf("Unknown command `%s'\n", buf);
                        }




--- End Message ---
--- Begin Message ---
Author: tick
Date: 2007-12-04 08:24:05 +0100 (Tue, 04 Dec 2007)
New Revision: 3558

Modified:
   trunk/src/target/gsm/src/gsmd/ext_response.c
Log:
gsmd: make extrsp_parse() can take care another input (sean_chiang)


Modified: trunk/src/target/gsm/src/gsmd/ext_response.c
===================================================================
--- trunk/src/target/gsm/src/gsmd/ext_response.c        2007-12-04 07:22:17 UTC 
(rev 3557)
+++ trunk/src/target/gsm/src/gsmd/ext_response.c        2007-12-04 07:24:05 UTC 
(rev 3558)
@@ -109,16 +109,16 @@
                        }
                        break;
                case TOKEN_NUMERIC:
-                       if (*cur == ',') {
+                       if (isdigit(*cur)) {
+                               *cur_buf = *cur;
+                               cur_buf++;
+                       }
+
+                       if (*cur == ',' || *(cur+1) == '\0') {
                                /* end of number */
                                cur_token->u.numeric = atoi(buf);
                                er->num_tokens++;
                                state = IDLE;
-                       } else if (isdigit(*cur)) {
-                               *cur_buf = *cur;
-                               cur_buf++;
-                       } else {
-                               /* ERORR */
                        }
                        break;
                case TOKEN_STRING:




--- End Message ---
--- Begin Message ---
Author: john_lee
Date: 2007-12-04 10:49:19 +0100 (Tue, 04 Dec 2007)
New Revision: 3559

Added:
   developers/john_lee/toolkit/bin/
   developers/john_lee/toolkit/bin/ipkg-build
   developers/john_lee/toolkit/bin/ipkg-unbuild
   developers/john_lee/toolkit/bin/om-conf
   developers/john_lee/toolkit/bin/om-make-ipkg
   developers/john_lee/toolkit/scripts/
   developers/john_lee/toolkit/scripts/functions
   developers/john_lee/toolkit/scripts/script-env
Removed:
   developers/john_lee/toolkit/build/
   developers/john_lee/toolkit/conf.sh
   developers/john_lee/toolkit/ipkg-build.sh
   developers/john_lee/toolkit/myapp/
   developers/john_lee/toolkit/scripts/
Modified:
   developers/john_lee/toolkit/README
   developers/john_lee/toolkit/setup-env
Log:
Change layout to install with openmoko toolchain
Remove myapp to use external openmoko-sample2
Update README to reflact the changes.


Modified: developers/john_lee/toolkit/README
===================================================================
--- developers/john_lee/toolkit/README  2007-12-04 07:24:05 UTC (rev 3558)
+++ developers/john_lee/toolkit/README  2007-12-04 09:49:19 UTC (rev 3559)
@@ -17,20 +17,20 @@
 Quick start
 ===========
 
-Put your own application with autotools (configure.ac or configure,
-etc) under this directory, e.g. `myapp', then do the following:
+In your home directory:
 
-$ ./conf.sh myapp
-$ . setup-env
-$ cd myapp
-<do the editing>
-$ make
-$ cd ..
-$ ./ipkg-build.sh
+$ cp -r /usr/local/openmoko-sample2 ~/
+$ . /usr/local/openmoko/setup-env
+$ om-conf openmoko-sample2
+$ om-make-ipkg openmoko-sample2
 
-You got ipkg under directory `build'.
+Now you got openmoko-sample2_0.1_armv4t.ipk , you can `scp' it to your
+neo and install it:
 
+$ scp openmoko-sample2_0.1_armv4t.ipk [EMAIL PROTECTED]:
+$ ssh [EMAIL PROTECTED] ipkg install openmoko-sample2_0.1_armv4t.ipk
 
+
 User configuraion
 =================
 
@@ -39,7 +39,7 @@
 If the application need extra configure or autoreconf arguments, they
 could be specified when executing `conf.sh':
 
-EXTRA_OECONF=" --without-foo --enable-bar" ./conf.sh myapp
+EXTRA_OECONF=" --without-foo --enable-bar" om-conf <myapp>
 
 
 Document

Copied: developers/john_lee/toolkit/bin/ipkg-build (from rev 3558, 
developers/john_lee/toolkit/scripts/ipkg-build)

Copied: developers/john_lee/toolkit/bin/ipkg-unbuild (from rev 3558, 
developers/john_lee/toolkit/scripts/ipkg-unbuild)

Added: developers/john_lee/toolkit/bin/om-conf
===================================================================
--- developers/john_lee/toolkit/bin/om-conf     2007-12-04 07:24:05 UTC (rev 
3558)
+++ developers/john_lee/toolkit/bin/om-conf     2007-12-04 09:49:19 UTC (rev 
3559)
@@ -0,0 +1,138 @@
+#!/bin/sh
+
+set -ex
+
+# extract/modified from OE autotools.bbclass
+# this scripts will call native autoconf tools.  if it's not installed
+# we're in trouble.
+
+# FIXME: sometimes requires glib native installed, which is not in the 
toolchain yet.
+# FIXME: sometimes requires intltool native installed, which is not in the 
toolchain yet.
+
+error_exit () {
+       echo usage: $(basename $0) [app_dir_name]
+       exit 1
+}
+
+test x${OMTOOL_DIR} = x && . /usr/local/openmoko/setup-env
+
+. ${OMTOOL_DIR}/scripts/script-env
+. ${OMTOOL_DIR}/scripts/functions
+
+test -z $1 && error_exit
+S=$(absolute_path $1)
+test ! -d $S && error_exit
+
+#EXTRA_OECONF=
+#EXTRA_OEMAKE=
+#EXTRA_AUTORECONF=
+
+acpaths="default"
+
+oefatal() {
+       echo "FATAL:" "$*"
+       exit 1
+
+}
+
+oenote() {
+       echo "NOTE:" "$*"
+
+}
+
+oe_runconf () {
+       if [ -x ${S}/configure ] ; then
+               cfgcmd="${S}/configure \
+                   --build=${BUILD_SYS} \
+                   --host=${HOST_SYS} \
+                   --target=${TARGET_SYS} \
+                   --prefix=${prefix} \
+                   --exec_prefix=${exec_prefix} \
+                   --bindir=${bindir} \
+                   --sbindir=${sbindir} \
+                   --libexecdir=${libexecdir} \
+                   --datadir=${datadir} \
+                   --sysconfdir=${sysconfdir} \
+                   --sharedstatedir=${sharedstatedir} \
+                   --localstatedir=${localstatedir} \
+                   --libdir=${libdir} \
+                   --includedir=${includedir} \
+                   --oldincludedir=${oldincludedir} \
+                   --infodir=${infodir} \
+                   --mandir=${mandir} \
+                       ${EXTRA_OECONF} \
+                   $@"
+               oenote "Running $cfgcmd..."
+               $cfgcmd || oefatal "oe_runconf failed" 
+       else
+               oefatal "no configure script found"
+       fi
+}
+
+autotools_do_configure() {
+       # WARNING: gross hack follows:
+       # An autotools built package generally needs these scripts, however only
+       # automake or libtoolize actually install the current versions of them.
+       # This is a problem in builds that do not use libtool or automake, in 
the case
+       # where we -need- the latest version of these scripts.  e.g. running a 
build
+       # for a package whose autotools are old, on an x86_64 machine, which 
the old
+       # config.sub does not support.  Work around this by installing them 
manually
+       # regardless.
+       ( for ac in `find ${S} -name configure.in -o -name configure.ac`; do
+                       rm -f `dirname $ac`/configure
+                       done )
+       if [ -e ${S}/configure.in -o -e ${S}/configure.ac ]; then
+               olddir=`pwd`
+               cd ${S}
+               if [ x"${acpaths}" = xdefault ]; then
+                       acpaths=
+                       for i in `find ${S} -maxdepth 2 -name \*.m4|grep -v 
'aclocal.m4'| \
+                               grep -v 'acinclude.m4' | sed -e 
's,\(.*/\).*$,\1,'|sort -u`; do
+                               acpaths="$acpaths -I $i"
+                       done
+               else
+                       acpaths="${acpaths}"
+               fi
+               AUTOV=`automake --version |head -n 1 |sed "s/.* 
//;s/\.[0-9]\+$//"`
+               automake --version
+               echo "AUTOV is $AUTOV"
+               #install -d ${STAGING_DATADIR}/aclocal
+               #install -d ${STAGING_DATADIR}/aclocal-$AUTOV
+               acpaths="$acpaths -I${STAGING_DATADIR}/aclocal-$AUTOV -I 
${STAGING_DATADIR}/aclocal"
+               # autoreconf is too shy to overwrite aclocal.m4 if it doesn't 
look
+               # like it was auto-generated.  Work around this by blowing it 
away
+               # by hand, unless the package specifically asked not to run 
aclocal.
+               if ! echo ${EXTRA_AUTORECONF} | grep -q "aclocal"; then
+                       rm -f aclocal.m4
+               fi
+               if [ -e configure.in ]; then
+                       CONFIGURE_AC=configure.in
+               else
+                       CONFIGURE_AC=configure.ac
+               fi
+               if grep "^AM_GLIB_GNU_GETTEXT" $CONFIGURE_AC >/dev/null; then
+                       if grep "sed.*POTFILES" $CONFIGURE_AC >/dev/null; then
+                               : do nothing -- we still have an old unmodified 
configure.ac
+                       else
+                               oenote Executing glib-gettextize --force --copy
+                               echo "no" | glib-gettextize --force --copy
+                       fi
+               fi
+               if grep "^[AI][CT]_PROG_INTLTOOL" $CONFIGURE_AC >/dev/null; then
+                       oenote Executing intltoolize --copy --force --automake
+                       intltoolize --copy --force --automake
+               fi
+               oenote Executing autoreconf --verbose --install --force 
${EXTRA_AUTORECONF} $acpaths
+               mkdir -p m4
+               autoreconf -Wcross --verbose --install --force 
${EXTRA_AUTORECONF} $acpaths || oefatal "autoreconf execution failed."
+               cd $olddir
+       fi
+       if [ -e ${S}/configure ]; then
+               oe_runconf
+       else
+               oenote "nothing to configure"
+       fi
+}
+
+cd ${S}
+autotools_do_configure ${S}


Property changes on: developers/john_lee/toolkit/bin/om-conf
___________________________________________________________________
Name: svn:executable
   + *

Added: developers/john_lee/toolkit/bin/om-make-ipkg
===================================================================
--- developers/john_lee/toolkit/bin/om-make-ipkg        2007-12-04 07:24:05 UTC 
(rev 3558)
+++ developers/john_lee/toolkit/bin/om-make-ipkg        2007-12-04 09:49:19 UTC 
(rev 3559)
@@ -0,0 +1,44 @@
+#!/bin/sh
+
+set -ex
+
+error_exit () {
+       echo usage: $(basename $0) [app_dir_name]
+       exit 1
+}
+
+test x${OMTOOL_DIR} = x && . /usr/local/openmoko/setup-env
+
+. ${OMTOOL_DIR}/scripts/functions
+
+test x$1 = x && error_exit
+S=$(absolute_path $1)
+test ! -d $S && error_exit
+
+appname=$(basename ${S})
+tmpdir=${TMPDIR}
+test x${tmpdir} = x && tmpdir=/tmp/${appname}-ipkg-tmp
+test -e "${tmpdir}" && (\
+echo Please specify environment variable TMPDIR.  Cannot use ${tmpdir} because 
it already exists.; \
+exit 1;\
+)
+
+oldpwd=$(pwd)
+cd ${S}
+make install DESTDIR="${tmpdir}"
+cd ${tmpdir}
+mkdir CONTROL
+cat >CONTROL/control <<EOF
+Package: $appname
+Version: 0.1
+Description: package built by openmoko toolchain
+Section: openmoko/applications
+Priority: optional
+Maintainer: $USER
+Architecture: armv4t
+Homepage: http://www.openmoko.org/
+Depends: 
+Source: ${S}
+EOF
+ipkg-build -o 0 -g 0 ${tmpdir} ${oldpwd}
+rm -rf ${tmpdir}


Property changes on: developers/john_lee/toolkit/bin/om-make-ipkg
___________________________________________________________________
Name: svn:executable
   + *

Deleted: developers/john_lee/toolkit/conf.sh
===================================================================
--- developers/john_lee/toolkit/conf.sh 2007-12-04 07:24:05 UTC (rev 3558)
+++ developers/john_lee/toolkit/conf.sh 2007-12-04 09:49:19 UTC (rev 3559)
@@ -1,146 +0,0 @@
-#!/bin/sh
-
-set -ex
-
-# extract/modified from OE autotools.bbclass
-# this scripts will call native autoconf tools.  if it's not installed
-# we're in trouble.
-
-# FIXME: this requires glib native installed, which is not in the toolchain 
yet.
-# FIXME: this requires intltool native installed, which is not in the 
toolchain yet.
-
-absolute_path () {
-       local S D B
-       S=$1
-       D=$(dirname $S)
-       B=$(basename $S)
-       echo "`cd \"$D\" 2>/dev/null && pwd || echo \"$D\"`/$B"
-}
-
-error_exit () {
-       echo usage: $(basename $0) [app_dir_name]
-       exit 1
-}
-
-abspath=$(dirname $(absolute_path $0))
-
-. ${abspath}/setup-env
-. ${abspath}/scripts/script-env
-
-test -z $1 && error_exit
-S=$(absolute_path $1)
-test ! -d $S && error_exit
-
-#EXTRA_OECONF=
-#EXTRA_OEMAKE=
-#EXTRA_AUTORECONF=
-
-acpaths="default"
-
-oefatal() {
-       echo "FATAL:" "$*"
-       exit 1
-
-}
-
-oenote() {
-       echo "NOTE:" "$*"
-
-}
-
-oe_runconf () {
-       if [ -x ${S}/configure ] ; then
-               cfgcmd="${S}/configure \
-                   --build=${BUILD_SYS} \
-                   --host=${HOST_SYS} \
-                   --target=${TARGET_SYS} \
-                   --prefix=${prefix} \
-                   --exec_prefix=${exec_prefix} \
-                   --bindir=${bindir} \
-                   --sbindir=${sbindir} \
-                   --libexecdir=${libexecdir} \
-                   --datadir=${datadir} \
-                   --sysconfdir=${sysconfdir} \
-                   --sharedstatedir=${sharedstatedir} \
-                   --localstatedir=${localstatedir} \
-                   --libdir=${libdir} \
-                   --includedir=${includedir} \
-                   --oldincludedir=${oldincludedir} \
-                   --infodir=${infodir} \
-                   --mandir=${mandir} \
-                       ${EXTRA_OECONF} \
-                   $@"
-               oenote "Running $cfgcmd..."
-               $cfgcmd || oefatal "oe_runconf failed" 
-       else
-               oefatal "no configure script found"
-       fi
-}
-
-autotools_do_configure() {
-       # WARNING: gross hack follows:
-       # An autotools built package generally needs these scripts, however only
-       # automake or libtoolize actually install the current versions of them.
-       # This is a problem in builds that do not use libtool or automake, in 
the case
-       # where we -need- the latest version of these scripts.  e.g. running a 
build
-       # for a package whose autotools are old, on an x86_64 machine, which 
the old
-       # config.sub does not support.  Work around this by installing them 
manually
-       # regardless.
-       ( for ac in `find ${S} -name configure.in -o -name configure.ac`; do
-                       rm -f `dirname $ac`/configure
-                       done )
-       if [ -e ${S}/configure.in -o -e ${S}/configure.ac ]; then
-               olddir=`pwd`
-               cd ${S}
-               if [ x"${acpaths}" = xdefault ]; then
-                       acpaths=
-                       for i in `find ${S} -maxdepth 2 -name \*.m4|grep -v 
'aclocal.m4'| \
-                               grep -v 'acinclude.m4' | sed -e 
's,\(.*/\).*$,\1,'|sort -u`; do
-                               acpaths="$acpaths -I $i"
-                       done
-               else
-                       acpaths="${acpaths}"
-               fi
-               AUTOV=`automake --version |head -n 1 |sed "s/.* 
//;s/\.[0-9]\+$//"`
-               automake --version
-               echo "AUTOV is $AUTOV"
-               #install -d ${STAGING_DATADIR}/aclocal
-               #install -d ${STAGING_DATADIR}/aclocal-$AUTOV
-               acpaths="$acpaths -I${STAGING_DATADIR}/aclocal-$AUTOV -I 
${STAGING_DATADIR}/aclocal"
-               # autoreconf is too shy to overwrite aclocal.m4 if it doesn't 
look
-               # like it was auto-generated.  Work around this by blowing it 
away
-               # by hand, unless the package specifically asked not to run 
aclocal.
-               if ! echo ${EXTRA_AUTORECONF} | grep -q "aclocal"; then
-                       rm -f aclocal.m4
-               fi
-               if [ -e configure.in ]; then
-                       CONFIGURE_AC=configure.in
-               else
-                       CONFIGURE_AC=configure.ac
-               fi
-               if grep "^AM_GLIB_GNU_GETTEXT" $CONFIGURE_AC >/dev/null; then
-                       if grep "sed.*POTFILES" $CONFIGURE_AC >/dev/null; then
-                               : do nothing -- we still have an old unmodified 
configure.ac
-                       else
-                               oenote Executing glib-gettextize --force --copy
-                               echo "no" | glib-gettextize --force --copy
-                       fi
-               fi
-               if grep "^[AI][CT]_PROG_INTLTOOL" $CONFIGURE_AC >/dev/null; then
-                       oenote Executing intltoolize --copy --force --automake
-                       intltoolize --copy --force --automake
-               fi
-               oenote Executing autoreconf --verbose --install --force 
${EXTRA_AUTORECONF} $acpaths
-               mkdir -p m4
-               autoreconf -Wcross --verbose --install --force 
${EXTRA_AUTORECONF} $acpaths || oefatal "autoreconf execution failed."
-               cd $olddir
-       fi
-       if [ -e ${S}/configure ]; then
-               oe_runconf
-       else
-               oenote "nothing to configure"
-       fi
-}
-
-cd ${S}
-autotools_do_configure ${S}

Deleted: developers/john_lee/toolkit/ipkg-build.sh
===================================================================
--- developers/john_lee/toolkit/ipkg-build.sh   2007-12-04 07:24:05 UTC (rev 
3558)
+++ developers/john_lee/toolkit/ipkg-build.sh   2007-12-04 09:49:19 UTC (rev 
3559)
@@ -1,53 +0,0 @@
-#!/bin/sh
-
-set -ex
-
-absolute_path () {
-       local S D B
-       S=$1
-       D=$(dirname $S)
-       B=$(basename $S)
-       echo "`cd \"$D\" 2>/dev/null && pwd || echo \"$D\"`/$B"
-}
-
-error_exit () {
-       echo usage: $(basename $0) [app_dir_name]
-       exit 1
-}
-
-abspath=$(dirname $(absolute_path $0))
-
-. ${abspath}/setup-env
-
-test -z $1 && error_exit
-S=$(absolute_path $1)
-test ! -d $S && error_exit
-
-appname=$(basename ${S})
-tmpdir=${abspath}/build/tmp/${appname}
-
-if test -e "${tmpdir}"
-then
-    rm -rf "${tmpdir}"/*
-else
-    mkdir -p ${tmpdir}
-fi
-
-cd ${S}
-make install DESTDIR="${tmpdir}"
-cd ${tmpdir}
-mkdir CONTROL
-cat >CONTROL/control <<EOF
-Package: $appname
-Version: 0.1
-Description: package built by openmoko toolchain
-Section: openmoko/applications
-Priority: optional
-Maintainer: $USER
-Architecture: armv4t
-Homepage: http://www.openmoko.org
-Depends: 
-Source: ${S}
-EOF
-cd ../../
-${abspath}/scripts/ipkg-build -o 0 -g 0 ${tmpdir}

Added: developers/john_lee/toolkit/scripts/functions
===================================================================
--- developers/john_lee/toolkit/scripts/functions       2007-12-04 07:24:05 UTC 
(rev 3558)
+++ developers/john_lee/toolkit/scripts/functions       2007-12-04 09:49:19 UTC 
(rev 3559)
@@ -0,0 +1,7 @@
+absolute_path () {
+       local S D B
+       S=$1
+       D=$(dirname $S)
+       B=$(basename $S)
+       echo "`cd \"$D\" 2>/dev/null && pwd || echo \"$D\"`/$B"
+}

Added: developers/john_lee/toolkit/scripts/script-env
===================================================================
--- developers/john_lee/toolkit/scripts/script-env      2007-12-04 07:24:05 UTC 
(rev 3558)
+++ developers/john_lee/toolkit/scripts/script-env      2007-12-04 09:49:19 UTC 
(rev 3559)
@@ -0,0 +1,158 @@
+
+# put extra configure arguments here.
+EXTRA_OECONF=
+
+# put extra autoreconf arguments here.
+EXTRA_AUTORECONF=
+
+# do not modify anything below.
+EXTRA_OEMAKE=
+
+STAGING_DATADIR=${OMTOOL_DIR}/arm-angstrom-linux-gnueabi/share/aclocal
+BUILD_SYS="x86_64-linux"
+HOST_SYS="arm-angstrom-linux-gnueabi"
+TARGET_SYS="arm-angstrom-linux-gnueabi"
+
+export localstatedir="/var"
+
+export prefix="/usr"
+
+export STRIP="arm-angstrom-linux-gnueabi-strip"
+
+#export 
STAGING_SIPDIR="/home/john/moko/build/openmoko/staging/x86_64-linux/share/sip"
+
+export libexecdir="/usr/libexec"
+
+export datadir="/usr/share"
+
+#export BUILD_CXX="ccache g++"
+
+export LD="arm-angstrom-linux-gnueabi-ld"
+
+export bindir="/usr/bin"
+
+#export 
TARGET_CXXFLAGS="-isystem/home/john/moko/build/openmoko/staging/arm-angstrom-linux-gnueabi/include
 -fexpensive-optimizations -fomit-frame-pointer -frename-registers -Os 
-fpermissive"
+
+export includedir="/usr/include"
+
+#export MANIFEST="/home/john/moko/openembedded/packages/openmoko2/./manifest"
+
+#export BUILD_CC="ccache gcc"
+
+#export 
BUILD_LDFLAGS="-L/home/john/moko/build/openmoko/staging/x86_64-linux/lib 
-Wl,-rpath-link,/home/john/moko/build/openmoko/staging/x86_64-linux/lib 
-Wl,-rpath,/home/john/moko/build/openmoko/staging/x86_64-linux/lib -Wl,-O1"
+
+#export BUILD_LD="ld"
+
+export oldincludedir="/usr/include"
+
+#export BUILD_CCLD="gcc"
+
+#export palmtopdir="/usr/lib/opie"
+
+export CC="ccache arm-angstrom-linux-gnueabi-gcc -march=armv4t -mtune=arm920t"
+
+export PATH="${OMTOOL_DIR}/arm/bin:${PATH}"
+
+#export 
TARGET_CFLAGS="-isystem/home/john/moko/build/openmoko/staging/arm-angstrom-linux-gnueabi/include
 -fexpensive-optimizations -fomit-frame-pointer -frename-registers -Os"
+
+export 
CPPFLAGS="-isystem/home/john/moko/build/openmoko/staging/arm-angstrom-linux-gnueabi/include"
+
+export RANLIB="arm-angstrom-linux-gnueabi-ranlib"
+
+export CXX="ccache arm-angstrom-linux-gnueabi-g++ -march=armv4t -mtune=arm920t"
+
+#export BUILD_RANLIB="ranlib"
+
+export mandir="/usr/share/man"
+
+export sharedstatedir="/usr/com"
+
+export OBJCOPY="arm-angstrom-linux-gnueabi-objcopy"
+
+#export base_libdir="/lib"
+
+#export servicedir="/srv"
+
+export 
PKG_CONFIG_DIR="${OMTOOL_DIR}/arm/arm-angstrom-linux-gnueabi/lib/pkgconfig"
+
+export 
LDFLAGS="-L/home/john/moko/build/openmoko/staging/arm-angstrom-linux-gnueabi/lib
 
-Wl,-rpath-link,/home/john/moko/build/openmoko/staging/arm-angstrom-linux-gnueabi/lib
 -Wl,-O1"
+
+export sysconfdir="/etc"
+
+export CCLD="ccache arm-angstrom-linux-gnueabi-gcc -march=armv4t 
-mtune=arm920t"
+
+export MAKE="make"
+
+#export base_bindir="/bin"
+
+export sbindir="/usr/sbin"
+
+export CFLAGS="-isystem${OMTOOL_DIR}/arm/arm-angstrom-linux-gnueabi/include 
-fexpensive-optimizations -fomit-frame-pointer -frename-registers -Os"
+
+#export 
TARGET_LDFLAGS="-L/home/john/moko/build/openmoko/staging/arm-angstrom-linux-gnueabi/lib
 
-Wl,-rpath-link,/home/john/moko/build/openmoko/staging/arm-angstrom-linux-gnueabi/lib
 -Wl,-O1"
+
+export libdir="/usr/lib"
+
+export PKG_CONFIG_DISABLE_UNINSTALLED="yes"
+
+#export 
OPIEDIR="/home/john/moko/build/openmoko/staging/arm-angstrom-linux-gnueabi"
+
+#export BUILD_F77="ccache g77"
+
+#export PATCH_GET="0"
+
+export CXXFLAGS="-isystem${OMTOOL_DIR}/arm/arm-angstrom-linux-gnueabi/include 
-fexpensive-optimizations -fomit-frame-pointer -frename-registers -Os 
-fpermissive -fvisibility-inlines-hidden"
+
+#export 
QMAKE_MKSPEC_PATH="/home/john/moko/build/openmoko/staging/x86_64-linux/share/qmake"
+
+export F77="ccache arm-angstrom-linux-gnueabi-g77 -march=armv4t -mtune=arm920t"
+
+#export 
QTDIR="/home/john/moko/build/openmoko/staging/arm-angstrom-linux-gnueabi/qt2"
+
+#export 
QPEDIR="/home/john/moko/build/openmoko/staging/arm-angstrom-linux-gnueabi"
+
+#export 
BUILD_CXXFLAGS="-isystem/home/john/moko/build/openmoko/staging/x86_64-linux/include
 -Os -fpermissive"
+
+#export SHELLCMDS="bash --rcfile $TERMRCFILE"
+
+#export 
BBPATH="/home/john/moko/openembedded/packages/openmoko2:/home/john/moko/openembedded/conf/distro/include:/home/john/moko/openembedded/conf/distro/include:/home/john/moko/openembedded/conf/distro/include:/home/john/moko/openembedded/conf/distro/include:/home/john/moko/openembedded/conf/distro/include:/home/john/moko/openembedded/conf/distro/include:/home/john/moko/openembedded/conf/distro/include:/home/john/moko/openembedded/conf/distro/include:/home/john/moko/openembedded/conf/distro/include:/home/john/moko/openembedded/conf/machine/include:/home/john/moko/build:/home/john/moko/openembedded"
+
+#export BUILD_CPP="cpp"
+
+#export 
BUILD_CFLAGS="-isystem/home/john/moko/build/openmoko/staging/x86_64-linux/include
 -Os"
+
+#export docdir="/usr/share/doc"
+
+export infodir="/usr/share/info"
+
+#export base_sbindir="/sbin"
+
+export 
PKG_CONFIG_PATH="${OMTOOL_DIR}/arm/arm-angstrom-linux-gnueabi/lib/pkgconfig"
+
+export AS="arm-angstrom-linux-gnueabi-as"
+
+export AR="arm-angstrom-linux-gnueabi-ar"
+
+#export 
BUILD_CPPFLAGS="-isystem/home/john/moko/build/openmoko/staging/x86_64-linux/include"
+
+export CPP="arm-angstrom-linux-gnueabi-gcc -E"
+
+#export CONFIG_SITE="/home/john/moko/openembedded/site/endian-little 
/home/john/moko/openembedded/site/common-glibc 
/home/john/moko/openembedded/site/arm-common 
/home/john/moko/openembedded/site/arm-linux 
/home/john/moko/openembedded/site/common 
/home/john/moko/openembedded/site/common"
+
+#export 
TARGET_CPPFLAGS="-isystem/home/john/moko/build/openmoko/staging/arm-angstrom-linux-gnueabi/include"
+
+export exec_prefix="/usr"
+
+#export 
STAGING_IDLDIR="/home/john/moko/build/openmoko/staging/arm-angstrom-linux-gnueabi/share/idl"
+
+unset MACHINE
+
+#export BUILD_AR="ar"
+
+export OBJDUMP="arm-angstrom-linux-gnueabi-objdump"
+
+unset DISTRO
+
+#export palmqtdir="/usr/lib/opie"
+
+#export BUILD_STRIP="strip"

Modified: developers/john_lee/toolkit/setup-env
===================================================================
--- developers/john_lee/toolkit/setup-env       2007-12-04 07:24:05 UTC (rev 
3558)
+++ developers/john_lee/toolkit/setup-env       2007-12-04 09:49:19 UTC (rev 
3559)
@@ -1,5 +1,5 @@
-OMTOOL_DIR="/usr/local/openmoko"
-(echo "$PATH" | grep -q "${OMTOOL_DIR}/arm/bin") || export 
PATH="${OMTOOL_DIR}/arm/bin:${PATH}"
+export OMTOOL_DIR="/usr/local/openmoko"
+(echo "$PATH" | grep -q "${OMTOOL_DIR}") || export 
PATH="${OMTOOL_DIR}/bin:${OMTOOL_DIR}/arm/bin:${PATH}"
 export STRIP="arm-angstrom-linux-gnueabi-strip"
 export LD="arm-angstrom-linux-gnueabi-ld"
 export CC="ccache arm-angstrom-linux-gnueabi-gcc -march=armv4t -mtune=arm920t"




--- End Message ---
_______________________________________________
commitlog mailing list
[email protected]
http://lists.openmoko.org/mailman/listinfo/commitlog

Reply via email to