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. r1134 - trunk/src/target/u-boot/patches
      ([EMAIL PROTECTED])
   2. r1135 - trunk/src/target/u-boot/patches
      ([EMAIL PROTECTED])
   3. r1136 - trunk/src/target/u-boot/patches
      ([EMAIL PROTECTED])
   4. r1137 - trunk/src/target/u-boot/patches
      ([EMAIL PROTECTED])
   5. r1138 - trunk/oe/classes ([EMAIL PROTECTED])
   6. r1139 - trunk/oe/packages/linux ([EMAIL PROTECTED])
   7. r1140 - trunk/src/host/dfu-util/src ([EMAIL PROTECTED])
   8. r1141 - trunk/src/target/u-boot/patches
      ([EMAIL PROTECTED])
--- Begin Message ---
Author: laforge
Date: 2007-02-26 14:15:54 +0100 (Mon, 26 Feb 2007)
New Revision: 1134

Modified:
   trunk/src/target/u-boot/patches/uboot-arm920t_cp15_cmd.patch
Log:
sync cmd_arm920 with upstream uboot changes in makefile


Modified: trunk/src/target/u-boot/patches/uboot-arm920t_cp15_cmd.patch
===================================================================
--- trunk/src/target/u-boot/patches/uboot-arm920t_cp15_cmd.patch        
2007-02-26 07:24:58 UTC (rev 1133)
+++ trunk/src/target/u-boot/patches/uboot-arm920t_cp15_cmd.patch        
2007-02-26 13:15:54 UTC (rev 1134)
@@ -3,23 +3,23 @@
 
 Signed-off-by: Harald Welte <[EMAIL PROTECTED]>
 
-Index: u-boot.git/common/Makefile
+Index: u-boot/common/Makefile
 ===================================================================
---- u-boot.git.orig/common/Makefile    2007-02-05 20:37:13.000000000 +0100
-+++ u-boot.git/common/Makefile 2007-02-05 20:37:17.000000000 +0100
-@@ -28,7 +28,7 @@
+--- u-boot.orig/common/Makefile        2007-02-26 14:11:57.000000000 +0100
++++ u-boot/common/Makefile     2007-02-26 14:14:16.000000000 +0100
+@@ -27,7 +27,7 @@
+ 
  AOBJS =
  
- COBJS = main.o ACEX1K.o altera.o bedbug.o circbuf.o \
--        cmd_ace.o cmd_autoscript.o \
-+        cmd_ace.o cmd_arm920.o cmd_autoscript.o \
+-COBJS = main.o ACEX1K.o altera.o bedbug.o circbuf.o cmd_autoscript.o \
++COBJS = main.o ACEX1K.o altera.o bedbug.o circbuf.o cmd_arm920.o 
cmd_autoscript.o \
          cmd_bdinfo.o cmd_bedbug.o cmd_bmp.o cmd_boot.o cmd_bootm.o \
          cmd_cache.o cmd_console.o \
          cmd_date.o cmd_dcr.o cmd_diag.o cmd_display.o cmd_doc.o cmd_dtt.o \
-Index: u-boot.git/common/cmd_arm920.c
+Index: u-boot/common/cmd_arm920.c
 ===================================================================
 --- /dev/null  1970-01-01 00:00:00.000000000 +0000
-+++ u-boot.git/common/cmd_arm920.c     2007-02-05 20:37:41.000000000 +0100
++++ u-boot/common/cmd_arm920.c 2007-02-26 14:14:36.000000000 +0100
 @@ -0,0 +1,64 @@
 +/*
 + * (C) Copyright 2006 by OpenMoko, Inc.
@@ -66,7 +66,7 @@
 +              printf("Usage:\n%s\n", cmdtp->usage);
 +              return 1;
 +      }
-+      
++
 +      if (!strcmp(argv[2], "write")) {
 +              ulong val = simple_strtoul(argv[3], NULL, 16);
 +              printf("setting cp15c1 to 0x%08x\n", val);
@@ -85,10 +85,10 @@
 +      NULL
 +);
 +#endif        /* CFG_CMD_BDI */
-Index: u-boot.git/cpu/arm920t/cpu.c
+Index: u-boot/cpu/arm920t/cpu.c
 ===================================================================
---- u-boot.git.orig/cpu/arm920t/cpu.c  2007-02-05 20:37:13.000000000 +0100
-+++ u-boot.git/cpu/arm920t/cpu.c       2007-02-05 20:37:17.000000000 +0100
+--- u-boot.orig/cpu/arm920t/cpu.c      2007-02-26 04:37:19.000000000 +0100
++++ u-boot/cpu/arm920t/cpu.c   2007-02-26 14:13:31.000000000 +0100
 @@ -38,7 +38,7 @@
  #endif
  
