20190108_jeffrey - silenceuncrio/diary GitHub Wiki

0905

morris 希望我在 M300 WiFi 的 uboot 去把 E4 這個 GPIO 先拉成 low 再拉成 high

1035

先完成 jessy 需要的 WiFi page 新增的項目

commit 4da296212fbb3465ca265e69d61bfdd338bca250
Refs: [hotfix/v1.76], {origin/hotfix/v1.76}
Author: jeffrey <[email protected]>
Date:   Tue Jan 8 10:35:13 2019 +0800

    add the flowing fields at 'WiFi > Config' page:
    - Mode
    - HT Mode
    - Country Code

 proscend/prosrc/webcgi/wifi_apsta.c              | 69 ++++++++++++++++++++-
 proscend/prosrc/www/app/feature/wifi_apsta.html  | 76 +++++++++++++++++-------
 proscend/prosrc/www/app/feature/wifi_apsta.js    | 25 ++++++--
 proscend/prosrc/www/app/locale-en.json           | 11 +++-
 proscend/prosrc/www/app/locale-fr.json           | 13 +++-
 proscend/prosrc/www/app/locale-zh-tw.json        | 13 +++-
 proscend/prosrc/www/app/services/icos.service.js |  3 +
 7 files changed, 178 insertions(+), 32 deletions(-)

1050

來幫 morris 做修改

