タグ: bootnum

WN-AX1167GR2 bootnum, debugflagメモ

WN-DX1167Rとそれぞれ格納場所が同じ

root@WN-AX1167GR2:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 07f80000 00020000 "ALL"
mtd1: 00100000 00020000 "Bootloader"
mtd2: 00100000 00020000 "Ubootenv"
mtd3: 00100000 00020000 "Factory"
mtd4: 03200000 00020000 "firmware"
mtd5: 00100000 00020000 "Config"
mtd6: 03200000 00020000 "firmware_2"
mtd7: 03078908 00020000 "rootfs"
mtd8: 00100000 00020000 "Config_2"
mtd9: 00100000 00020000 "persist"
mtd10: 01480000 00020000 "Backup"
mtd11: 00100000 00020000 "SecondBoot"

bootnum

0x4

root@WN-AX1167GR2:~# mstc_persist read bootnum
2
root@WN-AX1167GR2:~# hexdump -n 128 -C /dev/mtd9
00000000  1b 05 ce 17 02 00 00 00  5d 4b 00 00 66 11 c7 bc  |........]K..f...|
00000010  5d 4b 00 00 66 11 c7 bc  00 00 00 00 00 00 00 00  |]K..f...........|
00000020  00 00 00 00 00 00 00 00  ff ff ff ff ff ff ff ff  |................|
00000030  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*
00000080
root@WN-AX1167GR2:~# mstc_persist write bootnum 1
Unlocking persist ...
root@WN-AX1167GR2:~# hexdump -n 128 -C /dev/mtd9
00000000  1b 05 ce 17 01 00 00 00  5d 4b 00 00 66 11 c7 bc  |........]K..f...|
00000010  5d 4b 00 00 66 11 c7 bc  00 00 00 00 00 00 00 00  |]K..f...........|
00000020  00 00 00 00 00 00 00 00  ff ff ff ff ff ff ff ff  |................|
00000030  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*
00000080

debugflag

0xFE75

root@WN-AX1167GR2:~# sys debugflag
DebugFlag: 0
root@WN-AX1167GR2:~# hexdump -n 128 -C -s $((0xFE00)) /dev/mtd3
0000fe00  4d 69 74 72 61 73 74 61  72 00 54 65 63 68 6e 6f  |Mitrastar.Techno|
0000fe10  6c 6f 67 79 20 43 6f 72  70 2e 00 00 00 00 00 00  |logy Corp.......|
0000fe20  4d 69 43 41 50 2d 33 33  34 30 43 00 00 00 00 00  |MiCAP-3340C.....|
0000fe30  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
0000fe40  31 39 35 36 30 35 32 37  00 00 00 00 00 00 00 00  |19560527........|
0000fe50  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
0000fe60  53 30 39 30 59 30 30 30  30 30 30 30 30 00 00 13  |S090Y00000000...|
0000fe70  49 55 aa 00 04 00 ff ff  5a 59 ff ff 00 00 00 00  |IU......ZY......|
0000fe80
root@WN-AX1167GR2:~# sys debugflag 1
PASS
root@WN-AX1167GR2:~# hexdump -n 128 -C -s $((0xFE00)) /dev/mtd3
0000fe00  4d 69 74 72 61 73 74 61  72 00 54 65 63 68 6e 6f  |Mitrastar.Techno|
0000fe10  6c 6f 67 79 20 43 6f 72  70 2e 00 00 00 00 00 00  |logy Corp.......|
0000fe20  4d 69 43 41 50 2d 33 33  34 30 43 00 00 00 00 00  |MiCAP-3340C.....|
0000fe30  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
0000fe40  31 39 35 36 30 35 32 37  00 00 00 00 00 00 00 00  |19560527........|
0000fe50  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
0000fe60  53 30 39 30 59 30 30 30  30 30 30 30 30 00 00 13  |S090Y00000000...|
0000fe70  49 55 aa 00 04 01 ff ff  5a 59 ff ff 00 00 00 00  |IU......ZY......|
0000fe80
広告

WN-DX1167R bootnumメモ

WN-DX1167Rのデュアルイメージ構成において、ブートするパーティションを切り替える bootnum フラグについてのメモ。

root@WN-DX1167R:/tmp/mtd# mstc_persist read bootnum
1
root@WN-DX1167R:/tmp/mtd# hexdump -n 128 -C /dev/mtd9
00000000  1b 05 ce 17 01 00 00 00  4a 4f 00 00 06 9e e4 d0  |........JO......|
00000010  4a 4f 00 00 06 9e e4 d0  00 00 00 00 00 00 00 00  |JO..............|
00000020  00 00 00 00 00 00 00 00  ff ff ff ff ff ff ff ff  |................|
00000030  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*
00000080
root@WN-DX1167R:/tmp/mtd# mstc_persist write bootnum 2
Unlocking persist ...
root@WN-DX1167R:/tmp/mtd# hexdump -n 128 -C /dev/mtd9
00000000  1b 05 ce 17 02 00 00 00  4a 4f 00 00 06 9e e4 d0  |........JO......|
00000010  4a 4f 00 00 06 9e e4 d0  00 00 00 00 00 00 00 00  |JO..............|
00000020  00 00 00 00 00 00 00 00  ff ff ff ff ff ff ff ff  |................|
00000030  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*
00000080