@@ -107,4 +107,3 @@
  {
  #ifdef MMU_DEBUG
        printf ("write %08lx to p15/c1\n", value);
-




--- End Message ---
--- Begin Message ---
Author: laforge
Date: 2007-02-26 14:17:15 +0100 (Mon, 26 Feb 2007)
New Revision: 1135

Modified:
   trunk/src/target/u-boot/patches/uboot-mokoversion.patch
Log:
bump moko version


Modified: trunk/src/target/u-boot/patches/uboot-mokoversion.patch
===================================================================
--- trunk/src/target/u-boot/patches/uboot-mokoversion.patch     2007-02-26 
13:15:54 UTC (rev 1134)
+++ trunk/src/target/u-boot/patches/uboot-mokoversion.patch     2007-02-26 
13:17:15 UTC (rev 1135)
@@ -7,4 +7,4 @@
        fi
  fi
 +
-+printf '%s' -moko1
++printf '%s' -moko2




--- End Message ---
--- Begin Message ---
Author: laforge
Date: 2007-02-26 17:30:35 +0100 (Mon, 26 Feb 2007)
New Revision: 1136

Modified:
   trunk/src/target/u-boot/patches/uboot-dfu.patch
Log:
* add 6th altsetting and allow flashing of rootfs partition


Modified: trunk/src/target/u-boot/patches/uboot-dfu.patch
===================================================================
--- trunk/src/target/u-boot/patches/uboot-dfu.patch     2007-02-26 13:17:15 UTC 
(rev 1135)
+++ trunk/src/target/u-boot/patches/uboot-dfu.patch     2007-02-26 16:30:35 UTC 
(rev 1136)
@@ -1,7 +1,7 @@
 Index: u-boot/drivers/usbdcore_ep0.c
 ===================================================================
---- u-boot.orig/drivers/usbdcore_ep0.c 2007-02-26 04:20:02.000000000 +0100
-+++ u-boot/drivers/usbdcore_ep0.c      2007-02-26 04:31:03.000000000 +0100
+--- u-boot.orig/drivers/usbdcore_ep0.c 2007-02-26 17:25:03.000000000 +0100
++++ u-boot/drivers/usbdcore_ep0.c      2007-02-26 17:25:15.000000000 +0100
 @@ -42,10 +42,15 @@
   */
  
@@ -98,8 +98,8 @@
 Index: u-boot/drivers/usbdfu.c
 ===================================================================
 --- /dev/null  1970-01-01 00:00:00.000000000 +0000
-+++ u-boot/drivers/usbdfu.c    2007-02-26 04:23:14.000000000 +0100
-@@ -0,0 +1,943 @@
++++ u-boot/drivers/usbdfu.c    2007-02-26 17:25:15.000000000 +0100
+@@ -0,0 +1,954 @@
 +/*
 + * (C) 2007 by OpenMoko, Inc.
 + * Author: Harald Welte <[EMAIL PROTECTED]>
@@ -662,7 +662,7 @@
 +              .bLength                = USB_DT_CONFIG_SIZE,
 +              .bDescriptorType        = USB_DT_CONFIG,
 +              .wTotalLength           = USB_DT_CONFIG_SIZE +
-+                                      5*USB_DT_INTERFACE_SIZE +
++                                        DFU_NUM_ALTERNATES * 
USB_DT_INTERFACE_SIZE +
 +                                        USB_DT_DFU_SIZE,
 +              .bNumInterfaces         = 5,
 +              .bConfigurationValue    = 1,
@@ -729,6 +729,17 @@
 +              .bInterfaceProtocol     = 0x02,
 +              .iInterface             = 0,
 +      },
++      .uif[5] = {
++              .bLength                = USB_DT_INTERFACE_SIZE,
++              .bDescriptorType        = USB_DT_INTERFACE,
++              .bInterfaceNumber       = 0x00,
++              .bAlternateSetting      = 0x05,
++              .bNumEndpoints          = 0x00,
++              .bInterfaceClass        = 0xfe,
++              .bInterfaceSubClass     = 0x01,
++              .bInterfaceProtocol     = 0x02,
++              .iInterface             = 0,
++      },
 +      .func_dfu = DFU_FUNC_DESC,
 +};
 +
@@ -1045,11 +1056,11 @@
 +#endif /* CONFIG_USBD_DFU */
 Index: u-boot/drivers/Makefile
 ===================================================================
---- u-boot.orig/drivers/Makefile       2007-02-26 04:20:02.000000000 +0100
-+++ u-boot/drivers/Makefile    2007-02-26 04:23:14.000000000 +0100
+--- u-boot.orig/drivers/Makefile       2007-02-26 17:25:03.000000000 +0100
++++ u-boot/drivers/Makefile    2007-02-26 17:25:15.000000000 +0100
 @@ -46,7 +46,7 @@
          sl811_usb.o sm501.o smc91111.o smiLynxEM.o \
-         status_led.o sym53c8xx.o ahci.o \
+         status_led.o sym53c8xx.o systemace.o ahci.o \
          ti_pci1410a.o tigon3.o tsec.o \
 -        usbdcore.o usbdcore_ep0.o usbdcore_omap1510.o usbdcore_s3c2410.o 
usbtty.o \
 +        usbdcore.o usbdfu.o usbdcore_ep0.o usbdcore_omap1510.o 
usbdcore_s3c2410.o usbtty.o \
@@ -1058,8 +1069,8 @@
          pxa_pcmcia.o mpc8xx_pcmcia.o tqm8xx_pcmcia.o  \
 Index: u-boot/drivers/usbdcore.c
 ===================================================================
---- u-boot.orig/drivers/usbdcore.c     2007-02-26 04:20:02.000000000 +0100
-+++ u-boot/drivers/usbdcore.c  2007-02-26 04:23:14.000000000 +0100
+--- u-boot.orig/drivers/usbdcore.c     2007-02-26 17:25:03.000000000 +0100
++++ u-boot/drivers/usbdcore.c  2007-02-26 17:25:15.000000000 +0100
 @@ -31,6 +31,7 @@
  
  #include <malloc.h>
@@ -1114,8 +1125,8 @@
  }
 Index: u-boot/drivers/usbtty.c
 ===================================================================
