WN-DX1167R stock -> OpenWrt(仮2)

メインのブログで書いた通りユーザーが手動で編集することにしていた bootnum, debugflag 2つのflagを、sysupgrade関連のスクリプト内に押し込んで自動的に設定されるよう変更したもの。
stock firmwareが1番目のOSイメージ領域からブートしている状態と、2番目からの場合の2例を掲載。

stock: bootnum=1

  • 1番目のOSイメージでstock firmwareがブートしている状態からスタート
  • OpenWrtのinitramfs-factoryは2番目のOSイメージ領域に書き込まれブートされる
  • 415 – 417行目でbootnumとdebugflagをチェック、bootnumを1に設定しdebugflagを有効化
  • 504行目でZ-Loaderの中断が可能になる (debugflag)
  • 506行目で1番目のOSイメージ領域からブートしている旨が表示される
[  249.812000] led=9, on=1, off=1, blinks,=1, reset=0, time=4000 low_trigger=0
Unlocking firmware_2 ...

Writing from /tmp/fw.bin to firmware_2 ...     
Header checksum OK.
Data checksum OK
Unlocking persist ...
### Switch to bank 2 on next boot! ###
procd: - shutdown -
[  255.428000] br-lan: port 4(ra0) entered disabled state
[  255.436000] br-lan: port 3(rai0) entered disabled state
[  255.448000] br-lan: port 2(eth1) entered disabled state
[  255.460000] br-lan: port 1(eth0) entered disabled state
[  255.472000] device eth0 left promiscuous mode
[  255.480000] br-lan: port 1(eth0) entered disabled state
[  255.492000] ra2880stop()...Done
[  255.496000] eth1: ===> VirtualIF_close
[  255.504000] Free TX/RX Ring Memory!
[  255.512000] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[  255.528000] device eth1 left promiscuous mode
[  255.536000] br-lan: port 2(eth1) entered disabled state
[  255.544000] eth1: ===> VirtualIF_close
[  255.556000] device ra0 left promiscuous mode
[  255.564000] br-lan: port 4(ra0) entered disabled state
[  255.572000] device rai0 left promiscuous mode
[  255.584000] br-lan: port 3(rai0) entered disabled state
[  257.032000] WifiSysClose(), wdev idx = 0
[  257.048000] WifiSysGetBssInfoState(): BssInfoIdx 0 not found!!!
[  257.060000] WifiSysUpdateBssInfoState(): BssInfoIdx 0 not found!!!
### ap ###
[  258.552000] Device Instance
[  258.560000]  WDEV 00:
                Name:rai0
[  258.564000]          Wdev(list) Idx:0
[  258.572000]           Idx:8
[  258.576000]  WDEV 01:
                Name:rai1
[  258.584000]          Wdev(list) Idx:1
[  258.588000]           Idx:9
[  258.592000]  WDEV 02:
                Name:rai2
[  258.600000]          Wdev(list) Idx:2
[  258.608000]           Idx:10
[  258.612000]  WDEV 03:
                Name:rai3
[  258.616000]          Wdev(list) Idx:3
[  258.624000]           Idx:11
[  258.628000]  WDEV 04:
                Name:ra0
[  258.636000]          Wdev(list) Idx:4
[  258.640000]           Idx:12
[  258.644000]  WDEV 05:
                Name:ra1
[  258.652000]          Wdev(list) Idx:5
[  258.660000]           Idx:13
[  258.664000]  WDEV 06:
                Name:ra2
[  258.668000]          Wdev(list) Idx:6
[  258.676000]           Idx:14
[  258.680000]  WDEV 07:
                Name:ra3
[  258.688000]          Wdev(list) Idx:7
[  258.692000]           Idx:15
[  258.696000]  WDEV 08:
                Name:apclii0
[  258.704000]          Wdev(list) Idx:8
[  258.712000]           Idx:16
[  258.716000]  WDEV 09:
                Name:apcli0
[  258.724000]          Wdev(list) Idx:9
[  258.728000]           Idx:17
[  258.732000]  WDEV 10:
[  258.736000]  WDEV 11:
[  258.744000]  WDEV 12:
[  258.748000]  WDEV 13:
[  258.752000]  WDEV 14:
[  258.756000]  WDEV 15:
[  258.760000]  WDEV 16:
[  258.764000]  WDEV 17:
[  258.776000] WifiSysClose(), wdev idx = 4
[  258.788000] WifiSysGetBssInfoState(): BssInfoIdx 1 not found!!!
[  258.800000] WifiSysUpdateBssInfoState(): BssInfoIdx 1 not found!!!
[  258.812000] MtAsicSetPiggyBack(779): Not support for HIF_MT yet!
[  258.828000] WifiSysClose(), wdev idx = 0
[  258.832000] WifiSysClose(), wdev idx = 1
[  258.840000] WifiSysClose(), wdev idx = 2
[  258.848000] WifiSysClose(), wdev idx = 3
[  258.884000] MtAsicSetPiggyBack(779): Not support for HIF_MT yet!
[  258.896000] WifiSysClose(), wdev idx = 4
[  258.904000] WifiSysClose(), wdev idx = 5
[  258.912000] WifiSysClose(), wdev idx = 6
[  258.920000] WifiSysClose(), wdev idx = 7
[  258.928000] kill LoopBackTxTask task failed!
[  258.940000] AndesRestartCheck: Current TOP_MISC2(0x7)
[  258.996000] CmdReStartDLRsp: Status Success!, Status(0)
[  259.004000] AndesRestartCheck:  TOP_MISC2(1)
[  259.016000] RT28xxPciAsicRadioOff(): Not support for HIF_MT yet!
[  259.028000] RTMPDrvClose call RT28xxPciAsicRadioOff fail !!
[  259.036000] tx_kickout_fail_count = 0
[  259.044000] tx_timeout_fail_count = 0
[  259.052000] rx_receive_fail_count = 0
[  259.060000] alloc_cmd_msg = 1848
[  259.064000] free_cmd_msg = 1848
[  259.072000] cut_through_token_list_destroy(): 86231888,86231888
[  259.088000] cut_through_token_list_destroy(): 86231898,86231898
[  259.104000] FwOwn()::Set Fw Own
[  259.112000] RTMP_AllTimerListRelease: Size=0
[  259.120000] FwOwn()::Return since already in Fw Own...
[  259.132000] <---HwCtrlThread
procd: - reboot [  259.268000] Stopped WatchDog Timer.
-
[  259.284000] Restarting system.


U-Boot 1.1.3 (Aug  6 2018 - 14:37:41)

Board: Ralink APSoC DRAM:  128 MB
relocate_code Pointer at: 87f98000

Config XHCI 40M PLL 
******************************
Software System Reset Occurred
******************************
Allocate 16 byte aligned buffer: 87fcb030
Enable NFI Clock
# MTK NAND # : Use HW ECC
NAND ID [01 F1 80 1D 01]
Device found in MTK table, ID: 1f1, EXT_ID: 801d01
Support this Device in MTK table! 1f1 
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: DDR3 
DRAM bus: 16 bit
Xtal Mode=3 OCP Ratio=1/3
Flash component: NAND Flash
Date:Aug  6 2018  Time:14:37:41
============================================ 
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 =128 Mbytes
#Reset_MT7530
set LAN/WAN WLLLL
.## Starting application at 0x81E00000 ...


Z-LOADER V1.28 | 08/06/2018 14:37:44


..
Checking image 2...
   Image Name:   3.10(XIK.1)b7
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    5642640 Bytes =  5.4 MB
   Load Address: 80001000
   Entry Point:  80001000
.......................................................................................   Verifying Combo Checksum ... .......................................................................................## Booting image at bf700000 ...
   Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80001000) ...
## Giving linux memsize in MB, 128

Starting kernel ...