diff --git a/proscend/memory_fs/nandflash/default/rootfs/etc/rc.local b/proscend/memory_fs/nandflash/default/rootfs/etc/rc.local
index d5211ca..703fbf6 100644
--- a/proscend/memory_fs/nandflash/default/rootfs/etc/rc.local
+++ b/proscend/memory_fs/nandflash/default/rootfs/etc/rc.local
@@ -42,8 +42,8 @@ function core_uboot_env_loose_indicate {
 # apply the uboot env variables related to current application
 /usr/sbin/icos/uboot_env.sh

-# run bootcmd_v1.3 define in uboot_env.sh
-fw_setenv bootcmd 'run bootcmd_v1.3'
+# run bootcmd_v1.4 define in uboot_env.sh
+fw_setenv bootcmd 'run bootcmd_v1.4'



diff --git a/proscend/prosrc/icos/script/uboot_env.sh b/proscend/prosrc/icos/script/uboot_env.sh
index 08b8f72..d97f8f5 100755
--- a/proscend/prosrc/icos/script/uboot_env.sh
+++ b/proscend/prosrc/icos/script/uboot_env.sh
@@ -3,7 +3,7 @@



-uboot_env_ver=1.3
+uboot_env_ver=1.4



@@ -71,7 +71,7 @@ fi'
 # sys led - GPIO2-IO20
 # +----------+--------+-----------+------+
 # | Instance | Signal | Pad       | Mode |
-# | GPIO2    | IO20   | SD1_DATA2 |    ALT5 |
+# | GPIO2    | IO20   | SD1_DATA2 | ALT5 |
 # +----------+--------+-----------+------+
 #
 # SW_MUX_CTL_PAD_SD1_DATA2 - select mux mode: ALT5 mux port
@@ -135,6 +135,25 @@ mw 0x0209C000 C0000000 1; mw 0x020AC000 00000080 1'



+# IO control power - GPIO4-IO21
+# +----------+--------+------------+------+
+# | Instance | Signal | Pad        | Mode |
+# | GPIO4    | IO21   | CSI_DATA00 | ALT5 |
+# +----------+--------+------------+------+
+#
+# SW_MUX_CTL_PAD_CSI_DATA00 - select mux mode: ALT5 mux port
+# - mw 0x020E01E4 0x00000005 1
+# GPIO4_GDIR - define the direction of the GPIO4-IO21 as OUTPUT
+# - mw 0x020A8004 00200000 1
+# GPIO4_DR - define the value of the GPIO2-IO20 OUTPUT to 0 - pull low
+# - mw 0x020A8000 00000000 1
+# GPIO4_DR - define the value of the GPIO2-IO20 OUTPUT to 1 - pull high
+# - mw 0x020A8000 00200000 1
+fw_setenv turnon_iocontrolpower \
+'mw 0x020E01E4 0x00000005 1; mw 0x020A8004 00200000 1; mw 0x020A8000 00000000 1; sleep 1; mw 0x020A8000 00200000 1'
+
+
+



@@ -146,7 +165,7 @@ mw 0x0209C000 C0000000 1; mw 0x020AC000 00000080 1'

 fw_setenv bootdelay 0

-fw_setenv bootcmd_v1.3 'run turnon_sysled; run reset_ethernet_and_mobile; \
+fw_setenv bootcmd_v1.4 'run turnon_iocontrolpower; run turnon_sysled; run reset_ethernet_and_mobile; \
 run app_choose; \
 echo run bootargs_${app_primary}; run bootargs_${app_primary}; \
 run nandread_${app_primary}; \
@@ -162,8 +181,8 @@ fw_setenv uboot_env_ver $uboot_env_ver


 # bondary for protect the uboot env
-fw_setenv uboot_env_1.3_bondary_1 'therer are 3 bondary'
-fw_setenv uboot_env_1.3_bondary_2 'therer are 3 bondary'
-fw_setenv uboot_env_1.3_bondary_3 'therer are 3 bondary'
+fw_setenv uboot_env_1.4_bondary_1 'therer are 3 bondary'
+fw_setenv uboot_env_1.4_bondary_2 'therer are 3 bondary'
+fw_setenv uboot_env_1.4_bondary_3 'therer are 3 bondary'


(END)

mfgtool 燒完的第一次開機

console 沒東西

led 也沒反應

大概過了快一分鐘 (待測量)

console 才有顯示

 8388608 bytes read: OK

NAND read: device 0 offset 0xe00000, size 0x100000
 1048576 bytes read: OK
Saving Environment to NAND...
Erasing NAND...
Erasing at 0x3e0000 -- 100% complete.
Writing to NAND... OK
Kernel image @ 0x80800000 [ 0x000000 - 0x4ea270 ]
## Flattened Device Tree blob at 83000000
   Booting using the fdt blob at 0x83000000
   Using Device Tree in place at 83000000, end 8300a23c

Starting kernel ...

...

Running local boot scripts (/etc/rc.local)uboot_env_ver=1.4
uboot_env_ver 1.4 match, nothing to do

...

會發現 uboot_env_ver 已經是 1.4 了

表示一開始是有作套 1.4 的事情

不過為何會重開機就不知道了 - 因為沒有 console

再次的重開機觀察一下 led 燈和 console

sysled 燈要 3.5 秒

console 開始顯示在第 6 秒

再用 mfgtool 燒一片量第一次的時間

sysled 燈在 01:40.2 console 開始顯示在 01:42.7

這沒有 console 的 01:42.7 到底發生甚麼事

找一片 morris 沒有改硬體的板子

再用 mfgtool 燒一片試試

上電 馬上有 console

-Boot 2015.04imx_v2015.04_4.1.15_1.2.0_ga+gede7538 (Jun 05 2018 - 08:41:48)

CPU:   Freescale i.MX6UL rev1.1 at 396 MHz
CPU:   Temperature 31 C
Reset cause: POR
Board: MX6UL 14x14 EVK
I2C:   ready
DRAM:  512 MiB
force_idle_bus: sda=0 scl=0 sda.gp=0x1d scl.gp=0x1c
NAND:  256 MiB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   Phy 1 not found
PHY reset timed out
FEC1
Error: FEC1 address not set.

Normal Boot
Hit any key to stop autoboot:  0
run primary app
run bootargs_a
bootargs for room a

NAND read: device 0 offset 0x400000, size 0x800000
 8388608 bytes read: OK

NAND read: device 0 offset 0xe00000, size 0x100000
 1048576 bytes read: OK
Saving Environment to NAND...
Erasing NAND...
Erasing at 0x3e0000 -- 100% complete.
Writing to NAND... OK
Kernel image @ 0x80800000 [ 0x000000 - 0x4ea270 ]
## Flattened Device Tree blob at 83000000
   Booting using the fdt blob at 0x83000000
   Using Device Tree in place at 83000000, end 8300a23c

Starting kernel ...

...

Running local boot scripts (/etc/rc.local)uboot_env_ver not match, patching for the current applicaiton

...

M301-GW login:

並沒有重開機

真不知道為什麼 morris 改的那一片 mfgtool 燒完的第一次開機會重開機 - 又沒有 console 可以 debug

1300

mfgtool 燒完的第一次開機會重開機

這燒完的第一次 uboot 跟以前沒兩樣

linux 套用 uboot_env_ver 1.4 的整個過程不過是比較多次的 fw_setenv 罷了

說到底 mfgtool 燒完第一次開機就是 bootinit 的時間往後延罷了

先等 morris 確認 solution 之後再想要怎麼 release 吧

1330

來看一下上禮拜從 mitrastar 那裡拿回來說是 ping 不通 有 bad block 的板子

上電

PLL3 FB_DL: 0x14, 1/0 = 631/393 51000000
PLL4 FB_DL: 0x17, 1/0 = 558/466 5D000000
do DDR setting..[00320381]
Apply DDR2 Setting...(use customer AC)
          0    8   16   24   32   40   48   56   64   72   80   88   96  104  112  120
      --------------------------------------------------------------------------------
0000:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0001:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0002:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0003:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0004:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0005:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0006:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    1
0007:|    0    0    0    0    0    0    1    1    1    1    1    1    1    1    1    1
0008:|    1    1    1    1    1    1    1    1    1    1    1    1    1    1    0    0
0009:|    1    1    1    1    1    1    0    0    0    0    0    0    0    0    0    0
000A:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
000B:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
000C:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
000D:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
000E:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
000F:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0010:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0011:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0012:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0013:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0014:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0015:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0016:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0017:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0018:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0019:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001A:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001B:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001C:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001D:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001E:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001F:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
rank 0 coarse = 8
rank 0 fine = 56
B:|    0    0    0    0    0    0    0    1    1    1    0    0    0    0    0    0
opt_dle value:8
DRAMC_R0DELDLY[018]=00003333
==================================================================
                RX      DQS perbit delay software calibration
==================================================================
1.0-15 bit dq delay value
==================================================================
bit|     0  1  2  3  4  5  6  7  8  9
--------------------------------------
0 |    7 6 8 9 6 4 7 5 1 6
10 |    5 11 3 8 3 6
--------------------------------------

==================================================================
2.dqs window
x=pass dqs delay value (min~max)center
y=0-7bit DQ of every group
input delay:DQS0 =51 DQS1 = 51
==================================================================
bit     DQS0     bit      DQS1
0  (1~100)50  8  (1~98)49
1  (1~99)50  9  (0~98)49
2  (1~99)50  10  (1~100)50
3  (1~100)50  11  (1~102)51
4  (1~100)50  12  (1~100)50
5  (1~98)49  13  (1~98)49
6  (1~100)50  14  (1~102)51
7  (1~102)51  15  (1~100)50
==================================================================
3.dq delay value last
==================================================================
bit|    0  1  2  3  4  5  6  7  8   9
--------------------------------------
0 |    8 7 9 10 7 6 8 5 3 8
10 |    6 11 4 10 3 7
==================================================================
==================================================================
     TX  perbyte calibration
==================================================================
DQS loop = 15, cmp_err_1 = ffff0000
dqs_perbyte_dly.last_dqsdly_pass[0]=15,  finish count=1
dqs_perbyte_dly.last_dqsdly_pass[1]=15,  finish count=2
DQ loop=15, cmp_err_1 = ffff0000
dqs_perbyte_dly.last_dqdly_pass[0]=15,  finish count=1
dqs_perbyte_dly.last_dqdly_pass[1]=15,  finish count=2
byte:0, (DQS,DQ)=(8,8)
byte:1, (DQS,DQ)=(8,8)
20,data:88
[EMI] DRAMC calibration passed

===================================================================
                MT7621   stage1 code done
                CPU=50000000 HZ BUS=16666666 HZ
===================================================================


U-Boot 1.1.3 (Sep 26 2018 - 01:50:54)

Board: Ralink APSoC DRAM:  256 MB
relocate_code Pointer at: 8ffac000

Config XHCI 40M PLL
Allocate 16 byte aligned buffer: 8ffe04b0
Enable NFI Clock
# MTK NAND # : Use HW ECC
NAND ID [C2 F1 80 95 02]
Device found in MTK table, ID: c2f1, EXT_ID: 809502
Support this Device in MTK table! c2f1
select_chip
[NAND]select ecc bit:4, sparesize :64 spare_per_sector=16
Signature matched and data read!
load_fact_bbt success 1023
load fact bbt success
[mtk_nand] probe successfully!
mtd->writesize=2048 mtd->oobsize=64,    mtd->erasesize=131072  devinfo.iowidth=8
..============================================
Ralink UBoot Version: 5.0.0.0
--------------------------------------------
ASIC MT7621A DualCore (MAC to MT7530 Mode)
DRAM_CONF_FROM: Auto-Detection
DRAM_TYPE: DDR2
DRAM bus: 16 bit
Xtal Mode=3 OCP Ratio=1/3
Flash component: NAND Flash
Date:Sep 26 2018  Time:01:50:54
============================================
icache: sets:256, ways:4, linesz:32 ,total:32768
dcache: sets:256, ways:4, linesz:32 ,total:32768

 ##### The CPU freq = 880 MHZ ####
 estimate memory size =256 Mbytes
#Reset_MT7530

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.
 0
[board_init_r:2083]no_good: .xx

Switch the dual image
Switch from image 'b' to 'a'

Indicata linux the active dual image is a.
..ranand_erase: start:a0000, len:20000
.(5192)offs=655360 piece=0 piece_size=4 rc=0
Done!

3: System Boot system code via Flash at dual image a.
..Erasing NAND Flash...
ranand_erase: start:80000, len:20000
.Writing to NAND Flash...
done
[do_bootm:644]argc: 2, addr: 0xBC140000
## Booting image at bc140000 ...
[do_bootm:685]addr:0xBC140000 >= CFG_FLASH_BASE:0xBC000000 ?
[do_bootm:687]ranand_read; from: 0x00140000
[do_bootm:694]hdr->ih_magic: 0x56190527
   Image Name:   2.63(XJA.0)03 1810051355
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    13907560 Bytes = 13.3 MB
   Load Address: 80001000
   Entry Point:  8000d1d0
[do_bootm:738]addr:0xBC140000 >= CFG_FLASH_BASE:0xBC000000 ?
.....................................................................................................................................................................................................................   Verifying Checksum ... OK
[do_bootm:789]name: Kernel Image
[do_bootm:802]ih_comp: IH_COMP_LZMA(3)
   Uncompressing Kernel Image ... OK
[do_bootm:832]ih_type: IH_TYPE_KERNEL(2)
[do_bootm:846]ih_os: IH_OS_LINUX(5)
[do_bootm_linux:252]argc: 2
[do_bootm_linux:339]no initrd image
[do_bootm_linux:350]No initrd
[do_bootm_linux:361]initrd_start = 0
[do_bootm_linux:362]initrd_end = 0
## Transferring control to Linux (at address 8000d1d0) ...
## Giving linux memsize in MB, 256
[do_bootm_linux:379]linux env: initrd_start = 0x00000000
[do_bootm_linux:383]linux env: initrd_size = 0x0
[do_bootm_linux:387]linux env: flash_start = 0x00000000
[do_bootm_linux:391]linux env: flash_size = 0x0

Starting kernel ...


LINUX started...

 THIS IS ASIC
Linux version 2.6.36 (root@MBA-bsh1) (gcc version 4.6.3 (Buildroot 2012.11.1) ) #2 SMP Fri Oct 5 13:55:50 CST 2018

 The CPU feqenuce set to 880 MHz
GCMP present
CPU revision is: 0001992f (MIPS 1004Kc)
Software DMA cache coherency
Determined physical RAM map:
 memory: 10000000 @ 00000000 (usable)
Initrd not found or empty - disabling initrd
Zone PFN ranges:
  Normal   0x00000000 -> 0x00010000
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
    0: 0x00000000 -> 0x00010000
Detected 3 available secondary CPU(s)
PERCPU: Embedded 7 pages/cpu @81320000 s6464 r8192 d14016 u65536
pcpu-alloc: s6464 r8192 d14016 u65536 alloc=16*4096
pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 65024
Kernel command line: console=ttyS1,57600n8 root=/dev/ram0
PID hash table entries: 1024 (order: 0, 4096 bytes)
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Primary instruction cache 32kB, VIPT, , 4-waylinesize 32 bytes.
Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
Writing ErrCtl register=0003d384
Readback ErrCtl register=0003d384
Memory: 242252k/262144k available (4066k kernel code, 19892k reserved, 1334k data, 11800k init, 0k highmem)
Hierarchical RCU implementation.
        Verbose stalled-CPUs detection is disabled.
NR_IRQS:128
Trying to install interrupt handler for IRQ24
Trying to install interrupt handler for IRQ25
Trying to install interrupt handler for IRQ22
Trying to install interrupt handler for IRQ9
Trying to install interrupt handler for IRQ10
Trying to install interrupt handler for IRQ11
Trying to install interrupt handler for IRQ12
Trying to install interrupt handler for IRQ13
Trying to install interrupt handler for IRQ14
Trying to install interrupt handler for IRQ16
Trying to install interrupt handler for IRQ17
Trying to install interrupt handler for IRQ18
Trying to install interrupt handler for IRQ19
Trying to install interrupt handler for IRQ20
Trying to install interrupt handler for IRQ21
Trying to install interrupt handler for IRQ23
Trying to install interrupt handler for IRQ26
Trying to install interrupt handler for IRQ27
Trying to install interrupt handler for IRQ28
Trying to install interrupt handler for IRQ15
Trying to install interrupt handler for IRQ8
Trying to install interrupt handler for IRQ29
Trying to install interrupt handler for IRQ30
Trying to install interrupt handler for IRQ31
console [ttyS1] enabled
Calibrating delay loop... 577.53 BogoMIPS (lpj=1155072)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
launch: starting cpu1
launch: cpu1 gone!
CPU revision is: 0001992f (MIPS 1004Kc)
Primary instruction cache 32kB, VIPT, , 4-waylinesize 32 bytes.
Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
launch: starting cpu2
launch: cpu2 gone!
CPU revision is: 0001992f (MIPS 1004Kc)
Primary instruction cache 32kB, VIPT, , 4-waylinesize 32 bytes.
Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
launch: starting cpu3
launch: cpu3 gone!
CPU revision is: 0001992f (MIPS 1004Kc)
Primary instruction cache 32kB, VIPT, , 4-waylinesize 32 bytes.
Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
Brought up 4 CPUs
Synchronize counters across 4 CPUs: done.
NET: Registered protocol family 16
release PCIe RST: RALINK_RSTCTRL = 7000000
PCIE PHY initialize
***** Xtal 40MHz *****
start MT7621 PCIe register access
RALINK_RSTCTRL = 7000000
RALINK_CLKCFG1 = 77ffeff8

*************** MT7621 PCIe RC mode *************
PCIE0 no card, disable it(RST&CLK)
PCIE1 no card, disable it(RST&CLK)
PCIE2 no card, disable it(RST&CLK)
pcie_link status = 0x0
RALINK_RSTCTRL= 0
bio: create slab <bio-0> at 0
vgaarb: loaded
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Switching to clocksource MIPS
NET: Registered protocol family 2
IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
TCP established hash table entries: 8192 (order: 4, 65536 bytes)
TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
TCP reno registered
UDP hash table entries: 128 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 128 (order: 0, 4096 bytes)
NET: Registered protocol family 1
4 CPUs re-calibrate udelay(lpj = 1167360)
squashfs: version 4.0 (2009/01/31) Phillip Lougher
NTFS driver 2.1.29 [Flags: R/W].
msgmni has been set to 473
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
io scheduler noop registered (default)
Ralink gpio driver initialized
spidrv_major = 217
Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
serial8250: ttyS0 at MMIO 0x1e000d00 (irq = 27) is a 16550A
serial8250: ttyS1 at MMIO 0x1e000c00 (irq = 26) is a 16550A
brd: module loaded
MediaTek Nand driver init, version v2.1 Fix AHB virt2phys error
Allocate 16 byte aligned buffer: 81100510
Enable NFI Clock
# MTK NAND # : Use HW ECC
NAND ID [C2 F1 80 95 02, 00809502]
Device found in MTK table, ID: c2f1, EXT_ID: 809502
Support this Device in MTK table! c2f1
NAND device: Manufacturer ID: 0xc2, Chip ID: 0xf1 (Unknown NAND 128MiB 3,3V 8-bit)
[NAND]select ecc bit:4, sparesize :64 spare_per_sector=16
Scanning device for bad blocks
Bad eraseblock 306 at 0x000002640000
Signature matched and data read!
load_fact_bbt success 1023
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
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
00 00 00 00 00 00 00 00 00 00 00 00 30 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 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 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 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 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 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
mstc_nand_mtd_adjust(): Running!
Creating 12 MTD partitions on "MT7621-NAND":
0x000000000000-0x000007f80000 : "ALL"
0x000000000000-0x000000080000 : "Bootloader"
0x000000080000-0x000000100000 : "Config"
0x000000100000-0x000000140000 : "Factory"
0x000000140000-0x000002140000 : "Kernel"
0x000002280000-0x000004280000 : "Kernel2"
0x000004280000-0x0000042c0000 : "mrd_cert1"
0x0000042c0000-0x000004300000 : "mrd_cert2"
0x000004300000-0x000004700000 : "ConfigFS"
0x000004700000-0x000007f80000 : "firmware"
0x000000140000-0x000002140000 : "Kernel_RootFS"
0x000002280000-0x000004280000 : "Kernel_RootFS2"
[mtk_nand] probe successfully! nand_chip->phys_erase_shift=17
rdm_major = 249
GMAC1_MAC_ADRH -- : 0x0000000c
GMAC1_MAC_ADRL -- : 0x4328801e
Ralink APSoC Ethernet Driver Initilization. v3.1  512 rx/tx descriptors allocated, mtu = 1500!
GMAC1_MAC_ADRH -- : 0x0000000c
GMAC1_MAC_ADRL -- : 0x4328805b
PROC INIT OK!
PPP generic driver version 2.4.2
PPP BSD Compression module registered
PPP MPPE Compression module registered
NET: Registered protocol family 24
IMQ driver loaded successfully.
        Hooking IMQ before NAT on PREROUTING.
        Hooking IMQ after NAT on POSTROUTING.
usbcore: registered new interface driver cdc_ether
usbcore: registered new interface driver usbserial
usbserial: USB Serial Driver core
USB Serial support registered for GSM modem (1-port)
usbcore: registered new interface driver option
option: v0.7.2:USB Driver for GSM modems
netem: version 1.2
Netfilter messages via NETLINK v0.30.
nf_conntrack version 0.5.0 (3785 buckets, 15140 max)
ctnetlink v0.93: registering with nfnetlink.
matchsize=264
xt_time: kernel timezone is -0000
IPVS: Registered protocols ()
IPVS: Connection hash table configured (size=4096, memory=32Kbytes)
IPVS: ipvs loaded.
IPv4 over IPv4 tunneling driver
GRE over IPv4 tunneling driver
ip_tables: (C) 2000-2006 Netfilter Core Team, Type=Restricted Cone
ipt_CLUSTERIP: ClusterIP Version 0.8 loaded successfully
TCP cubic registered
NET: Registered protocol family 10
lo: Disabled Privacy Extensions
tunl0: Disabled Privacy Extensions
ip6_tables: (C) 2000-2006 Netfilter Core Team
IPv6 over IPv4 tunneling driver
sit0: Disabled Privacy Extensions
ip6tnl0: Disabled Privacy Extensions
NET: Registered protocol family 17
Bridge firewalling registered
Ebtables v2.0 registered
L2TP core driver, V2.0
PPPoL2TP kernel driver, V2.0
802.1Q VLAN Support v1.8 Ben Greear <[email protected]>
All bugs added by David S. Miller <[email protected]>
Freeing unused kernel memory: 11800k freed
starting pid 794, tty '': '/etc_ro/rcS'
#############
# Start rcS #
#############
mount: mounting none on /media failed: No such file or directory
mknod: /dev/ppp: File exists
Trying to mount flash as yaffs2 yaffs: dev is 32505864 name is "mtdblock8" rw
for configuratioyaffs: passed flags ""
n files (mtdblock8)
yaffs: dev is 32505865 name is "mtdblock9" rw
yaffs: passed flags ""
Trying to mount flash as yaffs2 for firmware andRaeth v3.1 ( temportary fileTasklets (mtdblock9)
)
phy_free_head is 0xcf6000!!!
phy_free_tail_phy is 0xcf7ff0!!!
txd_pool=a0cf8000 phy_txd_pool=00CF8000
ei_local->skb_free start address is 0x8fd41494.
free_txd: a0cf8010, ei_local->cpu_ptr: 00CF8000
 POOL  HEAD_PTR | DMA_PTR | CPU_PTR
----------------+---------+--------
     0xa0cf8000 0x00CF8000 0x00CF8000

phy_qrx_ring = 0x00ceb000, qrx_ring = 0xa0ceb000

phy_rx_ring0 = 0x00cfa000, rx_ring0 = 0xa0cfa000
change HW-TRAP to 0x17ccf
set LAN/WAN LLLLW
GMAC1_MAC_ADRH -- : 0x0000000c
GMAC1_MAC_ADRL -- : 0x4328805b
CDMA_CSG_CFG = 81000000
GDMA1_FWD_CFG = 20710000
FM_OUT value: u4FmOut = 0(0x00000000)
FM_OUT value: u4FmOut = 0(0x00000000)
FM_OUT value: u4FmOut = 0(0x00000000)
FM_OUT value: u4FmOut = 0(0x00000000)
FM_OUT value: u4FmOut = 0(0x00000000)
FM_OUT value: u4FmOut = 0(0x00000000)
FM_OUT value: u4FmOut = 0(0x00000000)
FM_OUT value: u4FmOut = 0(0x00000000)
FM_OUT value: u4FmOut = 0(0x00000000)
FM_OUT value: u4FmOut = 0(0x00000000)
FM_OUT value: u4FmOut = 0(0x00000000)
FM_OUT value: u4FmOut = 0(0x00000000)
FM_OUT value: u4FmOut = 0(0x00000000)
FM_OUT value: u4FmOut = 0(0x00000000)
FM_OUT value: u4FmOut = 0(0x00000000)
FM_OUT value: u4FmOut = 0(0x00000000)
FM_OUT value: u4FmOut = 0(0x00000000)
FM_OUT value: u4FmOut = 0(0x00000000)
FM_OUT value: u4FmOut = 0(0x00000000)
FM_OUT value: u4FmOut = 0(0x00000000)
xhc_mtk xhc_mtk: xHCI Host Controller
xhc_mtk xhc_mtk: new USB bus registered, assigned bus number 1
xhc_mtk xhc_mtk: irq 22, io mem 0x1e1c0000
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
xhc_mtk xhc_mtk: xHCI Host Controller
xhc_mtk xhc_mtk: new USB bus registered, assigned bus number 2
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
GobiNet: Quectel_Linux_GobiNet_SR01A02V16
usbcore: registered new interface driver GobiNet
net.core.message_burst = 15
[Starting] zyMultiboot ... Starting Multiboot
STARTING MultiBoot Program, pktsize = 1400
[zyMultiboot] Waiting 3 secs ...
usb 1-1: new high speed USB device number 2 using xhc_mtk
xhc_mtk xhc_mtk: WARN: short transfer on control ep
xhc_mtk xhc_mtk: WARN: short transfer on control ep
xhc_mtk xhc_mtk: WARN: short transfer on control ep
usb 1-1: ep 0x81 - rounding interval to 32768 microframes, ep desc says 0 microframes
usb 1-1: ep 0x1 - rounding interval to 32768 microframes, ep desc says 0 microframes
usb 1-1: ep 0x82 - rounding interval to 32768 microframes, ep desc says 0 microframes
usb 1-1: ep 0x2 - rounding interval to 32768 microframes, ep desc says 0 microframes
usb 1-1: ep 0x84 - rounding interval to 32768 microframes, ep desc says 0 microframes
usb 1-1: ep 0x3 - rounding interval to 32768 microframes, ep desc says 0 microframes
usb 1-1: ep 0x86 - rounding interval to 32768 microframes, ep desc says 0 microframes
usb 1-1: ep 0x4 - rounding interval to 32768 microframes, ep desc says 0 microframes
usb 1-1: ep 0x88 - rounding interval to 32768 microframes, ep desc says 0 microframes
usb 1-1: ep 0x5 - rounding interval to 32768 microframes, ep desc says 0 microframes
option 1-1:1.0: GSM modem (1-port) converter detected
usb 1-1: GSM modem (1-port) converter now attached to ttyUSB0
option 1-1:1.1: GSM modem (1-port) converter detected
usb 1-1: GSM modem (1-port) converter now attached to ttyUSB1
option 1-1:1.2: GSM modem (1-port) converter detected
usb 1-1: GSM modem (1-port) converter now attached to ttyUSB2
option 1-1:1.3: GSM modem (1-port) converter detected
usb 1-1: GSM modem (1-port) converter now attached to ttyUSB3
xhc_mtk xhc_mtk: [MTK]Doesn't find ep_sch instance when removing endpoint
xhc_mtk xhc_mtk: [MTK]Doesn't find ep_sch instance when removing endpoint
usb 1-1: ep 0x88 - rounding interval to 32768 microframes, ep desc says 0 microframes
usb 1-1: ep 0x5 - rounding interval to 32768 microframes, ep desc says 0 microframes
GobiNet 1-1:1.4: usb0: register 'GobiNet' at usb-xhc_mtk-1, GobiNet Ethernet Device, 9e:a4:1b:be:91:cb
creating qcqmi0
ESW: Link Status Changed - Port2 Link UP
xhc_mtk xhc_mtk: WARN: short transfer on control ep
xhc_mtk xhc_mtk: WARN: short transfer on control ep
xhc_mtk xhc_mtk: WARN: short transfer on control ep
xhc_mtk xhc_mtk: WARN: short transfer on control ep
xhc_mtk xhc_mtk: WARN: short transfer on control ep
xhc_mtk xhc_mtk: WARN: short transfer on control ep
xhc_mtk xhc_mtk: WARN: short transfer on control ep
xhc_mtk xhc_mtk: WARN: short transfer on control ep
xhc_mtk xhc_mtk: WARN: short transfer on control ep
xhc_mtk xhc_mtk: WARN: short transfer on control ep
xhc_mtk xhc_mtk: WARN: short transfer on control ep
xhc_mtk xhc_mtk: WARN: short transfer on control ep
Not receive Multiboot packets. Exit zyMultiboot program.
Closing Multiboot
.... done ....
Sun Jan  1 08:00:00 CET 2017
device eth2 entered promiscuous mode
set br0 to 192.192.192.4
br0: port 1(eth2) entering learning state
br0: port 1(eth2) entering learning state
====== Boot up finished. ======
starting pid 921, tty '': '/sbin/getty 57600 ttyS1'

(none) login: br0: port 1(eth2) entering forwarding state

發現目前開機的是 partition a

[board_init_r:2083]no_good: .xx

Switch the dual image
Switch from image 'b' to 'a'

從 mtd partition 可以發現這部是我們公司的 FW

Creating 12 MTD partitions on "MT7621-NAND":
0x000000000000-0x000007f80000 : "ALL"
0x000000000000-0x000000080000 : "Bootloader"
0x000000080000-0x000000100000 : "Config"
0x000000100000-0x000000140000 : "Factory"
0x000000140000-0x000002140000 : "Kernel"
0x000002280000-0x000004280000 : "Kernel2"
0x000004280000-0x0000042c0000 : "mrd_cert1"
0x0000042c0000-0x000004300000 : "mrd_cert2"
0x000004300000-0x000004700000 : "ConfigFS"
0x000004700000-0x000007f80000 : "firmware"
0x000000140000-0x000002140000 : "Kernel_RootFS"
0x000002280000-0x000004280000 : "Kernel_RootFS2"

拔插電再一次

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 4

 0


4: System Enter Boot Command Line Interface.

U-Boot 1.1.3 (Sep 26 2018 - 01:50:54)
MT7621 #

按 4 進 boot command line interface

set no_good .xx 讓 partition 作切換

MT7621 # set no_good .xx
MT7621 # save
Saving Environment to NAND Flash...
..Erasing NAND Flash...
ranand_erase: start:80000, len:20000
.Writing to NAND Flash...
done
MT7621 # print
bootcmd=cp.b 0xBFC20000 0x81E00000 0x10000;go 0x81E00000
bootdelay=5
baudrate=57600
ethaddr="00:AA:BB:CC:DD:10"
ipaddr=192.168.1.1
serverip=192.168.1.33
bootfile="ras.bin"
ethact=Eth0 (10/100-M)
BootImage=1
Image1Stable=1
raschksum1=2BC676F9
rootfs1_crc32=00000000
rootfs1_len=0
rootfs1_type=3
hw_ver=v1.001
serialno=BL9U33TL002C
macaddr=00037905F02C
dual_image_active=a
stdin=serial
stdout=serial
stderr=serial
no_good=.xx

Environment size: 424/4092 bytes
MT7621 #

敲 reset 讓 uboot 再跑一次

reset

===================================================================
                MT7621   stage1 code 10:33:11 (ASIC)
                CPU=50000000 HZ BUS=16666666 HZ
==================================================================
Change MPLL source from XTAL to CR...
do MEMPLL setting..
MEMPLL Config : 0x31100000
3PLL mode + External loopback
=== XTAL-40Mhz === DDR-800Mhz ===
PLL2 FB_DL: 0x11, 1/0 = 528/496 45000000
PLL3 FB_DL: 0x12, 1/0 = 538/486 49000000
PLL4 FB_DL: 0x16, 1/0 = 620/404 59000000
do DDR setting..[00320381]
Apply DDR2 Setting...(use customer AC)
          0    8   16   24   32   40   48   56   64   72   80   88   96  104  112  120
      --------------------------------------------------------------------------------
0000:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0001:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0002:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0003:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0004:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0005:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0006:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    1
0007:|    0    0    0    0    0    0    1    1    1    1    1    1    1    1    1    1
0008:|    1    1    1    1    1    1    1    1    1    1    1    1    1    1    0    0
0009:|    1    1    1    1    1    0    0    0    0    0    0    0    0    0    0    0
000A:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
000B:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
000C:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
000D:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
000E:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
000F:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0010:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0011:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0012:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0013:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0014:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0015:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0016:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0017:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0018:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0019:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001A:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001B:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001C:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001D:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001E:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001F:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
rank 0 coarse = 8
rank 0 fine = 56
B:|    0    0    0    0    0    0    1    1    1    0    0    0    0    0    0    0
opt_dle value:7
DRAMC_R0DELDLY[018]=00003333
==================================================================
                RX      DQS perbit delay software calibration
==================================================================
1.0-15 bit dq delay value
==================================================================
bit|     0  1  2  3  4  5  6  7  8  9
--------------------------------------
0 |    7 6 8 9 6 4 7 5 2 7
10 |    5 11 3 8 3 6
--------------------------------------

==================================================================
2.dqs window
x=pass dqs delay value (min~max)center
y=0-7bit DQ of every group
input delay:DQS0 =51 DQS1 = 51
==================================================================
bit     DQS0     bit      DQS1
0  (1~100)50  8  (1~98)49
1  (1~97)49  9  (2~101)51
2  (1~99)50  10  (1~100)50
3  (1~100)50  11  (1~101)51
4  (1~98)49  12  (1~100)50
5  (1~98)49  13  (1~98)49
6  (1~101)51  14  (1~101)51
7  (1~99)50  15  (1~100)50
==================================================================
3.dq delay value last
==================================================================
bit|    0  1  2  3  4  5  6  7  8   9
--------------------------------------
0 |    8 8 9 10 8 6 7 6 4 7
10 |    6 11 4 10 3 7
==================================================================
==================================================================
     TX  perbyte calibration
==================================================================
DQS loop = 15, cmp_err_1 = ffff0000
dqs_perbyte_dly.last_dqsdly_pass[0]=15,  finish count=1
dqs_perbyte_dly.last_dqsdly_pass[1]=15,  finish count=2
DQ loop=15, cmp_err_1 = ffff0000
dqs_perbyte_dly.last_dqdly_pass[0]=15,  finish count=1
dqs_perbyte_dly.last_dqdly_pass[1]=15,  finish count=2
byte:0, (DQS,DQ)=(8,8)
byte:1, (DQS,DQ)=(8,8)
20,data:88
[EMI] DRAMC calibration passed

===================================================================
                MT7621   stage1 code done
                CPU=50000000 HZ BUS=16666666 HZ
===================================================================


U-Boot 1.1.3 (Sep 26 2018 - 01:50:54)

Board: Ralink APSoC DRAM:  256 MB
relocate_code Pointer at: 8ffac000

Config XHCI 40M PLL
******************************
Software System Reset Occurred
******************************
Allocate 16 byte aligned buffer: 8ffe04b0
Enable NFI Clock
# MTK NAND # : Use HW ECC
NAND ID [C2 F1 80 95 02]
Device found in MTK table, ID: c2f1, EXT_ID: 809502
Support this Device in MTK table! c2f1
select_chip
[NAND]select ecc bit:4, sparesize :64 spare_per_sector=16
Signature matched and data read!
load_fact_bbt success 1023
load fact bbt success
[mtk_nand] probe successfully!
mtd->writesize=2048 mtd->oobsize=64,    mtd->erasesize=131072  devinfo.iowidth=8
..============================================
Ralink UBoot Version: 5.0.0.0
--------------------------------------------
ASIC MT7621A DualCore (MAC to MT7530 Mode)
DRAM_CONF_FROM: Auto-Detection
DRAM_TYPE: DDR2
DRAM bus: 16 bit
Xtal Mode=3 OCP Ratio=1/3
Flash component: NAND Flash
Date:Sep 26 2018  Time:01:50:54
============================================
icache: sets:256, ways:4, linesz:32 ,total:32768
dcache: sets:256, ways:4, linesz:32 ,total:32768

 ##### The CPU freq = 880 MHZ ####
 estimate memory size =256 Mbytes
#Reset_MT7530

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.
 0
[board_init_r:2083]no_good: .xx

Switch the dual image
Switch from image 'a' to 'b'

Indicata linux the active dual image is b.
..ranand_erase: start:a0000, len:20000
.(5192)offs=655360 piece=0 piece_size=4 rc=0
Done!

3: System Boot system code via Flash at dual image b.
..Erasing NAND Flash...
ranand_erase: start:80000, len:20000
.Writing to NAND Flash...
done
[do_bootm:644]argc: 2, addr: 0xBE140000
## Booting image at be140000 ...
[do_bootm:685]addr:0xBE140000 >= CFG_FLASH_BASE:0xBC000000 ?
[do_bootm:687]ranand_read; from: 0x02140000
[do_bootm:694]hdr->ih_magic: 0x56190527
   Image Name:   OpenWrt Linux-3.10.14
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    1756326 Bytes =  1.7 MB
   Load Address: 80001000
   Entry Point:  80001000
[do_bootm:738]addr:0xBE140000 >= CFG_FLASH_BASE:0xBC000000 ?
...........................   Verifying Checksum ... OK
[do_bootm:789]name: Kernel Image
[do_bootm:802]ih_comp: IH_COMP_LZMA(3)
   Uncompressing Kernel Image ... OK
[do_bootm:832]ih_type: IH_TYPE_KERNEL(2)
[do_bootm:846]ih_os: IH_OS_LINUX(5)
[do_bootm_linux:252]argc: 2
[do_bootm_linux:339]no initrd image
[do_bootm_linux:350]No initrd
[do_bootm_linux:361]initrd_start = 0
[do_bootm_linux:362]initrd_end = 0
## Transferring control to Linux (at address 80001000) ...
## Giving linux memsize in MB, 256
[do_bootm_linux:379]linux env: initrd_start = 0x00000000
[do_bootm_linux:383]linux env: initrd_size = 0x0
[do_bootm_linux:387]linux env: flash_start = 0x00000000
[do_bootm_linux:391]linux env: flash_size = 0x0

Starting kernel ...


LINUX started...

 THIS IS ASIC

SDK 5.0.S.0
[    0.000000] Linux version 3.10.14 (user@810f93cb999c) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 unknown) ) #1 SMP Fri Sep 14 06:29:03 CST 2018
[    0.000000]
[    0.000000]  The CPU feqenuce set to 880 MHz
[    0.000000] GCMP present
[    0.000000] CPU0 revision is: 0001992f (MIPS 1004Kc)
[    0.000000] Software DMA cache coherency
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 08000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x00000000-0x07ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x00000000-0x07ffffff]
[    0.000000] Detected 3 available secondary CPU(s)
[    0.000000] Primary instruction cache 32kB, 4-way, VIPT, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.000000] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.000000] PERCPU: Embedded 7 pages/cpu @81103000 s6464 r8192 d14016 u32768
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: console=ttyS1,57600n8 root=/dev/mtdblock5 rootfstype=squashfs,jffs2
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Writing ErrCtl register=0002c380
[    0.000000] Readback ErrCtl register=0002c380
[    0.000000] Memory: 124508k/131072k available (3911k kernel code, 6564k reserved, 919k data, 284k init, 0k highmem)
[    0.000000] Hierarchical RCU implementation.
[    0.000000] NR_IRQS:128
[    0.000000] console [ttyS1] enabled
[    0.116000] Calibrating delay loop... 562.17 BogoMIPS (lpj=1124352)
[    0.148000] pid_max: default: 32768 minimum: 301
[    0.152000] Mount-cache hash table entries: 512
[    0.156000] launch: starting cpu1
[    0.160000] launch: cpu1 gone!
[    0.160000] CPU1 revision is: 0001992f (MIPS 1004Kc)
[    0.160000] Primary instruction cache 32kB, 4-way, VIPT, linesize 32 bytes.
[    0.160000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.160000] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.192000] Synchronize counters for CPU 1: done.
[    0.200000] launch: starting cpu2
[    0.204000] launch: cpu2 gone!
[    0.204000] CPU2 revision is: 0001992f (MIPS 1004Kc)
[    0.204000] Primary instruction cache 32kB, 4-way, VIPT, linesize 32 bytes.
[    0.204000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.204000] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.232000] Synchronize counters for CPU 2: done.
[    0.240000] launch: starting cpu3
[    0.244000] launch: cpu3 gone!
[    0.244000] CPU3 revision is: 0001992f (MIPS 1004Kc)
[    0.244000] Primary instruction cache 32kB, 4-way, VIPT, linesize 32 bytes.
[    0.244000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.244000] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.272000] Synchronize counters for CPU 3: done.
[    0.280000] Brought up 4 CPUs
[    0.284000] NET: Registered protocol family 16
[    0.576000] release PCIe RST: RALINK_RSTCTRL = 7000000
[    0.580000] PCIE PHY initialize
[    0.584000] ***** Xtal 40MHz *****
[    0.588000] start MT7621 PCIe register access
[    1.164000] RALINK_RSTCTRL = 7000000
[    1.168000] RALINK_CLKCFG1 = 71ffeff8
[    1.172000]
[    1.172000] *************** MT7621 PCIe RC mode *************
[    1.652000] PCIE0 no card, disable it(RST&CLK)
[    1.656000] pcie_link status = 0x0
[    1.660000] RALINK_RSTCTRL= 6000000
[    1.684000] bio: create slab <bio-0> at 0
[    1.688000] SCSI subsystem initialized
[    1.692000] usbcore: registered new interface driver usbfs
[    1.696000] usbcore: registered new interface driver hub
[    1.700000] usbcore: registered new device driver usb
[    1.704000] Switching to clocksource MIPS
[    1.708000] NET: Registered protocol family 2
[    1.716000] TCP established hash table entries: 1024 (order: 1, 8192 bytes)
[    1.732000] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
[    1.744000] TCP: Hash tables configured (established 1024 bind 1024)
[    1.756000] TCP: reno registered
[    1.764000] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    1.776000] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    1.788000] NET: Registered protocol family 1
[    1.884000] 4 CPUs re-calibrate udelay(lpj = 1167360)
[    1.896000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    1.908000] jffs2: version 2.2. (NAND) (SUMMARY)  (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    1.928000] msgmni has been set to 243
[    1.940000] io scheduler noop registered (default)
[    1.948000] reg_int_mask=0, INT_MASK= 0
[    1.956000] HSDMA_init
[    1.960000]
[    1.960000]  hsdma_phy_tx_ring0 = 0x0fe44000, hsdma_tx_ring0 = 0xafe44000
[    1.980000]
[    1.980000]  hsdma_phy_rx_ring0 = 0x0fe38000, hsdma_rx_ring0 = 0xafe38000
[    1.996000] TX_CTX_IDX0 = 0
[    2.000000] TX_DTX_IDX0 = 0
[    2.004000] RX_CRX_IDX0 = 3ff
[    2.012000] RX_DRX_IDX0 = 0
[    2.016000] set_fe_HSDMA_glo_cfg
[    2.024000] HSDMA_GLO_CFG = 465
[    2.036000] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    2.048000] serial8250: ttyS0 at MMIO 0x1e000d00 (irq = 27) is a 16550A
[    2.060000] serial8250: ttyS1 at MMIO 0x1e000c00 (irq = 26) is a 16550A
[    2.076000] Ralink gpio driver initialized
[    2.084000] MediaTek Nand driver init, version v2.1 Fix AHB virt2phys error
[    2.100000] Allocate 16 byte aligned buffer: 80512450
[    2.108000] Enable NFI Clock
[    2.116000] # MTK NAND # : Use HW ECC
[    2.120000] NAND ID [C2 F1 80 95 02, 00809502]
[    2.132000] Device not found, ID: c2f1
[    2.136000] Not Support this Device!
[    2.144000] chip_mode=00000001
[    2.152000] Support this Device in MTK table! c2f1
[    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.280000] Bad eraseblock 306 at 0x000002640000
[    2.456000] Signature matched and data read!
[    2.464000] load_fact_bbt success 1023
[    2.472000] 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.492000] 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.512000] 00 00 00 00 00 00 00 00 00 00 00 00 30 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 00 00 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.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] active dual image is b!
[    2.636000] Creating 8 MTD partitions on "MT7621-NAND":
[    2.648000] 0x000000000000-0x000007f80000 : "ALL"
[    2.656000] 0x000000000000-0x000000080000 : "Bootloader"
[    2.668000] 0x000000080000-0x000000100000 : "Config"
[    2.680000] 0x000000100000-0x000000140000 : "Factory"
[    2.692000] 0x000002140000-0x000004140000 : "firmware"
[    2.704000] 0x0000022ecce6-0x000004140000 : "rootfs"
[    2.716000] mtd: partition "rootfs" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
[    2.744000] bad_detected= 1
[    2.756000] mtd: partition "rootfs_data" created automatically, ofs=0x2ec0000, len=0x1280000
[    2.776000] 0x000002ec0000-0x000004140000 : "rootfs_data"
[    2.788000] 0x000000140000-0x000002140000 : "reserve"
[    2.796000] 0x000005000000-0x000006000000 : "Proscend-config"
[    2.812000] 0x000006000000-0x000007000000 : "Proscend-misc"
[    2.824000] [mtk_nand] probe successfully!
[    2.832000] rootfs = 22ecce6 to 2ec0000
[    2.840000] PPP generic driver version 2.4.2
[    2.848000] PPP BSD Compression module registered
[    2.856000] PPP Deflate Compression module registered
[    2.868000] PPP MPPE Compression module registered
[    2.876000] NET: Registered protocol family 24
[    2.884000] rdm_major = 253
[    2.892000] GMAC1_MAC_ADRH -- : 0x0000000c
[    2.900000] GMAC1_MAC_ADRL -- : 0x43288081
[    2.908000] Ralink APSoC Ethernet Driver Initilization. v3.1  1024 rx/tx descriptors allocated, mtu = 1500!
[    2.928000] GMAC1_MAC_ADRH -- : 0x0000000c
[    2.936000] GMAC1_MAC_ADRL -- : 0x4328802a
[    2.944000] PROC INIT OK!
[    2.948000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    2.964000] ehci-pci: EHCI PCI platform driver
[    2.972000] ehci-platform: EHCI generic platform driver
[    2.980000] *****run project phy.
[    3.000000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.020000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.040000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.060000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.080000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.100000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.120000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.140000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.160000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.180000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.224000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.244000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.264000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.284000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.304000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.324000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.344000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.364000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.384000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.404000] FM_OUT value: u4FmOut = 0(0x00000000)
[    3.544000] xhci-hcd xhci-hcd: xHCI Host Controller
[    3.552000] xhci-hcd xhci-hcd: new USB bus registered, assigned bus number 1
[    3.568000] xhci-hcd xhci-hcd: irq 22, io mem 0x1e1c0000
[    3.580000] hub 1-0:1.0: USB hub found
[    3.588000] hub 1-0:1.0: 2 ports detected
[    3.596000] xhci-hcd xhci-hcd: xHCI Host Controller
[    3.604000] xhci-hcd xhci-hcd: new USB bus registered, assigned bus number 2
[    3.620000] hub 2-0:1.0: USB hub found
[    3.628000] hub 2-0:1.0: 1 port detected
[    3.636000] usbcore: registered new interface driver usb-storage
[    3.648000] Mirror/redirect action on
[    3.656000] u32 classifier
[    3.660000]     input device check on
[    3.668000]     Actions configured
[    3.676000] TCP: cubic registered
[    3.680000] Initializing XFRM netlink socket
[    3.688000] NET: Registered protocol family 10
[    3.700000] NET: Registered protocol family 17
[    3.708000] NET: Registered protocol family 15
[    3.716000] Bridge firewalling registered
[    3.724000] Ebtables v2.0 registered
[    3.732000] l2tp_core: L2TP core driver, V2.0
[    3.740000] l2tp_ppp: PPPoL2TP kernel driver, V2.0
[    3.752000] l2tp_ip: L2TP IP encapsulation support (L2TPv3)
[    3.760000] l2tp_netlink: L2TP netlink interface
[    3.772000] l2tp_eth: L2TP ethernet pseudowire support (L2TPv3)
[    3.784000] l2tp_ip6: L2TP IP encapsulation support for IPv6 (L2TPv3)
[    3.796000] 8021q: 802.1Q VLAN Support v1.8
[    3.808000] SQUASHFS error: unable to read id index table
[    3.820000] jffs2: Flash size not aligned to erasesize, reducing to 30976KiB
[    3.836000] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000000: 0x7368 instead
[    3.856000] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000004: 0x0bb4 instead
[    3.872000] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000008: 0xe501 instead
[    3.892000] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000010: 0x005c instead
[    3.912000] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000014: 0x0004 instead
[    3.932000] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000018: 0x06c0 instead
[    3.948000] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000001c: 0x0004 instead
[    3.968000] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000020: 0x0f08 instead
[    3.988000] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000028: 0x424c instead
[    4.004000] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000030: 0x4244 instead
[    4.024000] usb 1-1: new high-speed USB device number 2 using xhci-hcd
[    4.036000] jffs2: Further such events for this erase block will not be printed
[    4.052000] add_ep parameters, dev_speed 3, is_in 1, isTT 0, ep_type 2, maxp 512, interval 1, burst 0, mult 0, ep 0x87f49d80, ep_ctx 0xaff4a080, sch_ep 0x87f49680
[    4.052000] add_ep parameters, dev_speed 3, is_in 0, isTT 0, ep_type 2, maxp 512, interval 1, burst 0, mult 0, ep 0x87f49dac, ep_ctx 0xaff4a060, sch_ep 0x87f49400
[    4.052000] add_ep parameters, dev_speed 3, is_in 1, isTT 0, ep_type 3, maxp 10, interval 256, burst 0, mult 0, ep 0x87d7a580, ep_ctx 0xaff4a100, sch_ep 0x87f49180
[    4.052000] add_ep parameters, dev_speed 3, is_in 1, isTT 0, ep_type 2, maxp 512, interval 1, burst 0, mult 0, ep 0x87d7a5ac, ep_ctx 0xaff4a0c0, sch_ep 0x87ecce80
[    4.052000] add_ep parameters, dev_speed 3, is_in 0, isTT 0, ep_type 2, maxp 512, interval 1, burst 0, mult 0, ep 0x87d7a5d8, ep_ctx 0xaff4a0a0, sch_ep 0x87eccc00
[    4.052000] add_ep parameters, dev_speed 3, is_in 1, isTT 0, ep_type 3, maxp 10, interval 256, burst 0, mult 0, ep 0x87d7a480, ep_ctx 0xaff4a180, sch_ep 0x87ecc980
[    4.052000] add_ep parameters, dev_speed 3, is_in 1, isTT 0, ep_type 2, maxp 512, interval 1, burst 0, mult 0, ep 0x87d7a4ac, ep_ctx 0xaff4a140, sch_ep 0x87ecc780
[    4.052000] add_ep parameters, dev_speed 3, is_in 0, isTT 0, ep_type 2, maxp 512, interval 1, burst 0, mult 0, ep 0x87d7a4d8, ep_ctx 0xaff4a0e0, sch_ep 0x87ecc500
[    4.052000] add_ep parameters, dev_speed 3, is_in 1, isTT 0, ep_type 3, maxp 10, interval 256, burst 0, mult 0, ep 0x87d7a380, ep_ctx 0xaff4a200, sch_ep 0x87ecc280
[    4.052000] add_ep parameters, dev_speed 3, is_in 1, isTT 0, ep_type 2, maxp 512, interval 1, burst 0, mult 0, ep 0x87d7a3ac, ep_ctx 0xaff4a1c0, sch_ep 0x87f75f80
[    4.052000] add_ep parameters, dev_speed 3, is_in 0, isTT 0, ep_type 2, maxp 512, interval 1, burst 0, mult 0, ep 0x87d7a3d8, ep_ctx 0xaff4a120, sch_ep 0x87f75d00
[    4.052000] add_ep parameters, dev_speed 3, is_in 1, isTT 0, ep_type 3, maxp 8, interval 256, burst 0, mult 0, ep 0x87d7a280, ep_ctx 0xaff4a280, sch_ep 0x87f75a80
[    4.052000] add_ep parameters, dev_speed 3, is_in 1, isTT 0, ep_type 2, maxp 512, interval 1, burst 0, mult 0, ep 0x87d7a2ac, ep_ctx 0xaff4a240, sch_ep 0x87f75880
[    4.052000] add_ep parameters, dev_speed 3, is_in 0, isTT 0, ep_type 2, maxp 512, interval 1, burst 0, mult 0, ep 0x87d7a2d8, ep_ctx 0xaff4a160, sch_ep 0x87f75600
[    4.056000]
[    4.056000]
[    4.056000] Unsupported Device!
[    4.056000] Vendor=2c7c ProdID=125
[    4.056000] Manufacturer=Android Product=Android
[    4.056000]
[    4.524000] jffs2: Empty flash at 0x00000038 ends at 0x00000040
[    4.536000] jffs2: Old JFFS2 bitmask found at 0x00003084
[    4.548000] jffs2: You cannot use older JFFS2 filesystems with newer kernels
[    4.564000] jffs2: Old JFFS2 bitmask found at 0x0000b8f4
[    4.572000] jffs2: You cannot use older JFFS2 filesystems with newer kernels
[    4.592000] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020000: 0xfabd instead
[    4.612000] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020004: 0xb1ed instead
[    4.632000] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020008: 0x96b1 instead
[    4.652000] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0002000c: 0x4df7 instead
[    4.668000] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020010: 0x7de9 instead
[    4.688000] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020014: 0xc254 instead
[    4.708000] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020018: 0x883c instead
[    4.724000] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0002001c: 0x932e instead
[    4.744000] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020020: 0xb7af instead
[    4.764000] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020024: 0x938a instead
[    4.784000] jffs2: Further such events for this erase block will not be printed