---- u-boot.orig/drivers/usbtty.c       2007-02-26 04:20:02.000000000 +0100
-+++ u-boot/drivers/usbtty.c    2007-02-26 04:23:14.000000000 +0100
+--- u-boot.orig/drivers/usbtty.c       2007-02-26 17:25:03.000000000 +0100
++++ u-boot/drivers/usbtty.c    2007-02-26 17:25:15.000000000 +0100
 @@ -31,6 +31,8 @@
  #include "usbtty.h"
  #include "usb_cdc_acm.h"
@@ -1172,8 +1183,8 @@
        memset (bus_instance, 0, sizeof (struct usb_bus_instance));
 Index: u-boot/include/configs/neo1973.h
 ===================================================================
---- u-boot.orig/include/configs/neo1973.h      2007-02-26 04:23:14.000000000 
+0100
-+++ u-boot/include/configs/neo1973.h   2007-02-26 04:23:14.000000000 +0100
+--- u-boot.orig/include/configs/neo1973.h      2007-02-26 17:25:03.000000000 
+0100
++++ u-boot/include/configs/neo1973.h   2007-02-26 17:25:15.000000000 +0100
 @@ -165,7 +165,7 @@
   */
  #define CONFIG_STACKSIZE      (128*1024)      /* regular stack */
@@ -1197,7 +1208,7 @@
 Index: u-boot/include/usb_dfu.h
 ===================================================================
 --- /dev/null  1970-01-01 00:00:00.000000000 +0000
-+++ u-boot/include/usb_dfu.h   2007-02-26 04:23:14.000000000 +0100
++++ u-boot/include/usb_dfu.h   2007-02-26 17:25:15.000000000 +0100
 @@ -0,0 +1,94 @@
 +#ifndef _DFU_H
 +#define _DFU_H
@@ -1236,7 +1247,7 @@
 +#define DFU_FUNC_DESC  {                                              \
 +      .bLength                = USB_DT_DFU_SIZE,                      \
 +      .bDescriptorType        = USB_DT_DFU,                           \
-+      .bmAttributes           = USB_DFU_CAN_UPLOAD | USB_DFU_CAN_DOWNLOAD, \
++      .bmAttributes           = USB_DFU_CAN_UPLOAD | USB_DFU_CAN_DOWNLOAD | 
USB_DFU_MANIFEST_TOL, \
 +      .wDetachTimeOut         = 0xff00,                               \
 +      .wTransferSize          = CONFIG_USBD_DFU_XFER_SIZE,            \
 +      .bcdDFUVersion          = 0x0100,                               \
@@ -1271,7 +1282,7 @@
 +
 +#define ARRAY_SIZE(x)           (sizeof(x) / sizeof((x)[0]))
 +
-+#define DFU_NUM_ALTERNATES    5
++#define DFU_NUM_ALTERNATES    6
 +
 +struct _dfu_desc {
 +      struct usb_configuration_descriptor ucfg;
@@ -1296,7 +1307,7 @@
 Index: u-boot/include/usb_dfu_descriptors.h
 ===================================================================
 --- /dev/null  1970-01-01 00:00:00.000000000 +0000
-+++ u-boot/include/usb_dfu_descriptors.h       2007-02-26 04:23:14.000000000 
+0100
++++ u-boot/include/usb_dfu_descriptors.h       2007-02-26 17:25:15.000000000 
+0100
 @@ -0,0 +1,94 @@
 +#ifndef _USB_DFU_H
 +#define _USB_DFU_H
@@ -1394,8 +1405,8 @@
 +#endif /* _USB_DFU_H */
 Index: u-boot/include/usbdcore.h
 ===================================================================
---- u-boot.orig/include/usbdcore.h     2007-02-26 04:20:02.000000000 +0100
-+++ u-boot/include/usbdcore.h  2007-02-26 04:23:14.000000000 +0100
+--- u-boot.orig/include/usbdcore.h     2007-02-26 17:25:03.000000000 +0100
++++ u-boot/include/usbdcore.h  2007-02-26 17:25:15.000000000 +0100
 @@ -33,6 +33,7 @@
  
  #include <common.h>




--- End Message ---
--- Begin Message ---
Author: laforge
Date: 2007-02-26 17:32:34 +0100 (Mon, 26 Feb 2007)
New Revision: 1137

Modified:
   trunk/src/target/u-boot/patches/uboot-mokoversion.patch
Log:
bump revision to moko3


Modified: trunk/src/target/u-boot/patches/uboot-mokoversion.patch
===================================================================
--- trunk/src/target/u-boot/patches/uboot-mokoversion.patch     2007-02-26 
16:30:35 UTC (rev 1136)
+++ trunk/src/target/u-boot/patches/uboot-mokoversion.patch     2007-02-26 
16:32:34 UTC (rev 1137)
@@ -7,4 +7,4 @@
        fi
  fi
 +
-+printf '%s' -moko2
++printf '%s' -moko3




--- End Message ---
--- Begin Message ---
Author: laforge
Date: 2007-02-26 23:20:34 +0100 (Mon, 26 Feb 2007)
New Revision: 1138

Modified:
   trunk/oe/classes/sourcepkg.bbclass
Log:
some packages (the only known so far is base-files) end up with src_dir=/ and
thus want to include the contents of the whole buildhost filesystem in their
source package.  

This is not a fix, but a workaround.  If the path is '/', we don't create 
the source backage but rather print an error message into
$HOME/openembedded-source-missing.log

This needs a real fix.  I know mickeyl reads the changelog :)


