Newer
Older
barebox / board / ipe337 / env / bin / _update
@Marc Kleine-Budde Marc Kleine-Budde on 12 Nov 2007 340 bytes [ipe337] new version of update_* scripts
echo "updating $image to $part"

if [ -z "$part" -o -z "$image" ]; then
	echo "define \$part and \$image"
	exit 1
fi

if [ \! -e "$part" ]; then
        echo "Partition $part does not exist"
        exit 1
fi

if [ $# = 1 ]; then
        image=$1
fi

if [ x$ip = xdhcp ]; then
        dhcp
fi

unprotect $part
erase $part
tftp $image $part