...

[   28.352000] jffs2: Empty flash at 0x00bb424c ends at 0x00bb4318
[   28.380000] jffs2: Empty flash at 0x00bb4320 ends at 0x00bb5318
[   28.404000] jffs2: Empty flash at 0x00bb5320 ends at 0x00bb7318
[   28.764000] jffs2: Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes
[   28.780000] jffs2: empty_blocks 148, bad_blocks 1, c->nr_blocks 242
[   28.796000] VFS: Cannot open root device "mtdblock5" or unknown-block(31,5): error -5
[   28.808000] Please append a correct "root=" boot option; here are the available partitions:
[   28.828000] 1f00          130560 mtdblock0  (driver?)
[   28.836000] 1f01             512 mtdblock1  (driver?)
[   28.848000] 1f02             512 mtdblock2  (driver?)
[   28.856000] 1f03             256 mtdblock3  (driver?)
[   28.868000] 1f04           32768 mtdblock4  (driver?)
[   28.876000] 1f05           31052 mtdblock5  (driver?)
[   28.888000] 1f06           18944 mtdblock6  (driver?)
[   28.896000] 1f07           32768 mtdblock7  (driver?)
[   28.908000] 1f08           16384 mtdblock8  (driver?)
[   28.916000] 1f09           16384 mtdblock9  (driver?)
[   28.928000] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,5)