Modified: trunk/oe/classes/sourcepkg.bbclass
===================================================================
--- trunk/oe/classes/sourcepkg.bbclass  2007-02-26 16:32:34 UTC (rev 1137)
+++ trunk/oe/classes/sourcepkg.bbclass  2007-02-26 22:20:34 UTC (rev 1138)
@@ -40,8 +40,12 @@
        cd ${WORKDIR}
        [EMAIL PROTECTED](d)}
        echo $src_tree
-       oenote "Creating 
${DEPLOY_DIR_SRC}/${P}-${PR}-${DISTRO}-${DISTRO_VERSION}.tar.gz"
-       tar cvzf 
${DEPLOY_DIR_SRC}/${P}-${PR}-${DISTRO}-${DISTRO_VERSION}.tar.gz 
--ignore-failed-read $src_tree
+       if [ "${src_tree}" != "/" ]; then
+               oenote "Creating 
${DEPLOY_DIR_SRC}/${P}-${PR}-${DISTRO}-${DISTRO_VERSION}.tar.gz"
+               tar cvzf 
${DEPLOY_DIR_SRC}/${P}-${PR}-${DISTRO}-${DISTRO_VERSION}.tar.gz 
--ignore-failed-read $src_tree
+       else
+               echo "Not creating 
${DEPLOY_DIR_SRC}/${P}-${PR}-${DISTRO}-${DISTRO_VERSION}.tar.gz because 
src_tree=/" >> ${HOME}/openembedded-source-missing.log
+       fi
 }
 
 EXPORT_FUNCTIONS do_archive_patched_sourcetree




--- End Message ---
--- Begin Message ---
Author: laforge
Date: 2007-02-26 23:20:59 +0100 (Mon, 26 Feb 2007)
New Revision: 1139

Modified:
   trunk/oe/packages/linux/linux-gta01_2.6.20.1.bb
   trunk/oe/packages/linux/linux-gta01_2.6.20.bb
Log:
we don't need two timestamps in the filename