[    0.000000] Linux version 4.14.111 (musashino205@Taiha.Net) (gcc version 7.4.0 (OpenWrt GCC 7.4.0 r0+9901-29b3122f32)) #0 SMP Fri Apr 19 18:38:16 2019
[    0.000000] SoC Type: MediaTek MT7621 ver:1 eco:3
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001992f (MIPS 1004Kc)
[    0.000000] MIPS: machine is I-O DATA WN-DX1167R
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 08000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] VPE topology {2,2} total 4
[    0.000000] Primary instruction cache 32kB, VIPT, 4-way, 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] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000]   HighMem  empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] random: get_random_bytes called from start_kernel+0x90/0x4a4 with crng_init=0
[    0.000000] percpu: Embedded 14 pages/cpu @81110000 s26192 r8192 d22960 u57344
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: console=ttyS0,57600 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=00001001
[    0.000000] Readback ErrCtl register=00001001
[    0.000000] Memory: 119764K/131072K available (4497K kernel code, 230K rwdata, 1000K rodata, 3860K init, 248K bss, 11308K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000] NR_IRQS: 256
[    0.000000] CPU Clock: 880MHz
[    0.000000] clocksource: GIC: mask: 0xffffffffffffffff max_cycles: 0xcaf478abb4, max_idle_ns: 440795247997 ns
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 4343773742 ns
[    0.000009] sched_clock: 32 bits at 440MHz, resolution 2ns, wraps every 4880645118ns
[    0.015488] Calibrating delay loop... 586.13 BogoMIPS (lpj=2930688)
[    0.087817] pid_max: default: 32768 minimum: 301
[    0.097126] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.110147] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.125864] Hierarchical SRCU implementation.
[    0.135320] smp: Bringing up secondary CPUs ...
[    0.144858] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.144867] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.144879] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.145013] CPU1 revision is: 0001992f (MIPS 1004Kc)
[    0.204699] Synchronize counters for CPU 1: done.
[    0.268617] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.268625] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.268632] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.268709] CPU2 revision is: 0001992f (MIPS 1004Kc)
[    0.325525] Synchronize counters for CPU 2: done.
[    0.385688] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.385696] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.385704] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.385790] CPU3 revision is: 0001992f (MIPS 1004Kc)
[    0.445094] Synchronize counters for CPU 3: done.
[    0.504697] smp: Brought up 1 node, 4 CPUs
[    0.516485] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.535955] futex hash table entries: 1024 (order: 3, 32768 bytes)
[    0.548380] pinctrl core: initialized pinctrl subsystem
[    0.560001] NET: Registered protocol family 16
[    0.577896] pull PCIe RST: RALINK_RSTCTRL = 4000000
[    0.887882] release PCIe RST: RALINK_RSTCTRL = 7000000
[    0.897946] ***** Xtal 40MHz *****
[    0.904680] release PCIe RST: RALINK_RSTCTRL = 7000000
[    0.914883] Port 0 N_FTS = 1b102800
[    0.921784] Port 1 N_FTS = 1b105000
[    0.928709] Port 2 N_FTS = 1b102800
[    2.087355] PCIE0 no card, disable it(RST&CLK)
[    2.096042] PCIE2 no card, disable it(RST&CLK)
[    2.104845]  -> 20107f2
[    2.109695] PCIE1 enabled
[    2.114874] PCI host bridge /pcie@1e140000 ranges:
[    2.124402]  MEM 0x0000000060000000..0x000000006fffffff
[    2.134758]   IO 0x000000001e160000..0x000000001e16ffff
[    2.145126] PCI coherence region base: 0xbfbf8000, mask/settings: 0x60000000
[    2.167761] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    2.179069] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    2.190297] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    2.202912] PCI host bridge to bus 0000:00
[    2.210926] pci_bus 0000:00: root bus resource [mem 0x60000000-0x6fffffff]
[    2.224585] pci_bus 0000:00: root bus resource [io  0xffffffff]
[    2.236332] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    2.249806] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    2.266547] pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000]
[    2.279567] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000]
[    2.293386] pci 0000:00:00.0: BAR 8: assigned [mem 0x60000000-0x600fffff]
[    2.306866] pci 0000:00:00.0: BAR 1: assigned [mem 0x60100000-0x6010ffff]
[    2.320357] pci 0000:01:00.0: BAR 0: assigned [mem 0x60000000-0x600fffff 64bit]
[    2.334876] pci 0000:00:00.0: PCI bridge to [bus 01]
[    2.344693] pci 0000:00:00.0:   bridge window [mem 0x60000000-0x600fffff]
[    2.359393] clocksource: Switched to clocksource GIC
[    2.370552] NET: Registered protocol family 2
[    2.380001] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    2.393740] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
[    2.406345] TCP: Hash tables configured (established 1024 bind 1024)
[    2.419073] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    2.430573] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    2.443214] NET: Registered protocol family 1
[    5.829352] 4 CPUs re-calibrate udelay(lpj = 2924544)
[    5.840537] Crashlog allocated RAM at address 0x3f00000
[    5.851106] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    5.870961] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    5.882440] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    5.902557] random: fast init done
[    5.905526] io scheduler noop registered
[    5.916961] io scheduler deadline registered (default)
[    5.928091] Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
[    5.941833] console [ttyS0] disabled
[    5.948844] 1e000c00.uartlite: ttyS0 at MMIO 0x1e000c00 (irq = 18, base_baud = 3125000) is a 16550A
[    5.966853] console [ttyS0] enabled
[    5.966853] console [ttyS0] enabled
[    5.980605] bootconsole [early0] disabled
[    5.980605] bootconsole [early0] disabled
[    5.997174] cacheinfo: Unable to detect cache hierarchy for CPU 0
[    6.010121] MediaTek Nand driver init, version v2.1 Fix AHB virt2phys error
[    6.024144] Enable NFI Clock
[    6.029880] # MTK NAND # : Use HW ECC
[    6.037171] Device found in MTK table, ID: 1f1, EXT_ID: 801d01
[    6.048775] Support this Device in MTK table! 1f1 
[    6.058486] [NAND]select ecc bit:4, sparesize :64 spare_per_sector=16
[    6.071352] nand: device found, Manufacturer ID: 0x01, Chip ID: 0xf1
[    6.083992] nand: AMD/Spansion NAND 128MiB 3,3V 8-bit
[    6.094041] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    6.109116] Scanning device for bad blocks
[    6.398842] 12 fixed-partitions partitions found on MTD device MT7621-NAND
[    6.412529] Creating 12 MTD partitions on "MT7621-NAND":
[    6.423107] 0x000000000000-0x000000100000 : "Bootloader"
[    6.434753] 0x000000100000-0x000000200000 : "u-boot-env"
[    6.446365] 0x000000200000-0x000000300000 : "Factory"
[    6.457433] 0x000000300000-0x000000400000 : "SecondBoot"
[    6.469024] 0x000000400000-0x000000800000 : "kernel"
[    6.479999] 0x000000800000-0x000003600000 : "ubi"
[    6.490740] 0x000003600000-0x000003700000 : "Config"
[    6.501704] 0x000003700000-0x000006900000 : "firmware_2"
[    6.513661] 0x000006900000-0x000006a00000 : "Config_2"
[    6.524953] 0x000006a00000-0x000006b00000 : "persist"
[    6.536034] 0x000006b00000-0x000006c00000 : "idmkey"
[    6.546954] 0x000006c00000-0x000007f80000 : "Backup"
[    6.558005] [mtk_nand] probe successfully!
[    6.566889] Signature matched and data read!
[    6.575384] load_fact_bbt success 1023
[    6.583513] libphy: Fixed MDIO Bus: probed
[    6.661937] libphy: mdio: probed
[    8.079430] mtk_soc_eth 1e100000.ethernet: loaded mt7530 driver
[    8.091976] mtk_soc_eth 1e100000.ethernet eth0: mediatek frame engine at 0xbe100000, irq 19
[    8.110957] NET: Registered protocol family 10
[    8.121086] Segment Routing with IPv6
[    8.128441] NET: Registered protocol family 17
[    8.137379] 8021q: 802.1Q VLAN Support v1.8
[    8.148636] UBI error: no valid UBI magic found inside mtd5
[    8.159787] hctosys: unable to open rtc device (rtc0)
[    8.183994] Freeing unused kernel memory: 3860K
[    8.193046] This architecture does not have kernel memory protection.
[    8.217061] init: Console is alive
[    8.224187] init: - watchdog -
[    8.242011] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    8.259019] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    8.289673] init: - preinit -
[    8.455267] mtk_soc_eth 1e100000.ethernet: PPE started
[    8.477829] random: procd: uninitialized urandom read (4 bytes read)
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[    9.309121] mtk_soc_eth 1e100000.ethernet eth0: port 0 link up
[    9.714606] mtk_soc_eth 1e100000.ethernet eth0: port 2 link up
[   11.592689] mtk_soc_eth 1e100000.ethernet: 0x100 = 0x6060000c, 0x10c = 0x80818
[   11.613930] procd: - early -
[   11.619824] procd: - watchdog -
[   12.249524] procd: - watchdog -
[   12.256078] procd: - ubus -
[   12.266330] random: ubusd: uninitialized urandom read (4 bytes read)
[   12.319925] random: ubusd: uninitialized urandom read (4 bytes read)
[   12.332951] random: ubusd: uninitialized urandom read (4 bytes read)
[   12.346419] procd: - init -
Please press Enter to activate this console.
[   12.506500] kmodloader: loading kernel modules from /etc/modules.d/*
[   12.524664] nat46: module (version 683fbd2b765506332a1af141545652bf58f03166) loaded.
[   12.545421] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   12.565367] ip_tables: (C) 2000-2006 Netfilter Core Team
[   12.585498] nf_conntrack version 0.5.0 (2048 buckets, 8192 max)
[   12.627961] Netfilter messages via NETLINK v0.30.
[   12.657603] xt_time: kernel timezone is -0000
[   12.673395] ctnetlink v0.93: registering with nfnetlink.
[   12.686049] PPP generic driver version 2.4.2
[   12.696300] NET: Registered protocol family 24
[   12.707853] kmodloader: done loading kernel modules from /etc/modules.d/*
[   13.793633] urandom_read: 5 callbacks suppressed
[   13.793645] random: jshn: uninitialized urandom read (4 bytes read)
[   35.564701] mtk_soc_eth 1e100000.ethernet: PPE started
[   35.581714] br-lan: port 1(eth0.1) entered blocking state
[   35.592593] br-lan: port 1(eth0.1) entered disabled state
[   35.604021] device eth0.1 entered promiscuous mode
[   35.613640] device eth0 entered promiscuous mode
[   35.632768] br-lan: port 1(eth0.1) entered blocking state
[   35.643621] br-lan: port 1(eth0.1) entered forwarding state
[   35.655287] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   36.014320] random: crng init done
[   36.590171] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready



BusyBox v1.30.1 () built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt SNAPSHOT, r0+9901-29b3122f32
 -----------------------------------------------------
=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------
root@OpenWrt:/# sysupgrade https://taiha.net/jenkins/job/OpenWrt-master-IODATA-W
N-DX1167R/lastSuccessfulBuild/artifact/bin/targets/ramips/mt7621/openwrt-ramips-
mt7621-iodata_wn-dx1167r-squashfs-sysupgrade.bin
--2019-04-20 01:25:46--  https://taiha.net/jenkins/job/OpenWrt-master-IODATA-WN-DX1167R/lastSuccessfulBuild/artifact/bin/targets/ramips/mt7621/openwrt-ramips-mt7621-iodata_wn-dx1167r-squashfs-sysupgrade.bin
Resolving taiha.net... 240b:12:500:65f0:c822:64a3:7e11:4961, 49.129.167.30
Connecting to taiha.net|240b:12:500:65f0:c822:64a3:7e11:4961|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5888778 (5.6M) [application/octet-stream]
Saving to: '/tmp/sysupgrade.img'

/tmp/sysupgrade.img 100%[===================>]   5.62M  3.07MB/s    in 1.8s    

2019-04-20 01:25:48 (3.07 MB/s) - '/tmp/sysupgrade.img' saved [5888778/5888778]

Cannot save config while running from ramdisk.
Commencing upgrade. Closing all shell sessions.
Watchdog handover: fd=3
- watchdog -
killall: telnetd: no process killed
Sending TERM to remaining processes ... netifd odhcpd uhttpd nlbwmon sh sleep ntpd vnstatd dnsmasq ubusd logd rpcd 
Sending KILL to remaining processes ... 
Performing system upgrade...
current: bootnum => 2, debugflag => 0
### switch to 1st os-image on next boot ###
### enable debug ###
Unlocking kernel ...

Writing from  to kernel ...     
[  149.236208] ubi0: attaching mtd5
[  149.480801] ubi0: scanning is finished
[  149.488318] ubi0 error: ubi_read_volume_table: the layout volume was not found
[  149.502827] ubi0 error: ubi_attach_mtd_dev: failed to attach mtd5, error -22
ubiattach: error!: cannot attach mtd5
           error 22 (Invalid argument)
ubiformat: mtd5 (nand), size 48234496 bytes (46.0 MiB), 368 eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 2048 bytes
libscan: scanning eraseblock 367 -- 100 % complete  
ubiformat: 327 eraseblocks are supposedly empty
ubiformat: warning!: 41 of 368 eraseblocks contain non-UBI data
ubiformat: warning!: only 0 of 368 eraseblocks have valid erase counter
ubiformat: erase counter 0 will be used for all eraseblocks
ubiformat: note, arbitrary erase counter value may be specified using -e option
ubiformat: use erase counter 0 for all eraseblocks
ubiformat: formatting eraseblock 317 -- 86 % complet[  155.968118] ubi0: attaching mtd5
ubiformat: f[  156.404597] ubi0: scanning is finished  
ubiformat: formatting eraseblock 363 -- 98 % complet[  156.427486] ubi0: attached mtd5 (name "ubi", size 46 MiB)
ubiformat: f[  156.439973] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
ormatting eraseb[  156.456384] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
lock 364 -- 99 %[  156.472637] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
ubif[  156.489233] ubi0: good PEBs: 368, bad PEBs: 0, corrupted PEBs: 0
ormat: formattin[  156.503931] ubi0: user volume: 0, internal volumes: 1, max. volumes count: 128
g eraseblock 365[  156.521043] ubi0: max/mean erase counter: 0/0, WL threshold: 4096, image sequence number: 539701386
 -- 99 % complet[  156.541789] ubi0: available PEBs: 344, total reserved PEBs: 24, PEBs reserved for bad PEB handling: 20
ubiformat: f[  156.563066] ubi0: background thread "ubi_bgt0d" started, PID 2215
ubiformat: formatting eraseblock 367 -- 100 % complete  
UBI device number 0, total 368 LEBs (46727168 bytes, 44.5 MiB), available 344 LEBs (43679744 bytes, 41.6 MiB), LEB size 126976 bytes (124.0 KiB)
Volume ID 0, size 32 LEBs (4063232 bytes, 3.8 MiB), LEB size 126976 bytes (124.0 KiB), dynamic, name "rootfs", alignment 1
Set volume size to 39616512
Volume ID 1, size 312 LEBs (39616512 bytes, 37.7 MiB), LEB size 126976 bytes (124.0 KiB), dynamic, name "rootfs_data", alignment 1
sysupgrade successful
umount: can't unmount /dev: Resource busy
umount: can't unmount /tmp: Resource busy
umount: can't unmount /: Invalid argument
[  158.599742] reboot: Restarting system


U-Boot 1.1.3 (Aug  6 2018 - 14:37:41)

Board: Ralink APSoC DRAM:  128 MB
relocate_code Pointer at: 87f98000

Config XHCI 40M PLL 
******************************
Software System Reset Occurred
******************************
Allocate 16 byte aligned buffer: 87fcb030
Enable NFI Clock
# MTK NAND # : Use HW ECC
NAND ID [01 F1 80 1D 01]
Device found in MTK table, ID: 1f1, EXT_ID: 801d01
Support this Device in MTK table! 1f1 
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: DDR3 
DRAM bus: 16 bit
Xtal Mode=3 OCP Ratio=1/3
Flash component: NAND Flash
Date:Aug  6 2018  Time:14:37:41
============================================ 
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 =128 Mbytes
#Reset_MT7530
set LAN/WAN WLLLL
.## Starting application at 0x81E00000 ...


Z-LOADER V1.28 | 08/06/2018 14:37:44


..Hit ESC key to stop autoboot: 1

Checking image 1...
   Image Name:   MIPS OpenWrt Linux-4.14.
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    1905343 Bytes =  1.8 MB
   Load Address: 80001000
   Entry Point:  80001000
..............................   Verifying Checksum ... ## Booting image at bc400000 ...
   Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80001000) ...
## Giving linux memsize in MB, 128

Starting kernel ...

[    0.000000] Linux version 4.14.111 (musashino205@Taiha.Net) (gcc version 7.4.0 (OpenWrt GCC 7.4.0 r0+9901-29b3122f32)) #0 SMP Fri Apr 19 18:38:16 2019
[    0.000000] SoC Type: MediaTek MT7621 ver:1 eco:3
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001992f (MIPS 1004Kc)
[    0.000000] MIPS: machine is I-O DATA WN-DX1167R
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 08000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] VPE topology {2,2} total 4
[    0.000000] Primary instruction cache 32kB, VIPT, 4-way, 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] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000]   HighMem  empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] random: get_random_bytes called from start_kernel+0x90/0x4a4 with crng_init=0
[    0.000000] percpu: Embedded 14 pages/cpu @81110000 s26192 r8192 d22960 u57344
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: console=ttyS0,57600 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=00001000
[    0.000000] Readback ErrCtl register=00001000
[    0.000000] Memory: 123412K/131072K available (4497K kernel code, 230K rwdata, 1000K rodata, 212K init, 248K bss, 7660K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000] NR_IRQS: 256
[    0.000000] CPU Clock: 880MHz
[    0.000000] clocksource: GIC: mask: 0xffffffffffffffff max_cycles: 0xcaf478abb4, max_idle_ns: 440795247997 ns
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 4343773742 ns
[    0.000009] sched_clock: 32 bits at 440MHz, resolution 2ns, wraps every 4880645118ns
[    0.015488] Calibrating delay loop... 586.13 BogoMIPS (lpj=2930688)
[    0.087817] pid_max: default: 32768 minimum: 301
[    0.097126] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.110146] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.125865] Hierarchical SRCU implementation.
[    0.135322] smp: Bringing up secondary CPUs ...
[    0.157179] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.157188] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.157199] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.157334] CPU1 revision is: 0001992f (MIPS 1004Kc)
[    0.204698] Synchronize counters for CPU 1: done.
[    0.280941] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.280949] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.280956] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.281032] CPU2 revision is: 0001992f (MIPS 1004Kc)
[    0.325530] Synchronize counters for CPU 2: done.
[    0.398014] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.398022] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.398030] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.398117] CPU3 revision is: 0001992f (MIPS 1004Kc)
[    0.445099] Synchronize counters for CPU 3: done.
[    0.504703] smp: Brought up 1 node, 4 CPUs
[    0.516485] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.535955] futex hash table entries: 1024 (order: 3, 32768 bytes)
[    0.548382] pinctrl core: initialized pinctrl subsystem
[    0.559933] NET: Registered protocol family 16
[    0.577505] pull PCIe RST: RALINK_RSTCTRL = 4000000
[    0.887491] release PCIe RST: RALINK_RSTCTRL = 7000000
[    0.897554] ***** Xtal 40MHz *****
[    0.904288] release PCIe RST: RALINK_RSTCTRL = 7000000
[    0.914491] Port 0 N_FTS = 1b102800
[    0.921393] Port 1 N_FTS = 1b105000
[    0.928317] Port 2 N_FTS = 1b102800
[    2.086971] PCIE0 no card, disable it(RST&CLK)
[    2.095659] PCIE2 no card, disable it(RST&CLK)
[    2.104462]  -> 20107f2
[    2.109312] PCIE1 enabled
[    2.114491] PCI host bridge /pcie@1e140000 ranges:
[    2.124019]  MEM 0x0000000060000000..0x000000006fffffff
[    2.134375]   IO 0x000000001e160000..0x000000001e16ffff
[    2.144743] PCI coherence region base: 0xbfbf8000, mask/settings: 0x60000000
[    2.167366] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    2.178636] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    2.189838] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    2.202268] PCI host bridge to bus 0000:00
[    2.210286] pci_bus 0000:00: root bus resource [mem 0x60000000-0x6fffffff]
[    2.223959] pci_bus 0000:00: root bus resource [io  0xffffffff]
[    2.235687] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    2.249187] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    2.266052] pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000]
[    2.279096] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000]
[    2.292905] pci 0000:00:00.0: BAR 8: assigned [mem 0x60000000-0x600fffff]
[    2.306379] pci 0000:00:00.0: BAR 1: assigned [mem 0x60100000-0x6010ffff]
[    2.319877] pci 0000:01:00.0: BAR 0: assigned [mem 0x60000000-0x600fffff 64bit]
[    2.334380] pci 0000:00:00.0: PCI bridge to [bus 01]
[    2.344200] pci 0000:00:00.0:   bridge window [mem 0x60000000-0x600fffff]
[    2.359032] clocksource: Switched to clocksource GIC
[    2.370341] NET: Registered protocol family 2
[    2.379576] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    2.393317] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
[    2.405923] TCP: Hash tables configured (established 1024 bind 1024)
[    2.418647] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    2.430155] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    2.442799] NET: Registered protocol family 1
[    2.688982] 4 CPUs re-calibrate udelay(lpj = 2924544)
[    2.700354] Crashlog allocated RAM at address 0x3f00000
[    2.710851] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    2.730813] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    2.742294] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    2.762256] random: fast init done
[    2.765242] io scheduler noop registered
[    2.776727] io scheduler deadline registered (default)
[    2.787775] Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
[    2.801657] console [ttyS0] disabled
[    2.808665] 1e000c00.uartlite: ttyS0 at MMIO 0x1e000c00 (irq = 18, base_baud = 3125000) is a 16550A
[    2.826694] console [ttyS0] enabled
[    2.826694] console [ttyS0] enabled
[    2.840436] bootconsole [early0] disabled
[    2.840436] bootconsole [early0] disabled
[    2.857092] cacheinfo: Unable to detect cache hierarchy for CPU 0
[    2.870071] MediaTek Nand driver init, version v2.1 Fix AHB virt2phys error
[    2.884106] Enable NFI Clock
[    2.889844] # MTK NAND # : Use HW ECC
[    2.897135] Device found in MTK table, ID: 1f1, EXT_ID: 801d01
[    2.908743] Support this Device in MTK table! 1f1 
[    2.918458] [NAND]select ecc bit:4, sparesize :64 spare_per_sector=16
[    2.931327] nand: device found, Manufacturer ID: 0x01, Chip ID: 0xf1
[    2.943972] nand: AMD/Spansion NAND 128MiB 3,3V 8-bit
[    2.954025] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    2.969106] Scanning device for bad blocks
[    3.258898] 12 fixed-partitions partitions found on MTD device MT7621-NAND
[    3.272584] Creating 12 MTD partitions on "MT7621-NAND":
[    3.283166] 0x000000000000-0x000000100000 : "Bootloader"
[    3.294684] 0x000000100000-0x000000200000 : "u-boot-env"
[    3.306162] 0x000000200000-0x000000300000 : "Factory"
[    3.317093] 0x000000300000-0x000000400000 : "SecondBoot"
[    3.328545] 0x000000400000-0x000000800000 : "kernel"
[    3.339387] 0x000000800000-0x000003600000 : "ubi"
[    3.350032] 0x000003600000-0x000003700000 : "Config"
[    3.360791] 0x000003700000-0x000006900000 : "firmware_2"
[    3.372620] 0x000006900000-0x000006a00000 : "Config_2"
[    3.383745] 0x000006a00000-0x000006b00000 : "persist"
[    3.394669] 0x000006b00000-0x000006c00000 : "idmkey"
[    3.405445] 0x000006c00000-0x000007f80000 : "Backup"
[    3.416383] [mtk_nand] probe successfully!
[    3.425266] Signature matched and data read!
[    3.433761] load_fact_bbt success 1023
[    3.441842] libphy: Fixed MDIO Bus: probed
[    3.521593] libphy: mdio: probed
[    4.927628] mtk_soc_eth 1e100000.ethernet: loaded mt7530 driver
[    4.940154] mtk_soc_eth 1e100000.ethernet eth0: mediatek frame engine at 0xbe100000, irq 19
[    4.959228] NET: Registered protocol family 10
[    4.969483] Segment Routing with IPv6
[    4.976843] NET: Registered protocol family 17
[    4.985741] 8021q: 802.1Q VLAN Support v1.8
[    4.996937] UBI: auto-attach mtd5
[    5.003599] ubi0: attaching mtd5
[    5.437590] ubi0: scanning is finished
[    5.460295] ubi0: attached mtd5 (name "ubi", size 46 MiB)
[    5.471061] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    5.484742] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    5.498251] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[    5.512110] ubi0: good PEBs: 368, bad PEBs: 0, corrupted PEBs: 0
[    5.524061] ubi0: user volume: 2, internal volumes: 1, max. volumes count: 128
[    5.538434] ubi0: max/mean erase counter: 1/0, WL threshold: 4096, image sequence number: 539701386
[    5.556438] ubi0: available PEBs: 0, total reserved PEBs: 368, PEBs reserved for bad PEB handling: 20
[    5.574807] ubi0: background thread "ubi_bgt0d" started, PID 371
[    5.576428] block ubiblock0_0: created from ubi0:0(rootfs)
[    5.597689] ubiblock: device ubiblock0_0 (rootfs) set to be root filesystem
[    5.611558] hctosys: unable to open rtc device (rtc0)
[    5.628778] VFS: Mounted root (squashfs filesystem) readonly on device 254:0.
[    5.643534] Freeing unused kernel memory: 212K
[    5.652425] This architecture does not have kernel memory protection.
[    6.122265] init: Console is alive
[    6.129305] init: - watchdog -
[    6.168783] mtk_soc_eth 1e100000.ethernet eth0: port 0 link up
[    6.357869] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    6.485837] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    6.509320] init: - preinit -
[    7.328683] mtk_soc_eth 1e100000.ethernet: PPE started
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to [    7.405955] random: procd: uninitialized urandom read (4 bytes read)
select the debug level
[    8.371629] mtk_soc_eth 1e100000.ethernet eth0: port 2 link up
[   10.523665] UBIFS (ubi0:1): default file-system created
[   10.535531] UBIFS (ubi0:1): background thread "ubifs_bgt0_1" started, PID 448
[   10.648490] UBIFS (ubi0:1): UBIFS: mounted UBI device 0, volume 1, name "rootfs_data"
[   10.664101] UBIFS (ubi0:1): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[   10.683838] UBIFS (ubi0:1): FS size: 38346752 bytes (36 MiB, 302 LEBs), journal size 1904640 bytes (1 MiB, 15 LEBs)
[   10.704613] UBIFS (ubi0:1): reserved for root: 1811211 bytes (1768 KiB)
[   10.717783] UBIFS (ubi0:1): media format: w4/r0 (latest is w5/r0), UUID 7FB3E685-BC83-4CEC-B75E-984218747C31, small LPT model
[   10.743143] mount_root: overlay filesystem has not been fully initialized yet
[   10.757837] mount_root: switching to ubifs overlay
[   10.784973] urandom-seed: Seed file not found (/etc/urandom.seed)
[   10.862311] mtk_soc_eth 1e100000.ethernet: 0x100 = 0x6060000c, 0x10c = 0x80818
[   10.884080] procd: - early -
[   10.889995] procd: - watchdog -
[   11.519162] procd: - watchdog -
[   11.525724] procd: - ubus -
[   11.610131] random: ubusd: uninitialized urandom read (4 bytes read)
[   11.694616] random: ubusd: uninitialized urandom read (4 bytes read)
[   11.707749] random: ubusd: uninitialized urandom read (4 bytes read)
[   11.721270] procd: - init -
Please press Enter to activate this console.
[   12.109668] kmodloader: loading kernel modules from /etc/modules.d/*
[   12.197687] nat46: module (version 683fbd2b765506332a1af141545652bf58f03166) loaded.
[   12.217478] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   12.235888] ip_tables: (C) 2000-2006 Netfilter Core Team
[   12.254124] nf_conntrack version 0.5.0 (2048 buckets, 8192 max)
[   12.298491] Netfilter messages via NETLINK v0.30.
[   12.325272] xt_time: kernel timezone is -0000
[   12.340586] ctnetlink v0.93: registering with nfnetlink.
[   12.353220] PPP generic driver version 2.4.2
[   12.363368] NET: Registered protocol family 24
[   12.375649] kmodloader: done loading kernel modules from /etc/modules.d/*
[   13.634218] urandom_read: 5 callbacks suppressed
[   13.634230] random: jshn: uninitialized urandom read (4 bytes read)
[   31.774993] mtk_soc_eth 1e100000.ethernet: PPE started
[   31.814337] br-lan: port 1(eth0.1) entered blocking state
[   31.825186] br-lan: port 1(eth0.1) entered disabled state
[   31.836610] device eth0.1 entered promiscuous mode
[   31.846213] device eth0 entered promiscuous mode
[   31.859810] br-lan: port 1(eth0.1) entered blocking state
[   31.870640] br-lan: port 1(eth0.1) entered forwarding state
[   31.882301] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   32.207181] random: crng init done
[   32.809763] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready



BusyBox v1.30.1 () built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt SNAPSHOT, r0+9901-29b3122f32
 -----------------------------------------------------
=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------
root@OpenWrt:/# 

stock: bootnum=2

  • 2番目のOSイメージでstock firmwareがブートしている状態からスタート
  • OpenWrtのinitramfs-factoryは1番目のOSイメージ領域に書き込まれブートされる
  • 391行目でbootnumとdebugflagをチェック、bootnumは既に1なので392行目でdebugflagの有効化のみ実施
  • 479行目でZ-Loaderの中断が可能になる (debugflag)
  • 481行目で1番目のOSイメージ領域からブートしている旨が表示される
### DO NOT set cfgapply ###
cat: can't open 'remote_mgmt': No such file or directory
### Checksum is the same but commit does not change anything! Do nothing! ###
[  257.336000] led=9, on=1, off=1, blinks,=1, reset=0, time=4000 low_trigger=0
Unlocking firmware ...

Writing from /tmp/fw.bin to firmware ...     
Header checksum OK.
Data checksum OK
Unlocking persist ...
### Switch to bank 1 on next boot! ###
procd: - shutdown -
[  262.960000] br-lan: port 4(ra0) entered disabled state
[  262.968000] br-lan: port 3(rai0) entered disabled state
[  262.980000] br-lan: port 2(eth1) entered disabled state
[  262.988000] br-lan: port 1(eth0) entered disabled state
[  263.000000] device eth0 left promiscuous mode
[  263.012000] br-lan: port 1(eth0) entered disabled state
[  263.020000] ra2880stop()...Done
[  263.028000] eth1: ===> VirtualIF_close
[  263.036000] Free TX/RX Ring Memory!
[  263.044000] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[  263.060000] device eth1 left promiscuous mode
[  263.068000] br-lan: port 2(eth1) entered disabled state
[  263.080000] eth1: ===> VirtualIF_close
[  263.088000] device ra0 left promiscuous mode
[  263.096000] br-lan: port 4(ra0) entered disabled state
[  263.108000] device rai0 left promiscuous mode
[  263.116000] br-lan: port 3(rai0) entered disabled state
### ap ###
[  264.632000] WifiSysClose(), wdev idx = 0
[  264.648000] WifiSysGetBssInfoState(): BssInfoIdx 0 not found!!!
[  264.660000] WifiSysUpdateBssInfoState(): BssInfoIdx 0 not found!!!
[  265.980000] Device Instance
[  265.984000]  WDEV 00:
                Name:rai0
[  265.992000]          Wdev(list) Idx:0
[  266.000000]           Idx:9
[  266.004000]  WDEV 01:
                Name:rai1
[  266.008000]          Wdev(list) Idx:1
[  266.016000]           Idx:10
[  266.020000]  WDEV 02:
                Name:rai2
[  266.028000]          Wdev(list) Idx:2
[  266.032000]           Idx:11
[  266.040000]  WDEV 03:
                Name:rai3
[  266.044000]          Wdev(list) Idx:3
[  266.052000]           Idx:12
[  266.056000]  WDEV 04:
                Name:ra0
[  266.064000]          Wdev(list) Idx:4
[  266.068000]           Idx:13
[  266.072000]  WDEV 05:
                Name:ra1
[  266.080000]          Wdev(list) Idx:5
[  266.084000]           Idx:14
[  266.088000]  WDEV 06:
                Name:ra2
[  266.096000]          Wdev(list) Idx:6
[  266.104000]           Idx:15
[  266.108000]  WDEV 07:
                Name:ra3
[  266.112000]          Wdev(list) Idx:7
[  266.120000]           Idx:16
[  266.124000]  WDEV 08:
                Name:apclii0
[  266.132000]          Wdev(list) Idx:8
[  266.136000]           Idx:17
[  266.144000]  WDEV 09:
                Name:apcli0
[  266.148000]          Wdev(list) Idx:9
[  266.156000]           Idx:18
[  266.160000]  WDEV 10:
[  266.164000]  WDEV 11:
[  266.168000]  WDEV 12:
[  266.172000]  WDEV 13:
[  266.176000]  WDEV 14:
[  266.184000]  WDEV 15:
[  266.188000]  WDEV 16:
[  266.192000]  WDEV 17:
[  266.200000] WifiSysClose(), wdev idx = 4
[  266.216000] WifiSysGetBssInfoState(): BssInfoIdx 1 not found!!!
[  266.228000] WifiSysUpdateBssInfoState(): BssInfoIdx 1 not found!!!
[  266.240000] MtAsicSetPiggyBack(779): Not support for HIF_MT yet!
[  266.252000] WifiSysClose(), wdev idx = 0
[  266.260000] WifiSysClose(), wdev idx = 1
[  266.268000] WifiSysClose(), wdev idx = 2
[  266.276000] WifiSysClose(), wdev idx = 3
[  266.308000] MtAsicSetPiggyBack(779): Not support for HIF_MT yet!
[  266.320000] WifiSysClose(), wdev idx = 4
[  266.328000] WifiSysClose(), wdev idx = 5
[  266.336000] WifiSysClose(), wdev idx = 6
[  266.344000] WifiSysClose(), wdev idx = 7
[  266.352000] kill LoopBackTxTask task failed!
[  266.368000] AndesRestartCheck: Current TOP_MISC2(0x7)
[  266.420000] CmdReStartDLRsp: Status Success!, Status(0)
[  266.432000] AndesRestartCheck:  TOP_MISC2(1)
[  266.440000] RT28xxPciAsicRadioOff(): Not support for HIF_MT yet!
[  266.452000] RTMPDrvClose call RT28xxPciAsicRadioOff fail !!
[  266.464000] tx_kickout_fail_count = 0
[  266.472000] tx_timeout_fail_count = 0
[  266.476000] rx_receive_fail_count = 0
[  266.484000] alloc_cmd_msg = 1864
[  266.492000] free_cmd_msg = 1864
[  266.500000] cut_through_token_list_destroy(): 8545dd88,8545dd88
[  266.512000] cut_through_token_list_destroy(): 8545dd98,8545dd98
[  266.528000] FwOwn()::Set Fw Own
[  266.540000] RTMP_AllTimerListRelease: Size=0
[  266.548000] FwOwn()::Return since already in Fw Own...
[  266.556000] <---HwCtrlThread
procd: - reboot [  266.696000] Stopped WatchDog Timer.
-
[  266.708000] Restarting system.


U-Boot 1.1.3 (Aug  6 2018 - 14:37:41)

Board: Ralink APSoC DRAM:  128 MB
relocate_code Pointer at: 87f98000

Config XHCI 40M PLL 
******************************
Software System Reset Occurred
******************************
Allocate 16 byte aligned buffer: 87fcb030
Enable NFI Clock
# MTK NAND # : Use HW ECC
NAND ID [01 F1 80 1D 01]
Device found in MTK table, ID: 1f1, EXT_ID: 801d01
Support this Device in MTK table! 1f1 
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: DDR3 
DRAM bus: 16 bit
Xtal Mode=3 OCP Ratio=1/3
Flash component: NAND Flash
Date:Aug  6 2018  Time:14:37:41
============================================ 
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 =128 Mbytes
#Reset_MT7530
set LAN/WAN WLLLL
.## Starting application at 0x81E00000 ...


Z-LOADER V1.28 | 08/06/2018 14:37:44


..
Checking image 1...
   Image Name:   3.10(XIK.1)b7
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    5642216 Bytes =  5.4 MB
   Load Address: 80001000
   Entry Point:  80001000
.......................................................................................   Verifying Combo Checksum ... .......................................................................................## Booting image at bc400000 ...
   Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80001000) ...
## Giving linux memsize in MB, 128

Starting kernel ...

[    0.000000] Linux version 4.14.111 (musashino205@Taiha.Net) (gcc version 7.4.0 (OpenWrt GCC 7.4.0 r0+9901-29b3122f32)) #0 SMP Sat Apr 20 01:26:47 2019
[    0.000000] SoC Type: MediaTek MT7621 ver:1 eco:3
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001992f (MIPS 1004Kc)
[    0.000000] MIPS: machine is I-O DATA WN-DX1167R
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 08000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] VPE topology {2,2} total 4
[    0.000000] Primary instruction cache 32kB, VIPT, 4-way, 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] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000]   HighMem  empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] random: get_random_bytes called from start_kernel+0x90/0x4a4 with crng_init=0
[    0.000000] percpu: Embedded 14 pages/cpu @81110000 s26192 r8192 d22960 u57344
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: console=ttyS0,57600 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=00001000
[    0.000000] Readback ErrCtl register=00001000
[    0.000000] Memory: 119764K/131072K available (4497K kernel code, 230K rwdata, 1000K rodata, 3860K init, 248K bss, 11308K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000] NR_IRQS: 256
[    0.000000] CPU Clock: 880MHz
[    0.000000] clocksource: GIC: mask: 0xffffffffffffffff max_cycles: 0xcaf478abb4, max_idle_ns: 440795247997 ns
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 4343773742 ns
[    0.000009] sched_clock: 32 bits at 440MHz, resolution 2ns, wraps every 4880645118ns
[    0.015487] Calibrating delay loop... 586.13 BogoMIPS (lpj=2930688)
[    0.087817] pid_max: default: 32768 minimum: 301
[    0.097125] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.110146] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.125864] Hierarchical SRCU implementation.
[    0.135321] smp: Bringing up secondary CPUs ...
[    0.144858] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.144867] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.144879] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.145013] CPU1 revision is: 0001992f (MIPS 1004Kc)
[    0.204697] Synchronize counters for CPU 1: done.
[    0.268618] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.268627] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.268634] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.268710] CPU2 revision is: 0001992f (MIPS 1004Kc)
[    0.325526] Synchronize counters for CPU 2: done.
[    0.385687] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.385696] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.385704] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.385789] CPU3 revision is: 0001992f (MIPS 1004Kc)
[    0.445095] Synchronize counters for CPU 3: done.
[    0.504698] smp: Brought up 1 node, 4 CPUs
[    0.516487] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.535958] futex hash table entries: 1024 (order: 3, 32768 bytes)
[    0.548382] pinctrl core: initialized pinctrl subsystem
[    0.559984] NET: Registered protocol family 16
[    0.577541] pull PCIe RST: RALINK_RSTCTRL = 4000000
[    0.887528] release PCIe RST: RALINK_RSTCTRL = 7000000
[    0.897592] ***** Xtal 40MHz *****
[    0.904326] release PCIe RST: RALINK_RSTCTRL = 7000000
[    0.914529] Port 0 N_FTS = 1b102800
[    0.921430] Port 1 N_FTS = 1b105000
[    0.928355] Port 2 N_FTS = 1b102800
[    2.087005] PCIE0 no card, disable it(RST&CLK)
[    2.095693] PCIE2 no card, disable it(RST&CLK)
[    2.104497]  -> 20107f2
[    2.109346] PCIE1 enabled
[    2.114525] PCI host bridge /pcie@1e140000 ranges:
[    2.124053]  MEM 0x0000000060000000..0x000000006fffffff
[    2.134410]   IO 0x000000001e160000..0x000000001e16ffff
[    2.144777] PCI coherence region base: 0xbfbf8000, mask/settings: 0x60000000
[    2.167122] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    2.178384] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    2.189565] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    2.201941] PCI host bridge to bus 0000:00
[    2.209965] pci_bus 0000:00: root bus resource [mem 0x60000000-0x6fffffff]
[    2.223640] pci_bus 0000:00: root bus resource [io  0xffffffff]
[    2.235368] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    2.248861] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    2.265586] pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000]
[    2.278622] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000]
[    2.292436] pci 0000:00:00.0: BAR 8: assigned [mem 0x60000000-0x600fffff]
[    2.305909] pci 0000:00:00.0: BAR 1: assigned [mem 0x60100000-0x6010ffff]
[    2.319405] pci 0000:01:00.0: BAR 0: assigned [mem 0x60000000-0x600fffff 64bit]
[    2.333910] pci 0000:00:00.0: PCI bridge to [bus 01]
[    2.343731] pci 0000:00:00.0:   bridge window [mem 0x60000000-0x600fffff]
[    2.358409] clocksource: Switched to clocksource GIC
[    2.369593] NET: Registered protocol family 2
[    2.378820] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    2.392564] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
[    2.405170] TCP: Hash tables configured (established 1024 bind 1024)
[    2.417889] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    2.429398] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    2.442040] NET: Registered protocol family 1
[    5.828377] 4 CPUs re-calibrate udelay(lpj = 2924544)
[    5.839524] Crashlog allocated RAM at address 0x3f00000
[    5.850080] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    5.869596] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    5.881071] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    5.903416] random: fast init done
[    5.910435] io scheduler noop registered
[    5.918071] io scheduler deadline registered (default)
[    5.929233] Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
[    5.943050] console [ttyS0] disabled
[    5.950097] 1e000c00.uartlite: ttyS0 at MMIO 0x1e000c00 (irq = 18, base_baud = 3125000) is a 16550A
[    5.968061] console [ttyS0] enabled
[    5.968061] console [ttyS0] enabled
[    5.981831] bootconsole [early0] disabled
[    5.981831] bootconsole [early0] disabled
[    5.998427] cacheinfo: Unable to detect cache hierarchy for CPU 0
[    6.011221] MediaTek Nand driver init, version v2.1 Fix AHB virt2phys error
[    6.025291] Enable NFI Clock
[    6.031029] # MTK NAND # : Use HW ECC
[    6.038318] Device found in MTK table, ID: 1f1, EXT_ID: 801d01
[    6.049927] Support this Device in MTK table! 1f1 
[    6.059645] [NAND]select ecc bit:4, sparesize :64 spare_per_sector=16
[    6.072510] nand: device found, Manufacturer ID: 0x01, Chip ID: 0xf1
[    6.085154] nand: AMD/Spansion NAND 128MiB 3,3V 8-bit
[    6.095206] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    6.110288] Scanning device for bad blocks
[    6.400355] 12 fixed-partitions partitions found on MTD device MT7621-NAND
[    6.414037] Creating 12 MTD partitions on "MT7621-NAND":
[    6.424621] 0x000000000000-0x000000100000 : "Bootloader"
[    6.436271] 0x000000100000-0x000000200000 : "u-boot-env"
[    6.447867] 0x000000200000-0x000000300000 : "Factory"
[    6.458999] 0x000000300000-0x000000400000 : "SecondBoot"
[    6.470616] 0x000000400000-0x000000800000 : "kernel"
[    6.481538] 0x000000800000-0x000003600000 : "ubi"
[    6.492286] 0x000003600000-0x000003700000 : "Config"
[    6.503238] 0x000003700000-0x000006900000 : "firmware_2"
[    6.515206] 0x000006900000-0x000006a00000 : "Config_2"
[    6.526494] 0x000006a00000-0x000006b00000 : "persist"
[    6.537579] 0x000006b00000-0x000006c00000 : "idmkey"
[    6.548565] 0x000006c00000-0x000007f80000 : "Backup"
[    6.559662] [mtk_nand] probe successfully!
[    6.568573] Signature matched and data read!
[    6.577055] load_fact_bbt success 1023
[    6.585272] libphy: Fixed MDIO Bus: probed
[    6.660961] libphy: mdio: probed
[    8.078318] mtk_soc_eth 1e100000.ethernet: loaded mt7530 driver
[    8.090893] mtk_soc_eth 1e100000.ethernet eth0: mediatek frame engine at 0xbe100000, irq 19
[    8.109982] NET: Registered protocol family 10
[    8.120205] Segment Routing with IPv6
[    8.127564] NET: Registered protocol family 17
[    8.136513] 8021q: 802.1Q VLAN Support v1.8
[    8.147780] UBI error: no valid UBI magic found inside mtd5
[    8.158943] hctosys: unable to open rtc device (rtc0)
[    8.183210] Freeing unused kernel memory: 3860K
[    8.192259] This architecture does not have kernel memory protection.
[    8.216181] init: Console is alive
[    8.223265] init: - watchdog -
[    8.241019] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    8.258104] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    8.288695] init: - preinit -
[    8.453778] mtk_soc_eth 1e100000.ethernet: PPE started
[    8.476226] random: procd: uninitialized urandom read (4 bytes read)
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[    9.336037] mtk_soc_eth 1e100000.ethernet eth0: port 0 link up
[    9.713304] mtk_soc_eth 1e100000.ethernet eth0: port 2 link up
[   11.591627] mtk_soc_eth 1e100000.ethernet: 0x100 = 0x6060000c, 0x10c = 0x80818
[   11.613014] procd: - early -
[   11.618909] procd: - watchdog -
[   12.248572] procd: - watchdog -
[   12.255131] procd: - ubus -
[   12.265342] random: ubusd: uninitialized urandom read (4 bytes read)
[   12.318959] random: ubusd: uninitialized urandom read (4 bytes read)
[   12.331987] random: ubusd: uninitialized urandom read (4 bytes read)
[   12.345465] procd: - init -
Please press Enter to activate this console.
[   12.505945] kmodloader: loading kernel modules from /etc/modules.d/*
[   12.524713] nat46: module (version 683fbd2b765506332a1af141545652bf58f03166) loaded.
[   12.544708] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   12.565010] ip_tables: (C) 2000-2006 Netfilter Core Team
[   12.585937] nf_conntrack version 0.5.0 (2048 buckets, 8192 max)
[   12.629244] Netfilter messages via NETLINK v0.30.
[   12.658667] xt_time: kernel timezone is -0000
[   12.674768] ctnetlink v0.93: registering with nfnetlink.
[   12.687983] PPP generic driver version 2.4.2
[   12.697955] NET: Registered protocol family 24
[   12.710410] kmodloader: done loading kernel modules from /etc/modules.d/*
[   13.802323] urandom_read: 5 callbacks suppressed
[   13.802335] random: jshn: uninitialized urandom read (4 bytes read)
[   29.948714] mtk_soc_eth 1e100000.ethernet: PPE started
[   29.966406] br-lan: port 1(eth0.1) entered blocking state
[   29.977314] br-lan: port 1(eth0.1) entered disabled state
[   29.988828] device eth0.1 entered promiscuous mode
[   29.998458] device eth0 entered promiscuous mode
[   30.011542] br-lan: port 1(eth0.1) entered blocking state
[   30.022355] br-lan: port 1(eth0.1) entered forwarding state
[   30.034064] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   30.469127] random: crng init done
[   30.969428] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready



BusyBox v1.30.1 () built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt SNAPSHOT, r0+9902-961771ff30
 -----------------------------------------------------
=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------
root@OpenWrt:/# sysupgrade https://taiha.net/jenkins/job/OpenWrt-master-IODATA-W
N-DX1167R/lastSuccessfulBuild/artifact/bin/targets/ramips/mt7621/openwrt-ramips-
mt7621-iodata_wn-dx1167r-squashfs-sysupgrade.bin
--2019-04-20 02:06:11--  https://taiha.net/jenkins/job/OpenWrt-master-IODATA-WN-DX1167R/lastSuccessfulBuild/artifact/bin/targets/ramips/mt7621/openwrt-ramips-mt7621-iodata_wn-dx1167r-squashfs-sysupgrade.bin
Resolving taiha.net... 240b:12:500:65f0:c822:64a3:7e11:4961, 49.129.167.30
Connecting to taiha.net|240b:12:500:65f0:c822:64a3:7e11:4961|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5888778 (5.6M) [application/octet-stream]
Saving to: '/tmp/sysupgrade.img'

/tmp/sysupgrade.img 100%[===================>]   5.62M  3.13MB/s    in 1.8s    

2019-04-20 02:06:13 (3.13 MB/s) - '/tmp/sysupgrade.img' saved [5888778/5888778]

Cannot save config while running from ramdisk.
Commencing upgrade. Closing all shell sessions.
Watchdog handover: fd=3
- watchdog -
killall: telnetd: no process killed
Sending TERM to remaining processes ... netifd odhcpd uhttpd nlbwmon sh sleep ntpd vnstatd dnsmasq ubusd logd rpcd 
Sending KILL to remaining processes ... 
Performing system upgrade...
current: bootnum => 1, debugflag => 0
### enable debug ###
Unlocking kernel ...

Writing from  to kernel ...     
[   64.720676] ubi0: attaching mtd5
[   64.965168] ubi0: scanning is finished
[   64.972696] ubi0 error: ubi_read_volume_table: the layout volume was not found
[   64.987194] ubi0 error: ubi_attach_mtd_dev: failed to attach mtd5, error -22
ubiattach: error!: cannot attach mtd5
           error 22 (Invalid argument)
ubiformat: mtd5 (nand), size 48234496 bytes (46.0 MiB), 368 eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 2048 bytes
libscan: scanning eraseblock 367 -- 100 % complete  
ubiformat: 327 eraseblocks are supposedly empty
ubiformat: warning!: 41 of 368 eraseblocks contain non-UBI data
ubiformat: warning!: only 0 of 368 eraseblocks have valid erase counter
ubiformat: erase counter 0 will be used for all eraseblocks
ubiformat: note, arbitrary erase counter value may be specified using -e option
ubiformat: use erase counter 0 for all eraseblocks
ubiformat: formatting eraseblock 317 -- 86 % complet[   71.452084] ubi0: attaching mtd5
ubiformat: f[   71.889484] ubi0: scanning is finished  
ubiformat: formatting eraseblock 363 -- 98 % complet[   71.911907] ubi0: attached mtd5 (name "ubi", size 46 MiB)
ubiformat: f[   71.924433] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
ormatting eraseb[   71.940868] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
lock 364 -- 99 %[   71.957102] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
ubif[   71.973709] ubi0: good PEBs: 368, bad PEBs: 0, corrupted PEBs: 0
ormat: formattin[   71.988402] ubi0: user volume: 0, internal volumes: 1, max. volumes count: 128
g eraseblock 365[   72.005520] ubi0: max/mean erase counter: 0/0, WL threshold: 4096, image sequence number: 1110684811
 -- 99 % complet[   72.026438] ubi0: available PEBs: 344, total reserved PEBs: 24, PEBs reserved for bad PEB handling: 20
ubiformat: f[   72.047725] ubi0: background thread "ubi_bgt0d" started, PID 2207
ubiformat: formatting eraseblock 367 -- 100 % complete  
UBI device number 0, total 368 LEBs (46727168 bytes, 44.5 MiB), available 344 LEBs (43679744 bytes, 41.6 MiB), LEB size 126976 bytes (124.0 KiB)
Volume ID 0, size 32 LEBs (4063232 bytes, 3.8 MiB), LEB size 126976 bytes (124.0 KiB), dynamic, name "rootfs", alignment 1
Set volume size to 39616512
Volume ID 1, size 312 LEBs (39616512 bytes, 37.7 MiB), LEB size 126976 bytes (124.0 KiB), dynamic, name "rootfs_data", alignment 1
sysupgrade successful
umount: can't unmount /dev: Resource busy
umount: can't unmount /tmp: Resource busy
umount: can't unmount /: Invalid argument
[   74.078801] reboot: Restarting system


U-Boot 1.1.3 (Aug  6 2018 - 14:37:41)

Board: Ralink APSoC DRAM:  128 MB
relocate_code Pointer at: 87f98000

Config XHCI 40M PLL 
******************************
Software System Reset Occurred
******************************
Allocate 16 byte aligned buffer: 87fcb030
Enable NFI Clock
# MTK NAND # : Use HW ECC
NAND ID [01 F1 80 1D 01]
Device found in MTK table, ID: 1f1, EXT_ID: 801d01
Support this Device in MTK table! 1f1 
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: DDR3 
DRAM bus: 16 bit
Xtal Mode=3 OCP Ratio=1/3
Flash component: NAND Flash
Date:Aug  6 2018  Time:14:37:41
============================================ 
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 =128 Mbytes
#Reset_MT7530
set LAN/WAN WLLLL
.## Starting application at 0x81E00000 ...


Z-LOADER V1.28 | 08/06/2018 14:37:44


..Hit ESC key to stop autoboot: 1

Checking image 1...
   Image Name:   MIPS OpenWrt Linux-4.14.
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    1905158 Bytes =  1.8 MB
   Load Address: 80001000
   Entry Point:  80001000
..............................   Verifying Checksum ... ## Booting image at bc400000 ...
   Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80001000) ...
## Giving linux memsize in MB, 128

Starting kernel ...

[    0.000000] Linux version 4.14.111 (musashino205@Taiha.Net) (gcc version 7.4.0 (OpenWrt GCC 7.4.0 r0+9901-29b3122f32)) #0 SMP Sat Apr 20 01:26:47 2019
[    0.000000] SoC Type: MediaTek MT7621 ver:1 eco:3
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001992f (MIPS 1004Kc)
[    0.000000] MIPS: machine is I-O DATA WN-DX1167R
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 08000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] VPE topology {2,2} total 4
[    0.000000] Primary instruction cache 32kB, VIPT, 4-way, 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] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000]   HighMem  empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] random: get_random_bytes called from start_kernel+0x90/0x4a4 with crng_init=0
[    0.000000] percpu: Embedded 14 pages/cpu @81110000 s26192 r8192 d22960 u57344
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: console=ttyS0,57600 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=00001000
[    0.000000] Readback ErrCtl register=00001000
[    0.000000] Memory: 123412K/131072K available (4497K kernel code, 230K rwdata, 1000K rodata, 212K init, 248K bss, 7660K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000] NR_IRQS: 256
[    0.000000] CPU Clock: 880MHz
[    0.000000] clocksource: GIC: mask: 0xffffffffffffffff max_cycles: 0xcaf478abb4, max_idle_ns: 440795247997 ns
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 4343773742 ns
[    0.000009] sched_clock: 32 bits at 440MHz, resolution 2ns, wraps every 4880645118ns
[    0.015488] Calibrating delay loop... 586.13 BogoMIPS (lpj=2930688)
[    0.087817] pid_max: default: 32768 minimum: 301
[    0.097126] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.110146] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.125868] Hierarchical SRCU implementation.
[    0.135326] smp: Bringing up secondary CPUs ...
[    0.157183] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.157192] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.157204] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.157338] CPU1 revision is: 0001992f (MIPS 1004Kc)
[    0.204704] Synchronize counters for CPU 1: done.
[    0.280943] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.280951] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.280958] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.281034] CPU2 revision is: 0001992f (MIPS 1004Kc)
[    0.325533] Synchronize counters for CPU 2: done.
[    0.398017] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.398025] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.398033] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.398119] CPU3 revision is: 0001992f (MIPS 1004Kc)
[    0.445102] Synchronize counters for CPU 3: done.
[    0.504705] smp: Brought up 1 node, 4 CPUs
[    0.516488] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.535958] futex hash table entries: 1024 (order: 3, 32768 bytes)
[    0.548383] pinctrl core: initialized pinctrl subsystem
[    0.559935] NET: Registered protocol family 16
[    0.578196] pull PCIe RST: RALINK_RSTCTRL = 4000000
[    0.888183] release PCIe RST: RALINK_RSTCTRL = 7000000
[    0.898248] ***** Xtal 40MHz *****
[    0.904981] release PCIe RST: RALINK_RSTCTRL = 7000000
[    0.915184] Port 0 N_FTS = 1b102800
[    0.922086] Port 1 N_FTS = 1b105000
[    0.929010] Port 2 N_FTS = 1b102800
[    2.087654] PCIE0 no card, disable it(RST&CLK)
[    2.096341] PCIE2 no card, disable it(RST&CLK)
[    2.105144]  -> 20107f2
[    2.109994] PCIE1 enabled
[    2.115173] PCI host bridge /pcie@1e140000 ranges:
[    2.124701]  MEM 0x0000000060000000..0x000000006fffffff
[    2.135057]   IO 0x000000001e160000..0x000000001e16ffff
[    2.145425] PCI coherence region base: 0xbfbf8000, mask/settings: 0x60000000
[    2.167700] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    2.178946] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    2.190116] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    2.202405] PCI host bridge to bus 0000:00
[    2.210422] pci_bus 0000:00: root bus resource [mem 0x60000000-0x6fffffff]
[    2.224095] pci_bus 0000:00: root bus resource [io  0xffffffff]
[    2.235823] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    2.249312] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    2.266052] pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000]
[    2.279087] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000]
[    2.292902] pci 0000:00:00.0: BAR 8: assigned [mem 0x60000000-0x600fffff]
[    2.306375] pci 0000:00:00.0: BAR 1: assigned [mem 0x60100000-0x6010ffff]
[    2.319870] pci 0000:01:00.0: BAR 0: assigned [mem 0x60000000-0x600fffff 64bit]
[    2.334380] pci 0000:00:00.0: PCI bridge to [bus 01]
[    2.344196] pci 0000:00:00.0:   bridge window [mem 0x60000000-0x600fffff]
[    2.358915] clocksource: Switched to clocksource GIC
[    2.370139] NET: Registered protocol family 2
[    2.379360] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    2.393098] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
[    2.405705] TCP: Hash tables configured (established 1024 bind 1024)
[    2.418430] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    2.429937] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    2.442587] NET: Registered protocol family 1
[    2.688867] 4 CPUs re-calibrate udelay(lpj = 2924544)
[    2.700185] Crashlog allocated RAM at address 0x3f00000
[    2.710679] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    2.729381] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    2.740855] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    2.763374] random: fast init done
[    2.770320] io scheduler noop registered
[    2.777955] io scheduler deadline registered (default)
[    2.789063] Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
[    2.802824] console [ttyS0] disabled
[    2.809877] 1e000c00.uartlite: ttyS0 at MMIO 0x1e000c00 (irq = 18, base_baud = 3125000) is a 16550A
[    2.827814] console [ttyS0] enabled
[    2.827814] console [ttyS0] enabled
[    2.841603] bootconsole [early0] disabled
[    2.841603] bootconsole [early0] disabled
[    2.858084] cacheinfo: Unable to detect cache hierarchy for CPU 0
[    2.870858] MediaTek Nand driver init, version v2.1 Fix AHB virt2phys error
[    2.884894] Enable NFI Clock
[    2.890641] # MTK NAND # : Use HW ECC
[    2.897930] Device found in MTK table, ID: 1f1, EXT_ID: 801d01
[    2.909547] Support this Device in MTK table! 1f1 
[    2.919271] [NAND]select ecc bit:4, sparesize :64 spare_per_sector=16
[    2.932140] nand: device found, Manufacturer ID: 0x01, Chip ID: 0xf1
[    2.944790] nand: AMD/Spansion NAND 128MiB 3,3V 8-bit
[    2.954847] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    2.969935] Scanning device for bad blocks
[    3.259828] 12 fixed-partitions partitions found on MTD device MT7621-NAND
[    3.273515] Creating 12 MTD partitions on "MT7621-NAND":
[    3.284101] 0x000000000000-0x000000100000 : "Bootloader"
[    3.295589] 0x000000100000-0x000000200000 : "u-boot-env"
[    3.307024] 0x000000200000-0x000000300000 : "Factory"
[    3.317974] 0x000000300000-0x000000400000 : "SecondBoot"
[    3.329475] 0x000000400000-0x000000800000 : "kernel"
[    3.340266] 0x000000800000-0x000003600000 : "ubi"
[    3.350874] 0x000003600000-0x000003700000 : "Config"
[    3.361650] 0x000003700000-0x000006900000 : "firmware_2"
[    3.373482] 0x000006900000-0x000006a00000 : "Config_2"
[    3.384593] 0x000006a00000-0x000006b00000 : "persist"
[    3.395534] 0x000006b00000-0x000006c00000 : "idmkey"
[    3.406328] 0x000006c00000-0x000007f80000 : "Backup"
[    3.417265] [mtk_nand] probe successfully!
[    3.426176] Signature matched and data read!
[    3.434679] load_fact_bbt success 1023
[    3.442735] libphy: Fixed MDIO Bus: probed
[    3.521466] libphy: mdio: probed
[    4.927550] mtk_soc_eth 1e100000.ethernet: loaded mt7530 driver
[    4.940123] mtk_soc_eth 1e100000.ethernet eth0: mediatek frame engine at 0xbe100000, irq 19
[    4.959274] NET: Registered protocol family 10
[    4.969504] Segment Routing with IPv6
[    4.976861] NET: Registered protocol family 17
[    4.985779] 8021q: 802.1Q VLAN Support v1.8
[    4.996931] UBI: auto-attach mtd5
[    5.003577] ubi0: attaching mtd5
[    5.437581] ubi0: scanning is finished
[    5.460232] ubi0: attached mtd5 (name "ubi", size 46 MiB)
[    5.470997] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    5.484679] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    5.498185] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[    5.512043] ubi0: good PEBs: 368, bad PEBs: 0, corrupted PEBs: 0
[    5.523993] ubi0: user volume: 2, internal volumes: 1, max. volumes count: 128
[    5.538366] ubi0: max/mean erase counter: 1/0, WL threshold: 4096, image sequence number: 1110684811
[    5.556542] ubi0: available PEBs: 0, total reserved PEBs: 368, PEBs reserved for bad PEB handling: 20
[    5.574919] ubi0: background thread "ubi_bgt0d" started, PID 372
[    5.576897] block ubiblock0_0: created from ubi0:0(rootfs)
[    5.597830] ubiblock: device ubiblock0_0 (rootfs) set to be root filesystem
[    5.611699] hctosys: unable to open rtc device (rtc0)
[    5.628946] VFS: Mounted root (squashfs filesystem) readonly on device 254:0.
[    5.643645] Freeing unused kernel memory: 212K
[    5.652531] This architecture does not have kernel memory protection.
[    6.122667] init: Console is alive
[    6.129708] init: - watchdog -
[    6.168650] mtk_soc_eth 1e100000.ethernet eth0: port 0 link up
[    6.364148] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    6.492490] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    6.509223] init: - preinit -
[    6.514134] mtk_soc_eth 1e100000.ethernet eth0: port 2 link up
[    7.329817] mtk_soc_eth 1e100000.ethernet: PPE started
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to [    7.407135] random: procd: uninitialized urandom read (4 bytes read)
select the debug level
[   10.523692] UBIFS (ubi0:1): default file-system created
[   10.535559] UBIFS (ubi0:1): background thread "ubifs_bgt0_1" started, PID 448
[   10.648588] UBIFS (ubi0:1): UBIFS: mounted UBI device 0, volume 1, name "rootfs_data"
[   10.664199] UBIFS (ubi0:1): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[   10.683937] UBIFS (ubi0:1): FS size: 38346752 bytes (36 MiB, 302 LEBs), journal size 1904640 bytes (1 MiB, 15 LEBs)
[   10.704711] UBIFS (ubi0:1): reserved for root: 1811211 bytes (1768 KiB)
[   10.717882] UBIFS (ubi0:1): media format: w4/r0 (latest is w5/r0), UUID B62DEE20-04B6-4BB2-B22F-19A90A3DC706, small LPT model
[   10.743239] mount_root: overlay filesystem has not been fully initialized yet
[   10.757879] mount_root: switching to ubifs overlay
[   10.785078] urandom-seed: Seed file not found (/etc/urandom.seed)
[   10.862493] mtk_soc_eth 1e100000.ethernet: 0x100 = 0x6060000c, 0x10c = 0x80818
[   10.884326] procd: - early -
[   10.890184] procd: - watchdog -
[   11.509052] procd: - watchdog -
[   11.515610] procd: - ubus -
[   11.599988] random: ubusd: uninitialized urandom read (4 bytes read)
[   11.684382] random: ubusd: uninitialized urandom read (4 bytes read)
[   11.697524] random: ubusd: uninitialized urandom read (4 bytes read)
[   11.711058] procd: - init -
Please press Enter to activate this console.
[   12.099025] kmodloader: loading kernel modules from /etc/modules.d/*
[   12.187056] nat46: module (version 683fbd2b765506332a1af141545652bf58f03166) loaded.
[   12.206932] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   12.225448] ip_tables: (C) 2000-2006 Netfilter Core Team
[   12.243844] nf_conntrack version 0.5.0 (2048 buckets, 8192 max)
[   12.289461] Netfilter messages via NETLINK v0.30.
[   12.319386] xt_time: kernel timezone is -0000
[   12.336616] ctnetlink v0.93: registering with nfnetlink.
[   12.350023] PPP generic driver version 2.4.2
[   12.360073] NET: Registered protocol family 24
[   12.371598] kmodloader: done loading kernel modules from /etc/modules.d/*
[   13.633810] urandom_read: 5 callbacks suppressed
[   13.633822] random: jshn: uninitialized urandom read (4 bytes read)
[   38.772592] mtk_soc_eth 1e100000.ethernet: PPE started
[   38.787870] br-lan: port 1(eth0.1) entered blocking state
[   38.798662] br-lan: port 1(eth0.1) entered disabled state
[   38.810224] device eth0.1 entered promiscuous mode
[   38.819834] device eth0 entered promiscuous mode
[   38.832645] br-lan: port 1(eth0.1) entered blocking state
[   38.843498] br-lan: port 1(eth0.1) entered forwarding state
[   38.855149] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   39.219880] random: crng init done
[   39.849578] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready



BusyBox v1.30.1 () built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt SNAPSHOT, r0+9902-961771ff30
 -----------------------------------------------------
=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------
root@OpenWrt:/#