20190626_jeffrey - silenceuncrio/diary GitHub Wiki

0910

昨天針對 M300 - release/v2.00 的修改

scroll to top at each time a angularjs route change

status 那一頁放一下就會自動捲到頂

那是因為 status 那一頁每五秒就會呼叫 $route.reload();

    vm.myLoop = function() {
        timer = $timeout(5000);
        timer.then(function () {
            $route.reload();
            vm.myLoop();
        });
    }

1015

作了以下修正後也稍微測試了一下

diff --git a/proscend/prosrc/www/app/app.controller.js b/proscend/prosrc/www/app/app.controller.js
index bb2d773..0221a44 100644
--- a/proscend/prosrc/www/app/app.controller.js
+++ b/proscend/prosrc/www/app/app.controller.js
@@ -92,7 +92,13 @@ function appController($scope, $http, $timeout, $translate, $location, $template
         $templateCache.removeAll();

         // Scroll to top
-        $window.scrollTo(0, 0);
+        if (next !== undefined && next.originalPath === '/')^M
+        {^M
+            // do nothing because status page use $route.reload() per 5 seconds^M
+        } else {^M
+            $window.scrollTo(0, 0);^M
+        }^M
+^M
     });

沒有發現什麼問題

commit b9208b52fb811977ea176df80e8adb1312593df4
Refs: [release/v2.00], {origin/release/v2.00}
Author: jeffrey <[email protected]>
Date:   Wed Jun 26 10:21:35 2019 +0800

    when scroll to top at each time a angularjs route change,
    exclude the case when status page use $route.reload() to call it's self per 5 seconds.

 proscend/prosrc/www/app/app.controller.js | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

1030

相同的 code 也放到 M330 - release/v0.04

build 個 image 測一下

PASS

順手也放到 M360 上

M360P - develop

commit 92a7620b5c8e22b3022627a057976a2480a8b2ac
Refs: [develop], {origin/develop}
Author: jeffrey <[email protected]>
Date:   Wed Jun 26 10:51:54 2019 +0800

    when scroll to top at each time a angularjs route change,
    exclude the case when status page use $route.reload() to call it's self per 5 seconds.

 proscend/prosrc/www/app/app.controller.js | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

1100

M360P 大陸量產 400 台約有 6% 有問題

品保拿了兩台有問題的板子回來

先拿一台接上電

發現問題跟 20190108_jeffrey 一樣

當時也有回覆 mail 給 mitrastar

不過目前再來看當時 mail 裡的懷疑有覺得不合理

畢竟 mistrastar 的產測需要他們自己的 partition a 先跑一次用來測試 PCBA

那照理說應該切到 partition b 都會有目前這個現象才對

但 400 台裡面有 6%

到底是怎麼造成的還要跟對方交換情報才行

再確認另一片的情形是否也是這樣

也是一樣

先問一下相關聯絡窗口試著交換一下情報

這兩片先不去動它

1145

先等 spring 確認對方的聯絡窗口後

試著安排一下電話會議聊一下

今年一月份的 email 等有需要我再 mail 給他們當作參考

1300

回到 M330 - feature/lighttpd

  • Procuts/Vendor = M330/0_GENERIC

M330 - feature/lighttpd - 'VPN > L2TP'

commit e40839fdc3637037e8a9e6334decfbc86faeb1e7
Refs: [feature/lighttpd], {origin/feature/lighttpd}
Author: jeffrey <[email protected]>
Date:   Wed Jun 26 13:30:20 2019 +0800

    feature/lighttpd - 'VPN > L2TP'

    l2tp.cgi
    - jweb.access.filter(ATTVAL_SYSTEM_LEVEL1, _config)
    - jweb.access.filter(ATTVAL_SYSTEM_LEVEL2, _apply)
    - jweb.access.filter(ATTVAL_SYSTEM_LEVEL1, _help)

 proscend/prosrc/webcgi/l2tp.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

M330 - feature/lighttpd - 'Firewall > Basic Rules'