Modified: trunk/oe/packages/linux/linux-gta01_2.6.20.1.bb
===================================================================
--- trunk/oe/packages/linux/linux-gta01_2.6.20.1.bb     2007-02-26 22:20:34 UTC 
(rev 1138)
+++ trunk/oe/packages/linux/linux-gta01_2.6.20.1.bb     2007-02-26 22:20:59 UTC 
(rev 1139)
@@ -88,12 +88,12 @@
 #
 do_deploy() {
        install -d ${DEPLOY_DIR_IMAGE}
-       install -m 0644 arch/${ARCH}/boot/${KERNEL_IMAGETYPE} 
${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${PV}-${PR}-${MACHINE}-${DATETIME}.bin
+       install -m 0644 arch/${ARCH}/boot/${KERNEL_IMAGETYPE} 
${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${PV}-${PR}-${MACHINE}.bin
        tar -cvzf 
${DEPLOY_DIR_IMAGE}/modules-${KERNEL_RELEASE}-${PR}-${MACHINE}.tgz -C ${D} lib
        arm-linux-objcopy -O binary -R .note -R .comment -S vmlinux linux.bin
        rm -f linux.bin.gz
        gzip -9 linux.bin
-       uboot-mkimage -A arm -O linux -T kernel -C gzip -a 30008000 -e 30008000 
-n "OpenMoko Kernel Image Neo1973(GTA01)" -d linux.bin.gz 
${DEPLOY_DIR_IMAGE}/uImage-${PV}-${PR}-${MACHINE}-${DATETIME}.bin
+       uboot-mkimage -A arm -O linux -T kernel -C gzip -a 30008000 -e 30008000 
-n "OpenMoko Kernel Image Neo1973(GTA01)" -d linux.bin.gz 
${DEPLOY_DIR_IMAGE}/uImage-${PV}-${PR}-${MACHINE}.bin
        rm -f linux.bin.gz
 }
 

Modified: trunk/oe/packages/linux/linux-gta01_2.6.20.bb
===================================================================
--- trunk/oe/packages/linux/linux-gta01_2.6.20.bb       2007-02-26 22:20:34 UTC 
(rev 1138)
+++ trunk/oe/packages/linux/linux-gta01_2.6.20.bb       2007-02-26 22:20:59 UTC 
(rev 1139)
@@ -88,12 +88,12 @@
 #
 do_deploy() {
        install -d ${DEPLOY_DIR_IMAGE}
-       install -m 0644 arch/${ARCH}/boot/${KERNEL_IMAGETYPE} 
${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${PV}-${PR}-${MACHINE}-${DATETIME}.bin
+       install -m 0644 arch/${ARCH}/boot/${KERNEL_IMAGETYPE} 
${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${PV}-${PR}-${MACHINE}.bin
        tar -cvzf 
${DEPLOY_DIR_IMAGE}/modules-${KERNEL_RELEASE}-${PR}-${MACHINE}.tgz -C ${D} lib
        arm-linux-objcopy -O binary -R .note -R .comment -S vmlinux linux.bin
        rm -f linux.bin.gz
        gzip -9 linux.bin
-       uboot-mkimage -A arm -O linux -T kernel -C gzip -a 30008000 -e 30008000 
-n "OpenMoko Kernel Image Neo1973(GTA01)" -d linux.bin.gz 
${DEPLOY_DIR_IMAGE}/uImage-${PV}-${PR}-${MACHINE}-${DATETIME}.bin
+       uboot-mkimage -A arm -O linux -T kernel -C gzip -a 30008000 -e 30008000 
-n "OpenMoko Kernel Image Neo1973(GTA01)" -d linux.bin.gz 
${DEPLOY_DIR_IMAGE}/uImage-${PV}-${PR}-${MACHINE}.bin
        rm -f linux.bin.gz
 }
 




--- End Message ---
--- Begin Message ---
Author: laforge
Date: 2007-02-27 00:36:55 +0100 (Tue, 27 Feb 2007)
New Revision: 1140

Modified:
   trunk/src/host/dfu-util/src/main.c
Log:
* be more 'aggressive' in trying to obtain the interface name
* use quotes around interface name
* fprintf needs 'stderr', whereas printf doesn't ;)


Modified: trunk/src/host/dfu-util/src/main.c
===================================================================
--- trunk/src/host/dfu-util/src/main.c  2007-02-26 22:20:59 UTC (rev 1139)
+++ trunk/src/host/dfu-util/src/main.c  2007-02-26 23:36:55 UTC (rev 1140)
@@ -137,10 +137,14 @@
        char name[MAX_STR_LEN+1] = "UNDEFINED";
 
        if_name_str_idx = 
dev->config[dfu_if->configuration].interface[dfu_if->interface].altsetting[dfu_if->altsetting].iInterface;
-       if (if_name_str_idx && dfu_if->dev_handle)
-               usb_get_string_simple(dfu_if->dev_handle, if_name_str_idx, 
name, MAX_STR_LEN);
+       if (if_name_str_idx) {
+               if (!dfu_if->dev_handle)
+                       dfu_if->dev_handle = usb_open(dfu_if->dev);
+               if (dfu_if->dev_handle)
+                       usb_get_string_simple(dfu_if->dev_handle, 
if_name_str_idx, name, MAX_STR_LEN);
+       }
 
-       printf("Found DFU %s: [0x%04x:0x%04x] devnum=%u, cfg=%u, intf=%u, 
alt=%u, name=%s\n", 
+       printf("Found %s: [0x%04x:0x%04x] devnum=%u, cfg=%u, intf=%u, alt=%u, 
name=\"%s\"\n", 
               dfu_if->flags & DFU_IFF_DFU ? "DFU" : "Runtime",
               dev->descriptor.idVendor, dev->descriptor.idProduct,
               dev->devnum, dfu_if->configuration, dfu_if->interface,
@@ -471,7 +475,7 @@
                        }
                        break;
                default:
-                       printf(stderr, "IMPOSSIBLE: Runtime device already in 
DFU state ?!?\n");
+                       fprintf(stderr, "IMPOSSIBLE: Runtime device already in 
DFU state ?!?\n");
                        exit(1);
                        break;
                }
@@ -627,7 +631,7 @@
 
        if (final_reset) {
                if (dfu_detach(dif->dev_handle, dif->interface, 1000) < 0) {
-                       fprintf("can't detach: %s\n", usb_strerror());
+                       fprintf(stderr, "can't detach: %s\n", usb_strerror());
                }
                printf("Resetting USB to swithc back to runtime mode\n");
                if (usb_reset(dif->dev_handle) < 0) {




--- End Message ---
--- Begin Message ---
Author: laforge
Date: 2007-02-27 00:40:59 +0100 (Tue, 27 Feb 2007)
New Revision: 1141

Modified:
   trunk/src/target/u-boot/patches/uboot-dfu.patch
Log:
* add support for putting NAND partition names into USB DFU altinterface string 
descriptors


Modified: trunk/src/target/u-boot/patches/uboot-dfu.patch
===================================================================
--- trunk/src/target/u-boot/patches/uboot-dfu.patch     2007-02-26 23:36:55 UTC 
(rev 1140)
+++ trunk/src/target/u-boot/patches/uboot-dfu.patch     2007-02-26 23:40:59 UTC 
(rev 1141)
@@ -1,7 +1,7 @@
 Index: u-boot/drivers/usbdcore_ep0.c
 ===================================================================
---- u-boot.orig/drivers/usbdcore_ep0.c 2007-02-26 17:25:03.000000000 +0100
-+++ u-boot/drivers/usbdcore_ep0.c      2007-02-26 17:25:15.000000000 +0100
+--- u-boot.orig/drivers/usbdcore_ep0.c 2007-02-27 00:38:10.000000000 +0100
++++ u-boot/drivers/usbdcore_ep0.c      2007-02-27 00:38:11.000000000 +0100
 @@ -42,10 +42,15 @@
   */
  
@@ -98,8 +98,8 @@
 Index: u-boot/drivers/usbdfu.c
 ===================================================================
 --- /dev/null  1970-01-01 00:00:00.000000000 +0000
-+++ u-boot/drivers/usbdfu.c    2007-02-26 17:25:15.000000000 +0100
-@@ -0,0 +1,954 @@
++++ u-boot/drivers/usbdfu.c    2007-02-27 00:38:11.000000000 +0100
+@@ -0,0 +1,995 @@
 +/*
 + * (C) 2007 by OpenMoko, Inc.
 + * Author: Harald Welte <[EMAIL PROTECTED]>
@@ -162,6 +162,7 @@
 +extern struct list_head devices;
 +
 +#include "usbdcore_s3c2410.h"
++#include "usbtty.h"                   /* for STR_* defs */
 +
 +#define RET_NOTHING   0
 +#define RET_ZLP               1
@@ -651,9 +652,9 @@
 +      .idVendor               = CONFIG_USBD_VENDORID,
 +      .idProduct              = CONFIG_USBD_PRODUCTID_DFU,
 +      .bcdDevice              = 0x0000,
-+      .iManufacturer          = 1,
-+      .iProduct               = 2,
-+      .iSerialNumber          = 0x00,
++      .iManufacturer          = DFU_STR_MANUFACTURER,
++      .iProduct               = DFU_STR_PRODUCT,
++      .iSerialNumber          = DFU_STR_SERIAL,
 +      .bNumConfigurations     = 0x01,
 +};
 +
@@ -666,11 +667,7 @@
 +                                        USB_DT_DFU_SIZE,
 +              .bNumInterfaces         = 5,
 +              .bConfigurationValue    = 1,
-+#ifdef CONFIG_USBD_STRING
-+              .iConfiguration         = 3,
-+#else
-+              .iConfiguration         = 0,
-+#endif
++              .iConfiguration         = DFU_STR_CONFIG,
 +              .bmAttributes           = BMATTRIBUTE_RESERVED,
 +              .bMaxPower              = 50,
 +      },
@@ -683,7 +680,7 @@
 +              .bInterfaceClass        = 0xfe,
 +              .bInterfaceSubClass     = 0x01,
 +              .bInterfaceProtocol     = 0x02,
-+              .iInterface             = 0,
++              .iInterface             = DFU_STR_ALT0,
 +      },
 +      .uif[1] = {
 +              .bLength                = USB_DT_INTERFACE_SIZE,
@@ -694,7 +691,7 @@
 +              .bInterfaceClass        = 0xfe,
 +              .bInterfaceSubClass     = 0x01,
 +              .bInterfaceProtocol     = 0x02,
-+              .iInterface             = 0,
++              .iInterface             = DFU_STR_ALT1,
 +      },
 +      .uif[2] = {
 +              .bLength                = USB_DT_INTERFACE_SIZE,
@@ -705,7 +702,7 @@
 +              .bInterfaceClass        = 0xfe,
 +              .bInterfaceSubClass     = 0x01,
 +              .bInterfaceProtocol     = 0x02,
-+              .iInterface             = 0,
++              .iInterface             = DFU_STR_ALT2,
 +      },
 +      .uif[3] = {
 +              .bLength                = USB_DT_INTERFACE_SIZE,
@@ -716,7 +713,7 @@
 +              .bInterfaceClass        = 0xfe,
 +              .bInterfaceSubClass     = 0x01,
 +              .bInterfaceProtocol     = 0x02,
-+              .iInterface             = 0,
++              .iInterface             = DFU_STR_ALT3,
 +      },
 +      .uif[4] = {
 +              .bLength                = USB_DT_INTERFACE_SIZE,
@@ -727,7 +724,7 @@
 +              .bInterfaceClass        = 0xfe,
 +              .bInterfaceSubClass     = 0x01,
 +              .bInterfaceProtocol     = 0x02,
-+              .iInterface             = 0,
++              .iInterface             = DFU_STR_ALT4,
 +      },
 +      .uif[5] = {
 +              .bLength                = USB_DT_INTERFACE_SIZE,
@@ -738,7 +735,7 @@
 +              .bInterfaceClass        = 0xfe,
 +              .bInterfaceSubClass     = 0x01,
 +              .bInterfaceProtocol     = 0x02,
-+              .iInterface             = 0,
++              .iInterface             = DFU_STR_ALT5,
 +      },
 +      .func_dfu = DFU_FUNC_DESC,
 +};
@@ -973,6 +970,48 @@
 +      return DFU_EP0_DATA;
 +}
 +
++void str2wide (char *str, u16 * wide);
++static struct usb_string_descriptor *create_usbstring(char *string)
++{
++      struct usb_string_descriptor *strdesc;
++      int size = sizeof(*strdesc) + strlen(string)*2;
++
++      if (size > 255)
++              return NULL;
++
++      strdesc = malloc(size);
++      if (!strdesc)
++              return NULL;
++
++      strdesc->bLength = size;
++      strdesc->bDescriptorType = USB_DT_STRING;
++      str2wide(string, strdesc->wData);
++
++      return strdesc;
++}
++
++
++static void dfu_init_strings(struct usb_device_instance *dev)
++{
++      int i;
++      struct usb_string_descriptor *strdesc;
++
++      strdesc = create_usbstring(CONFIG_DFU_CFG_STR);
++      usb_strings[DFU_STR_CONFIG] = strdesc;
++
++      for (i = 0; i < DFU_NUM_ALTERNATES; i++) {
++              if (i == 0) {
++                      strdesc = create_usbstring(CONFIG_DFU_ALT0_STR);
++              } else {
++                      struct part_info *part = get_partition_nand(i-1);
++                      if (!part)
++                              continue;
++                      strdesc = create_usbstring(part->name);
++              }
++              usb_strings[STR_COUNT+i+1] = strdesc;
++      }
++}
++
 +int dfu_init_instance(struct usb_device_instance *dev)
 +{
 +      dev->dfu_dev_desc = &dfu_dev_descriptor;
@@ -980,6 +1019,8 @@
 +      dev->dfu_state = DFU_STATE_appIDLE;
 +      dev->dfu_status = DFU_STATUS_OK;
 +
++      dfu_init_strings(dev);
++
 +      return 0;
 +}
 +
@@ -1056,8 +1097,8 @@
 +#endif /* CONFIG_USBD_DFU */
 Index: u-boot/drivers/Makefile
 ===================================================================
---- u-boot.orig/drivers/Makefile       2007-02-26 17:25:03.000000000 +0100
-+++ u-boot/drivers/Makefile    2007-02-26 17:25:15.000000000 +0100
+--- u-boot.orig/drivers/Makefile       2007-02-27 00:38:10.000000000 +0100
++++ u-boot/drivers/Makefile    2007-02-27 00:38:11.000000000 +0100
 @@ -46,7 +46,7 @@
          sl811_usb.o sm501.o smc91111.o smiLynxEM.o \
          status_led.o sym53c8xx.o systemace.o ahci.o \
@@ -1069,8 +1110,8 @@
          pxa_pcmcia.o mpc8xx_pcmcia.o tqm8xx_pcmcia.o  \
 Index: u-boot/drivers/usbdcore.c
 ===================================================================
---- u-boot.orig/drivers/usbdcore.c     2007-02-26 17:25:03.000000000 +0100
-+++ u-boot/drivers/usbdcore.c  2007-02-26 17:25:15.000000000 +0100
+--- u-boot.orig/drivers/usbdcore.c     2007-02-27 00:37:59.000000000 +0100
++++ u-boot/drivers/usbdcore.c  2007-02-27 00:38:11.000000000 +0100
 @@ -31,6 +31,7 @@
  
  #include <malloc.h>
@@ -1125,8 +1166,8 @@
  }
 Index: u-boot/drivers/usbtty.c
 ===================================================================
---- u-boot.orig/drivers/usbtty.c       2007-02-26 17:25:03.000000000 +0100
-+++ u-boot/drivers/usbtty.c    2007-02-26 17:25:15.000000000 +0100
+--- u-boot.orig/drivers/usbtty.c       2007-02-27 00:38:10.000000000 +0100
++++ u-boot/drivers/usbtty.c    2007-02-27 00:38:11.000000000 +0100
 @@ -31,6 +31,8 @@
  #include "usbtty.h"
  #include "usb_cdc_acm.h"
@@ -1136,6 +1177,15 @@
  #include <config.h>           /* If defined, override Linux identifiers with
                                 * vendor specific ones */
  
+@@ -118,7 +120,7 @@
+ static unsigned short rx_endpoint = 0;
+ static unsigned short tx_endpoint = 0;
+ static unsigned short interface_count = 0;
+-static struct usb_string_descriptor *usbtty_string_table[STR_COUNT];
++static struct usb_string_descriptor *usbtty_string_table[NUM_STRINGS];
+ 
+ /* USB Descriptor Strings */
+ static u8 wstrLang[4] = {4,USB_DT_STRING,0x9,0x4};
 @@ -169,6 +171,10 @@
        struct usb_interface_descriptor data_class_interface;
        struct usb_endpoint_descriptor 
@@ -1171,6 +1221,15 @@
        },
  };    
  
