From a60b2f24a8dfc4704a66648bc067333e25adc84d Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Fri, 26 Apr 2019 23:51:43 +0200 Subject: [PATCH] update.sh flash boot only if option -b --- update.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/update.sh b/update.sh index fe5f0dd95..aa58b693e 100755 --- a/update.sh +++ b/update.sh @@ -1,5 +1,10 @@ #!/bin/bash +FULLIMAGE="armsrc/obj/fullimage.elf" +if [ "$1" == "-b" ]; then + FLASHBOOT="-b bootrom/obj/bootrom.elf" +fi + function wait4proxmark_Linux { echo >&2 "Waiting for Proxmark to appear..." while [ ! -c /dev/ttyACM? -a ! -L /dev/pm3-? ]; do @@ -26,7 +31,7 @@ function wait4proxmark_macOS { # Detect OS and flash bootroom & system image if [[ $(uname | awk '{print toupper($0)}') == "LINUX" ]]; then - client/flasher $(wait4proxmark_Linux) -b bootrom/obj/bootrom.elf armsrc/obj/fullimage.elf + client/flasher $(wait4proxmark_Linux) $FLASHBOOT $FULLIMAGE elif [[ $(uname | awk '{print toupper($0)}') == "DARWIN" ]]; then - client/flasher $(wait4proxmark_macOS) -b bootrom/obj/bootrom.elf armsrc/obj/fullimage.elf + client/flasher $(wait4proxmark_macOS) $FLASHBOOT $FULLIMAGE fi