Fresh pull from upstream
[librecmc/librecmc.git] / target / linux / sunxi / base-files / lib / preinit / 02_b53_hack.sh
1 #!/bin/sh
2 . /lib/sunxi.sh
3
4 do_b53_hack() {
5         # hack: enable switch on Lamobo R1 and reset counters
6         case "$( sunxi_board_name )" in
7         "lamobo,lamobo-r1")
8                 ifconfig eth0 up
9                 sleep 1
10                 swconfig dev switch0 set reset 1
11                 swconfig dev switch0 set reset_mib 1
12                 swconfig dev switch0 set apply 1
13                 ;;
14         esac
15 }
16
17 boot_hook_add preinit_main do_b53_hack