commit 69b627d845f3d34699370f57b70f6500e69896a5
Refs: [feature/lighttpd], {origin/feature/lighttpd}
Author: jeffrey <[email protected]>
Date:   Wed Jun 26 13:38:18 2019 +0800

    feature/lighttpd - 'Firewall > Basic Rules'

    firewall.cgi
    - jweb.access.filter(ATTVAL_SYSTEM_LEVEL1, _config)
    - jweb.access.filter(ATTVAL_SYSTEM_LEVEL2, _apply)
    - jweb.access.filter(ATTVAL_SYSTEM_LEVEL1, _help)

    firewall6.cgi
    - jweb.access.filter(ATTVAL_SYSTEM_LEVEL1, _config)
    - jweb.access.filter(ATTVAL_SYSTEM_LEVEL2, _apply)
    - jweb.access.filter(ATTVAL_SYSTEM_LEVEL1, _help)

 proscend/prosrc/webcgi/firewall.c  | 8 ++++----
 proscend/prosrc/webcgi/firewall6.c | 8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)

M330 - feature/lighttpd - 'Firewall > Port Forwading'

commit 1af1fa997cadec8e65734a1037b63b7685e318bd
Refs: [feature/lighttpd], {origin/feature/lighttpd}
Author: jeffrey <[email protected]>
Date:   Wed Jun 26 13:41:30 2019 +0800

    feature/lighttpd - 'Firewall > Port Forwading'

    dnat.cgi
    - jweb.access.filter(ATTVAL_SYSTEM_LEVEL1, _config)
    - jweb.access.filter(ATTVAL_SYSTEM_LEVEL2, _apply)
    - jweb.access.filter(ATTVAL_SYSTEM_LEVEL1, _help)

 proscend/prosrc/webcgi/dnat.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

M330 - feature/lighttpd - 'Firewall > DMZ'

commit d12c0909305f13af02d1c8863f0243309b43321e
Refs: [feature/lighttpd], {origin/feature/lighttpd}
Author: jeffrey <[email protected]>
Date:   Wed Jun 26 13:46:07 2019 +0800

    feature/lighttpd - 'Firewall > DMZ'

    dmz.cgi
    - jweb.access.filter(ATTVAL_SYSTEM_LEVEL1, _config);
    - jweb.access.filter(ATTVAL_SYSTEM_LEVEL2, _apply);
    - jweb.access.filter(ATTVAL_SYSTEM_LEVEL1, _test);
    - jweb.access.filter(ATTVAL_SYSTEM_LEVEL1, _help);

 proscend/prosrc/webcgi/dmz.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

M330 - feature/lighttpd - 'Firewall > IP Filter'

commit fe336f3baf30752a0126eb9df1c11460d041d92e
Refs: [feature/lighttpd], {origin/feature/lighttpd}
Author: jeffrey <[email protected]>
Date:   Wed Jun 26 13:48:36 2019 +0800

    feature/lighttpd - 'Firewall > IP Filter'

    ipfilter.cgi
    - jweb.access.filter(ATTVAL_SYSTEM_LEVEL1, _config);
    - jweb.access.filter(ATTVAL_SYSTEM_LEVEL2, _apply);

 proscend/prosrc/webcgi/ipfilter.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

M330 - feature/lighttpd - 'Firewall > MAC Filter'

commit 465786f0c60616adf5ed4154766c1150fe92522c
Refs: [feature/lighttpd], {origin/feature/lighttpd}
Author: jeffrey <[email protected]>
Date:   Wed Jun 26 13:50:46 2019 +0800

    feature/lighttpd - 'Firewall > MAC Filter'

    macfilter.cgi
    - jweb.access.filter(ATTVAL_SYSTEM_LEVEL1, _config);
    - jweb.access.filter(ATTVAL_SYSTEM_LEVEL2, _apply);

 proscend/prosrc/webcgi/macfilter.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

M330 - feature/lighttpd - 'Firewall > URL Filter'

commit 910baff471543ac6fa91329e3ba4b8d183af292f
Refs: [feature/lighttpd], {origin/feature/lighttpd}
Author: jeffrey <[email protected]>
Date:   Wed Jun 26 13:53:01 2019 +0800

    feature/lighttpd - 'Firewall > URL Filter'

    urlfilter.cgi
    - jweb.access.filter(ATTVAL_SYSTEM_LEVEL1, _config);
    - jweb.access.filter(ATTVAL_SYSTEM_LEVEL2, _apply);

 proscend/prosrc/webcgi/urlfilter.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

M330 - feature/lighttpd - 'Firewall > NAT'

