lede/target/linux/ipq806x/base-files/etc/init.d/bootcount
2021-12-09 10:25:20 +08:00

46 lines
1.0 KiB
Bash
Executable File

#!/bin/sh /etc/rc.common
START=99
. "$IPKG_INSTROOT/lib/upgrade/asrock.sh"
boot() {
case $(board_name) in
asrock,g10)
asrock_bootconfig_mangle "bootcheck" && reboot
;;
edgecore,ecw5410)
fw_setenv bootcount 0
;;
linksys,ea7500-v1 |\
linksys,ea8500)
mtd resetbc s_env || true
;;
norton,core-518)
. /lib/functions/caldata.sh
FIRMWARE='ath10k/pre-cal-pci-0000:01:00.0.bin'
[ -e /lib/firmware/$FIRMWARE ] || {
caldata_extract_mmc "0:ART" 0x1000 0x2f20
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii_mmc 0:APPSBLENV ethaddr) 2)
}
FIRMWARE='ath10k/pre-cal-pci-0001:01:00.0.bin'
[ -e /lib/firmware/$FIRMWARE ] || {
caldata_extract_mmc "0:ART" 0x5000 0x2f20
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii_mmc 0:APPSBLENV ethaddr) 3)
}
[ -e /etc/config/wireless ] || {
/sbin/wifi config
/sbin/wifi up
}
[ -s /etc/config/wireless ] || {
rm /etc/config/wireless
/sbin/wifi config
/sbin/wifi up
}
;;
esac
}