blob: bb922d4d75221842eff468de3b308c4eba6b126a (
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
27
28
|
#!/bin/sh
. /lib/functions.sh
case $(board_name) in
ctera,c200-v1)
part=$(find_mtd_part "active_bank")
if [ -n "$part" ]; then
active_bank="$(strings $part | grep bank)"
if [ $active_bank = "bank1" ]; then
echo "bank2" > /tmp/change_bank
else
echo "bank1" > /tmp/change_bank
fi
mtd write /tmp/change_bank active_bank
reboot
else
echo "active_bank partition missed!"
return 1
fi
;;
*)
echo "Unsupported hardware."
;;
esac
|