commit 576f9b7b3b0eab084c7d5a3826bd02b11635a895
Refs: [feature/lighttpd], {origin/feature/lighttpd}
Author: jeffrey <[email protected]>
Date:   Wed Jun 26 13:55:06 2019 +0800

    feature/lighttpd - 'Firewall > NAT'

    snat.cgi
    - jweb.access.filter(ATTVAL_SYSTEM_LEVEL1, _config);
    - jweb.access.filter(ATTVAL_SYSTEM_LEVEL2, _apply);
    - jweb.access.filter(ATTVAL_SYSTEM_LEVEL1, _help);

 proscend/prosrc/webcgi/snat.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

1400

M360P 的 mistratar 的聯絡窗口是 jeffary 羅煥英

目前已回到 台灣

連絡電話是 03-5777998 分機 56815

先致電聊了一下

生產 1000 台裡有 4x 台有這個問題

先不管具體的生產流程

對方在某個站點利用 partition a 做完測試後

會把 partition a erase 掉並利用 uboot 切到 partition b 後拔電

下一個站點上電期待的就是 partition b 裡我們的 image

但開不起來

結果就是我手上這兩台的樣子

對方待會會寄 mail 給我

不過目前對方針對的點是我們的 image 並沒有針對 bad block 做處理

所以才卡住了

等待對方的 email 的同時再拿其中一台來看

目前開機的 partition 是 b

出現了一堆 jffs2 的 error 之後會出現 Kernel panic

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,5)

確認一下對方說的 會去 erase 掉 partition a

進 uboot

把 dual_image_active 從 b 改成 a

看起來的確是刪掉了

我想我要去面對這 bad block 的問題了

1430

mitrastar 回信如下

Hi Spring,

針對6% fail rate的問題: “生產切到客戶FW無法開機”
我們在產線debug 4台device, 此4台異常都一樣附件是其中一台0Y1925069103-PKCT
開機異常的console log.

我們分析此log如下:
Flash has bad block on 0x2ea0000 in rootfs partition 0x0000022ef58d-0x000004140000 (See, pic 1)
Squash fs don’t allow bad block(no sequence) in it’s partition
Please correct MTK ralink_nand.c driver for skip bad blocks on rootfs partition

image

image

1515

寫信跟對方凹一下 nand driver

不過我先拿這兩台當中的其中一台看看 nand erase 能否救得回來

注意不要把對方已寫入的 uboot env 刪掉了

已其中一台為例

