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. r1086 - trunk/src/target/u-boot/patches ([EMAIL PROTECTED])
2. r1087 - trunk/src/target/u-boot/patches ([EMAIL PROTECTED])
3. r1088 - trunk/src/host/dfu-util/src ([EMAIL PROTECTED])
4. r1089 - trunk/src/host/dfu-util/src ([EMAIL PROTECTED])
5. r1090 - trunk/src/target/u-boot/patches ([EMAIL PROTECTED])
6. r1091 - trunk/src/target/u-boot/patches ([EMAIL PROTECTED])
7. r1092 - trunk/src/target/u-boot/patches
([EMAIL PROTECTED])
--- Begin Message ---
Author: werner
Date: 2007-02-23 20:49:03 +0100 (Fri, 23 Feb 2007)
New Revision: 1086
Modified:
trunk/src/target/u-boot/patches/nand-dynamic_partitions.patch
trunk/src/target/u-boot/patches/uboot-20061030-neo1973.patch
trunk/src/target/u-boot/patches/uboot-s3c2410-nand.patch
Log:
uboot-20061030-neo1973.patch:
include/configs/neo1973.h: added CFG_UBOOT_SIZE, the number of bytes to load
from NAND
uboot-s3c2410-nand.patch:
cpu/arm920t/start.S: use CFG_UBOOT_SIZE instead of hard-coded 0x30000
nand-dynamic_partitions.patch:
drivers/nand/nand_bbt.c (part_size): increased u-boot partition from 0x30000 to
0x40000 (through CFG_UBOOT_SIZE), reduced "splash" partition from 0x130000 to
0xa0000, and make "rootfs" partition just fill the rest
Modified: trunk/src/target/u-boot/patches/nand-dynamic_partitions.patch
===================================================================
--- trunk/src/target/u-boot/patches/nand-dynamic_partitions.patch
2007-02-23 19:20:04 UTC (rev 1085)
+++ trunk/src/target/u-boot/patches/nand-dynamic_partitions.patch
2007-02-23 19:49:03 UTC (rev 1086)
@@ -17,9 +17,9 @@
Index: u-boot/drivers/nand/nand_bbt.c
===================================================================
---- u-boot.orig/drivers/nand/nand_bbt.c 2007-02-16 23:53:09.000000000
+0100
-+++ u-boot/drivers/nand/nand_bbt.c 2007-02-16 23:53:36.000000000 +0100
-@@ -1049,4 +1049,61 @@
+--- u-boot.orig/drivers/nand/nand_bbt.c
++++ u-boot/drivers/nand/nand_bbt.c
+@@ -1049,4 +1049,63 @@ int nand_isbad_bbt (struct mtd_info *mtd
return 1;
}
@@ -31,8 +31,10 @@
+ "initrd" is sized such that it can hold two uncompressed 16 bit 640*480
+ images: 640*480*2*2 = 1228800 < 1245184. */
+
-+static unsigned int part_size[] = { 0x30000, 0x4000, 0x200000, 0x130000,
0x3c9c000 };
-+static char *part_names[] = { "u-boot", "u-boot_env", "kernel", "splash",
"rootfs" };
++static unsigned int part_size[] = {
++ CFG_UBOOT_SIZE, 0x4000, 0x200000, 0xa0000, 0x3d5c000-CFG_UBOOT_SIZE };
++static char *part_names[] = {
++ "u-boot", "u-boot_env", "kernel", "splash", "rootfs" };
+
+int nand_create_mtd_dynpart(struct mtd_info *mtd)
+{
@@ -83,9 +85,9 @@
#endif
Index: u-boot/include/configs/neo1973.h
===================================================================
---- u-boot.orig/include/configs/neo1973.h 2007-02-16 23:53:34.000000000
+0100
-+++ u-boot/include/configs/neo1973.h 2007-02-16 23:53:36.000000000 +0100
-@@ -102,7 +102,7 @@
+--- u-boot.orig/include/configs/neo1973.h
++++ u-boot/include/configs/neo1973.h
+@@ -99,7 +99,7 @@
CFG_CMD_ELF | \
CFG_CMD_MISC | \
/* CFG_CMD_USB | */ \
@@ -94,7 +96,7 @@
CFG_CMD_DIAG | \
/* CFG_CMD_HWFLOW | */ \
CFG_CMD_SAVES | \
-@@ -212,13 +212,13 @@
+@@ -209,13 +209,13 @@
#define CONFIG_FAT 1
#define CONFIG_SUPPORT_VFAT 1
@@ -111,7 +113,7 @@
#endif
/* ATAG configuration */
-@@ -254,4 +254,7 @@
+@@ -251,4 +251,7 @@
#define CONFIG_S3C2410_NAND_BBT 1
@@ -121,9 +123,9 @@
#endif /* __CONFIG_H */
Index: u-boot/common/cmd_jffs2.c
===================================================================
---- u-boot.orig/common/cmd_jffs2.c 2007-02-16 23:53:09.000000000 +0100
-+++ u-boot/common/cmd_jffs2.c 2007-02-16 23:53:36.000000000 +0100
-@@ -2123,6 +2123,18 @@
+--- u-boot.orig/common/cmd_jffs2.c
++++ u-boot/common/cmd_jffs2.c
+@@ -2132,6 +2132,18 @@ int do_jffs2_mtdparts(cmd_tbl_t *cmdtp,
printf ("Usage:\n%s\n", cmdtp->usage);
return 1;
}
@@ -142,7 +144,7 @@
#endif /* #ifdef CONFIG_JFFS2_CMDLINE */
/***************************************************/
-@@ -2188,6 +2200,13 @@
+@@ -2197,6 +2209,13 @@ U_BOOT_CMD(
"<name> := '(' NAME ')'\n"
"<ro-flag> := when set to 'ro' makes partition read-only (not used,
passed to kernel)\n"
);
Modified: trunk/src/target/u-boot/patches/uboot-20061030-neo1973.patch
===================================================================
--- trunk/src/target/u-boot/patches/uboot-20061030-neo1973.patch
2007-02-23 19:20:04 UTC (rev 1085)
+++ trunk/src/target/u-boot/patches/uboot-20061030-neo1973.patch
2007-02-23 19:49:03 UTC (rev 1086)
@@ -695,7 +695,7 @@
===================================================================
--- /dev/null
+++ u-boot/include/configs/neo1973.h
-@@ -0,0 +1,257 @@
+@@ -0,0 +1,259 @@
+/*
+ * (C) Copyright 2006 OpenMoko, Inc.
+ * Author: Harald Welte <[EMAIL PROTECTED]>
@@ -734,6 +734,8 @@
+#define CONFIG_S3C2410_NAND_SKIP_BAD 1
+#endif
+
++#define CFG_UBOOT_SIZE 0x40000 /* size of u-boot, for NAND
loading */
++
+/*
+ * High Level Configuration Options
+ * (easy to change)
Modified: trunk/src/target/u-boot/patches/uboot-s3c2410-nand.patch
===================================================================
--- trunk/src/target/u-boot/patches/uboot-s3c2410-nand.patch 2007-02-23
19:20:04 UTC (rev 1085)
+++ trunk/src/target/u-boot/patches/uboot-s3c2410-nand.patch 2007-02-23
19:49:03 UTC (rev 1086)
@@ -5,9 +5,9 @@
Index: u-boot/cpu/arm920t/s3c24x0/Makefile
===================================================================
---- u-boot.orig/cpu/arm920t/s3c24x0/Makefile 2007-02-20 01:18:11.000000000
+0100
-+++ u-boot/cpu/arm920t/s3c24x0/Makefile 2007-02-20 01:18:51.000000000
+0100
-@@ -26,7 +26,7 @@
+--- u-boot.orig/cpu/arm920t/s3c24x0/Makefile
++++ u-boot/cpu/arm920t/s3c24x0/Makefile
+@@ -26,7 +26,7 @@ include $(TOPDIR)/config.mk
LIB = $(obj)lib$(SOC).a
COBJS = i2c.o interrupts.o serial.o speed.o \
@@ -18,8 +18,8 @@
OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS))
Index: u-boot/cpu/arm920t/s3c24x0/nand.c
===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ u-boot/cpu/arm920t/s3c24x0/nand.c 2007-02-20 01:18:23.000000000 +0100
+--- /dev/null
++++ u-boot/cpu/arm920t/s3c24x0/nand.c
@@ -0,0 +1,185 @@
+/*
+ * (C) Copyright 2006 OpenMoko, Inc.
@@ -208,8 +208,8 @@
+#endif
Index: u-boot/cpu/arm920t/s3c24x0/nand_read.c
===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ u-boot/cpu/arm920t/s3c24x0/nand_read.c 2007-02-20 01:19:20.000000000
+0100
+--- /dev/null
++++ u-boot/cpu/arm920t/s3c24x0/nand_read.c
@@ -0,0 +1,98 @@
+/*
+ * nand_read.c: Simple NAND read functions for booting from NAND
@@ -311,8 +311,8 @@
+#endif /* CONFIG_S3C2410_NAND_BOOT */
Index: u-boot/cpu/arm920t/start.S
===================================================================
---- u-boot.orig/cpu/arm920t/start.S 2007-02-20 01:18:11.000000000 +0100
-+++ u-boot/cpu/arm920t/start.S 2007-02-20 01:18:23.000000000 +0100
+--- u-boot.orig/cpu/arm920t/start.S
++++ u-boot/cpu/arm920t/start.S
@@ -5,6 +5,10 @@
* Copyright (c) 2002 Alex Z�pke <[EMAIL PROTECTED]>
* Copyright (c) 2002 Gary Jennejohn <[EMAIL PROTECTED]>
@@ -332,7 +332,7 @@
/*
-@@ -161,6 +166,7 @@
+@@ -161,6 +166,7 @@ reset:
#endif
#ifndef CONFIG_SKIP_RELOCATE_UBOOT
@@ -340,7 +340,7 @@
relocate: /* relocate U-Boot to RAM */
adr r0, _start /* r0 <- current position of code */
ldr r1, _TEXT_BASE /* test if we run from flash or RAM */
-@@ -177,6 +183,93 @@
+@@ -177,6 +183,93 @@ copy_loop:
stmia r1!, {r3-r10} /* copy to target address [r1] */
cmp r0, r2 /* until source end addreee [r2] */
ble copy_loop
@@ -386,7 +386,7 @@
+ @ copy u-boot to RAM
+ ldr r0, _TEXT_BASE
+ mov r1, #0x0
-+ mov r2, #0x30000
++ mov r2, #CFG_UBOOT_SIZE
+ bl nand_read_ll
+
+ tst r0, #0x0
@@ -436,8 +436,8 @@
/* Set up the stack */
Index: u-boot/include/s3c2410.h
===================================================================
---- u-boot.orig/include/s3c2410.h 2007-02-20 01:18:20.000000000 +0100
-+++ u-boot/include/s3c2410.h 2007-02-20 01:18:23.000000000 +0100
+--- u-boot.orig/include/s3c2410.h
++++ u-boot/include/s3c2410.h
@@ -38,12 +38,6 @@
#define S3C2410_ECCSIZE 512
#define S3C2410_ECCBYTES 3
@@ -451,7 +451,7 @@
/* S3C2410 device base addresses */
#define S3C24X0_MEMCTL_BASE 0x48000000
#define S3C24X0_USB_HOST_BASE 0x49000000
-@@ -65,9 +59,23 @@
+@@ -65,9 +59,23 @@ typedef enum {
#define S3C2410_SDI_BASE 0x5A000000
@@ -475,7 +475,7 @@
static inline S3C24X0_MEMCTL * S3C24X0_GetBase_MEMCTL(void)
{
-@@ -142,6 +150,7 @@
+@@ -142,6 +150,7 @@ static inline S3C2410_SDI * S3C2410_GetB
return (S3C2410_SDI * const)S3C2410_SDI_BASE;
}
--- End Message ---
--- Begin Message ---
Author: werner
Date: 2007-02-23 21:25:22 +0100 (Fri, 23 Feb 2007)
New Revision: 1087
Added:
trunk/src/target/u-boot/patches/lowlevel_foo.patch
Modified:
trunk/src/target/u-boot/patches/series
Log:
Merged low_level.bin from http://people.openmoko.org/laforge/tmp/bbt-20070206/
into regular u-boot build.
Added: trunk/src/target/u-boot/patches/lowlevel_foo.patch
===================================================================
--- trunk/src/target/u-boot/patches/lowlevel_foo.patch 2007-02-23 19:49:03 UTC
(rev 1086)
+++ trunk/src/target/u-boot/patches/lowlevel_foo.patch 2007-02-23 20:25:22 UTC
(rev 1087)
@@ -0,0 +1,195 @@
+board/neo1973/lowlevel_foo.S:
http://people.openmoko.org/laforge/tmp/bbt-20070206/lowlevel_foo.S
+board/neo1973/lowlevel_foo.lds:
http://people.openmoko.org/laforge/tmp/bbt-20070206/lowlevel_foo.lds
+board/neo1973/Makefile: added building of lowlevel_foo.bin (based on
+ http://people.openmoko.org/laforge/tmp/bbt-20070206/lowlevel_foo.build.sh)
+
+Index: u-boot/board/neo1973/lowlevel_foo.S
+===================================================================
+--- /dev/null
++++ u-boot/board/neo1973/lowlevel_foo.S
+@@ -0,0 +1,82 @@
++
++_start:
++ b reset
++undefvec:
++ b undefvec
++swivec:
++ b swivec
++pabtvec:
++ b pabtvec
++dabtvec:
++ b dabtvec
++rsvdvec:
++ b rsvdvec
++irqvec:
++ b irqvec
++fiqvec:
++ b fiqvec
++
++reset:
++ /*
++ * set the cpu to SVC32 mode
++ */
++ mrs r0,cpsr
++ bic r0,r0,#0x1f
++ orr r0,r0,#0xd3
++ msr cpsr,r0
++
++/* turn off the watchdog */
++#define pWTCON 0x53000000
++#define INTMSK 0x4A000008 /* Interupt-Controller base
addresses */
++#define INTSUBMSK 0x4A00001C
++#define CLKDIVN 0x4C000014 /* clock divisor register */
++
++ ldr r0, =pWTCON
++ mov r1, #0x0
++ str r1, [r0]
++
++ mov r1, #0xffffffff
++ ldr r0, =INTMSK
++ str r1, [r0]
++ ldr r1, =0x3ff
++ ldr r0, =INTSUBMSK
++ str r1, [r0]
++
++ /* FCLK:HCLK:PCLK = 1:2:4 */
++ /* default FCLK is 120 MHz ! */
++ ldr r0, =CLKDIVN
++ mov r1, #3
++ str r1, [r0]
++
++ bl cpu_init_crit
++ ldr r0,=TEXT_BASE
++ mov pc, r0
++
++cpu_init_crit:
++ /*
++ * flush v4 I/D caches
++ */
++ mov r0, #0
++ mcr p15, 0, r0, c7, c7, 0 /* flush v3/v4 cache */
++ mcr p15, 0, r0, c8, c7, 0 /* flush v4 TLB */
++
++ /*
++ * disable MMU stuff and caches
++ */
++ mrc p15, 0, r0, c1, c0, 0
++ bic r0, r0, #0x00002300 @ clear bits 13, 9:8 (--V- --RS)
++ bic r0, r0, #0x00000087 @ clear bits 7, 2:0 (B--- -CAM)
++ orr r0, r0, #0x00000002 @ set bit 2 (A) Align
++ orr r0, r0, #0x00001000 @ set bit 12 (I) I-Cache
++ mcr p15, 0, r0, c1, c0, 0
++
++ /*
++ * before relocating, we have to setup RAM timing
++ * because memory timing is board-dependend, you will
++ * find a lowlevel_init.S in your board directory.
++ */
++ mov ip, lr
++ bl lowlevel_init
++ mov lr, ip
++ mov pc, lr
++
+Index: u-boot/board/neo1973/lowlevel_foo.lds
+===================================================================
+--- /dev/null
++++ u-boot/board/neo1973/lowlevel_foo.lds
+@@ -0,0 +1,56 @@
++/*
++ * (C) Copyright 2002
++ * Gary Jennejohn, DENX Software Engineering, <[EMAIL PROTECTED]>
++ *
++ * See file CREDITS for list of people who contributed to this
++ * project.
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License as
++ * published by the Free Software Foundation; either version 2 of
++ * the License, or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ * MA 02111-1307 USA
++ */
++
++OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
++OUTPUT_ARCH(arm)
++ENTRY(_start)
++SECTIONS
++{
++ . = 0x00000000;
++
++ . = ALIGN(4);
++ .text :
++ {
++ lowlevel_foo.o (.text)
++ *(.text)
++ }
++
++ . = ALIGN(4);
++ .rodata : { *(.rodata) }
++
++ . = ALIGN(4);
++ .data : { *(.data) }
++
++ . = ALIGN(4);
++ .got : { *(.got) }
++
++ . = .;
++ __u_boot_cmd_start = .;
++ .u_boot_cmd : { *(.u_boot_cmd) }
++ __u_boot_cmd_end = .;
++
++ . = ALIGN(4);
++ __bss_start = .;
++ .bss : { *(.bss) }
++ _end = .;
++}
+Index: u-boot/board/neo1973/Makefile
+===================================================================
+--- u-boot.orig/board/neo1973/Makefile
++++ u-boot/board/neo1973/Makefile
+@@ -23,6 +23,10 @@
+
+ include $(TOPDIR)/config.mk
+
++.PHONY: all
++
++all: $(LIB) lowevel_foo.bin
++
+ LIB = lib$(BOARD).a
+
+ OBJS := neo1973.o pcf50606.o cmd_neo1973.o jbt6k74.o
+@@ -31,11 +35,24 @@ SOBJS := lowlevel_init.o
+ $(LIB): $(OBJS) $(SOBJS)
+ $(AR) crv $@ $(OBJS) $(SOBJS)
+
++lowlevel_foo.o: lowlevel_foo.S
++ $(CC) -c -DTEXT_BASE=0x33F80000 -march=armv4 \
++ -o lowlevel_foo.o lowlevel_foo.S
++
++lowlevel_foo: lowlevel_foo.o lowlevel_init.o
++ $(LD) -T ./lowlevel_foo.lds -Ttext 0x33f80000 -Bstatic \
++ lowlevel_init.o lowlevel_foo.o -o lowlevel_foo
++
++lowevel_foo.bin: lowlevel_foo
++ arm-linux-objcopy --gap-fill=0xff -O binary \
++ lowlevel_foo lowlevel_foo.bin
++
++
+ clean:
+- rm -f $(SOBJS) $(OBJS)
++ rm -f $(SOBJS) $(OBJS) lowlevel_foo lowlevel_foo.o
+
+ distclean: clean
+- rm -f $(LIB) core *.bak .depend
++ rm -f $(LIB) core *.bak .depend lowlevel_foo.bin
+
+ #########################################################################
+
Modified: trunk/src/target/u-boot/patches/series
===================================================================
--- trunk/src/target/u-boot/patches/series 2007-02-23 19:49:03 UTC (rev
1086)
+++ trunk/src/target/u-boot/patches/series 2007-02-23 20:25:22 UTC (rev
1087)
@@ -52,3 +52,4 @@
# for automated installation
preboot-override.patch
+lowlevel_foo.patch
--- End Message ---
--- Begin Message ---
Author: laforge
Date: 2007-02-23 22:20:08 +0100 (Fri, 23 Feb 2007)
New Revision: 1088
Modified:
trunk/src/host/dfu-util/src/usb_dfu.h
Log:
add dfu file header structure
Modified: trunk/src/host/dfu-util/src/usb_dfu.h
===================================================================
--- trunk/src/host/dfu-util/src/usb_dfu.h 2007-02-23 20:25:22 UTC (rev
1087)
+++ trunk/src/host/dfu-util/src/usb_dfu.h 2007-02-23 21:20:08 UTC (rev
1088)
@@ -80,4 +80,15 @@
DFU_STATE_dfuERROR = 10,
};
+/* this is the 'swapped' definition, i.e. after/before mirroring */
+struct dfu_file_suffix {
+ u_int32_t dwCRC; /* CRC32 ANSI X3.66 */
+ u_int8_t bLength; /* 16 bytes */
+ char ucDfuSignature[3]; /* "DFU" */
+ u_int16_t bcdDFU; /* Version */
+ u_int16_t idVendor; /* VendorID */
+ u_int16_t idProduct; /* ProductID */
+ u_int16_t bcdDevice; /* Device Revision, or 0xffff */
+} __attribute__ ((packed));
+
#endif /* _USB_DFU_H */
--- End Message ---
--- Begin Message ---
Author: laforge
Date: 2007-02-23 22:21:51 +0100 (Fri, 23 Feb 2007)
New Revision: 1089
Added:
trunk/src/host/dfu-util/src/sam7dfu.h
Modified:
trunk/src/host/dfu-util/src/main.c
Log:
* add new '-t' option to specify transfer size
* fix '--help' message indentation
* enable up/download
* limit transfer size to PAGE_SIZE, since usbdevio (linux kernel) can't handle
bigger control xfers
* add new sam7dfu.h header file
Modified: trunk/src/host/dfu-util/src/main.c
===================================================================
--- trunk/src/host/dfu-util/src/main.c 2007-02-23 21:20:08 UTC (rev 1088)
+++ trunk/src/host/dfu-util/src/main.c 2007-02-23 21:21:51 UTC (rev 1089)
@@ -29,8 +29,10 @@
#include "dfu.h"
#include "usb_dfu.h"
+#include "sam7dfu.h"
//#include "config.h"
+/* FIXME: how do we learn about PAGE_SIZE in userspace? */
int debug;
static int verbose = 0;
@@ -253,14 +255,15 @@
{
printf("Usage: dfu-util [options] ...\n"
" -h --help\t\t\tPrint this help message\n"
- " -V --version\t\tPrint the version number\n"
- " -l --list\t\tList the currently attached DFU capable USB
devices\n"
+ " -V --version\t\t\tPrint the version number\n"
+ " -l --list\t\t\tList the currently attached DFU capable USB
devices\n"
" -d --device vendor:product\tSpecify Vendor/Product ID of DFU
device\n"
" -c --cfg config_nr\t\tSpecify the Configuration of DFU
device\n"
" -i --intf intf_nr\t\tSpecify the DFU Interface number\n"
" -a --alt alt_nr\t\tSpecify the Altseting of the DFU
Interface\n"
- " -U --upload file\tRead firmware from device into <file>\n"
- " -D --download file\tWrite firmware from <file> into device\n"
+ " -t --transfer-size\tSpecify the number of bytes per USB
Transfer\n"
+ " -U --upload file\t\tRead firmware from device into <file>\n"
+ " -D --download file\t\tWrite firmware from <file> into
device\n"
);
}
@@ -276,6 +279,7 @@
{ "intf", 1, 0, 'i' },
{ "altsetting", 1, 0, 'a' },
{ "alt", 1, 0, 'a' },
+ { "transfer-size", 1, 0, 't' },
{ "upload", 1, 0, 'U' },
{ "download", 1, 0, 'D' },
};
@@ -292,10 +296,11 @@
struct dfu_if _rt_dif, _dif, *dif = &_dif;
int num_devs;
int num_ifs;
+ unsigned int transfer_size = 0;
enum mode mode = MODE_NONE;
struct dfu_status status;
struct usb_dfu_func_descriptor func_dfu;
- char *filename;
+ char *filename = NULL;
printf("dfu-util - (C) 2007 by OpenMoko Inc.\n"
"This program is Free Software and has ABSOLUTELY NO
WARRANTY\n\n");
@@ -309,7 +314,7 @@
while (1) {
int c, option_index = 0;
- c = getopt_long(argc, argv, "hVvld:c:i:a:UD", opts,
&option_index);
+ c = getopt_long(argc, argv, "hVvld:c:i:a:t:U:D:", opts,
&option_index);
if (c == -1)
break;
@@ -353,6 +358,9 @@
dif->altsetting = atoi(optarg);
dif->flags |= DFU_IFF_ALT;
break;
+ case 't':
+ transfer_size = atoi(optarg);
+ break;
case 'U':
mode = MODE_UPLOAD;
filename = optarg;
@@ -373,6 +381,12 @@
exit(2);
}
+ if (!filename) {
+ fprintf(stderr, "You need to specify a filename to -D -r -U\n");
+ help();
+ exit(2);
+ }
+
dfu_init(5000);
num_devs = count_dfu_devices(dif);
@@ -469,6 +483,8 @@
"device\n");
exit(1);
}
+ if (!get_first_dfu_device(dif))
+ exit(3);
printf("Opening USB Device...\n");
dif->dev_handle = usb_open(dif->dev);
@@ -482,9 +498,7 @@
}
already_idle:
- printf("%p (%d)\n", dif->dev_handle, *(int *)dif->dev_handle);
num_ifs = count_dfu_interfaces(dif->dev);
- printf("%p (%d)\n", dif->dev_handle, *(int *)dif->dev_handle);
if (num_ifs < 0) {
fprintf(stderr, "No DFU Interface after RESET?!?\n");
exit(1);
@@ -548,6 +562,7 @@
/* Obtain DFU functional descriptor */
{
int ret;
+ int page_size = getpagesize();
ret = usb_get_descriptor(dif->dev_handle, 0x21, dif->interface,
&func_dfu, sizeof(func_dfu));
@@ -556,9 +571,14 @@
usb_strerror());
exit(1);
}
+ /* FIXME: Endian! */
+ if (!transfer_size)
+ transfer_size = func_dfu.wTransferSize;
- printf("wTransferSize = 0x%04x\n", func_dfu.wTransferSize);
-
+ printf("Transfer Size = 0x%04x\n", transfer_size);
+
+ if (func_dfu.wTransferSize > page_size)
+ func_dfu.wTransferSize = page_size;
}
if (DFU_STATUS_OK != status.bStatus ) {
@@ -574,10 +594,12 @@
switch (mode) {
case MODE_UPLOAD:
- //sam7dfu_do_upload(usb_handle, interface,
func_dfu.wTransferSize, filename);
+ sam7dfu_do_upload(dif->dev_handle, dif->interface,
+ transfer_size, filename);
break;
case MODE_DOWNLOAD:
- //sam7dfu_do_dnload(usb_handle, interface,
func_dfu.wTransferSize, filename);
+ sam7dfu_do_dnload(dif->dev_handle, dif->interface,
+ transfer_size, filename);
break;
default:
fprintf(stderr, "Unsupported mode: %u\n", mode);
Added: trunk/src/host/dfu-util/src/sam7dfu.h
===================================================================
--- trunk/src/host/dfu-util/src/sam7dfu.h 2007-02-23 21:20:08 UTC (rev
1088)
+++ trunk/src/host/dfu-util/src/sam7dfu.h 2007-02-23 21:21:51 UTC (rev
1089)
@@ -0,0 +1,9 @@
+#ifndef _SAM7DFU_H
+#define _SAM7DFU_H
+
+int sam7dfu_do_upload(struct usb_dev_handle *usb_handle, int interface,
+ int xfer_size, const char *fname);
+int sam7dfu_do_dnload(struct usb_dev_handle *usb_handle, int interface,
+ int xfer_size, const char *fname);
+
+#endif
--- End Message ---
--- Begin Message ---
Author: werner
Date: 2007-02-24 00:04:22 +0100 (Sat, 24 Feb 2007)
New Revision: 1090
Modified:
trunk/src/target/u-boot/patches/lowlevel_foo.patch
Log:
Makefile change broke build dependency, oops :-(
Modified: trunk/src/target/u-boot/patches/lowlevel_foo.patch
===================================================================
--- trunk/src/target/u-boot/patches/lowlevel_foo.patch 2007-02-23 21:21:51 UTC
(rev 1089)
+++ trunk/src/target/u-boot/patches/lowlevel_foo.patch 2007-02-23 23:04:22 UTC
(rev 1090)
@@ -155,18 +155,14 @@
===================================================================
--- u-boot.orig/board/neo1973/Makefile
+++ u-boot/board/neo1973/Makefile
-@@ -23,6 +23,10 @@
+@@ -28,14 +28,31 @@ LIB = lib$(BOARD).a
+ OBJS := neo1973.o pcf50606.o cmd_neo1973.o jbt6k74.o
+ SOBJS := lowlevel_init.o
- include $(TOPDIR)/config.mk
-
+.PHONY: all
+
+all: $(LIB) lowevel_foo.bin
+
- LIB = lib$(BOARD).a
-
- OBJS := neo1973.o pcf50606.o cmd_neo1973.o jbt6k74.o
-@@ -31,11 +35,24 @@ SOBJS := lowlevel_init.o
$(LIB): $(OBJS) $(SOBJS)
$(AR) crv $@ $(OBJS) $(SOBJS)
--- End Message ---
--- Begin Message ---
Author: werner
Date: 2007-02-24 01:33:39 +0100 (Sat, 24 Feb 2007)
New Revision: 1091
Modified:
trunk/src/target/u-boot/patches/nand-dynamic_partitions.patch
Log:
include/configs/neo1973.h (MTPARTS_DEFAULT): updated to new sizes
(u-boot: 192k -> 256k, u-boot_env: 8k -> 16k, splash: 2M -> 640k)
Modified: trunk/src/target/u-boot/patches/nand-dynamic_partitions.patch
===================================================================
--- trunk/src/target/u-boot/patches/nand-dynamic_partitions.patch
2007-02-23 23:04:22 UTC (rev 1090)
+++ trunk/src/target/u-boot/patches/nand-dynamic_partitions.patch
2007-02-24 00:33:39 UTC (rev 1091)
@@ -118,7 +118,7 @@
#define CONFIG_S3C2410_NAND_BBT 1
+#define MTDIDS_DEFAULT "nand0=neo1973-nand"
-+#define MTPARTS_DEFAULT
"neo1973-nand:192k(u-boot),8k(u-boot_env),2M(kernel),2M(splash),-(jffs2)"
++#define MTPARTS_DEFAULT
"neo1973-nand:256k(u-boot),16k(u-boot_env),2M(kernel),640k(splash),-(jffs2)"
+
#endif /* __CONFIG_H */
Index: u-boot/common/cmd_jffs2.c
--- End Message ---
--- Begin Message ---
Author: laforge
Date: 2007-02-24 03:27:50 +0100 (Sat, 24 Feb 2007)
New Revision: 1092
Added:
trunk/src/target/u-boot/patches/uboot-arm920t-gd_in_irq.patch
Modified:
trunk/src/target/u-boot/patches/series
Log:
add patch to use 'gd' from interrupt context
Modified: trunk/src/target/u-boot/patches/series
===================================================================
--- trunk/src/target/u-boot/patches/series 2007-02-24 00:33:39 UTC (rev
1091)
+++ trunk/src/target/u-boot/patches/series 2007-02-24 02:27:50 UTC (rev
1092)
@@ -24,6 +24,7 @@
boot-from-ram-and-nand.patch
wakeup-reason-nand-only.patch
uboot-neo1973-resume.patch
+uboot-arm920t-gd_in_irq.patch
# this will be somewhat more difficult
nand-dynamic_partitions.patch
Added: trunk/src/target/u-boot/patches/uboot-arm920t-gd_in_irq.patch
===================================================================
--- trunk/src/target/u-boot/patches/uboot-arm920t-gd_in_irq.patch
2007-02-24 00:33:39 UTC (rev 1091)
+++ trunk/src/target/u-boot/patches/uboot-arm920t-gd_in_irq.patch
2007-02-24 02:27:50 UTC (rev 1092)
@@ -0,0 +1,28 @@
+This patch allows us to use the 'gd' pointer (and thus environment
+and everything else associated with it) from interrupt context on
+arm920t.
+
+Signed-off-by: Harald Welte <[EMAIL PROTECTED]>
+
+Index: u-boot/cpu/arm920t/start.S
+===================================================================
+--- u-boot.orig/cpu/arm920t/start.S 2007-02-24 02:35:38.000000000 +0100
++++ u-boot/cpu/arm920t/start.S 2007-02-24 02:36:01.000000000 +0100
+@@ -474,12 +474,12 @@
+ .macro irq_save_user_regs
+ sub sp, sp, #S_FRAME_SIZE
+ stmia sp, {r0 - r12} @ Calling r0-r12
+- add r8, sp, #S_PC
+- stmdb r8, {sp, lr}^ @ Calling SP, LR
+- str lr, [r8, #0] @ Save calling PC
++ add r7, sp, #S_PC
++ stmdb r7, {sp, lr}^ @ Calling SP, LR
++ str lr, [r7, #0] @ Save calling PC
+ mrs r6, spsr
+- str r6, [r8, #4] @ Save CPSR
+- str r0, [r8, #8] @ Save OLD_R0
++ str r6, [r7, #4] @ Save CPSR
++ str r0, [r7, #8] @ Save OLD_R0
+ mov r0, sp
+ .endm
+
--- End Message ---
_______________________________________________
commitlog mailing list
[email protected]
http://lists.openmoko.org/mailman/listinfo/commitlog