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. r1180 - trunk/oe/packages/openocd ([EMAIL PROTECTED])
2. r1181 - trunk/oe/packages/openocd ([EMAIL PROTECTED])
3. r1182 - developers/werner ([EMAIL PROTECTED])
4. r1183 - trunk/oe/packages/openocd ([EMAIL PROTECTED])
5. r1184 - in trunk/oe/packages: . openocd
([EMAIL PROTECTED])
6. r1185 - trunk/src/host/devirginator ([EMAIL PROTECTED])
7. r1186 - trunk/src/host/dfu-util/src ([EMAIL PROTECTED])
8. r1187 - trunk/src/host/devirginator ([EMAIL PROTECTED])
9. r1188 - trunk/src/host/dfu-util/src ([EMAIL PROTECTED])
10. r1189 - trunk/src/host/dfu-util/src ([EMAIL PROTECTED])
--- Begin Message ---
Author: laforge
Date: 2007-03-01 15:21:48 +0100 (Thu, 01 Mar 2007)
New Revision: 1180
Added:
trunk/oe/packages/openocd/openocd-native_130.bb
trunk/oe/packages/openocd/openocd_130.bb
Modified:
trunk/oe/packages/openocd/openocd_svn.bb
Log:
* add 'wait-patiently.patch' from werner
* add revision 130 as 'known-good' version
Added: trunk/oe/packages/openocd/openocd-native_130.bb
===================================================================
--- trunk/oe/packages/openocd/openocd-native_130.bb 2007-03-01 14:11:34 UTC
(rev 1179)
+++ trunk/oe/packages/openocd/openocd-native_130.bb 2007-03-01 14:21:48 UTC
(rev 1180)
@@ -0,0 +1,11 @@
+require openocd_${PV}.bb
+
+inherit native
+
+DEPENDS = "libftdi-native"
+EXTRA_OECONF = "--enable-ft2232_libftdi --enable-parport-ppdev"
+
+do_stage() {
+ install -m 0755 src/openocd ${STAGING_BINDIR}
+}
+
Added: trunk/oe/packages/openocd/openocd_130.bb
===================================================================
--- trunk/oe/packages/openocd/openocd_130.bb 2007-03-01 14:11:34 UTC (rev
1179)
+++ trunk/oe/packages/openocd/openocd_130.bb 2007-03-01 14:21:48 UTC (rev
1180)
@@ -0,0 +1,12 @@
+DESCRIPTION = "Free and Open On-Chip Debugging, In-System Programming and
Boundary-Scan Testing"
+HOMEPAGE = "http://openocd.berlios.de/"
+LICENSE = "GPL"
+PV = "130"
+
+inherit autotools
+
+SRC_URI = "svn://svn.berlios.de/;module=openocd;revision=130 \
+
http://svn.openmoko.org/developers/werner/openocd-wait-patiently.patch;patch=1"
+S = "${WORKDIR}/openocd/trunk"
+
+EXTRA_OECONF = " --disable-ftdi2232 --disable-ftd2xx"
Modified: trunk/oe/packages/openocd/openocd_svn.bb
===================================================================
--- trunk/oe/packages/openocd/openocd_svn.bb 2007-03-01 14:11:34 UTC (rev
1179)
+++ trunk/oe/packages/openocd/openocd_svn.bb 2007-03-01 14:21:48 UTC (rev
1180)
@@ -5,7 +5,8 @@
inherit autotools
-SRC_URI = "svn://svn.berlios.de/;module=openocd"
+SRC_URI = "svn://svn.berlios.de/;module=openocd \
+
http://svn.openmoko.org/developers/werner/openocd-wait-patiently.patch;patch=1"
S = "${WORKDIR}/openocd/trunk"
EXTRA_OECONF = " --disable-ftdi2232 --disable-ftd2xx"
--- End Message ---
--- Begin Message ---
Author: laforge
Date: 2007-03-01 15:34:18 +0100 (Thu, 01 Mar 2007)
New Revision: 1181
Modified:
trunk/oe/packages/openocd/openocd_130.bb
trunk/oe/packages/openocd/openocd_svn.bb
Log:
put the openocd binary in deploy_dir
Modified: trunk/oe/packages/openocd/openocd_130.bb
===================================================================
--- trunk/oe/packages/openocd/openocd_130.bb 2007-03-01 14:21:48 UTC (rev
1180)
+++ trunk/oe/packages/openocd/openocd_130.bb 2007-03-01 14:34:18 UTC (rev
1181)
@@ -10,3 +10,10 @@
S = "${WORKDIR}/openocd/trunk"
EXTRA_OECONF = " --disable-ftdi2232 --disable-ftd2xx"
+
+do_deploy() {
+ install -d ${DEPLOY_DIR_IMAGE}
+ install -m 0755 src/openocd ${DEPLOY_DIR_IMAGE}/openocd
+}
+
+addtask deploy before do_package after do_install
Modified: trunk/oe/packages/openocd/openocd_svn.bb
===================================================================
--- trunk/oe/packages/openocd/openocd_svn.bb 2007-03-01 14:21:48 UTC (rev
1180)
+++ trunk/oe/packages/openocd/openocd_svn.bb 2007-03-01 14:34:18 UTC (rev
1181)
@@ -10,3 +10,10 @@
S = "${WORKDIR}/openocd/trunk"
EXTRA_OECONF = " --disable-ftdi2232 --disable-ftd2xx"
+
+do_deploy() {
+ install -d ${DEPLOY_DIR_IMAGE}
+ install -m 0755 src/openocd ${DEPLOY_DIR_IMAGE}/openocd
+}
+
+addtask deploy before do_package after do_install
--- End Message ---
--- Begin Message ---
Author: werner
Date: 2007-03-01 16:01:17 +0100 (Thu, 01 Mar 2007)
New Revision: 1182
Added:
developers/werner/openocd-link-static.patch
Log:
Link everything statically, for better binary compatibility.
Added: developers/werner/openocd-link-static.patch
===================================================================
--- developers/werner/openocd-link-static.patch 2007-03-01 14:34:18 UTC (rev
1181)
+++ developers/werner/openocd-link-static.patch 2007-03-01 15:01:17 UTC (rev
1182)
@@ -0,0 +1,20 @@
+--- openocd/src/Makefile.am.orig 2007-03-01 11:51:41.000000000 -0300
++++ openocd/src/Makefile.am 2007-03-01 11:58:08.000000000 -0300
+@@ -7,7 +7,7 @@
+ -I$(top_srcdir)/src/flash -I$(top_srcdir)/src/pld $(all_includes)
+
+ # the library search path.
+-openocd_LDFLAGS = $(all_libraries)
++openocd_LDFLAGS = -Bstatic $(all_libraries)
+ SUBDIRS = helper jtag xsvf target server flash pld
+
+ if IS_MINGW
+@@ -17,7 +17,7 @@
+ endif
+
+ if FT2232_LIBFTDI
+-FTDI2232LIB = -lftdi
++FTDI2232LIB = -lftdi -lusb
+ else
+ FTDI2232LIB =
+ endif
--- End Message ---
--- Begin Message ---
Author: laforge
Date: 2007-03-01 16:07:19 +0100 (Thu, 01 Mar 2007)
New Revision: 1183
Modified:
trunk/oe/packages/openocd/openocd_130.bb
trunk/oe/packages/openocd/openocd_svn.bb
Log:
build a statically linked version
Modified: trunk/oe/packages/openocd/openocd_130.bb
===================================================================
--- trunk/oe/packages/openocd/openocd_130.bb 2007-03-01 15:01:17 UTC (rev
1182)
+++ trunk/oe/packages/openocd/openocd_130.bb 2007-03-01 15:07:19 UTC (rev
1183)
@@ -6,7 +6,8 @@
inherit autotools
SRC_URI = "svn://svn.berlios.de/;module=openocd;revision=130 \
-
http://svn.openmoko.org/developers/werner/openocd-wait-patiently.patch;patch=1"
+
http://svn.openmoko.org/developers/werner/openocd-wait-patiently.patch;patch=1 \
+
http://svn.openmoko.org/developers/werner/openocd-link-static.patch;patch=1"
S = "${WORKDIR}/openocd/trunk"
EXTRA_OECONF = " --disable-ftdi2232 --disable-ftd2xx"
Modified: trunk/oe/packages/openocd/openocd_svn.bb
===================================================================
--- trunk/oe/packages/openocd/openocd_svn.bb 2007-03-01 15:01:17 UTC (rev
1182)
+++ trunk/oe/packages/openocd/openocd_svn.bb 2007-03-01 15:07:19 UTC (rev
1183)
@@ -6,7 +6,8 @@
inherit autotools
SRC_URI = "svn://svn.berlios.de/;module=openocd \
-
http://svn.openmoko.org/developers/werner/openocd-wait-patiently.patch;patch=1"
+
http://svn.openmoko.org/developers/werner/openocd-wait-patiently.patch;patch=1 \
+
http://svn.openmoko.org/developers/werner/openocd-link-static.patch;patch=1"
S = "${WORKDIR}/openocd/trunk"
EXTRA_OECONF = " --disable-ftdi2232 --disable-ftd2xx"
--- End Message ---
--- Begin Message ---
Author: laforge
Date: 2007-03-01 16:27:00 +0100 (Thu, 01 Mar 2007)
New Revision: 1184
Added:
trunk/oe/packages/dfu-util/
Modified:
trunk/oe/packages/openocd/openocd_130.bb
Log:
bitbake wants 'rev' not 'revision'
Modified: trunk/oe/packages/openocd/openocd_130.bb
===================================================================
--- trunk/oe/packages/openocd/openocd_130.bb 2007-03-01 15:07:19 UTC (rev
1183)
+++ trunk/oe/packages/openocd/openocd_130.bb 2007-03-01 15:27:00 UTC (rev
1184)
@@ -5,7 +5,7 @@
inherit autotools
-SRC_URI = "svn://svn.berlios.de/;module=openocd;revision=130 \
+SRC_URI = "svn://svn.berlios.de/;module=openocd;rev=130 \
http://svn.openmoko.org/developers/werner/openocd-wait-patiently.patch;patch=1 \
http://svn.openmoko.org/developers/werner/openocd-link-static.patch;patch=1"
S = "${WORKDIR}/openocd/trunk"
--- End Message ---
--- Begin Message ---
Author: werner
Date: 2007-03-01 16:32:24 +0100 (Thu, 01 Mar 2007)
New Revision: 1185
Modified:
trunk/src/host/devirginator/Makefile
trunk/src/host/devirginator/README
trunk/src/host/devirginator/config.example
trunk/src/host/devirginator/crc32.pl
Log:
Makefile: updated "devirginate" dependencies.
README: added run-time requisites for setup and installation.
README: added partial description of setup.
config.example: removed variable "MODULES" (for kernel modules).
crc32.pl: fixed 64 bit compatibility
Modified: trunk/src/host/devirginator/Makefile
===================================================================
--- trunk/src/host/devirginator/Makefile 2007-03-01 15:27:00 UTC (rev
1184)
+++ trunk/src/host/devirginator/Makefile 2007-03-01 15:32:24 UTC (rev
1185)
@@ -20,7 +20,9 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-devirginate: config setup.sh smiley.gz
+devirginate: config environment.in openocd.in u-boot.in \
+ setup.sh smiley.gz \
+ crc32.pl envedit.pl openocdcmd.pl scriptify.pl
mkdir -p tmp
./setup.sh
Modified: trunk/src/host/devirginator/README
===================================================================
--- trunk/src/host/devirginator/README 2007-03-01 15:27:00 UTC (rev 1184)
+++ trunk/src/host/devirginator/README 2007-03-01 15:32:24 UTC (rev 1185)
@@ -47,7 +47,34 @@
For build instructions, see developers/werner/notes/openocd
+ If you're using the version of OpenOCD built by the OpenMoko
+ distribution (SVN revision 1180 or later), the patch is already
+ applied.
+Furthermore, "devirginate" requires telnet.
+
+"setup.sh" can be run from a different machine sharing the same file
+system hierarchy. It requires Netpbm, transfig, wget, and Perl.
+
+
+Setup
+=====
+
+The devirginator first needs to be set up. This includes
+
+- downloading binaries for u-boot, kernel, etc.
+- generating/converting various files used during the setup process
+
+At the moment, the setup must be done in the directory containing all
+files belonging to the devirginator. The files generated during setup
+are stored in the directory tmp/. The files in tmp/ are also used
+during devirgination.
+
+First, copy config.example to "config" and make the necessary changes.
+Almost all settings have reasonable defaults, but you will have to
+set SNAPSHOT to the date code of the snapshot you desire.
+
+
Files
=====
Modified: trunk/src/host/devirginator/config.example
===================================================================
--- trunk/src/host/devirginator/config.example 2007-03-01 15:27:00 UTC (rev
1184)
+++ trunk/src/host/devirginator/config.example 2007-03-01 15:32:24 UTC (rev
1185)
@@ -78,10 +78,6 @@
# Example:
#
UIMAGE=$OMDIR/build/tmp/deploy/images/uImage-2.6-200702241944-fic-gta01-20070224194345.bin
-# MODULES: the kernel modules, as gzip'ed tar file.
-# Example:
-# MODULES=$OMDIR/build/tmp/deploy/images/modules-2.6-200702241944-fic-gta01.tgz
-
# ROOTFS: the root file system, in jffs2 format.
# Example:
#
ROOTFS=$OMDIR/build/tmp/deploy/images/openmoko-devel-image-fic-gta01-20070212015815.rootfs.jffs2
Modified: trunk/src/host/devirginator/crc32.pl
===================================================================
--- trunk/src/host/devirginator/crc32.pl 2007-03-01 15:27:00 UTC (rev
1184)
+++ trunk/src/host/devirginator/crc32.pl 2007-03-01 15:32:24 UTC (rev
1185)
@@ -29,11 +29,12 @@
sub crc32
{
local ($s) = @_;
- local ($poly, $crc) = (0xedb88320, ~0);
+ local ($poly, $crc) = (0xedb88320, 0xffffffff);
local ($i, $j);
for ($i = 0; $i != length $s; $i++) {
for ($j = 0; $j != 8; $j++) {
+ $crc &= 0xffffffff;
if (($crc ^ (unpack("C", substr($s, $i, 1)) >> $j)) & 1) {
$crc = ($crc >> 1) ^ $poly;
}
@@ -42,5 +43,5 @@
}
}
}
- return ~$crc;
+ return $crc ^ 0xffffffff;
}
--- End Message ---
--- Begin Message ---
Author: laforge
Date: 2007-03-01 16:52:55 +0100 (Thu, 01 Mar 2007)
New Revision: 1186
Modified:
trunk/src/host/dfu-util/src/main.c
Log:
* only print error message if usb_reset() returns error != -ENODEV, since that
seems to be
somewhat standard ?!?
Modified: trunk/src/host/dfu-util/src/main.c
===================================================================
--- trunk/src/host/dfu-util/src/main.c 2007-03-01 15:32:24 UTC (rev 1185)
+++ trunk/src/host/dfu-util/src/main.c 2007-03-01 15:52:55 UTC (rev 1186)
@@ -308,6 +308,8 @@
struct usb_dfu_func_descriptor func_dfu;
char *filename = NULL;
int final_reset = 0;
+ int page_size = getpagesize();
+ int ret;
printf("dfu-util - (C) 2007 by OpenMoko Inc.\n"
"This program is Free Software and has ABSOLUTELY NO
WARRANTY\n\n");
@@ -461,9 +463,10 @@
break;
}
printf("Resetting USB...\n");
- if (usb_reset(_rt_dif.dev_handle) < 0) {
- fprintf(stderr, "error resetting after detach:
%s\n", usb_strerror());
- }
+ ret = usb_reset(_rt_dif.dev_handle);
+ if (ret < 0 && ret != -ENODEV)
+ fprintf(stderr, "error resetting after detach:
%s\n",
+ usb_strerror());
sleep(2);
break;
case DFU_STATE_dfuERROR:
@@ -581,26 +584,21 @@
}
/* 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));
- if (ret < 0) {
- fprintf(stderr, "Error obtaining DFU functional "
- "descriptor: %s\n", usb_strerror());
- exit(1);
- }
- /* FIXME: Endian! */
- if (!transfer_size)
- transfer_size = func_dfu.wTransferSize;
+ ret = usb_get_descriptor(dif->dev_handle, 0x21, dif->interface,
+ &func_dfu, sizeof(func_dfu));
+ if (ret < 0) {
+ fprintf(stderr, "Error obtaining DFU functional "
+ "descriptor: %s\n", usb_strerror());
+ exit(1);
+ }
+ /* FIXME: Endian! */
+ if (!transfer_size)
+ transfer_size = func_dfu.wTransferSize;
- printf("Transfer Size = 0x%04x\n", transfer_size);
+ printf("Transfer Size = 0x%04x\n", transfer_size);
- if (func_dfu.wTransferSize > page_size)
- func_dfu.wTransferSize = page_size;
- }
+ if (func_dfu.wTransferSize > page_size)
+ func_dfu.wTransferSize = page_size;
if (DFU_STATUS_OK != status.bStatus ) {
printf("WARNING: DFU Status: '%s'\n",
@@ -636,7 +634,8 @@
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) {
+ ret = usb_reset(dif->dev_handle);
+ if (ret < 0 && ret != -ENODEV) {
fprintf(stderr, "error resetting after download: %s\n",
usb_strerror());
}
--- End Message ---
--- Begin Message ---
Author: werner
Date: 2007-03-01 16:56:01 +0100 (Thu, 01 Mar 2007)
New Revision: 1187
Modified:
trunk/src/host/devirginator/README
trunk/src/host/devirginator/setup.sh
Log:
setup.sh: added test for possibly missing "external" executables
README: more setup description
Modified: trunk/src/host/devirginator/README
===================================================================
--- trunk/src/host/devirginator/README 2007-03-01 15:52:55 UTC (rev 1186)
+++ trunk/src/host/devirginator/README 2007-03-01 15:56:01 UTC (rev 1187)
@@ -35,6 +35,7 @@
- dfu-util must be accessible from the machine running "devirginate".
If dfu-util is not in PATH, you can set an explicit path in "config".
+
To build dfu-util, do this:
cd $OMDIR/openmoko/trunk/src/host/dfu-util
./autogen.sh
@@ -71,10 +72,25 @@
during devirgination.
First, copy config.example to "config" and make the necessary changes.
-Almost all settings have reasonable defaults, but you will have to
-set SNAPSHOT to the date code of the snapshot you desire.
+Almost all settings have reasonable defaults, but the least thing you
+will have to do is set SNAPSHOT to the date code of the snapshot you
+desire.
+Next, run either ./setup.sh or just make .
+setup.sh will now download any missing files, and perform the various
+conversions. If any error occur during this, e.g., because of missing
+tools or a configuration error, setup.sh will stop with an error. You
+then have to correct the problem and retry. Files already downloaded
+to tmp/ will be skipped in the retry (setup.sh will still probe if
+they have changed).
+
+setup.sh also checks if executables used during devirgination are
+available and prints a warning if it finds anything missing. In general,
+one can run setup.sh on a different machine than "devirginate", in
+which case these warnings can be ignored.
+
+
Files
=====
Modified: trunk/src/host/devirginator/setup.sh
===================================================================
--- trunk/src/host/devirginator/setup.sh 2007-03-01 15:52:55 UTC (rev
1186)
+++ trunk/src/host/devirginator/setup.sh 2007-03-01 15:56:01 UTC (rev
1187)
@@ -54,6 +54,14 @@
}
+probe()
+{
+ if ! "$@" >/dev/null 2>&1; then
+ echo "WARNING: cannot execute $1" 1>&2
+ fi
+}
+
+
# --- Configuration defaults --------------------------------------------------
@@ -80,6 +88,13 @@
. config
+# --- Check executables -------------------------------------------------------
+
+
+probe "$DFU_UTIL" -l
+probe telnet </dev/null
+
+
# --- Post configuration ------------------------------------------------------
--- End Message ---
--- Begin Message ---
Author: laforge
Date: 2007-03-01 17:30:56 +0100 (Thu, 01 Mar 2007)
New Revision: 1188
Modified:
trunk/src/host/dfu-util/src/main.c
Log:
print interface info once we have selected the one that we actually want to
flash
Modified: trunk/src/host/dfu-util/src/main.c
===================================================================
--- trunk/src/host/dfu-util/src/main.c 2007-03-01 15:56:01 UTC (rev 1187)
+++ trunk/src/host/dfu-util/src/main.c 2007-03-01 16:30:56 UTC (rev 1188)
@@ -432,8 +432,6 @@
if (!get_first_dfu_if(&_rt_dif))
exit(1);
- print_dfu_if(&_rt_dif, NULL);
-
if (!_rt_dif.flags & DFU_IFF_DFU) {
/* In the 'first round' during runtime mode, there can only be
one
* DFU Interface descriptor according to the DFU Spec. */
@@ -511,6 +509,8 @@
* procedure */
}
+ print_dfu_if(dif, NULL);
+
num_ifs = count_dfu_interfaces(dif->dev);
if (num_ifs < 0) {
fprintf(stderr, "No DFU Interface after RESET?!?\n");
--- End Message ---
--- Begin Message ---
Author: laforge
Date: 2007-03-01 17:31:44 +0100 (Thu, 01 Mar 2007)
New Revision: 1189
Modified:
trunk/src/host/dfu-util/src/sam7dfu.c
Log:
* correctly call dfu_download with NULL data buffer at the end
* add scaled progress bar instead of hash printing
Modified: trunk/src/host/dfu-util/src/sam7dfu.c
===================================================================
--- trunk/src/host/dfu-util/src/sam7dfu.c 2007-03-01 16:30:56 UTC (rev
1188)
+++ trunk/src/host/dfu-util/src/sam7dfu.c 2007-03-01 16:31:44 UTC (rev
1189)
@@ -62,10 +62,13 @@
return ret;
}
+#define PROGRESS_BAR_WIDTH 50
+
int sam7dfu_do_dnload(struct usb_dev_handle *usb_handle, int interface,
int xfer_size, const char *fname)
{
int ret, fd, bytes_sent = 0;
+ unsigned int bytes_per_hash, hashes = 0;
char *buf = malloc(xfer_size);
struct stat st;
struct dfu_status dst;
@@ -93,28 +96,42 @@
goto out_close;
}
+ bytes_per_hash = st.st_size / PROGRESS_BAR_WIDTH;
+ printf("bytes_per_hash=%u\n", bytes_per_hash);
#if 0
read(fd, DFU_HDR);
#endif
printf("Starting download: [");
+ fflush(stdout);
while (bytes_sent < st.st_size /* - DFU_HDR */) {
+ int hashes_todo;
+
ret = read(fd, buf, xfer_size);
if (ret < 0) {
perror(fname);
goto out_close;
}
- ret = dfu_download(usb_handle, interface, ret, buf);
- if (ret < 0)
+ ret = dfu_download(usb_handle, interface, ret, ret ? buf :
NULL);
+ if (ret < 0) {
+ printf(stderr, "Error during download\n");
goto out_close;
+ }
bytes_sent += ret;
+
do {
ret = dfu_get_status(usb_handle, interface, &dst);
- if (ret < 0)
+ if (ret < 0) {
+ fprintf(stderr, "Error during download
get_status\n");
goto out_close;
+ }
+ usleep(5000);
} while (dst.bState != DFU_STATE_dfuDNLOAD_IDLE ||
dst.bStatus != DFU_STATUS_OK);
- putchar('#');
- usleep(5000);
+
+ hashes_todo = (bytes_sent / bytes_per_hash) - hashes;
+ hashes += hashes_todo;
+ while (hashes_todo--)
+ putchar('#');
fflush(stdout);
}
@@ -124,6 +141,7 @@
ret = bytes_sent;
printf("] finished!\n");
+ fflush(stdout);
get_status:
/* Transition to MANIFEST_SYNC state */
--- End Message ---
_______________________________________________
commitlog mailing list
[email protected]
http://lists.openmoko.org/mailman/listinfo/commitlog