待會直接拔插電進 uboot 清空除了 uboot 之外的 partition - nand erase 80000 7000000

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 4

 0


4: System Enter Boot Command Line Interface.

U-Boot 1.1.3 (Sep 26 2018 - 01:50:54)
MT7621 # nand erase 80000 7000000
erase addr=00080000, len=117440512
ranand_erase: start:80000, len:7000000
..............................................................................................................................................................................................................................................................................................................ranand_erase: attempt to erase a fact bad block at 0x02640000
..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................erase finish
MT7621 # reset

直接燒目前的 M360 的 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 () ==:sysupgrade.bin
[tftp_config:1090]modifies++

...

[    2.632000] active dual image is a!
[    2.636000] Creating 8 MTD partitions on "MT7621-NAND":
[    2.648000] 0x000000000000-0x000007f80000 : "ALL"
[    2.660000] 0x000000000000-0x000000080000 : "Bootloader"
[    2.672000] 0x000000080000-0x000000100000 : "Config"
[    2.680000] 0x000000100000-0x000000140000 : "Factory"
[    2.692000] 0x000000140000-0x000002140000 : "firmware"
[    2.704000] 0x0000002ecd97-0x000002140000 : "rootfs"
[    2.716000] mtd: partition "rootfs" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
[    2.752000] mtd: partition "rootfs_data" created automatically, ofs=0xec0000, len=0x1280000
[    2.772000] 0x000000ec0000-0x000002140000 : "rootfs_data"
[    2.780000] 0x000002140000-0x000004140000 : "reserve"
[    2.792000] 0x000005000000-0x000006000000 : "Proscend-config"
[    2.804000] 0x000006000000-0x000007000000 : "Proscend-misc"
[    2.816000] [mtk_nand] probe successfully!
[    2.824000] rootfs = 2ecd97 to ec0000

