Merge pull request #137 from winguru/basic-helper-scripts

Basic helper scripts
This commit is contained in:
Iceman 2017-10-24 09:25:18 +02:00 committed by GitHub
commit 42d3fec4a1
2 changed files with 31 additions and 0 deletions

14
proxmark3.sh Executable file
View file

@ -0,0 +1,14 @@
#!/bin/bash
function wait4proxmark {
echo >&2 "Waiting for Proxmark to appear..."
while [ ! -c /dev/ttyACM? -a ! -L /dev/pm3-? ]; do
sleep .1
done
local PM3=`ls -1 /dev/pm3-? /dev/ttyACM? 2>/dev/null | head -1`
echo >&2 -e "Found proxmark on ${PM3}\n"
echo $PM3
}
# start proxmark with first detected interface
client/proxmark3 $(wait4proxmark)

17
update.sh Executable file
View file

@ -0,0 +1,17 @@
#!/bin/bash
function wait4proxmark {
echo >&2 "Waiting for Proxmark to appear..."
while [ ! -c /dev/ttyACM? -a ! -L /dev/pm3-? ]; do
sleep .1
done
local PM3=`ls -1 /dev/pm3-? /dev/ttyACM? 2>/dev/null | head -1`
echo >&2 -e "Found proxmark on ${PM3}\n"
echo $PM3
}
# flash bootroom
client/flasher $(wait4proxmark) -b bootrom/obj/bootrom.elf
# flash system image
client/flasher $(wait4proxmark) armsrc/obj/fullimage.elf