...
[    2.160000] NAND device: Manufacturer ID: 0xc2, Chip ID: 0xf1 (Macronix NAND 128MiB 3,3V 8-bit), 128MiB, page size: 2048, OOB size: 64
[    2.184000] [NAND]select ecc bit:4, sparesize :64 spare_per_sector=16
[    2.200000] Scanning device for bad blocks
[    2.220000] Bad eraseblock 55 at 0x0000006e0000
[    2.304000] Bad eraseblock 373 at 0x000002ea0000
[    2.312000] Bad eraseblock 376 at 0x000002f00000
[    2.476000] Signature matched and data read!
[    2.484000] load_fact_bbt success 1023
[    2.492000] 00 00 00 00 00 00 00 00 00 00 00 00 00 c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[    2.512000] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[    2.532000] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0c 03 00
[    2.552000] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[    2.568000] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[    2.588000] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[    2.608000] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[    2.628000] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[    2.648000] active dual image is b!
[    2.656000] Creating 8 MTD partitions on "MT7621-NAND":
[    2.668000] 0x000000000000-0x000007f80000 : "ALL"
[    2.676000] 0x000000000000-0x000000080000 : "Bootloader"
[    2.688000] 0x000000080000-0x000000100000 : "Config"
[    2.700000] 0x000000100000-0x000000140000 : "Factory"
[    2.712000] 0x000002140000-0x000004140000 : "firmware"
[    2.724000] 0x0000022ef58d-0x000004140000 : "rootfs"
[    2.732000] mtd: partition "rootfs" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
[    2.772000] bad_detected= 1
[    2.776000] bad_detected= 2
[    2.784000] mtd: partition "rootfs_data" created automatically, ofs=0x2f80000, len=0x11c0000
[    2.800000] 0x000002f80000-0x000004140000 : "rootfs_data"
[    2.812000] 0x000000140000-0x000002140000 : "reserve"
[    2.824000] 0x000005000000-0x000006000000 : "Proscend-config"
[    2.836000] 0x000006000000-0x000007000000 : "Proscend-misc"
[    2.848000] [mtk_nand] probe successfully!
[    2.856000] rootfs = 22ef58d to 2f80000
[    2.864000] PPP generic driver version 2.4.2
[    2.872000] PPP BSD Compression module registered
[    2.884000] PPP Deflate Compression module registered
[    2.892000] PPP MPPE Compression module registered
[    2.900000] NET: Registered protocol family 24
[    2.912000] rdm_major = 253
[    2.916000] GMAC1_MAC_ADRH -- : 0x0000000c
[    2.924000] GMAC1_MAC_ADRL -- : 0x4328808a
[    2.932000] Ralink APSoC Ethernet Driver Initilization. v3.1  1024 rx/tx descriptors allocated, mtu = 1500!
[    2.952000] GMAC1_MAC_ADRH -- : 0x0000000c
[    2.960000] GMAC1_MAC_ADRL -- : 0x432880e8
[    2.968000] PROC INIT OK!
[    2.976000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    2.988000] ehci-pci: EHCI PCI platform driver
[    2.996000] ehci-platform: EHCI generic platform driver
[    3.008000] *****run project phy.
[    3.024000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.040000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.056000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.072000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.088000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.104000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.120000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.136000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.152000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.168000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.200000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.216000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.232000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.248000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.264000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.280000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.296000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.312000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.328000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.344000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.472000] xhci-hcd xhci-hcd: xHCI Host Controller
[    3.480000] xhci-hcd xhci-hcd: new USB bus registered, assigned bus number 1
[    3.496000] xhci-hcd xhci-hcd: irq 22, io mem 0x1e1c0000
[    3.508000] hub 1-0:1.0: USB hub found
[    3.516000] hub 1-0:1.0: 2 ports detected
[    3.524000] xhci-hcd xhci-hcd: xHCI Host Controller
[    3.532000] xhci-hcd xhci-hcd: new USB bus registered, assigned bus number 2
[    3.548000] hub 2-0:1.0: USB hub found
[    3.556000] hub 2-0:1.0: 1 port detected
[    3.564000] usbcore: registered new interface driver usb-storage
[    3.576000] Mirror/redirect action on
[    3.584000] u32 classifier
[    3.588000]     input device check on
[    3.596000]     Actions configured
[    3.604000] weburl init
[    3.608000] TCP: cubic registered
[    3.616000] Initializing XFRM netlink socket
[    3.624000] NET: Registered protocol family 10
[    3.632000] NET: Registered protocol family 17
[    3.640000] NET: Registered protocol family 15
[    3.652000] Bridge firewalling registered
[    3.660000] Ebtables v2.0 registered
[    3.664000] l2tp_core: L2TP core driver, V2.0
[    3.676000] l2tp_ppp: PPPoL2TP kernel driver, V2.0
[    3.684000] l2tp_ip: L2TP IP encapsulation support (L2TPv3)
[    3.696000] l2tp_netlink: L2TP netlink interface
[    3.704000] l2tp_eth: L2TP ethernet pseudowire support (L2TPv3)
[    3.716000] l2tp_ip6: L2TP IP encapsulation support for IPv6 (L2TPv3)
[    3.728000] 8021q: 802.1Q VLAN Support v1.8
[    3.740000] SQUASHFS error: unable to read id index table
...

我們想 erase 的範圍從 0x000002140000 到 0x000007f80000 共 5E40000

U-Boot 1.1.3 (Apr 16 2019 - 11:43:51)
MT7621 #
MT7621 # nand erase 2140000 5E40000
erase addr=02140000, len=98828288
ranand_erase: start:2140000, len:5e40000
.........................................................................................................
..ranand_erase: attempt to erase a fact bad block at 0x02ea0000
..ranand_erase: attempt to erase a fact bad block at 0x02f00000
.........................................................................................................
.........................................................................................................
.........................................................................................................
.........................................................................................................
.........................................................................................................
.........................................................................................................
...............erase finish
MT7621 #

