blob: b4feb742633c6e533fb1b7dc86e18756aa29b4fc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#!/bin/sh
. /env/config
if [ x$1 = xnand ]; then
part=/dev/nand0.uboot
elif [ x$1 = xnor ]; then
part=/dev/nor0.uboot
else
echo "usage: $0 nor|nand"
exit 1
fi
loadb -f uboot.bin -c
unprotect $part
echo
echo "erasing partition $part"
erase $part
echo
echo "flashing uboot.bin to $part"
echo
cp uboot.bin $part
crc32 -f uboot.bin
crc32 -f $part
|