...

[   13.880000] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
[   13.892000] jffs2_build_filesystem(): unlocking the mtd device... done.
[   13.908000] jffs2_build_filesystem(): erasing all blocks after the end marker... done.
[   19.420000] jffs2: notice: (1169) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[   19.740000] jffs2: notice: (1179) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[   19.996000] jffs2: notice: (1181) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
### module <system> init
### module <syslog> init
### module <switch> init
### module <vlan> init
### module <lan> init
### module <dhcpc> init
### module <firewall> init
### module <firewall6> init
### module <urlfilter> init
### module <macfilter> init
### module <ipFilter> init
### module <dns> init
### module <cwmp> init
### module <web> init
### module <virtual-server> init
### module <nat> init
### module <dhcp> init
### module <qos> init
### module <sntp> init
### module <snmp> init
### module <ssh> init
### module <telnet> init
### module <ipsec> init
### module <ipv6lan> init
### module <dhcp6c> init
### module <alarm> init
### module <lte> init
### module <netmon> init
### module <connmgr> init
### module <dmz> init
### module <cli> init
### module <lan_control> init
### module <vrrp> init
### module <route> init
### module <zebra> init
### module <smtp> init
### module <bgp> init
### module <ip_alias> init
### module <gre> init
### module <pptpd> init
### module <l2tp> init
### module <statsticMD> init
procd: - init complete -