再利用 proscend uboot 提供的 c: Write to dual images 'a' and 'b' via TFTP. 再 write 一次 sysupgrade.bin

...
Please choose the operation:
   1: Load system code to SDRAM via TFTP.
   2: Load system code then write to Flash via TFTP.
   3: Boot system code via Flash (default).
   4: Entr boot command line interface.
   7: Load Boot Loader code then write to Flash via Serial.
   9: Load Boot Loader code then write to Flash via TFTP.
   a: Write to dual image 'a' via TFTP.
   b: Write to dual image 'b' via TFTP.
   c: Write to dual images 'a' and 'b' via TFTP.

You choosed c

 0


c: Write to all dual images via TFTP.
 Warning!! Erase Linux at dual images 'a' and 'b' then burn new one. Are you sure?(Y/N)
[tftp_config:1011]type: 2
 Please Input new ones /or Ctrl-C to discard
        Input device IP (192.168.1.1) ==:192.168.1.1
        Input server IP (192.168.1.113) ==:192.168.1.113
        Input Linux Kernel filename ("ras.bin") ==:sysupgrade.bin
...

開機

...
[    2.160000] NAND device: Manufacturer ID: 0xc2, Chip ID: 0xf1 (Macronix NAND 128MiB 3,3V 8-bit), 128MiB, page size: 2048, OOB size: 64
[    2.184000] [NAND]select ecc bit:4, sparesize :64 spare_per_sector=16
[    2.200000] Scanning device for bad blocks
[    2.220000] Bad eraseblock 55 at 0x0000006e0000
[    2.304000] Bad eraseblock 373 at 0x000002ea0000
[    2.312000] Bad eraseblock 376 at 0x000002f00000
[    2.476000] Signature matched and data read!
[    2.484000] load_fact_bbt success 1023
[    2.492000] 00 00 00 00 00 00 00 00 00 00 00 00 00 c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[    2.512000] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[    2.532000] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0c 03 00
[    2.552000] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[    2.572000] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[    2.592000] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[    2.612000] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[    2.628000] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[    2.652000] active dual image is b!
[    2.656000] Creating 8 MTD partitions on "MT7621-NAND":
[    2.668000] 0x000000000000-0x000007f80000 : "ALL"
[    2.676000] 0x000000000000-0x000000080000 : "Bootloader"
[    2.688000] 0x000000080000-0x000000100000 : "Config"
[    2.700000] 0x000000100000-0x000000140000 : "Factory"
[    2.712000] 0x000002140000-0x000004140000 : "firmware"
[    2.724000] 0x0000022ef58d-0x000004140000 : "rootfs"
[    2.736000] mtd: partition "rootfs" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
[    2.772000] bad_detected= 1
[    2.780000] bad_detected= 2
[    2.784000] mtd: partition "rootfs_data" created automatically, ofs=0x2f80000, len=0x11c0000
[    2.800000] 0x000002f80000-0x000004140000 : "rootfs_data"
[    2.812000] 0x000000140000-0x000002140000 : "reserve"
[    2.824000] 0x000005000000-0x000006000000 : "Proscend-config"
[    2.836000] 0x000006000000-0x000007000000 : "Proscend-misc"
[    2.848000] [mtk_nand] probe successfully!
[    2.856000] rootfs = 22ef58d to 2f80000
[    2.864000] PPP generic driver version 2.4.2
[    2.872000] PPP BSD Compression module registered
[    2.884000] PPP Deflate Compression module registered
[    2.892000] PPP MPPE Compression module registered
[    2.904000] NET: Registered protocol family 24
[    2.912000] rdm_major = 253
[    2.916000] GMAC1_MAC_ADRH -- : 0x0000000c
[    2.928000] GMAC1_MAC_ADRL -- : 0x43288079
[    2.936000] Ralink APSoC Ethernet Driver Initilization. v3.1  1024 rx/tx descriptors allocated, mtu = 1500!
[    2.952000] GMAC1_MAC_ADRH -- : 0x0000000c
[    2.960000] GMAC1_MAC_ADRL -- : 0x432880f0
[    2.972000] PROC INIT OK!
[    2.976000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    2.988000] ehci-pci: EHCI PCI platform driver
[    2.996000] ehci-platform: EHCI generic platform driver
[    3.008000] *****run project phy.
[    3.028000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.048000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.068000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.088000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.108000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.128000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.148000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.168000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.188000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.208000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.252000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.272000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.292000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.312000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.332000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.352000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.372000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.392000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.412000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.432000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.572000] xhci-hcd xhci-hcd: xHCI Host Controller
[    3.580000] xhci-hcd xhci-hcd: new USB bus registered, assigned bus number 1
[    3.596000] xhci-hcd xhci-hcd: irq 22, io mem 0x1e1c0000
[    3.608000] hub 1-0:1.0: USB hub found
[    3.616000] hub 1-0:1.0: 2 ports detected
[    3.624000] xhci-hcd xhci-hcd: xHCI Host Controller
[    3.632000] xhci-hcd xhci-hcd: new USB bus registered, assigned bus number 2
[    3.648000] hub 2-0:1.0: USB hub found
[    3.656000] hub 2-0:1.0: 1 port detected
[    3.664000] usbcore: registered new interface driver usb-storage
[    3.676000] Mirror/redirect action on
[    3.684000] u32 classifier
[    3.688000]     input device check on
[    3.696000]     Actions configured
[    3.704000] weburl init
[    3.708000] TCP: cubic registered
[    3.716000] Initializing XFRM netlink socket
[    3.724000] NET: Registered protocol family 10
[    3.732000] NET: Registered protocol family 17
[    3.740000] NET: Registered protocol family 15
[    3.752000] Bridge firewalling registered
[    3.760000] Ebtables v2.0 registered
[    3.764000] l2tp_core: L2TP core driver, V2.0
[    3.776000] l2tp_ppp: PPPoL2TP kernel driver, V2.0
[    3.784000] l2tp_ip: L2TP IP encapsulation support (L2TPv3)
[    3.796000] l2tp_netlink: L2TP netlink interface
[    3.804000] l2tp_eth: L2TP ethernet pseudowire support (L2TPv3)
[    3.816000] l2tp_ip6: L2TP IP encapsulation support for IPv6 (L2TPv3)
[    3.828000] 8021q: 802.1Q VLAN Support v1.8
[    3.840000] SQUASHFS error: unable to read id index table
...

