20180221_jeffrey - silenceuncrio/diary GitHub Wiki
0910
review
0940
先整理一下目前的問題
就以 Mitrastar 提供的原生 sysupgrade.bin
為主
先利用 uboot upgrade 該 firmware
再利用 web ui 做 firmware upgrade
再 reboot
這時就會發生問題
jffs2 is ready
No jffs2 marker was found
failed to mount -t jffs2 /dev/mtdblock6 /tmp/overlay: Input/output error
switching to overlay
switching to overlay failed - fallback to ramoverlay
0950
把 uboot 也還原回 mitrastar 提供的 uboot.img
再透過該 uboot upgrade firmware
以下是 console 相關訊息
jffs2 is not ready - marker found
[ 14.092000] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
[ 14.108000] jffs2_build_filesystem(): unlocking the mtd device... done.
[ 14.120000] jffs2_build_filesystem(): erasing all blocks after the end marker...
[ 50.384000] done.
[ 50.388000] jffs2: notice: (1028) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
直接在 shell 敲 reboot
jffs2 is ready
jffs2 is ready
[ 10.084000] jffs2: notice: (306) jffs2_build_xattr_subsystem: complete building xattr subsystem, 1 of xdatum (0 unchecked, 0 orphan) and 10 of xref (0 dead, 0 orphan) found.
switching to overlay
透過 web ui 做 firmware upgrade
該動作會讓系統自動 reboot
jffs2 is ready
[ 8.336000] jffs2: CLEANMARKER node found at 0x00000000 has totlen 0xc != normal 0x0
No jffs2 marker was found
[ 8.424000] jffs2_scan_eraseblock(): End of filesystem marker found at 0x20000
[ 8.440000] jffs2_build_filesystem(): unlocking the mtd device... done.
[ 8.452000] jffs2_build_filesystem(): erasing all blocks after the end marker... done.
[ 44.524000] jffs2: notice: (306) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
switching to overlay
- config restore -
此時在 shell 敲 reboot
jffs2 is ready
[ 8.332000] jffs2: CLEANMARKER node found at 0x00000000 has totlen 0xc != normal 0x0
No jffs2 marker was found
failed to mount -t jffs2 /dev/mtdblock6 /tmp/overlay: Input/output error
switching to overlay
switching to overlay failed - fallback to ramoverlay
1025
參考開機時的 mtd partition 資訊
[ 2.800000] Creating 5 MTD partitions on "MT7621-NAND":
[ 2.812000] 0x000000000000-0x000007f80000 : "ALL"
[ 2.820000] 0x000000000000-0x000000080000 : "Bootloader"
[ 2.832000] 0x000000080000-0x000000100000 : "Config"
[ 2.844000] 0x000000100000-0x000000140000 : "Factory"
[ 2.856000] 0x000000140000-0x000007f80000 : "firmware"
[ 2.868000] 0x0000002be7b5-0x000007f80000 : "rootfs"
把除了 Bootloader
之外的 partition 都清掉
1045
從 uboot upgrade sysupgrade.bin
jffs2 is not ready - marker found
[ 13.584000] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
[ 13.600000] jffs2_build_filesystem(): unlocking the mtd device... done.
[ 13.612000] jffs2_build_filesystem(): erasing all blocks after the end marker...
[ 49.968000] done.
[ 49.972000] jffs2: notice: (1002) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
reboot via shell
jffs2 is ready
jffs2 is ready
[ 10.088000] jffs2: notice: (306) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
switching to overlay
firmware upgrade via mitrastar web ui
會自動重開機
jffs2 is ready
[ 8.332000] jffs2: CLEANMARKER node found at 0x00000000 has totlen 0xc != normal 0x0
No jffs2 marker was found
[ 8.420000] jffs2_scan_eraseblock(): End of filesystem marker found at 0x20000
[ 8.436000] jffs2_build_filesystem(): unlocking the mtd device... done.
[ 8.448000] jffs2_build_filesystem(): erasing all blocks after the end marker... done.
[ 44.524000] jffs2: notice: (306) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
switching to overlay
- config restore -
reboot via shell
jffs2 is ready
[ 8.340000] jffs2: CLEANMARKER node found at 0x00000000 has totlen 0xc != normal 0x0
No jffs2 marker was found
failed to mount -t jffs2 /dev/mtdblock6 /tmp/overlay: Input/output error
switching to overlay
switching to overlay failed - fallback to ramoverlay
一樣的結果
1055
點一下 女兒收到的紅包
我這邊的親戚
- 爸爸 - 2000
- 媽媽 - 2000
- 妹妹 - ?
- 弟弟 - 1000 ?
- 二姑 - 1200
- 五姑 - 600
- 五姑 兒子 - 600
- 五姑 女兒 - 1000
- 小姑 - 600
- 叔叔 - 1200
- 叔叔 兒子 - 600
- 叔叔 大女兒 - 600
- 叔叔 小女兒 - 200
老婆的親戚
- 爸爸 - 2000
- 媽媽 - 2000
- 妹妹 - 1200
- 弟弟 - 2000
- 二姑 - 3600
- 外婆 - 1000
- 大舅 - 600
- 小舅 - 1000
- 趙媽 - 1000
1120
試著追一下目前 m360 遇到的問題
要 trace system/fstools 這個 package 可以利用下面的流程
- 修改 source code
make package/system/fstools/install V=s
make package/install V=s
make -j3 V=s
這會在 bin/ramips
位置產出 openwrt-ramips-mt7621-mt7621-squashfs-sysupgrade.bin
1550
覺得差不多要開始準備第二備案的 survey 了
當問題發生的時候
執行 mount -t jffs2 /dev/mtdblock6 /tmp/overlay
會失敗
但目前不知道為什麼會這樣
目前暫時的結論是只要透過 web ui 做過 firmware upgrade 並且勾選了 Keep settings
就會造成目前的現象
1640
參考 https://github.com/openwrt/openwrt/commits/master/package/system/mtd
更新一下 package/system/mtd
最多可以更新到 c666584
就試試看吧
make package/system/mtd/install V=s
make package/install V=s
make -j3 V=s
還是失敗了
1700
明天就朝第二條路前進吧
自己保留一個 partition 自己用