M360-P login:

打完收工

1440

已經回復給了 mitrastar

我的措辭應該很客氣

1445

jessy 的 WiFi 功能有些問題這禮拜的 release 前是解不了了

幫忙從 web ui 隱藏一下相關項目

1500

aaron 分享說 github 現在免費帳號也能建立 Private 的 repository 了

參考 GitHub大放送!免費帳號也能開私人儲存庫,不只免費而且數量無上限

馬上 downgrade from GitHub Pro to GitHub Free

image

每個月省下 7 美金 - pending changed - downgrade to Free plan - 2019-01-17

image

1550

commit 975981e032f0a0fbd5bb69934dcd0c1b7730295d
Refs: [hotfix/v1.76], {origin/hotfix/v1.76}
Author: jeffrey <[email protected]>
Date:   Tue Jan 8 15:48:16 2019 +0800

    chnage the option 'WPA+WPA2(MIX)' to 'WPA2(MIX)' at 'WiFi > Config' page

 proscend/prosrc/www/app/feature/wifi_apsta.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

1600

這禮拜 M360 我有一個待完成項目

web ui for upgrade uboot (uboot need version information: 1.0)

整理一下因果關係

1620

先切換到 M360P branch develop

  • Products/Vendor = LITE/2_PI

make clean

make