慘了

最糟的狀況發生了

看來這個 case 跟 20190108_jeffrey 不一樣

透過 nand erase 還是救不回來

1545

先透過 spring 去凹一下對方的業務來 push 一下新的 nand driver

1555

耐著性子再看一次 20190108_jeffrey

一樣是 Bad eraseblock 導致 SQUASHFS error: unable to read id index table

為何那次 nand erase 就可以解決呢

先不對此深究了

注定要改 driver 並給出新的 image 了

手上這兩片就當實驗對象吧

不要再作 nand erase 了

勇敢的去承擔自己過去的失誤吧

1635

邊整理邊回憶 M360 跟 bad block 相關的情報

  • 20181130_jeffrey
    • Mistra Star M360P 試產有三片不良
  • 20181228_jeffrey
    • mitrastar 回復的 log - 跟 bad block 有關
  • 20190102_jeffrey
    • 從 mitrastar 把 M360 發生 bad block 板子拿回來了
  • 20190108_jeffrey
    • 進 uboot 清空除了 uboot 之外的 partition - nand erase 80000 7000000
    • 回信給 mitrastar 表示應該是另一個 partition 把 nand flash layout 弄得跟我們認得的不一樣所導致

看來就是自己的錯誤判斷讓這個問題拖到現在

明天先向 ariel 作個報告

目前能做的就是解決 nand driver 的問題

不解決的話 M360P 就無法出貨

1700

回憶一下之前作 dual image 時怎麼來 trace M360P 底層

參考 20180208_jeffrey

1725

試著作以下修改

14,17c14,17
< #define CONFIG_BADBLOCK_CHECK 1
< #ifdef CONFIG_BADBLOCK_CHECK
< #define MTK_NAND_BMT  1
< #endif
---
> //#define CONFIG_BADBLOCK_CHECK       1
> //#ifdef CONFIG_BADBLOCK_CHECK
> //#define MTK_NAND_BMT        1
> //#endif

參考 20180208_jeffrey

  • make target/linux/install
    • 快速套用目前對於 source code 的修改
    • 重新產生 linux kernel image

進 proscend 目錄

  1. Products/Vendor = M360P/2_PI
  2. make clean
  3. make

