Send commitlog mailing list submissions to
commitlog@lists.openmoko.org
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. r4547 - in developers/zecke: . keytest ([EMAIL PROTECTED])
2. r4548 - in developers/zecke: . app_restarter
([EMAIL PROTECTED])
3. Openmoko's OpenEmbedded repository. This is used to build the
Openmoko distribution: Changes to 'org.openmoko.asu.dev'
([EMAIL PROTECTED])
4. Openmoko's OpenEmbedded repository. This is used to build the
Openmoko distribution: Changes to 'org.openmoko.asu.dev'
([EMAIL PROTECTED])
5. Openmoko's OpenEmbedded repository. This is used to build the
Openmoko distribution: Changes to 'org.openmoko.asu.stable'
([EMAIL PROTECTED])
6. Openmoko's OpenEmbedded repository. This is used to build the
Openmoko distribution: Changes to 'org.openmoko.asu.dev'
([EMAIL PROTECTED])
7. Openmoko's OpenEmbedded repository. This is used to build the
Openmoko distribution: Changes to 'org.openmoko.asu.stable'
([EMAIL PROTECTED])
8. Openmoko's OpenEmbedded repository. This is used to build the
Openmoko distribution: Changes to 'org.openmoko.asu.dev'
([EMAIL PROTECTED])
9. Openmoko's OpenEmbedded repository. This is used to build the
Openmoko distribution: Changes to 'org.openmoko.asu.stable'
([EMAIL PROTECTED])
10. r4549 - developers/zecke/app_restarter ([EMAIL PROTECTED])
--- Begin Message ---
Author: zecke
Date: 2008-07-22 16:28:48 +0200 (Tue, 22 Jul 2008)
New Revision: 4547
Added:
developers/zecke/keytest/
developers/zecke/keytest/GNUmakefile
developers/zecke/keytest/keytest.c
Log:
Simple utility to set the keyboard in raw modus (unfinished as debugging ended
there)
Added: developers/zecke/keytest/GNUmakefile
===================================================================
--- developers/zecke/keytest/GNUmakefile (rev 0)
+++ developers/zecke/keytest/GNUmakefile 2008-07-22 14:28:48 UTC (rev
4547)
@@ -0,0 +1,4 @@
+all: keytest
+
+keytest: keytest.c
+ $(CC) -std=c99 -o $@ keytest.c
Added: developers/zecke/keytest/keytest.c
===================================================================
--- developers/zecke/keytest/keytest.c (rev 0)
+++ developers/zecke/keytest/keytest.c 2008-07-22 14:28:48 UTC (rev 4547)
@@ -0,0 +1,92 @@
+/*
+ * Test the dev tty output, derived from my QtE keyboard patch
+ *
+ * Copyright (C) 2008 Openmoko Inc.
+ *
+ * Author: Holger Hans Peter Freyther <[EMAIL PROTECTED]>
+ *
+ */
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/ioctl.h>
+
+#include <fcntl.h>
+#include <stdio.h>
+#include <termios.h>
+#include <unistd.h>
+
+#include <linux/keyboard.h>
+#include <linux/kd.h>
+
+
+static void handle_key(int keycode, int press)
+{
+ printf("Key: %d press: %d\n", keycode, press);
+}
+
+static int s_highKey = 0;
+static unsigned int s_highKeyCode = 0;
+static unsigned int s_highNeedMoreKey = 0;
+static void read_keyboard(int keyboard)
+{
+ unsigned char buf[80];
+ unsigned char code;
+ int release = 0;
+ int release_bit;
+
+
+ int n = read(keyboard, buf, 80 );
+ printf("Read keyboard data: %d\n", n);
+ for (int loop = 0; loop < n; loop++ ) {
+ code = buf[loop] & 0x7f;
+ release_bit = buf[loop] & 0x80;
+
+ if ( s_highKey ) {
+ if ( s_highNeedMoreKey == 2 ) {
+ s_highNeedMoreKey--;
+ s_highKeyCode = code << 7;
+ }else if ( s_highNeedMoreKey == 1 ) {
+ s_highNeedMoreKey = 0;
+ s_highKeyCode |= code;
+ s_highKey = 0;
+ if ( s_highKeyCode > 127 && s_highKeyCode < NR_KEYS )
+ handle_key( s_highKeyCode, release );
+ }
+ }else if (code == 0) {
+ s_highKey = 1;
+ s_highNeedMoreKey = 2;
+ release = release_bit;
+ }else {
+ release = release_bit;
+ handle_key(code, release);
+ }
+ }
+}
+
+int main(int argc, char** argv)
+{
+ int keyboard = open("/dev/tty0", O_RDWR);
+ if (keyboard < 0) {
+ perror("keyboard open");
+ return -1;
+ }
+
+ ioctl(keyboard, KDSKBMODE, K_MEDIUMRAW);
+
+ struct termios termdata;
+ tcgetattr( keyboard, &termdata );
+ termdata.c_iflag = (IGNPAR | IGNBRK) & (~PARMRK) & (~ISTRIP);
+ termdata.c_oflag = 0;
+ termdata.c_cflag = CREAD | CS8;
+ termdata.c_lflag = 0;
+ termdata.c_cc[VTIME]=0;
+ termdata.c_cc[VMIN]=1;
+ cfsetispeed(&termdata, 9600);
+ cfsetospeed(&termdata, 9600);
+ tcsetattr(keyboard, TCSANOW, &termdata);
+
+ while (1) {
+ read_keyboard(keyboard);
+ }
+}
Property changes on: developers/zecke/keytest/keytest.c
___________________________________________________________________
Name: svn:eol-style
+ native
--- End Message ---
--- Begin Message ---
Author: zecke
Date: 2008-07-22 16:29:36 +0200 (Tue, 22 Jul 2008)
New Revision: 4548
Added:
developers/zecke/app_restarter/
developers/zecke/app_restarter/app_restarter.c
Log:
Restart a server process. Inspired by e_alert.c, it will show a XWindow asking
the user...
Added: developers/zecke/app_restarter/app_restarter.c
===================================================================
--- developers/zecke/app_restarter/app_restarter.c
(rev 0)
+++ developers/zecke/app_restarter/app_restarter.c 2008-07-22 14:29:36 UTC
(rev 4548)
@@ -0,0 +1,60 @@
+/*
+ * (C) Copyright 2008 Openmoko Inc.
+ * Author: Holger Hans Peter Freyther
+ *
+ * Licensed under GPLv2 or later, no warranty
+ *
+ * keep a giving process going
+ *
+ * stolen and inspired from e_alert.c
+ */
+
+#include <sys/types.h>
+#include <sys/wait.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+static void usage(char* name)
+{
+ fprintf(stderr, "%s crash_comment appname [params for app]\n", name);
+}
+
+void fork_and_exec(char* file, int argc, char** argv)
+{
+ pid_t pid = vfork();
+
+ if (pid == 0) {
+ execvp(file, argv);
+ fprintf(stderr, "Failed to launch: %s\n", file);
+ _exit(-1);
+ } else {
+ int status;
+
+ /* wait for the process to die */
+ while (waitpid(pid, &status, 0) != pid);
+
+ fprintf(stderr, "The process exited: %d normal: %d\n", status,
WIFEXITED(status));
+ }
+}
+
+int main(int argc, char** argv)
+{
+ int i = 0;
+
+ if (argc < 3) {
+ usage(argv[0]);
+ return EXIT_FAILURE;
+ }
+
+ /* Create a list for execvp with a sentinel */
+ int commands = argc-3;
+ char** command_arguments = (char**) malloc(sizeof(char*)*(commands+1));
+ for (i = 0; i < commands; ++i)
+ command_arguments[i] = argv[2+i];
+ command_arguments[commands] = NULL;
+
+ for (;;)
+ fork_and_exec(argv[2], commands, command_arguments);
+}
Property changes on: developers/zecke/app_restarter/app_restarter.c
___________________________________________________________________
Name: svn:eol-style
+ native
--- End Message ---
--- Begin Message ---
packages/packagekit/packagekit_git.bb | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
New commits:
commit baccce447e2f967b7997440c4ac58d1c4e62b9fc
Author: Julian_chu <[EMAIL PROTECTED]>
Date: Tue Jul 22 22:35:15 2008 +0800
[packagekit] Add a patch to packagekit
Make packagekit can remove packagekit without regarding the
dependency. (So that can remove packages such as splinter depended by tasks)
--- End Message ---
--- Begin Message ---
packages/packagekit/files/force_depends.patch | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
New commits:
commit 8ab6e09daf509d20bf55eea55c8884917b0d8a1e
Author: Julian_chu <[EMAIL PROTECTED]>
Date: Wed Jul 23 00:05:00 2008 +0800
[packagekit] Add patch force_depends.patch
Forgot to add this patch in the latest commit
--- End Message ---
--- Begin Message ---
conf/checksums.ini | 156 ++++++++++++-------------
conf/distro/include/sane-srcdates.inc | 2 +-
conf/distro/include/sane-srcrevs.inc | 14 +-
packages/packagekit/files/force_depends.patch | 20 +++
packages/packagekit/packagekit_git.bb | 13 ++-
5 files changed, 114 insertions(+), 91 deletions(-)
New commits:
commit d8a607ce933b4a03a57f9d178233cf1d4406a505
Author: Holger Hans Peter Freyther <[EMAIL PROTECTED]>
Date: Tue Jul 22 19:58:47 2008 +0200
[packagekit] Disable generation of the docbook
Say xmlto is missing to disable generation of the docbook information.
On
some hosts xmlto and other utilities are installed on some are not,
xmlto
and xmllint can require network access during the build which is not
guranteed in some setups. I think it is fine to not generate the
documentation
commit 5ff27065b33ecf977b851145f394427d1a5b293d
Author: Holger Hans Peter Freyther <[EMAIL PROTECTED]>
Date: Tue Jul 22 18:37:54 2008 +0200
[srcrev] Upgrade Qtopia to get a better ringtone, ringtone delay,
callscreen fixes...
Many fixes in Qtopia. CallScreen changes requested by QA, Jeremy's
ringtone
delay work. A new ringtone and some other things.
commit 5d5f34ae237530a7d6c88d44045bc6eee284f342
Author: Julian_chu <[EMAIL PROTECTED]>
Date: Wed Jul 23 00:05:00 2008 +0800
[packagekit] Add patch force_depends.patch
Forgot to add this patch in the latest commit
commit b753e21e8b01b7da9c33bdfda64e1b637f572922
Author: Julian_chu <[EMAIL PROTECTED]>
Date: Tue Jul 22 22:35:15 2008 +0800
[packagekit] Add a patch to packagekit
Make packagekit can remove packagekit without regarding the
dependency. (So that can remove packages such as splinter depended by tasks)
commit c2fe1f1fb06f1be05b76e8b0a24bdead1b8374df
Author: Julian_chu <[EMAIL PROTECTED]>
Date: Tue Jul 22 21:47:21 2008 +0800
[assassin] Bump up the reversion of assassin to 202
commit d34e703d2b64734feccde06ca701d06f6ed0d842
Author: Julian_chu <[EMAIL PROTECTED]>
Date: Tue Jul 22 21:45:12 2008 +0800
[opkg] Bump up the reversion of opkg to 4545
commit 4134d6f86a83df4895417c80af2c3870f74ca3ef
Author: Holger Hans Peter Freyther <[EMAIL PROTECTED]>
Date: Tue Jul 22 11:58:05 2008 +0200
[srcrev] Bump the illume rev to get a version that will use the Qtopia
keyboard
Do not create/show the illume keyboard. This is a special version from
raster to allow upgrading of Qtopia. The Qtopia keyboard will be used
and
no other unmanaged keyboard will be on the screen.
commit 5b44fd753c5f8c057442b80a4f642b866d1317d6
Author: Holger Hans Peter Freyther <[EMAIL PROTECTED]>
Date: Tue Jul 22 11:57:40 2008 +0200
[srcdate] Bump the EFL version.
commit 801720284736855db145a07359e902ac74014409
Author: Julian_chu <[EMAIL PROTECTED]>
Date: Tue Jul 22 11:32:25 2008 +0800
[checksum] Sort the entries with FILENAME by alphabet ordering.
i.e. http://www.download.url/path/to/FILENAME.tar.gz
--- End Message ---
--- Begin Message ---
conf/distro/include/sane-srcrevs.inc | 2 +-
packages/packagekit/packagekit_git.bb | 9 +++++++--
2 files changed, 8 insertions(+), 3 deletions(-)
New commits:
commit 4fde675e345800b980ea6bef714d619241471c8a
Author: Holger Hans Peter Freyther <[EMAIL PROTECTED]>
Date: Tue Jul 22 19:58:47 2008 +0200
[packagekit] Disable generation of the docbook
Say xmlto is missing to disable generation of the docbook information.
On
some hosts xmlto and other utilities are installed on some are not,
xmlto
and xmllint can require network access during the build which is not
guranteed in some setups. I think it is fine to not generate the
documentation
commit e66ebb74cba203cd194ce90bf03cafcdce5fe9d5
Author: Holger Hans Peter Freyther <[EMAIL PROTECTED]>
Date: Tue Jul 22 18:37:54 2008 +0200
[srcrev] Upgrade Qtopia to get a better ringtone, ringtone delay,
callscreen fixes...
Many fixes in Qtopia. CallScreen changes requested by QA, Jeremy's
ringtone
delay work. A new ringtone and some other things.
--- End Message ---
--- Begin Message ---
conf/checksums.ini | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 34c718be9c3dbd70ab1ffc44d6384288f40a009f
Author: Julian_chu <[EMAIL PROTECTED]>
Date: Tue Jul 22 14:05:31 2008 +0800
[checksum] Remove the duplicate entry
commit 103da729549bf700f6218c28e942450025154118
Author: Julian_chu <[EMAIL PROTECTED]>
Date: Tue Jul 22 15:06:37 2008 +0800
[checksum] Add checksum for settingsgui-0.8
--- End Message ---
--- Begin Message ---
conf/distro/include/sane-srcrevs.inc | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
New commits:
commit c4bc1b55721cbb9659cbc49f417f73df408c9972
Author: Holger Hans Peter Freyther <[EMAIL PROTECTED]>
Date: Tue Jul 22 20:43:31 2008 +0200
[srcrev] Upgrade our kernel, some more charging patches done by andy
--- End Message ---
--- Begin Message ---
conf/distro/include/sane-srcrevs.inc | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
New commits:
commit 8c2f4944b83138b9451504d318aca92b4e91ac41
Author: Holger Hans Peter Freyther <[EMAIL PROTECTED]>
Date: Tue Jul 22 20:43:31 2008 +0200
[srcrev] Upgrade our kernel, some more charging patches done by andy
--- End Message ---
--- Begin Message ---
Author: zecke
Date: 2008-07-22 21:30:16 +0200 (Tue, 22 Jul 2008)
New Revision: 4549
Added:
developers/zecke/app_restarter/GNUmakefile
Modified:
developers/zecke/app_restarter/app_restarter.c
Log:
app_restarter: Use some e_alert.c code to provide a X11 interface to ask the
user
Ask the user if an application should be restarted or not
Added: developers/zecke/app_restarter/GNUmakefile
===================================================================
--- developers/zecke/app_restarter/GNUmakefile (rev 0)
+++ developers/zecke/app_restarter/GNUmakefile 2008-07-22 19:30:16 UTC (rev
4549)
@@ -0,0 +1,2 @@
+app_restarter: app_restarter.o
+ $(CC) -o app_restarter app_restarter.o `pkg-config --libs x11`
Modified: developers/zecke/app_restarter/app_restarter.c
===================================================================
--- developers/zecke/app_restarter/app_restarter.c 2008-07-22 14:29:36 UTC
(rev 4548)
+++ developers/zecke/app_restarter/app_restarter.c 2008-07-22 19:30:16 UTC
(rev 4549)
@@ -14,15 +14,190 @@
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <unistd.h>
+#include <X11/Xlib.h>
+#include <X11/X.h>
+
static void usage(char* name)
{
fprintf(stderr, "%s crash_comment appname [params for app]\n", name);
}
-void fork_and_exec(char* file, int argc, char** argv)
+/*
+ * handle a crash. Open a display connection... create windows...
+ * ...
+ */
+static void handle_crash(int status, const char* question)
{
+ Display* display;
+ Font font;
+ XFontStruct *fs = NULL;
+ GC gc = 0;
+ Window win = 0, b1 = 0, b2 = 0;
+ char *title, *button1, *button2;
+ int wid, hih, mask, fw, fh, mh, button;
+ int ww = 320, hh = 240;
+ char line[1024];
+ int w, i, j, k;
+ XSetWindowAttributes att;
+ XGCValues gcv;
+ XEvent ev;
+ KeyCode key;
+
+ /* create the user interface */
+ display = XOpenDisplay(NULL);
+ if (!display) {
+ fprintf(stderr, "Opening the X display failed\n");
+ exit(-1);
+ }
+
+ font = XLoadFont(display, "fixed");
+ fs = XQueryFont(display, font);
+ if (!fs) {
+ fprintf(stderr, "XQueryFont failed\n");
+ exit(-1);
+ }
+
+ title = "Application Error";
+ button1 = "(F1) Restart";
+ button2 = "(F2) Exit";
+
+ wid = DisplayWidth(display, DefaultScreen(display));
+ hih = DisplayHeight(display, DefaultScreen(display));
+
+
+ att.background_pixel = WhitePixel(display, DefaultScreen(display));
+ att.border_pixel = BlackPixel(display, DefaultScreen(display));
+ att.override_redirect = True;
+ mask = CWBackPixel | CWBorderPixel | CWOverrideRedirect;
+
+ win = XCreateWindow(display, DefaultRootWindow(display),
+ (wid - ww) / 2, (hih - hh) / 2, ww, hh, 0,
+ CopyFromParent, InputOutput,
+ CopyFromParent, mask, &att);
+
+ b1 = XCreateWindow(display, win, -100, -100, 1, 1, 0, CopyFromParent,
+ InputOutput, CopyFromParent, mask, &att);
+ b2 = XCreateWindow(display, win, -100, -100, 1, 1, 0, CopyFromParent,
+ InputOutput, CopyFromParent, mask, &att);
+ XMapWindow(display, b1);
+ XMapWindow(display, b2);
+
+ gc = XCreateGC(display, win, 0, &gcv);
+ XSetForeground(display, gc, att.border_pixel);
+ XSelectInput(display, win, KeyPressMask | KeyReleaseMask | ExposureMask);
+
+ /* place the dialog */
+ XMapWindow(display, win);
+
+
+ /* handle the events */
+ fh = fs->ascent + fs->descent;
+ mh = ((ww - 20) / 2) - 20;
+
+ /* fixed size... */
+ w = 20;
+ XMoveResizeWindow(display, b1, w, hh - 15 - fh, mh + 10, fh + 10);
+ XSelectInput(display, b1, ButtonPressMask | ButtonReleaseMask |
ExposureMask);
+ w = ww - 20 - mh;
+ XMoveResizeWindow(display, b2, w, hh - 15 - fh, mh + 10, fh + 10);
+ XSelectInput(display, b2, ButtonPressMask | ButtonReleaseMask |
ExposureMask);
+
+ XMapWindow(display, win);
+ XGrabPointer(display, win, True, ButtonPressMask | ButtonReleaseMask,
+ GrabModeAsync, GrabModeAsync, None, None, CurrentTime);
+ XGrabKeyboard(display, win, False, GrabModeAsync, GrabModeAsync,
CurrentTime);
+ XSetInputFocus(display, win, RevertToPointerRoot, CurrentTime);
+ XSync(display, False);
+
+ button = 0;
+ for (; button == 0;) {
+ XNextEvent(display, &ev);
+ switch (ev.type) {
+ case KeyPress:
+ key = XKeysymToKeycode(display, XStringToKeysym("F1"));
+ if (key == ev.xkey.keycode) {
+ button = 1;
+ break;
+ }
+ key = XKeysymToKeycode(display, XStringToKeysym("F2"));
+ if (key == ev.xkey.keycode) {
+ button = 2;
+ break;
+ }
+ break;
+ case ButtonPress:
+ if (ev.xbutton.window == b1)
+ button = 1;
+ else if (ev.xbutton.window == b2)
+ button = 2;
+ break;
+ case Expose:
+ while (XCheckTypedWindowEvent(display, ev.xexpose.window, Expose,
&ev));
+
+ /* outline */
+ XDrawRectangle(display, win, gc, 0, 0, ww - 1, hh - 1);
+
+ XDrawRectangle(display, win, gc, 2, 2, ww - 4 - 1, fh + 4 - 1);
+
+ fw = XTextWidth(fs, title, strlen(title));
+ XDrawString(display, win, gc, 2 + 2 + ((ww - 4 - 4 - fw) / 2) , 2
+ 2 + fs->ascent, title, strlen(title));
+
+ i = 0;
+ j = 0;
+ k = 2 + fh + 4 + 2;
+ while (question[i]) {
+ line[j++] = question[i++];
+ if (line[j - 1] == '\n') {
+ line[j - 1] = 0;
+ j = 0;
+ XDrawString(display, win, gc, 4, k + fs->ascent, line,
strlen(line));
+ k += fh + 2;
+ }
+ }
+ fw = XTextWidth(fs, button2, strlen(button1));
+ XDrawRectangle(display, b1, gc, 0, 0, mh - 1, fh + 10 - 1);
+ XDrawString(display, b1, gc, 5 + ((mh - fw) / 2), 5 + fs->ascent,
button1, strlen(button1));
+
+ fw = XTextWidth(fs, button2, strlen(button2));
+ XDrawRectangle(display, b2, gc, 0, 0, mh - 1, fh + 10 - 1);
+ XDrawString(display, b2, gc, 5 + ((mh - fw) / 2), 5 + fs->ascent,
button2, strlen(button2));
+
+ XSync(display, False);
+ break;
+
+ default:
+ break;
+ }
+ }
+
+
+ /* destruct the X connection and give up the resources */
+ XDestroyWindow(display, win);
+ XFreeGC(display, gc);
+ XFreeFont(display, fs);
+ XSync(display, False);
+ XCloseDisplay(display);
+
+ switch (button) {
+ case 2:
+ fprintf(stderr, "Was asked to quit. Bye Bye\n");
+ exit(-11);
+ case 1:
+ default:
+ break;
+ }
+}
+
+
+/*
+ * Fork and execute the command, wait for the command to finish.
+ * On any kind of exit ask the user to restart
+ */
+int fork_and_exec(char* file, int argc, char** argv)
+{
pid_t pid = vfork();
if (pid == 0) {
@@ -36,7 +211,10 @@
while (waitpid(pid, &status, 0) != pid);
fprintf(stderr, "The process exited: %d normal: %d\n", status,
WIFEXITED(status));
+ return status;
}
+
+ assert(0);
}
int main(int argc, char** argv)
@@ -48,6 +226,11 @@
return EXIT_FAILURE;
}
+ if (strlen(argv[1]) >= 1024) {
+ fprintf(stderr, "The comment string has to be less than 1024 bytes\n");
+ return EXIT_FAILURE;
+ }
+
/* Create a list for execvp with a sentinel */
int commands = argc-3;
char** command_arguments = (char**) malloc(sizeof(char*)*(commands+1));
@@ -55,6 +238,8 @@
command_arguments[i] = argv[2+i];
command_arguments[commands] = NULL;
- for (;;)
- fork_and_exec(argv[2], commands, command_arguments);
+ for (;;) {
+ int status = fork_and_exec(argv[2], commands, command_arguments);
+ handle_crash(status, argv[1]);
+ }
}
--- End Message ---
_______________________________________________
commitlog mailing list
commitlog@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/commitlog