先把現有的 rc.local 裡對於 uboot env uboot_env_ver 的需求改成 uboot_env_ver

diff --git a/proscend/base_fs/default/rootfs/etc/rc.local b/proscend/base_fs/default/rootfs/etc/rc.local
index b8c0a1d..2609c9a 100755
--- a/proscend/base_fs/default/rootfs/etc/rc.local
+++ b/proscend/base_fs/default/rootfs/etc/rc.local
@@ -55,11 +55,11 @@ sysinfo_path="$sysinfo_dir"/"$sysinfo_file"


 # get uboot_env_ver from uboot env
-UBOOT_ENV_VER=$(fw_printenv uboot_env_ver 2>/dev/null | awk -F"=" '{ print $2 }')
-if [ "$UBOOT_ENV_VER" = "" ]
+UBOOT_VER=$(fw_printenv uboot_ver 2>/dev/null | awk -F"=" '{ print $2 }')
+if [ "$UBOOT_VER" = "" ]
 then
-    echo "WARNING: uboot env uboot_env_ver loose"
-    UBOOT_ENV_VER="NA"
+    echo "WARNING: uboot env uboot_ver loose"
+    UBOOT_VER="NA"
 fi


@@ -122,7 +122,7 @@ DUAL_IMAGE_ACTIVE=$(fw_printenv dual_image_active 2>/dev/null | awk -F"=" '{ pri


 mkdir -p "$sysinfo_dir"
-echo "UBOOT_ENV_VER"=$UBOOT_ENV_VER         >  "$sysinfo_path"
+echo "UBOOT_VER"=$UBOOT_VER                 >  "$sysinfo_path"
 echo "MAC"=$MAC                             >> "$sysinfo_path"
 echo "HW_MCSV"=$HW_MCSV                     >> "$sysinfo_path"
 echo "SERIALNO"=$SERIALNO                   >> "$sysinfo_path"
(END)

畢竟 M360 的 uboot 修改都是直接修改 source code

這樣一開機後產生的 /tmp/etc/sysinfo.txt 如下

root@M360-P:/home/admin# cat /tmp/etc/sysinfo.txt
UBOOT_VER=NA
MAC="00:AA:BB:CC:DD:10"
HW_MCSV=01F500001002C3DE
SERIALNO=NA
HW_VER=
DUAL_IMAGE_ACTIVE=a

順手在 Management > Identification 加上 U-Boot Version

commit ccc25d234457b5ff72d7094f4c73e75b42ceadad
Refs: [develop], {origin/develop}
Author: jeffrey <[email protected]>
Date:   Tue Jan 8 16:57:25 2019 +0800

    add 'U-Boot Version' field at 'Management > Identification' page

 proscend/base_fs/default/rootfs/etc/rc.local        | 10 +++++-----
 proscend/prosrc/icos/icoslib/system/systemcfg.c     |  4 ++++
 proscend/prosrc/icos/include/module_system.h        |  1 +
 proscend/prosrc/webcgi/system.c                     |  1 +
 proscend/prosrc/www/app/feature/identification.html |  1 +
 proscend/prosrc/www/app/locale-en.json              |  1 +
 proscend/prosrc/www/app/locale-fr.json              |  1 +
 proscend/prosrc/www/app/locale-zh-tw.json           |  1 +
 8 files changed, 15 insertions(+), 5 deletions(-)

1700

接著要修改 uboot

利用下面的 command 進入該 container

docker exec -it -u user build-uboot-m360 /bin/bash

cd home/user/ 之後直接使用 make 即可

➜  ~ docker exec -it -u user build-uboot-m360 /bin/bash
user@a07386063862:/$ cd home/user/
user@a07386063862:~$ make
find . -type f \
                \( -name 'core' -o -name '*.bak' -o -name '*~' \
                -o -name '*.o'  -o -name '*.a'  \) -print \
                | xargs rm -f

...

./tools/mkimage -A mips -T standalone -C none \
                -a 0xA0200000 -e 0xa0200000 \
                -n "NAND Flash Image" \
                -r DDR3 -s 16 -t 128 -u 32 \
                -y 40 \
                -z 5000 -d uboot_a.bin uboot.img
/bin/sh: 1: [: Illegal number: 03-64) 2
DDRCal Code Offset      : 0x00000040
Uboot Offset            : 0x00005000
Image Name:   NAND Flash I
Created:      Tue Jan  8 09:13:07 2019
Image Type:   MIPS Linux Standalone Program (uncompressed)
Data Size:    136140 Bytes = 132.95 kB = 0.13 MB
Load Address: 0xA0200000
Entry Point:  0xA0200000

===============<<IMPORTANT>>==================
Notes:Uboot firmware is uboot.img NOT uboot.bin
================================================

user@a07386063862:~$

1740

uboot 作的修改如下

diff --git a/common/env_common.c b/common/env_common.c
index fd49ed9..4479448 100644
--- a/common/env_common.c
+++ b/common/env_common.c
@@ -142,6 +142,9 @@ uchar default_environment[] = {
 #ifdef CONFIG_PRODUCTION
     "production=" CONFIG_PRODUCTION "\0"
 #endif
+#ifdef CONFIG_PROSCEND_UBOOT_VER
+        "uboot_ver=" CONFIG_PROSCEND_UBOOT_VER "\0"
+#endif
        "\0"
 };

diff --git a/include/configs/rt2880.h b/include/configs/rt2880.h
index 140764e..03b445f 100644
--- a/include/configs/rt2880.h
+++ b/include/configs/rt2880.h
@@ -135,6 +135,14 @@ extern unsigned int  CFG_BLOCKSIZE;



+/*
+** Proscend U-Boot version
+*/
+
+#define CONFIG_PROSCEND_UBOOT_VER "1.0"
+
+
+
 #include <cmd_confdefs.h>

 /*
diff --git a/lib_mips/board.c b/lib_mips/board.c
index 852f274..3013c16 100644
--- a/lib_mips/board.c
+++ b/lib_mips/board.c
@@ -2228,7 +2228,8 @@ __attribute__((nomips16)) void board_init_r (gd_t *id, ulong dest_addr)
             setenv("no_good", tmp_no_good);
         }

-
+        // use the current value to over-wirte the previous saved one
+        setenv("uboot_ver", CONFIG_PROSCEND_UBOOT_VER);

         saveenv();

(END)

上 code

commit 5f436dab353a5d65c4e0418d8d2b22e3120bf9c5
Refs: [master], {origin/master}, {origin/HEAD}
Author: jeffrey <[email protected]>
Date:   Tue Jan 8 17:40:18 2019 +0800

    add a new env 'uboot_ver' to record the modification by PROSCEND:
    use setenv to over-write the previous saved one

 common/env_common.c      | 3 +++
 include/configs/rt2880.h | 8 ++++++++
 lib_mips/board.c         | 3 ++-
 3 files changed, 13 insertions(+), 1 deletion(-)

明天再來作一個秘密的 web ui 能 upgrade uboot

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