+@@ -390,7 +405,7 @@
+ void usbtty_poll (void);
+ 
+ /* utility function for converting char* to wide string used by USB */
+-static void str2wide (char *str, u16 * wide)
++void str2wide (char *str, u16 * wide)
+ {
+       int i;
+       for (i = 0; i < strlen (str) && str[i]; i++){
 @@ -652,6 +667,9 @@
        device_instance->bus = bus_instance;
        device_instance->configurations = NUM_CONFIGS;
@@ -1183,8 +1242,8 @@
        memset (bus_instance, 0, sizeof (struct usb_bus_instance));
 Index: u-boot/include/configs/neo1973.h
 ===================================================================
---- u-boot.orig/include/configs/neo1973.h      2007-02-26 17:25:03.000000000 
+0100
-+++ u-boot/include/configs/neo1973.h   2007-02-26 17:25:15.000000000 +0100
+--- u-boot.orig/include/configs/neo1973.h      2007-02-27 00:38:11.000000000 
+0100
++++ u-boot/include/configs/neo1973.h   2007-02-27 00:38:11.000000000 +0100
 @@ -165,7 +165,7 @@
   */
  #define CONFIG_STACKSIZE      (128*1024)      /* regular stack */
@@ -1208,8 +1267,8 @@
 Index: u-boot/include/usb_dfu.h
 ===================================================================
 --- /dev/null  1970-01-01 00:00:00.000000000 +0000
-+++ u-boot/include/usb_dfu.h   2007-02-26 17:25:15.000000000 +0100
-@@ -0,0 +1,94 @@
++++ u-boot/include/usb_dfu.h   2007-02-27 00:39:48.000000000 +0100
+@@ -0,0 +1,97 @@
 +#ifndef _DFU_H
 +#define _DFU_H
 +
@@ -1254,7 +1313,6 @@
 +}
 +
 +/* USB Interface descriptor in Runtime mode */
-+#ifdef CONFIG_USB_STRING
 +#define DFU_RT_IF_DESC        {                                               
\
 +      .bLength                = USB_DT_INTERFACE_SIZE,                \
 +      .bDescriptorType        = USB_DT_INTERFACE,                     \
@@ -1264,26 +1322,30 @@
 +      .bInterfaceClass        = 0xfe,                                 \
 +      .bInterfaceSubClass     = 0x01,                                 \
 +      .bInterfaceProtocol     = 0x01,                                 \
-+      .iInterface             = 1,                                    \
++      .iInterface             = DFU_STR_CONFIG,                       \
 +}
