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. r4859 - in trunk/src/target/opkg: libopkg tests
      ([EMAIL PROTECTED])
   2. Openmoko's OpenEmbedded repository. This is used to build the
      Openmoko distribution: Changes to 'org.openmoko.dev'
      ([EMAIL PROTECTED])
   3. r4860 - trunk/src/host/sjf2410-linux ([EMAIL PROTECTED])
--- Begin Message ---
Author: tick
Date: 2008-12-08 16:26:11 +0100 (Mon, 08 Dec 2008)
New Revision: 4859

Modified:
   trunk/src/target/opkg/libopkg/active_list.c
   trunk/src/target/opkg/tests/opkg_active_list_test.c
Log:
opkg: implment active_list_clear()


Modified: trunk/src/target/opkg/libopkg/active_list.c
===================================================================
--- trunk/src/target/opkg/libopkg/active_list.c 2008-12-08 13:16:45 UTC (rev 
4858)
+++ trunk/src/target/opkg/libopkg/active_list.c 2008-12-08 15:26:11 UTC (rev 
4859)
@@ -71,7 +71,22 @@
     return prev;
 }
 
+static void list_head_clear (struct list_head *head) {
+    struct active_list *next;
+    struct list_head *n, *ptr;
+    if (!head)
+        return;
+    list_for_each_safe(ptr, n , head) {
+        next = list_entry(ptr, struct active_list, node);
+        if (next->depend.next != &next->depend) {
+            list_head_clear(&next->depend);
+        }
+        list_del_init(&next->node);
+        next->depended = NULL;
+    }
+}
 void active_list_clear(struct active_list *head) {
+    list_head_clear(&head->node);
 }
 
 void active_list_add_depend(struct active_list *node, struct active_list 
*depend) {

Modified: trunk/src/target/opkg/tests/opkg_active_list_test.c
===================================================================
--- trunk/src/target/opkg/tests/opkg_active_list_test.c 2008-12-08 13:16:45 UTC 
(rev 4858)
+++ trunk/src/target/opkg/tests/opkg_active_list_test.c 2008-12-08 15:26:11 UTC 
(rev 4859)
@@ -111,7 +111,8 @@
         test = list_entry(ptr, struct active_test, list);
         printf ("%s ",test->str);
     }
