ath79: adtran,bsap1840/bsap1800-v2: move bootcount out of 02_network
authorChuanhong Guo <gch981213@gmail.com>
Sat, 10 Aug 2019 12:00:24 +0000 (20:00 +0800)
committerChuanhong Guo <gch981213@gmail.com>
Sat, 17 Aug 2019 15:52:34 +0000 (23:52 +0800)
These device supports were introduced before /etc/init.d/bootcount and they
had a bootcount reset done in /etc/board.d/02_network.
Move it into /etc/init.d/bootcount instead.

Suggested-by: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
target/linux/ath79/base-files/etc/board.d/02_network
target/linux/ath79/base-files/etc/init.d/bootcount

index c9261f355670a259d0953776036bc694fa2efef7..9702a29ad91a77ac4985ac9f1f5fbeeccac6f949 100755 (executable)
@@ -304,7 +304,6 @@ ath79_setup_macs()
        case "$board" in
        adtran,bsap1800-v2|\
        adtran,bsap1840)
-               fconfig -s -w -d $(find_mtd_part "RedBoot config") -n boot_cntb -x 0
                lan_mac=$(mtd_get_mac_binary "Board data" 2)
                ;;
        avm,fritz300e)
index c734fd9d336e0defa397496d86ea72555efb04a4..7807559d81033368d73fdfe2a4f1277054b47742 100755 (executable)
@@ -4,6 +4,10 @@ START=99
 
 boot() {
        case $(board_name) in
+       adtran,bsap1800-v2|\
+       adtran,bsap1840)
+               fconfig -s -w -d $(find_mtd_part "RedBoot config") -n boot_cntb -x 0
+               ;;
        qihoo,c301)
                local n=$(fw_printenv activeregion | cut -d = -f 2)
                fw_setenv "image${n}trynum" 0