blob: 39818b585c99c73afae21ef910fdaa44d310408b (
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.barebox
elif [ x$1 = xnor ]; then
part=/dev/nor0.barebox
else
echo "usage: $0 nor|nand"
exit 1
fi
loadb -f barebox.bin -c
unprotect $part
echo
echo "erasing partition $part"
erase $part
echo
echo "flashing barebox.bin to $part"
echo
cp barebox.bin $part
crc32 -f barebox.bin
crc32 -f $part
|