openwrt/target/linux/ramips/base-files/etc/init.d/bootcount
Chuanhong Guo 7a21c85f70 ramips: improve support for Xiaomi Miwifi Nano
This patch does the following things:
1. mark u-boot-env writable
2. add bootcount support
   Currently, u-boot has a flag_boot_success env variable to reset.
   Also reset it in our firmware to follow the behavior in vendor's
   firmware.
3. disable usb support
   This router doesn't have usb port at all.
4. increase spi clock to 40MHz
5. fix pinmux groups

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2019-09-04 19:26:01 +08:00

15 lines
186 B
Bash
Executable File

#!/bin/sh /etc/rc.common
START=99
boot() {
case $(board_name) in
samknows,whitebox-v8)
fw_setenv bootcount 0
;;
xiaomi,miwifi-nano)
fw_setenv flag_boot_success 1
;;
esac
}