拿 mitrastar 退回來的其中一台利用 c: Write to dual images 'a' and 'b' via TFTP. upgrade 剛剛產出的 sysupgrade.bin

...
[    2.160000] NAND device: Manufacturer ID: 0xc2, Chip ID: 0xf1 (Macronix NAND 128MiB 3,3V 8-bit), 128MiB, page size: 2048, OOB size: 64
[    2.184000] [NAND]select ecc bit:4, sparesize :64 spare_per_sector=16
[    2.200000] Scanning device for bad blocks
[    2.220000] Bad eraseblock 55 at 0x0000006e0000
[    2.360000] Bad eraseblock 373 at 0x000002ea0000
[    2.372000] Bad eraseblock 376 at 0x000002f00000
[    2.684000] Signature matched and data read!
[    2.696000] load_fact_bbt success 1023
[    2.700000] 00 00 00 00 00 00 00 00 00 00 00 00 00 c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[    2.720000] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[    2.740000] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0c 03 00
[    2.760000] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[    2.780000] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[    2.800000] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[    2.820000] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[    2.840000] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[    2.860000] Init bmt table, size: 8
[    2.868000] mtd_bmt: 87dba638, nand_chip_bmt: 87dba400
[    2.876000] bmt count: 8, system count: 1012
[    2.884000] [load_bmt_data]: begin to search BMT from block 0x3fb
[    2.900000] bmt block not found!
[    2.908000] Load bmt data fail, need re-construct!
[    2.916000] read page: 0xfd00
[    2.924000] get bad index: 0xffff
[    2.932000] read page: 0xfd40
[    2.936000] get bad index: 0xffff
[    2.944000] read page: 0xfd80
[    2.952000] get bad index: 0xffff
[    2.956000] read page: 0xfdc0
[    2.964000] get bad index: 0xffff
[    2.972000] read page: 0xfe00
[    2.976000] get bad index: 0xffff
[    2.984000] read page: 0xfe40
[    2.988000] get bad index: 0xffff
[    2.996000] read page: 0xfe80
[    3.004000] get bad index: 0xffff
[    3.008000] read page: 0xfec0
[    3.016000] get bad index: 0xffff
[    3.024000] Scan replace pool done, mapped block: 0
[    3.032000] BMT v1. total 0 mapping:
[    3.040000] Try to write BMT
[    3.044000] Try to find_available_block, pool_erase: 0
[    3.056000] Erase all un-mapped blocks in pool
[    3.068000] Find block 0x3fb available
[    3.076000] Find BMT block: 0x3fb
[    3.084000] Write BMT data to block 0x3fb success

<停在這邊>

看來的確有套用到我的修改

不過停在奇怪的地方

再修改一次

14c14
< #define CONFIG_BADBLOCK_CHECK 1
---
> //#define CONFIG_BADBLOCK_CHECK       1
  • proscend 外層 - make target/linux/install
  • 進 proscend - make

透過 uboot upgrade

