move boards to arch/<architecure>/boards
[barebox-mini2440.git] / arch / arm / boards / at91sam9260ek / env / bin / _update
blob014bce3512c3583b86c7a342a3aca586e124127d
1 #!/bin/sh
3 if [ -z "$part" -o -z "$image" ]; then
4 echo "define \$part and \$image"
5 exit 1
6 fi
8 if [ ! -e "$part" ]; then
9 echo "Partition $part does not exist"
10 exit 1
13 if [ $# = 1 ]; then
14 image=$1
17 if [ x$ip = xdhcp ]; then
18 dhcp
21 ping $eth0.serverip
22 if [ $? -ne 0 ] ; then
23 echo "update aborted"
24 exit 1
27 unprotect $part
29 echo
30 echo "erasing partition $part"
31 erase $part
33 echo
34 echo "flashing $image to $part"
35 echo
36 tftp $image $part