-    printf("\npos order: ");
+    printf("\nafter clear: ");
+    active_list_clear(&head);
     for(ptr = active_list_next(&head, NULL); ptr ;ptr = 
active_list_next(&head, ptr)) {
         test = list_entry(ptr, struct active_test, list);
         printf ("%s ",test->str);




--- End Message ---
--- Begin Message ---
 packages/linux/linux-openmoko.inc           |    9 ++++++++-
 packages/linux/linux-openmoko_2.6.24+git.bb |    2 +-
 2 files changed, 9 insertions(+), 2 deletions(-)

New commits:
commit f1af9f152d294b66dbfa3dcea8c0dad273ce8091
Author: Julian_chu <[EMAIL PROTECTED]>
Date:   Tue Dec 9 01:52:10 2008 +0800

    linux-openmoko: To Modify the post-install script then it
    will not flash kernel image after upgrade kernel if people
    boot from SD card.




--- End Message ---
--- Begin Message ---
Author: mickey
Date: 2008-12-09 10:47:14 +0100 (Tue, 09 Dec 2008)
New Revision: 4860

Modified:
   trunk/src/host/sjf2410-linux/ppt.c
Log:
This fixes compilation on non-x86.
Some platforms, such as PowerPC, don't have sys/io.h and don't support inb/outb.

Signed-off-by: Michael Buesch <[EMAIL PROTECTED]>


Modified: trunk/src/host/sjf2410-linux/ppt.c
===================================================================
--- trunk/src/host/sjf2410-linux/ppt.c  2008-12-08 15:26:11 UTC (rev 4859)
+++ trunk/src/host/sjf2410-linux/ppt.c  2008-12-09 09:47:14 UTC (rev 4860)
@@ -1,158 +1,161 @@
-#include <stdio.h>
-#ifdef __WINDOWS__
-#include <windows.h>
-#include <conio.h>
-#else
-#include <unistd.h>
-#include <stdlib.h>
-#include <sys/io.h>
-#include <linux/parport.h>
-#include <linux/ppdev.h>
-#include <sys/ioctl.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#endif
-#include "ppt.h"
-
-/* Add support for Linux host:
- * (C) 2006 by Harald Welte <[EMAIL PROTECTED]>
- *
- * Sponsored by FIC First International Computing, Taiwan.
- */
-
-int validPpt; 
-
-int GetValidPpt(void)
-{
-#ifdef __WINDOWS__
-       // search for valid parallel port
-       _outp(LPT1, 0x55);
-       if((int)_inp(LPT1) == 0x55)
-           return LPT1;
-       
-       _outp(LPT2, 0x55);
-       if((int)_inp(LPT2) == 0x55)
-           return LPT2;
-       
-       _outp(LPT3, 0x55);
-       if((int)_inp(LPT3) == 0x55)
-           return LPT3;
-
-       return 0;       
-#else
-#ifdef LINUX_PPDEV
-       int i, ppt;
-
-       ppt = open("/dev/parport0", O_WRONLY);
-       if (ppt < 0) {
-               fprintf(stderr, "can't open /dev/parport0\n");
-               return 0;
-       }
-
-       i = ioctl(ppt, PPCLAIM);
-       if (i < 0) {
-               fprintf(stderr, "can't claim device\n");
-               close(ppt);
-               return 0;
-       }
-       return ppt;
-#else
-       if (ioperm(LPT1, 3, 1) != 0) {
-               fprintf(stderr, "missing privileges for direct i/o");
-               exit(1);
-       }
-               
-       return LPT1;
-#endif
-#endif
-}
-
-#define ECP_ECR                    (0x402)
-#define ECR_STANDARD       (0x0)
-#define ECR_DISnERRORINT    (0x10)
-#define ECR_DISDMA         (0x0)
-#define ECR_DISSVCINT      (0x4)
-
-void SetPptCompMode(void)
-{
-#ifdef __WINDOWS__
-    //configure the parallel port at the compatibility mode.
-    _outp(validPpt+ECP_ECR,ECR_STANDARD | ECR_DISnERRORINT | ECR_DISDMA | 
ECR_DISSVCINT);
-#else
-#ifdef LINUX_PPDEV
-       int i;
-
-       i = PARPORT_MODE_COMPAT;
-       i = ioctl(validPpt, PPSETMODE, &i);
-       if (i < 0) {
-               fprintf(stderr, "can't set compatible mode\n");
-               close(validPpt);
-               exit(1);
-       }
-
-       i = IEEE1284_MODE_COMPAT;
-       i = ioctl(validPpt, PPNEGOT, &i);
-       if (i < 0) {
-               fprintf(stderr, "can't set compatible 1284 mode\n");
-               close(validPpt);
-               exit(1);
-       }
-#endif
-#endif
-}
-
-int InstallGiveIo(void)
-{
-#ifdef __WINDOWS__
-    HANDLE h;
-    OSVERSIONINFO osvi;
-    
-    osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
-    GetVersionEx(&osvi);
-       
-    if(osvi.dwPlatformId == VER_PLATFORM_WIN32_NT)
-    {
-       //OS=NT/2000
-       h = CreateFile("\\\\.\\giveio", GENERIC_READ, 0, NULL,
-                       OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
-       CloseHandle(h);
-       if(h == INVALID_HANDLE_VALUE)
-           return 0;
-       else
-           return 0x2000;
-    }
-    else
-    {  //OS=WIN98
-       return 0x0098;
-    }
-#endif
-}
-
-#ifndef __WINDOWS__
-#ifdef LINUX_PPDEV
-void OutputPpt(unsigned char value)
-{
-       int i = value;
-
-       ioctl(validPpt, PPWDATA, &i);
-}
-
-unsigned char InputPpt(void)
-{
-       int i;
-
-       ioctl(validPpt, PPRSTATUS, &i);
-
-       return (i & 0xff);
-}
-#else
-void OutputPpt(unsigned char value)
-{
-       outb(value, validPpt);
-}
-unsigned char InputPpt(void)
-{
-       return inb(validPpt+1);
-}
-#endif
-#endif
+#include <stdio.h>
+#ifdef __WINDOWS__
+#include <windows.h>
+#include <conio.h>
+#else
+#include <unistd.h>
+#include <stdlib.h>
+#ifdef LINUX_PPDEV
+#include <linux/parport.h>
+#include <linux/ppdev.h>
+#else
+#include <sys/io.h>
+#endif
+#include <sys/ioctl.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#endif
+#include "ppt.h"
+
+/* Add support for Linux host:
+ * (C) 2006 by Harald Welte <[EMAIL PROTECTED]>
+ *
+ * Sponsored by FIC First International Computing, Taiwan.
+ */
+
+int validPpt; 
+
+int GetValidPpt(void)
+{
+#ifdef __WINDOWS__
+       // search for valid parallel port
+       _outp(LPT1, 0x55);
+       if((int)_inp(LPT1) == 0x55)
+           return LPT1;
+       
+       _outp(LPT2, 0x55);
+       if((int)_inp(LPT2) == 0x55)
+           return LPT2;
+       
+       _outp(LPT3, 0x55);
+       if((int)_inp(LPT3) == 0x55)
+           return LPT3;
+
+       return 0;       
+#else
+#ifdef LINUX_PPDEV
+       int i, ppt;
+
+       ppt = open("/dev/parport0", O_WRONLY);
+       if (ppt < 0) {
+               fprintf(stderr, "can't open /dev/parport0\n");
+               return 0;
+       }
+
+       i = ioctl(ppt, PPCLAIM);
+       if (i < 0) {
+               fprintf(stderr, "can't claim device\n");
+               close(ppt);
+               return 0;
+       }
+       return ppt;
+#else
+       if (ioperm(LPT1, 3, 1) != 0) {
+               fprintf(stderr, "missing privileges for direct i/o");
+               exit(1);
+       }
+               
+       return LPT1;
+#endif
+#endif
+}
+
+#define ECP_ECR                    (0x402)
+#define ECR_STANDARD       (0x0)
+#define ECR_DISnERRORINT    (0x10)
+#define ECR_DISDMA         (0x0)
+#define ECR_DISSVCINT      (0x4)
+
+void SetPptCompMode(void)
+{
+#ifdef __WINDOWS__
+    //configure the parallel port at the compatibility mode.
+    _outp(validPpt+ECP_ECR,ECR_STANDARD | ECR_DISnERRORINT | ECR_DISDMA | 
ECR_DISSVCINT);
+#else
+#ifdef LINUX_PPDEV
+       int i;
+
+       i = PARPORT_MODE_COMPAT;
+       i = ioctl(validPpt, PPSETMODE, &i);
+       if (i < 0) {
+               fprintf(stderr, "can't set compatible mode\n");
+               close(validPpt);
+               exit(1);
+       }
+
+       i = IEEE1284_MODE_COMPAT;
+       i = ioctl(validPpt, PPNEGOT, &i);
+       if (i < 0) {
+               fprintf(stderr, "can't set compatible 1284 mode\n");
+               close(validPpt);
+               exit(1);
+       }
+#endif
+#endif
+}
+
+int InstallGiveIo(void)
+{
+#ifdef __WINDOWS__
+    HANDLE h;
+    OSVERSIONINFO osvi;
+    
+    osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
+    GetVersionEx(&osvi);
+       
+    if(osvi.dwPlatformId == VER_PLATFORM_WIN32_NT)
+    {
+       //OS=NT/2000
+       h = CreateFile("\\\\.\\giveio", GENERIC_READ, 0, NULL,
+                       OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
+       CloseHandle(h);
+       if(h == INVALID_HANDLE_VALUE)
+           return 0;
+       else
+           return 0x2000;
+    }
+    else
+    {  //OS=WIN98
+       return 0x0098;
+    }
+#endif
+}
+
+#ifndef __WINDOWS__
+#ifdef LINUX_PPDEV
+void OutputPpt(unsigned char value)
+{
+       int i = value;
+
+       ioctl(validPpt, PPWDATA, &i);
+}
+
+unsigned char InputPpt(void)
+{
+       int i;
+
+       ioctl(validPpt, PPRSTATUS, &i);
+
+       return (i & 0xff);
+}
+#else
+void OutputPpt(unsigned char value)
+{
+       outb(value, validPpt);
+}
+unsigned char InputPpt(void)
+{
+       return inb(validPpt+1);
+}
+#endif
+#endif




--- End Message ---
_______________________________________________
commitlog mailing list
commitlog@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/commitlog

Reply via email to