...
[    2.160000] NAND device: Manufacturer ID: 0xc2, Chip ID: 0xf1 (Macronix NAND 128MiB 3,3V 8-bit), 128MiB, page size: 2048, OOB size: 64
[    2.184000] [NAND]select ecc bit:4, sparesize :64 spare_per_sector=16
[    2.200000] Scanning device for bad blocks
[    2.220000] Bad eraseblock 55 at 0x0000006e0000
[    2.304000] Bad eraseblock 373 at 0x000002ea0000
[    2.312000] Bad eraseblock 376 at 0x000002f00000
[    2.476000] Signature matched and data read!
[    2.484000] load_fact_bbt success 1023
[    2.492000] 00 00 00 00 00 00 00 00 00 00 00 00 00 c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[    2.512000] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[    2.532000] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0c 03 00
[    2.552000] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[    2.572000] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[    2.592000] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[    2.612000] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[    2.628000] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[    2.648000] active dual image is b!
[    2.656000] Creating 8 MTD partitions on "MT7621-NAND":
[    2.668000] 0x000000000000-0x000007f80000 : "ALL"
[    2.676000] 0x000000000000-0x000000080000 : "Bootloader"
[    2.688000] 0x000000080000-0x000000100000 : "Config"
[    2.700000] 0x000000100000-0x000000140000 : "Factory"
[    2.712000] 0x000002140000-0x000004140000 : "firmware"
[    2.724000] 0x0000022ef6bc-0x000004140000 : "rootfs"
[    2.736000] mtd: partition "rootfs" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
[    2.772000] bad_detected= 1
[    2.780000] bad_detected= 2
[    2.784000] mtd: partition "rootfs_data" created automatically, ofs=0x2fc0000, len=0x1180000
[    2.800000] 0x000002fc0000-0x000004140000 : "rootfs_data"
[    2.812000] 0x000000140000-0x000002140000 : "reserve"
[    2.824000] 0x000005000000-0x000006000000 : "Proscend-config"
[    2.836000] 0x000006000000-0x000007000000 : "Proscend-misc"
[    2.848000] [mtk_nand] probe successfully!
[    2.856000] rootfs = 22ef6bc to 2fc0000
[    2.864000] PPP generic driver version 2.4.2
[    2.872000] PPP BSD Compression module registered
[    2.884000] PPP Deflate Compression module registered
[    2.892000] PPP MPPE Compression module registered
[    2.904000] NET: Registered protocol family 24
[    2.912000] rdm_major = 253
[    2.916000] GMAC1_MAC_ADRH -- : 0x0000000c
[    2.928000] GMAC1_MAC_ADRL -- : 0x43288081
[    2.936000] Ralink APSoC Ethernet Driver Initilization. v3.1  1024 rx/tx descriptors allocated, mtu = 1500!
[    2.952000] GMAC1_MAC_ADRH -- : 0x0000000c
[    2.960000] GMAC1_MAC_ADRL -- : 0x432880aa
[    2.972000] PROC INIT OK!
[    2.976000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    2.988000] ehci-pci: EHCI PCI platform driver
[    2.996000] ehci-platform: EHCI generic platform driver
[    3.008000] *****run project phy.
[    3.028000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.048000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.068000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.088000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.108000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.128000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.148000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.168000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.188000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.208000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.252000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.272000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.292000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.312000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.332000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.352000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.372000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.392000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.412000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.432000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.572000] xhci-hcd xhci-hcd: xHCI Host Controller
[    3.580000] xhci-hcd xhci-hcd: new USB bus registered, assigned bus number 1
[    3.596000] xhci-hcd xhci-hcd: irq 22, io mem 0x1e1c0000
[    3.608000] hub 1-0:1.0: USB hub found
[    3.616000] hub 1-0:1.0: 2 ports detected
[    3.624000] xhci-hcd xhci-hcd: xHCI Host Controller
[    3.632000] xhci-hcd xhci-hcd: new USB bus registered, assigned bus number 2
[    3.648000] hub 2-0:1.0: USB hub found
[    3.656000] hub 2-0:1.0: 1 port detected
[    3.664000] usbcore: registered new interface driver usb-storage
[    3.676000] Mirror/redirect action on
[    3.684000] u32 classifier
[    3.688000]     input device check on
[    3.696000]     Actions configured
[    3.704000] weburl init
[    3.708000] TCP: cubic registered
[    3.716000] Initializing XFRM netlink socket
[    3.724000] NET: Registered protocol family 10
[    3.732000] NET: Registered protocol family 17
[    3.740000] NET: Registered protocol family 15
[    3.752000] Bridge firewalling registered
[    3.760000] Ebtables v2.0 registered
[    3.764000] l2tp_core: L2TP core driver, V2.0
[    3.776000] l2tp_ppp: PPPoL2TP kernel driver, V2.0
[    3.784000] l2tp_ip: L2TP IP encapsulation support (L2TPv3)
[    3.796000] l2tp_netlink: L2TP netlink interface
[    3.804000] l2tp_eth: L2TP ethernet pseudowire support (L2TPv3)
[    3.816000] l2tp_ip6: L2TP IP encapsulation support for IPv6 (L2TPv3)
[    3.828000] 8021q: 802.1Q VLAN Support v1.8
[    3.840000] SQUASHFS error: unable to read id index table
...

又回到原點

1805

unable to read id index table 這個字眼是從 linux driver 的 fs/squashfs/super.c 印出來的

明天試著 trace 一下

⚠️ **GitHub.com Fallback** ⚠️