aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdfu-kern8
1 files changed, 5 insertions, 3 deletions
diff --git a/dfu-kern b/dfu-kern
index 023d13b0941..8ba564ee607 100755
--- 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