#!/bin/sh

# eeprom_bootcount_set.sh

d=$(dirname "$0")

# includes:
. ${d}/eeprom_bootcount_include.sh

usage() {
	echo "usage: $1 <decimal value>"
	exit 1
}

if [ "$1" = "" ]
then
	usage "$0"
	exit 1
fi

echo -n -e \\x$(printf '%x' $1 ) | dd of=${nvmem} bs=1 count=1 seek=${addr} 2>/dev/null