-+#else
-+#define DFU_RT_IF_DESC        {                                               
\
-+      .bLength                = USB_DT_INTERFACE_SIZE,                \
-+      .bDescriptorType        = USB_DT_INTERFACE,                     \
-+      .bInterfaceNumber       = CONFIG_USBD_DFU_INTERFACE,            \
-+      .bAlternateSetting      = 0x00,                                 \
-+      .bNumEndpoints          = 0x00,                                 \
-+      .bInterfaceClass        = 0xfe,                                 \
-+      .bInterfaceSubClass     = 0x01,                                 \
-+      .bInterfaceProtocol     = 0x01,                                 \
-+      .iInterface             = 0,                                    \
-+}
-+#endif
 +
 +#define ARRAY_SIZE(x)           (sizeof(x) / sizeof((x)[0]))
 +
 +#define DFU_NUM_ALTERNATES    6
 +
++#define DFU_STR_MANUFACTURER  STR_MANUFACTURER
++#define DFU_STR_PRODUCT               STR_PRODUCT
++#define DFU_STR_SERIAL                STR_SERIAL
++#define DFU_STR_CONFIG                (STR_COUNT)
++#define DFU_STR_ALT0          (STR_COUNT+1)
++#define DFU_STR_ALT1          (STR_COUNT+2)
++#define DFU_STR_ALT2          (STR_COUNT+3)
++#define DFU_STR_ALT3          (STR_COUNT+4)
++#define DFU_STR_ALT4          (STR_COUNT+5)
++#define DFU_STR_ALT5          (STR_COUNT+6)
++#define DFU_STR_COUNT         (STR_COUNT+7)
++
++#define DFU_NUM_STRINGS               (STR_COUNT+8)
++
++#define CONFIG_DFU_CFG_STR    "USB Device Firmware Upgrade"
++#define CONFIG_DFU_ALT0_STR   "RAM 0x32000000"
++
 +struct _dfu_desc {
 +      struct usb_configuration_descriptor ucfg;
 +      struct usb_interface_descriptor uif[DFU_NUM_ALTERNATES];
@@ -1307,7 +1369,7 @@
 Index: u-boot/include/usb_dfu_descriptors.h
 ===================================================================
 --- /dev/null  1970-01-01 00:00:00.000000000 +0000
-+++ u-boot/include/usb_dfu_descriptors.h       2007-02-26 17:25:15.000000000 
+0100
++++ u-boot/include/usb_dfu_descriptors.h       2007-02-27 00:38:11.000000000 
+0100
 @@ -0,0 +1,94 @@
 +#ifndef _USB_DFU_H
 +#define _USB_DFU_H
@@ -1405,8 +1467,8 @@
 +#endif /* _USB_DFU_H */
 Index: u-boot/include/usbdcore.h
 ===================================================================
---- u-boot.orig/include/usbdcore.h     2007-02-26 17:25:03.000000000 +0100
-+++ u-boot/include/usbdcore.h  2007-02-26 17:25:15.000000000 +0100
+--- u-boot.orig/include/usbdcore.h     2007-02-27 00:38:10.000000000 +0100
++++ u-boot/include/usbdcore.h  2007-02-27 00:38:11.000000000 +0100
 @@ -33,6 +33,7 @@
  
  #include <common.h>
@@ -1440,3 +1502,27 @@
  };
  
  /* Bus Interface configuration structure
+@@ -632,6 +643,8 @@
+ extern char *usbd_device_requests[];
+ extern char *usbd_device_descriptors[];
+ 
++extern struct usb_string_descriptor **usb_strings;
++
+ void urb_link_init (urb_link * ul);
+ void urb_detach (struct urb *urb);
+ urb_link *first_urb_link (urb_link * hd);
+Index: u-boot/drivers/usbtty.h
+===================================================================
+--- u-boot.orig/drivers/usbtty.h       2007-02-27 00:38:10.000000000 +0100
++++ u-boot/drivers/usbtty.h    2007-02-27 00:38:11.000000000 +0100
+@@ -71,4 +71,10 @@
+ #define STR_CTRL_INTERFACE    0x06
+ #define STR_COUNT             0x07
+ 
++#ifdef CONFIG_USBD_DFU
++#define NUM_STRINGS           DFU_STR_COUNT
++#else
++#define NUM_STRINGS           STR_COUNT
++#endif
++
+ #endif




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

Reply via email to