fix-dfu-kern.patch
authorAndy Green <andy@openmoko.com>
Fri, 20 Feb 2009 13:33:26 +0000 (13:33 +0000)
committerAndy Green <agreen@octopus.localdomain>
Fri, 20 Feb 2009 13:33:26 +0000 (13:33 +0000)
Signed-off-by: Andy Green <andy@openmoko.com>
dfu-kern

index 023d13b..8ba564e 100755 (executable)
--- a/dfu-kern
+++ b/dfu-kern
@@ -5,10 +5,12 @@ if [ -z "$1" ] ; then
        exit 1
 fi
 
-../../dfu-util/src/dfu-util -a 3 -d 0x1d50:0x5119 -D uImage-$1.bin
+NAME=`echo $1 | cut -d'-' -f1`
+
+../../dfu-util/src/dfu-util -a 3 -d 0x1d50:0x5119 -D $1/uImage-$NAME.bin
 if [ $? -eq 1 ] ; then
-../../dfu-util/src/dfu-util -a 3 -d 0x1d50:0x5120 -D uImage-$1.bin
-../../dfu-util/src/dfu-util -a 3 -d 0x1d50:0x5119 -D uImage-$1.bin
+../../dfu-util/src/dfu-util -a 3 -d 0x1d50:0x5120 -D $1/uImage-$NAME.bin
+../../dfu-util/src/dfu-util -a 3 -d 0x1d50:0x5119 -D $1/uImage-$NAME.bin
 fi