# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# see the update-nand format definition
+# http://wiki.laptop.org/go/OFW_NAND_FLASH_Updater
+
. functions.sh
usage()
f=$1
eblocks=$((`stat --printf "%s\n" $f` / (128*1024)))
for b in $(seq 0 $(($eblocks - 1))); do
- sha=$(dd status=noxfer bs=128KiB skip=$b count=1 if=$f | sha256sum | cut -d- -f1)
+ sha=$(dd status=noxfer bs=128KiB skip=$b count=1 if=$f 2>/dev/null | sha256sum | cut -d- -f1)
echo "eblock: `printf '%x' $b` sha256 $sha" >> ${IMG_NAME}
done
}