git-bashから起動したVSCodeでもWindowsのssh.exeを使うメモ

git-bashから起動したVSCodeでもWindowsのssh.exeを使うメモ

2019/07/04 12:14 追記

Remote拡張で新たなウィンドウが起動された場合、そのウィンドウ内ではsettings.jsonの ${env: <var>} が展開されず、この文字列のままPATHに設定されてしまうことが判明。この結果、ウィンドウ内でSSHが使用できず接続に失敗する。
どうにもできないので、この記事のやり方は非推奨。2019/07/04現在、VSCode Insiders (バージョン: 1.36.0-insider) ではRemote拡張の設定でSSHコマンドへのパス指定が実装されているため、これを利用してしまうのが手っ取り早そう。リリース版 (バージョン: 1.35.1) にはこの設定は無し。
追記: リリース版 (バージョン: 1.36.0) からssh.exeへのパス指定が追加されていることを確認。

Windows 10にて、普段git-bashからVisual Studio Codeを起動して作業しているが、その際VSCodeへgit-bashからPATHが渡され、VSCode側の認識するssh.exeがgit-bash側のものとWindows側のもの2種類が存在してしまっていた。

PS C:\Users\tofu\git\musashino205\openwrt> cmd
Microsoft Windows [Version 10.0.18362.175]
(c) 2019 Microsoft Corporation. All rights reserved.

C:\Users\tofu\git\musashino205\openwrt>path
PATH=C:\Users\tofu\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\local\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\tofu\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\dotnet;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn;C:\Program Files\Microsoft VS Code\bin;C:\Program Files (x86)\Poedit;D:\Compiler\go\bin;D:\Compiler\GOPATH\bin;C:\Users\tofu\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Git\usr\bin\vendor_perl;C:\Program Files\Git\usr\bin\core_perl

C:\Users\tofu\git\musashino205\openwrt>where ssh.exe
C:\Program Files\Git\usr\bin\ssh.exe
C:\Windows\System32\OpenSSH\ssh.exe

C:\Users\tofu\git\musashino205\openwrt>

この結果、Remoting (SSH)などでgit-bash側のssh.exeが使用され、Windows側のssh-agentに登録した認証情報を使用して自動的にログインできず、毎回パスワードを聞かれて非常に面倒だった。

大体対処できたのでメモ。

Windowsの環境変数を追加登録
Windowsの環境変数を登録。ユーザー環境変数で問題ない。
名前は VSCPATH などとし、値は %PATH%
settings.jsonを編集
VSCodeのsettings.jsonを開き、以下を追加して保存(環境変数名は適宜合わせること)

    "terminal.integrated.env.windows": {
        "PATH": "${env:VSCPATH}"
    }

${env:<variable>} は環境変数を読み取って代入するもの。

以上。

PS C:\Users\tofu\git\musashino205\openwrt> cmd
Microsoft Windows [Version 10.0.18362.175]
(c) 2019 Microsoft Corporation. All rights reserved.

C:\Users\tofu\git\musashino205\openwrt>path
PATH=C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\Microsoft VS Code\bin;C:\Program Files (x86)\Poedit;D:\Compiler\go\bin;D:\Compiler\GOPATH\bin;C:\Users\tofu\AppData\Local\Microsoft\WindowsApps;

C:\Users\tofu\git\musashino205\openwrt>where ssh.exe
C:\Windows\System32\OpenSSH\ssh.exe

C:\Users\tofu\git\musashino205\openwrt>
広告

WN-G300DGR

作業した時期が非常に古く、メモを取っていなかったので今更ながら書き出し。なお、既に散々弄った状態であるためオリジナルとは異なっていたり、破損個所が存在する可能性に注意すること。

MAC

  • LAN: 00:A0:B0:xx:xx:AC (u-boot-env, ethaddr (text))
  • WAN: 00:A0:B0:xx:xx:AB (u-boot-env, wanaddr (tex))
  • 2.4G: 00:A0:B0:xx:xx:AC (Factory, 0x4 (hex))

※Flash: Parallel-NOR (CFI) 4MiB (MX29LV320E)

U-Boot

  • help
    RT3052 # help
    rf      - read/write rf register
    ?       - alias for 'help'
    bootm   - boot application image from memory
    cp      - memory copy
    erase   - erase FLASH memory
    go      - start application at address 'addr'
    help    - print online help
    loadb   - load binary file over serial line (kermit mode)
    loopback   - Ralink eth loopback test !!
    md      - memory display
    mdio   - Ralink PHY register R/W command !!
    mm      - memory modify (auto-incrementing)
    mw      - memory write (fill)
    nm      - memory modify (constant address)
    printenv- print environment variables
    protect - enable or disable FLASH write protection
    reset   - Perform RESET of the CPU
    saveenv - save environment variables to persistent storage
    setenv  - set environment variables
    spicmd  - read/write data from/to eeprom or vtss
    tftpboot- boot image via network using TFTP protocol
    version - print monitor version
    

  • version

    RT3052 # version
    
    U-Boot 1.1.3 (Jun  1 2011 - 15:30:20)
    

  • printenv

    RT3052 # printenv
    bootcmd=tftp
    bootdelay=5
    baudrate=57600
    ethaddr="00:A0:B0:**:**:**"
    sn=00024936I
    hw_ver=1.0.0
    pro_id=000
    country=000
    domain=1
    wanaddr=00:A0:B0:**:**:**
    wlanaddr=00:AA:BB:CC:DD:12
    fwaddr=00:AA:BB:CC:DD:13
    eth_en=0
    snextra=00000000000000000000
    preboot=echo;echo
    ramargs=setenv bootargs root=/dev/ram rw
    addip=setenv bootargs $(bootargs) ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):$(hostname):$(netdev):off
    addmisc=setenv bootargs $(bootargs) console=ttyS0,$(baudrate) ethaddr=$(ethaddr) panic=1
    flash_self=run ramargs addip addmisc;bootm $(kernel_addr) $(ramdisk_addr)
    kernel_addr=BFC40000
    u-boot=u-boot.bin
    load=tftp 8A100000 $(u-boot)
    u_b=protect off 1:0-1;era 1:0-1;cp.b 8A100000 BC400000 $(filesize)
    loadfs=tftp 8A100000 root.cramfs
    u_fs=era bc540000 bc83ffff;cp.b 8A100000 BC540000 $(filesize)
    test_tftp=tftp 8A100000 root.cramfs;run test_tftp
    hw_id=030A003E
    ethact=Eth0 
    filesize=26c36d
    fileaddr=80800000
    ipaddr=192.168.99.9
    serverip=192.168.99.8
    autostart=no
    bootfile=uImageWN-G300DGR
    uboot_ver=1.0.6.20
    op_mode=1
    stdin=serial
    stdout=serial
    stderr=serial
    
    Environment size: 1066/4092 bytes
    

Kernel

  • uname -a

    # uname -a
    Linux WN-G300DGR 2.6.21 #3 Tue Mar 17 09:25:56 CST 2015 mips unknown
    

  • cat /proc/version

    # cat /proc/version
    Linux version 2.6.21 (root@******-******-******-******) (gcc version 3.4.6) #3 Tue Mar 17 09:25:56 CST 2015
    

  • cat /proc/cpuinfo

    # cat /proc/cpuinfo
    system type             : Ralink SoC
    processor               : 0
    cpu model               : MIPS 24K V4.12
    BogoMIPS                : 255.48
    wait instruction        : yes
    microsecond timers      : yes
    tlb_entries             : 32
    extra interrupt vector  : yes
    hardware watchpoint     : yes
    ASEs implemented        : mips16 dsp
    VCED exceptions         : not available
    VCEI exceptions         : not available
    

  • cat /proc/meminfo

    # cat /proc/meminfo
    MemTotal:        29696 kB
    MemFree:         15092 kB
    Buffers:          1096 kB
    Cached:           5616 kB
    SwapCached:          0 kB
    Active:           3860 kB
    Inactive:         4216 kB
    SwapTotal:           0 kB
    SwapFree:            0 kB
    Dirty:               0 kB
    Writeback:           0 kB
    AnonPages:        1372 kB
    Mapped:           1920 kB
    Slab:             3684 kB
    SReclaimable:      464 kB
    SUnreclaim:       3220 kB
    PageTables:        412 kB
    NFS_Unstable:        0 kB
    Bounce:              0 kB
    CommitLimit:     14848 kB
    Committed_AS:     3692 kB
    VmallocTotal:  1048404 kB
    VmallocUsed:     18468 kB
    VmallocChunk:  1029828 kB
    

  • cat /proc/mtd

    # cat /proc/mtd
    dev:    size   erasesize  name
    mtd0: 00020000 00010000 "Bootloader"
    mtd1: 00010000 00010000 "backup"
    mtd2: 00010000 00010000 "Config "
    mtd3: 00010000 00010000 "Factory"
    mtd4: 000b0000 00010000 "Kernel"
    mtd5: 002b0000 00010000 "app"
    mtd6: 001a0000 00010000 "cb-app"
    mtd7: 00040000 00010000 "manufacture"
    mtd8: 00010000 00002000 "storage"
    

  • bootlog

    U-boot Ver:1.0.6.20 2011/06/01
    
    
    Board: Ralink APSoC DRAM:  32 MB  2*16 MB
    ============================================ 
    ASIC 3052_MP2 (Port5GigaSW)
    Product Name: WN-G300DGR
    SDRAM CAS = 3(d1835272) 
    ============================================ 
    
    Please choose the operation: 
       1: Load system code to SDRAM via TFTP. 
    
    LINUX started...
    
     THIS IS ASIC
    init started: BusyBox v1.7.5 (2015-03-17 09:22:54 CST)
    starting pid 151, tty '/dev/console': '/sbin/config_init'
    mknod: /dev/ttyS0: File exists
    mknod: /dev/ttyS1: File exists
    Config Init version: 1.15.000.113 date: 2015/03/17
    Thu Jan  1 00:00:00 UTC 2015
    mount: can't find /sys in /etc/fstab or /etc/mtab
    ln: /lib/./modules: File exists
    switch reg write offset=94, value=7f00
    Could not find Watchdog driver (/apps/lib/modules/2.6.21/kernel/arch/mips/rt2880/rt_timer.ko)
    Application Ver:1.15.000.113             Date:2015/03/17
    
    starting pid 211, tty '/dev/ttyS1': '/sbin/config_term'
    ************************************************************************
    *                               WN-G300DGR                             *
    ************************************************************************
    
    KernelApp/Ramdisk Ver:1.15.000.113                       Date:2015/03/17
    cat: can't open '/apps/lib/modules/2.6.21/modulesApp.dep': No such file or directory
    ln: /sbin/apps_init: File exists
    ln: /sbin/opmode.sh: File exists
    password: createShareMem keyid 7001 shmId 0
    Set Int value 0 but not in rage 1000 to 50000
    checkpApCfg i=746 [wan2_dl_bw]
    Set Int value 0 but not in rage 1000 to 50000
    checkpApCfg i=762 [wan2_ul_bw]
    checkpApCfg error!!
    CTRL_INTERFACE:[/var/sysconfd_if]  CTRL_INTERFACE_IF:[if0]
    
    System Monitoring
    *********************************************************************
    Initializing system environment
    Setting up /tmp directory ...
    Setting up loopback device ...
    ***************************************************
    System is in    AP Router Mode [0]
    ***************************************************
    SEM_GETID got id -1
    Mac: 0, rtcTime:1420070401
    Starting system logging daemon ...OK
    Setting up Ethernet devices ...
    OK
    Configuring Bridge device ...          OK
    Setting the host&domain name ...Finished.
    Configuring net ...          OK
    Configuring LAN device ...          OK
    getRegularDomain,0
    Configuring RT28XX device ...Wlan is in AP Mode
    Using fixWDSLowTP function.
    sh: cannot create /proc/netpktconfig/config_interface: nonexistent directory
    Wan Manager...
    Configuring WAN device[WAN0] ...
    Obtaining IP address from DHCP ... 
    wan is Ready
    Set Domain Routing for FLET'S Square Connection...            
    Starting DNS Proxy ...            FAILED
    Starting DHCP(udhcpd) server ...            OK
    Starting ntpclient ...            
    Setup tc for QoS ... Disabled
    
    SCHEDULE, ServiceWlanLowRateInit ...service_index[0].
    
    SCHEDULE, ServiceWlsRadioOffInit ...service_index[1].
    
    SCHEDULE, ServiceLedOffInit ...service_index[2].
    
    SCHEDULE, ServiceLanOffInit ...service_index[3].
    
    SCHEDULE, ServiceWanOffInit ...service_index[4].
    
    SCHEDULE, ServiceLanLowRateInit ...service_index[5].
    
    SCHEDULE, ServicePowerLedInit ...service_index[6].
    
    
    Schedule starting  [scheduleOpen], ...wait result..
    Schedule result :[Disable (No rules)]. 
    Configuring network routing and filtering ...Iptable restart VPN ACL ...VPN ACL ...
    OK
    Starting SiteBlock server ...            
    Netpacket Filter Open ....              sysGetKernelInfo: netv :1.0
    Kernel netpkt ver netv: 1.0
    OK
    Starting DDNS  ...  Disabled
    Starting UPNPD  ...  WAN Speed = 10 Mbps
    FAILED
    Starting HTTPD server ...           OK
    Staring ALG...           OK
    Starting LLTD ...           OK
    Starting netbios daemon ...  OK
    Initialization has completed
    *We used 6.210000 seconds to initialize all modules*
    pSEM_GETID got id 32769
    [RMGMT DBG] RMGMT_VERSION: 3.42.32
    NewWAN0:[192.168.1.25]  LastWAN0:[0.0.0.0]
    wan0Configuring ...
    Wan IP was changed, Reload related module**
    *** PROCESS MANAGER Starts ***
    Processmanager update modules
    Restarting Iptables ....Clean iptable...OK
    Configuring network routing and filtering ...Iptable restart VPN ACL ...VPN ACL ...
    OK
    OK
    QoS, Stopping
    Setup tc for QoS ... Disabled
    Reloading dnsProxy ...            Stopping DNS Proxy ...            OK
    Set Domain Routing for FLET'S Square Connection...            
    Starting DNS Proxy ...            wan0Configuring ...
    OK
    Stopping igmpProxy ...            OK
    Starting IGMP Proxy ...  OK
    Starting UPNPD  ...  WAN Speed = 1000 Mbps
    OK
    RMMOD ALG H323 [ip_nat_h323]
    RMMOD ALG MMS [ip_nat_mms]
    RMMOD 2nd ALG TFTP [ip_nat_tftp]
    RMMOD ALG TFTP [ip_conntrack_tftp]
    RMMOD ALG Egg [ip_conntrack_egg]
    RMMOD ALG IRC [ip_nat_irc]
    RMMOD ALG Quake3 [ip_nat_quake3]
    RMMOD ALG Talk [ip_nat_talk]
    RMMOD ALG PPTP [ip_nat_pptp]
    RMMOD ALG SNMP [ip_nat_snmp_basic]
    RMMOD ALG FTP [ip_nat_ftp]
    RMMOD 2nd ALG SIP [ip_nat_sip]
    RMMOD ALG SIP [ip_conntrack_sip]
    RMMOD 2nd ALG RTSP [ip_nat_rtsp]
    RMMOD ALG RTSP [ip_conntrack_rtsp]
    Staring ALG...           OK
    Processmanager update modules
    VPN, WAN_IP_CHANGED event received ...Closing ntpclient ...            Starting ntpclient ...            
    Stopping DDNS ...            OK
    Starting DDNS  ...  Disabled
    
    SCHEDULE, ServiceWlanLowRateInit ...service_index[0].
    
    SCHEDULE, ServiceWlsRadioOffInit ...service_index[1].
    
    SCHEDULE, ServiceLedOffInit ...service_index[2].
    
    SCHEDULE, ServiceLanOffInit ...service_index[3].
    
    SCHEDULE, ServiceWanOffInit ...service_index[4].
    
    SCHEDULE, ServiceLanLowRateInit ...service_index[5].
    
    SCHEDULE, ServicePowerLedInit ...service_index[6].
    
    
    Schedule starting  [scheduleOpen], ...wait result..
    Schedule result :[Disable (No rules)]. 
    ==>error
    

検索ワード色々

適当にWordPressのダッシュボードやGoogle Webmasterの解析を眺め、拾い上げたワードについて色々。
雑記だけでなくメインのブログでの検索ワードについてもまとめる。

Q: 何故OpenWrt関係だけ?
A: BVEとかVostro 260sその他も色々あったけど、最近の記事の傾向的にOpenWrtが扱いやすいから。
wn-ac1167r openwrt
WN-AC1167″R” はRealtek SoC搭載と推測される。OpenWrtでは現在Realtek SoCのサポートが無く、搭載するルータもサポートできないためこの機種は未サポート。今後の作業予定も無し。
elecom wrc-1167ghbk2-s dd-wrt
WRC-1167GHBK2-S用のDD-WRTファームウェアは存在せず。DD-WRTはそもそもが過去のOpenWrtをベースとし海外機を中心とした国外のプロジェクトであり、日本のみで販売されている機種をプロジェクトが人的その他のリソースを割いてサポートしても現地方面にとってはメリットが皆無であるため、サポートされる可能性は限りなく低い。OpenWrtでは既にサポート済み。
なお、BUFFALOやPlanexの一部機種(古いものが中心)はDD-WRTでもサポートされている。
openwrt コマンド仕様書
基本的に openwrt.org の Technical Reference を参照。OpenWrtはLinuxをKernelに採用しており、Linuxで一般的なコマンドについてはそれぞれの開発元のドキュメントを参照。
openwrt nec
2019年6月現在、OpenWrtでサポートされているNEC製ルータは以下の通り。

model SoC target/subtarget Release
WG800HP QCA9563 ath79/generic snapshot
WG1200CR QCA9563 ath79/generic snapshot
WG2600HP/HP2 IPQ8064 ipq806x/generic OpenWrt 18.06

※WG2600HPxはHPのみサポート済みとなっているが、WG2600HP2にもHP用OpenWrtファームウェアを使用可。WG2600HP3は未サポート。
※他にサポートが可能と思われる機種はいくつかあるが、実機を確保できていないため、まだ。

openwrt 対応機種
wsr-1166dhp3 openwrt
WSR-1166DHP3はRealtek SoCを搭載する。このため、上で挙げたWN-AC1167Rと同様にOpenWrtでサポートされていないSoCであるため現在この機種もサポートされておらず、今後作業予定も無し。

WG2600HPx ファーム展開メモ (2)

続き的なもの。

前回OpenSSLによりdecryptしたファイルを用い、KernelとRootfsの取り出し。
ブートローダ用スクリプト, TP (TestProgram), Kernel (HLOS), RootFSの4つのイメージがFIT形式で格納されている。
余談: 以下は全てWindows 10環境(WSL含む)での作業。

バイナリエディタ等でdecryptしたファーム内のhexデータ d00dfeed (D00DFEED) を探し、

tofu@Tofu-H170W10 MINGW64 ~/router/nec/wg2600hp2/wg2600hp2_1_0_5
$ busybox hexdump -n 256 -C wg2600hp2_1_0_5.bin.pad.dec
00000000  55 53 42 20 41 54 45 52  4d 57 4c 33 30 35 30 00  |USB ATERMWL3050.|
00000010  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
00000020  00 00 ff ff 00 00 00 68  00 00 00 18 6a af 00 00  |.......h....j...|
00000030  00 00 00 00 00 00 00 00  56 45 52 53 49 4f 4e 3a  |........VERSION:|
00000040  20 33 2e 33 39 2e 32 30  0a 4f 45 4d 31 20 56 45  | 3.39.20.OEM1 VE|
00000050  52 53 49 4f 4e 3a 20 31  2e 30 2e 35 0a 43 6f 70  |RSION: 1.0.5.Cop|
00000060  79 72 69 67 68 74 28 63  29 20 4e 45 43 20 50 6c  |yright(c) NEC Pl|
00000070  61 74 66 6f 72 6d 73 2c  20 4c 74 64 2e 20 32 30  |atforms, Ltd. 20|
00000080  30 31 2d 32 30 31 35 0a  00 02 ff fd 00 f9 66 50  |01-2015.......fP|
00000090  00 00 00 18 ce 19 00 00  00 00 00 00 00 00 00 00  |................|
000000a0  d0 0d fe ed 00 f9 66 34  00 00 00 38 00 f9 64 64  |......f4...8..dd|
000000b0  00 00 00 28 00 00 00 11  00 00 00 10 00 00 00 00  |...(............|
000000c0  00 00 00 3c 00 f9 64 2c  00 00 00 00 00 00 00 00  |...<..d,........|
000000d0  00 00 00 00 00 00 00 00  00 00 00 01 00 00 00 00  |................|
000000e0  00 00 00 03 00 00 00 04  00 00 00 32 5c 41 a9 4f  |...........2\A.O|
000000f0  00 00 00 03 00 00 00 17  00 00 00 00 46 6c 61 73  |............Flas|
00000100

それが先頭に来るよう切り詰め。

tofu@Tofu-H170W10 MINGW64 ~/router/nec/wg2600hp2/wg2600hp2_1_0_5
$ busybox hexdump -n 256 -C wg2600hp2_1_0_5.bin.pad.dec.itb
00000000  d0 0d fe ed 00 f9 66 34  00 00 00 38 00 f9 64 64  |......f4...8..dd|
00000010  00 00 00 28 00 00 00 11  00 00 00 10 00 00 00 00  |...(............|
00000020  00 00 00 3c 00 f9 64 2c  00 00 00 00 00 00 00 00  |...<..d,........|
00000030  00 00 00 00 00 00 00 00  00 00 00 01 00 00 00 00  |................|
00000040  00 00 00 03 00 00 00 04  00 00 00 32 5c 41 a9 4f  |...........2\A.O|
00000050  00 00 00 03 00 00 00 17  00 00 00 00 46 6c 61 73  |............Flas|
00000060  68 69 6e 67 20 6e 6f 72  20 31 30 30 20 31 30 30  |hing nor 100 100|
00000070  30 30 00 00 00 00 00 01  69 6d 61 67 65 73 00 00  |00......images..|
00000080  00 00 00 01 73 63 72 69  70 74 00 00 00 00 00 03  |....script......|
00000090  00 00 00 0a 00 00 00 00  66 6c 61 73 68 2e 73 63  |........flash.sc|
000000a0  72 00 00 00 00 00 00 03  00 00 63 c7 00 00 00 0c  |r.........c.....|
000000b0  69 66 20 74 65 73 74 20  22 78 24 76 65 72 62 6f  |if test "x$verbo|
000000c0  73 65 22 20 3d 20 22 78  22 3b 20 74 68 65 6e 0a  |se" = "x"; then.|
000000d0  66 61 69 6c 65 64 6d 73  67 3d 27 5b 66 61 69 6c  |failedmsg='[fail|
000000e0  65 64 5d 27 0a 65 6c 73  65 0a 66 61 69 6c 65 64  |ed]'.else.failed|
000000f0  6d 73 67 3d 27 23 23 23  23 23 23 23 23 23 23 23  |msg='###########|
00000100

切り詰めたファイルを dumpimage コマンドでリスト表示。

tofu@Tofu-H170W10:/mnt/d/router/NEC/WG2600HP2/wg2600hp2_1_0_5$ dumpimage -l wg2600hp2_1_0_5.bin.pad.dec.itb
FIT description: Flashing nor 100 10000
Created:         Fri Jan 18 19:24:15 2019
 Image 0 (script)
  Description:  flash.scr
  Created:      Fri Jan 18 19:24:15 2019
  Type:         Script
  Compression:  uncompressed
  Data Size:    25543 Bytes = 24.94 KiB = 0.02 MiB
  Hash algo:    crc32
  Hash value:   fad97085
 Image 1 (tp-147c46b934f3a70b73abf2c62847c7685388b4b8)
  Description:  rotary-tp.bin
  Created:      Fri Jan 18 19:24:15 2019
  Type:         Firmware
  Compression:  uncompressed
  Data Size:    66736 Bytes = 65.17 KiB = 0.06 MiB
  Architecture: ARM
  OS:           Unknown OS
  Load Address: unavailable
  Hash algo:    crc32
  Hash value:   22f74fee
 Image 2 (hlos-894c257106b4e407230bdc07bedb9c44ce088f40)
  Description:  openwrt-ipq806x-3.4-uImage
  Created:      Fri Jan 18 19:24:15 2019
  Type:         Firmware
  Compression:  uncompressed
  Data Size:    1925174 Bytes = 1880.05 KiB = 1.84 MiB
  Architecture: ARM
  OS:           Unknown OS
  Load Address: unavailable
  Hash algo:    crc32
  Hash value:   7d55fcec
 Image 3 (fs-73be11f50c9325ae68c43b1ae01663c947d14314)
  Description:  openwrt-ipq806x-squashfs-root.img
  Created:      Fri Jan 18 19:24:15 2019
  Type:         Firmware
  Compression:  uncompressed
  Data Size:    14325760 Bytes = 13990.00 KiB = 13.66 MiB
  Architecture: ARM
  OS:           Unknown OS
  Load Address: unavailable
  Hash algo:    crc32
  Hash value:   bb43bd4c

再び dumpimage コマンドを用い、KernelとRootFSを取り出し。

-i: 入力ファイル
-p: FIT内の位置指定、上記リストの Image n
最後: 出力先ファイル名
tofu@Tofu-H170W10:/mnt/d/router/NEC/WG2600HP2/wg2600hp2_1_0_5$ dumpimage -T flat_dt -i wg2600hp2_1_0_5.bin.pad.dec.itb -p 2 wg2600hp2_1_0_5_kernel.bin
Extracted:
 Image 2 (hlos-894c257106b4e407230bdc07bedb9c44ce088f40)
  Description:  openwrt-ipq806x-3.4-uImage
  Created:      Fri Jan 18 19:24:15 2019
  Type:         Firmware
  Compression:  uncompressed
  Data Size:    1925174 Bytes = 1880.05 KiB = 1.84 MiB
  Architecture: ARM
  OS:           Unknown OS
  Load Address: unavailable
  Hash algo:    crc32
  Hash value:   7d55fcec
tofu@Tofu-H170W10:/mnt/d/router/NEC/WG2600HP2/wg2600hp2_1_0_5$ dumpimage -T flat_dt -i wg2600hp2_1_0_5.bin.pad.dec.itb -p 3 wg2600hp2_1_0_5_rootfs.bin
Extracted:
 Image 3 (fs-73be11f50c9325ae68c43b1ae01663c947d14314)
  Description:  openwrt-ipq806x-squashfs-root.img
  Created:      Fri Jan 18 19:24:15 2019
  Type:         Firmware
  Compression:  uncompressed
  Data Size:    14325760 Bytes = 13990.00 KiB = 13.66 MiB
  Architecture: ARM
  OS:           Unknown OS
  Load Address: unavailable
  Hash algo:    crc32
  Hash value:   bb43bd4c

WG2600HPx ファーム展開メモ

many thanks goroh_kun (@goroh_kun)

ヘッダ(0x0 – 0xF) 除去したものを32byte単位でpadding

tofu@Tofu-H170W10 MINGW64 ~/router/nec/wg2600hp/wg2600hp_1_0_13
$ dd if=wg2600hp_1_0_13_noheader.bin of=wg2600hp_1_0_13_noheader.bin.pad bs=32 conv=sync
396727+0 records in
396727+0 records out
12695264 bytes (13 MB, 12 MiB) copied, 2.89493 s, 4.4 MB/s

キーを32byteで作成してhexな文字列で取り出し

tofu@Tofu-H170W10 MINGW64 ~/router/nec/wg2600hp/wg2600hp_1_0_13
$ echo -n "rotary" | dd bs=32 count=1 conv=sync > key.bin
0+1 records in
1+0 records out
32 bytes copied, 0.0061302 s, 5.2 kB/s

tofu@Tofu-H170W10 MINGW64 ~/router/nec/wg2600hp/wg2600hp_1_0_13
$ busybox hexdump -v -e '1/1 "%02x"' key.bin
726f746172790000000000000000000000000000000000000000000000000000

バイナリファイルへの出力省略してワンライナーでも可。

tofu@Tofu-H170W10 MINGW64 ~/router/nec/wg2600hp2/wg2600hp2_1_0_5
$ echo -n "rotary" | dd bs=32 count=1 conv=sync 2> /dev/null | busybox hexdump -v -e '1/1 "%02x"'
726f746172790000000000000000000000000000000000000000000000000000

OpenSSLを用いてdecrypt

tofu@Tofu-H170W10 MINGW64 ~/router/nec/wg2600hp/wg2600hp_1_0_13
$ openssl enc -aes-256-cbc -d -in wg2600hp_1_0_13_noheader.bin.pad -out wg2600hp_1_0_13_noheader.bin.pad.dec -K 726f746172790000000000000000000000000000000000000000000000000000 -iv 0 -nopad

完了

tofu@Tofu-H170W10 MINGW64 ~/router/nec/wg2600hp/wg2600hp_1_0_13
$ busybox hexdump -n 128 -C wg2600hp_1_0_13_noheader.bin.pad.dec
00000000  55 53 42 20 41 54 45 52  4d 57 4c 33 30 35 30 00  |USB ATERMWL3050.|
00000010  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
00000020  00 00 ff ff 00 00 00 69  00 00 00 18 25 c3 00 00  |.......i....%...|
00000030  00 00 00 00 00 00 00 00  56 45 52 53 49 4f 4e 3a  |........VERSION:|
00000040  20 33 2e 32 30 2e 36 37  0a 4f 45 4d 31 20 56 45  | 3.20.67.OEM1 VE|
00000050  52 53 49 4f 4e 3a 20 31  2e 30 2e 31 33 0a 43 6f  |RSION: 1.0.13.Co|
00000060  70 79 72 69 67 68 74 28  63 29 20 4e 45 43 20 50  |pyright(c) NEC P|
00000070  6c 61 74 66 6f 72 6d 73  2c 20 4c 74 64 2e 20 32  |latforms, Ltd. 2|
00000080

WG2600HP2

某フリマアプリで、ブート不可のジャンクとして出品されていたものを購入。
説明を見た限りではブートローダは生きており、KernelかRootfsの破損によりブートできなくなっているものと思われた。

WG2600HP2のコードネームはWG2600HPと同じ “ROTARY” であり、ハードウェアの差異はほとんど無いと思われる。

U-Boot

  • help
    boot> help
    ?       - alias for 'help'
    additional- [NECPF] additional information read/write/erase command
    ar8xxx_dump- Dump ar8xxx registers
    base    - print or set address offset
    bdinfo  - print Board Info structure
    bootipq - bootipq from flash device
    bootm   - boot application image from memory
    bootp   - boot image via network using BOOTP/TFTP protocol
    bootz   - boot Linux zImage image from memory
    chpart  - change active partition
    ckcrc   - [NECPF] check the crc32 in RAM
    cmp     - memory compare
    configid- [NECPF] configid read/write command
    cp      - memory copy
    crc32   - checksum calculation
    debug   - [NECPF] debug command
    dhcp    - boot image via network using DHCP/TFTP protocol
    dumpipq_data- dumpipq_data crashdump collection from memory
    echo    - echo args to console
    env     - environment handling commands
    errorlog- [NECPF] errorlog command
    ethspeed- Force ethernet speed to 10/100/autoneg
    exit    - exit script
    false   - do nothing, unsuccessfully
    fdt     - flattened device tree utility commands
    fuseipq - fuse QFPROM registers from memory
    
    
    go      - start application at address 'addr'
    help    - print command description/usage
    i2c     - I2C sub-system
    iminfo  - print header information for application image
    imxtract- extract a part of a multi-image
    ipq_nand- Switch between SBL and Linux kernel page layout.
    loadb   - load binary file over serial line (kermit mode)
    loady   - load binary file over serial line (ymodem mode)
    loop    - infinite loop on address range
    macaddr - [NECPF] macaddr read/write command
    md      - memory display
    mii     - MII utility commands
    mm      - memory modify (auto-incrementing address)
    mmc     - MMC sub system
    mmcinfo - display MMC info
    mphyrd  - qca8511 packet processor PHY register display
    mphyrw  - qca8511 packet processor PHY register write (fill)
    mprd    - qca8511 packet processor register display
    mprw    - qca8511 packet processor register write (fill)
    mtdparts- define flash/nand partitions
    mtest   - simple RAM read/write test
    mw      - memory write (fill)
    nand    - NAND sub-system
    nboot   - boot from NAND device
    nm      - memory modify (constant address)
    pci     - list and access PCI Configuration Space
    ping    - send ICMP ECHO_REQUEST to network host
    pkg_info- [NECPF] show package information
    presetid- [NECPF] presetid read/write/erase command
    printenv- print environment variables
    randomkey- [NECPF] randomkey read/write command
    reset   - Perform RESET of the CPU
    rf_regdmn- [NECPF] rf_regdmn read command
    rf_serial- [NECPF] rf_serial read command
    run     - run commands in an environment variable
    saveenv - save environment variables to persistent storage
    serial  - [NECPF] serial read/write/erase command
    setenv  - set environment variables
    sf      - SPI flash sub-system
    show_version- [NECPF] show boot/tp/system version
    showvar - print local hushshell variables
    smeminfo- print SMEM FLASH information
    source  - run script from memory
    test    - minimal test like /bin/sh
    tftpboot- boot image via network using TFTP protocol
    tftpput - TFTP put command, for uploading files to a server
    tftpsrv - act as a TFTP server and boot the first received file
    tp      - [NECPF] run test program
    true    - do nothing, successfully
    uartrd  - uartrd from flash device
    uartwr  - uartwr from flash device
    ubi     - ubi commands
    usb     - USB sub-system
    usbboot - boot from USB device
    version - print monitor, compiler and linker version
    

  • version

    boot> version
    
    
    U-Boot 2012.07 [Standard IPQ806X.LN,local] (May 20 2016 - 11:16:41)
    arm-openwrt-linux-uclibcgnueabi-gcc (Linaro GCC 4.6-2012.02) 4.6.3 20120201 (prerelease)
    GNU ld (GNU Binutils) 2.22
    

  • show_version

    boot> show_version
    TP Version = 2.0.0
    Boot Version = 2.0.0
    System (Kernel) Size : 1923472 Bytes (0x001d5990)
    NEC_VERSION=3.39.20
    OEM_VERSION=1.0.5
    

  • printenv

    boot> printenv
    baudrate=115200
    bootargs=console=ttyHSL1,115200n8
    bootcmd=bootipq
    bootdelay=2
    eth1addr=98:f1:99:**:**:**
    ethact=eth1
    ethaddr=98:f1:99:**:**:**
    ethrotate=no
    ipaddr=192.168.0.1
    machid=1260
    stderr=serial
    stdin=serial
    stdout=serial
    
    
    Environment size: 255/65532 bytes
    

  • pkg_info

    boot> pkg_info
    PKG NAME : ROTARY
    CPU : ARMv7 Processor [512f04d0] revision 0
    RAM : 510 MiB
    Flash : 32 MiB
    Device         : S25FL256S
    Sector size    : 64 KiB
    DIPSW : 0x3
    

  • mii device
    boot> mii device
    MII devices: 'IPQ MDIO1' 'IPQ MDIO2'
    Current device: 'IPQ MDIO2'
    

  • help debug
    boot> help debug
    debug - [NECPF] debug command
    
    
    Usage:
    debug - [NECPF] debug command
    debug watchdog enable  - Enable watchdog timer.
    debug watchdog disable - Disable watchdog timer.
    debug watchdog reboot  - Wait for a watchdog timer to expire.
    debug watchdog settime - Set a watchdog time. [sec]
    debug flash read  - flash read.
    debug flash write - flash write.
    debug flash erase - flash erase.
    debug flash info  - flash information.
    debug flash diag  - self diagnostic for flash device.
    debug l2sw read  - l2sw register read.
    debug l2sw write - l2sw register write.
    debug l2sw dump  - l2sw register dump.
    

  • debug l2sw dump

    boot> debug l2sw dump
    ### PHY ###
    
    
    ADDR : PHY0 PHY1 PHY2 PHY3 PHY4
    -----+-------------------------
    0 : 3100 1000 3100 3100 3100
    1 : 7949 7949 7949 7949 7949
    2 : 004d 004d 004d 004d 004d
    3 : d036 d036 d036 d036 d036
    4 : 1de1 1de1 1de1 1de1 1de1
    5 : 0000 0000 0000 0000 0000
    6 : 0004 0004 0004 0004 0004
    7 : 2801 2801 2801 2801 2801
    8 : 0000 0000 0000 0000 0000
    9 : 0200 0200 0200 0200 0200
    a : 0000 0000 0000 0000 0000
    b : 0000 0000 0000 0000 0000
    c : 0000 0000 0000 0000 0000
    d : 4007 4007 4007 4007 4007
    e : 0000 0000 0000 0000 0000
    f : 2000 2000 2000 2000 2000
    10 : 0862 0862 0862 0862 0862
    11 : 0010 0010 0010 0010 0010
    12 : 0000 0000 0000 0000 0000
    13 : 0000 0000 0000 0000 0000
    14 : 082c 082c 082c 082c 082c
    15 : 0000 0000 0000 0000 0000
    16 : 2400 2400 2400 2400 2400
    17 : 0000 0000 0000 0000 0000
    18 : 3200 3200 3200 3200 3200
    19 : 1000 1000 1000 1000 1000
    1a : 0000 0000 0000 0000 0000
    1b : 0000 0000 0000 0000 0000
    1c : 0000 0000 0000 0000 0000
    1d : 003f 003f 003f 003f 003f
    1e : 8000 8000 8000 8000 8000
    1f : 0000 0000 0000 0000 0000
    
    ### DEBUG ###
    
    ADDR : PHY0 PHY1 PHY2 PHY3 PHY4
    -----+-------------------------
    0 : 02ee 02ee 02ee 02ee 02ee
    1 : 02b2 01b1 01b1 01b1 02b2
    2 : 3220 3220 3220 3110 3220
    3 : 3f11 3f11 3f11 3f22 3f22
    4 : fbbb fbbb fbbb fbbb fbbb
    5 : 1c47 1c47 1c47 1c47 1c47
    6 : 0000 0000 0000 0000 0000
    7 : 0000 0000 0000 0000 0000
    8 : 1c00 1c00 1c00 1c00 1c00
    9 : 8000 8000 8000 8000 8000
    a : 3000 3000 3000 3000 3000
    b : bc40 bc40 bc40 bc40 bc40
    c : 6001 6001 6001 6001 6001
    d : 2820 a820 2820 2820 2820
    e : 0003 0003 0003 0003 0003
    f : 0030 0030 0030 0030 0030
    10 : 0000 0000 0000 0000 0000
    11 : 7552 7552 7552 7552 7552
    12 : 4c04 4c04 4c04 4c04 4c04
    13 : c01b c01b c01b c01b c01b
    14 : 0752 0752 0752 0752 0752
    15 : b220 b220 b220 b220 b220
    16 : 8000 8000 8000 8000 8000
    17 : 0000 0000 0000 0000 0000
    18 : 62ea 62ea 62ea 62ea 62ea
    19 : 01f4 01f4 01f4 01f4 01f4
    1a : 01d7 01d7 01d7 01d7 01d7
    1b : 0176 02ee 0176 0176 0176
    1c : 3cbb 3cbb 3cbb 3cbb 3cbb
    1d : 00ec 00ec 00ec 00ec 00ec
    1e : 0076 0076 0076 0076 0076
    1f : 0000 0000 0000 0000 0000
    20 : 0000 0000 0000 0000 0000
    21 : 2d15 2d15 2d15 2d15 2d15
    22 : 1f6a 1f6a 1f6a 1f6a 1f6a
    23 : a200 a200 a200 a200 a200
    24 : 1000 5000 1000 1000 1000
    25 : 0000 0000 0000 0000 0000
    26 : 0000 0000 0000 0002 0000
    27 : 1000 1000 1000 1000 1000
    28 : 0000 0000 0000 0000 0000
    29 : 36dd 36dd 36dd 36dd 36dd
    2a : 0000 0000 0000 0000 0000
    2b : 3a98 3a98 3a98 3a98 3a98
    2c : 0000 0000 0000 0000 0000
    2d : 0000 0000 0000 0000 0000
    2e : 0000 0000 0000 0000 0000
    2f : 0000 0000 0000 0000 0000
    30 : 0000 0000 0000 0000 0000
    31 : 0000 0000 0000 0000 0000
    32 : 2200 2200 2200 2200 2200
    33 : 2200 2200 2200 2200 2200
    34 : 2200 2200 2200 2200 2200
    35 : 0000 0000 0000 0000 0000
    36 : e1ec e1ec e1ec e1ec e1ec
    37 : 6000 6000 6000 6000 6000
    38 : 1111 1111 1111 1111 1111
    39 : 7359 7359 7359 7359 7359
    3a : ee6b ee6b ee6b ee6b ee6b
    3b : 5a5a 5a5a 5a5a 5a5a 5a5a
    3c : 5a5a 5a5a 5a5a 5a5a 5a5a
    3d : 6860 6860 6860 6860 6860
    3e : e0d8 e0d8 e0d8 e0d8 e0d8
    3f : 8000 8000 8000 8000 8000
    
    ### PHY MMD3 ###
    
    ADDR : PHY0 PHY1 PHY2 PHY3 PHY4
    -----+-------------------------
    0 : 0000 0000 0000 0000 0000
    1 : 0000 0000 0000 0000 0000
    2 : 0000 0000 0000 0000 0000
    3 : 0000 0000 0000 0000 0000
    4 : 0000 0000 0000 0000 0000
    5 : 0089 0089 0089 0089 0089
    6 : 0000 0000 0000 0000 0000
    7 : 0000 0000 0000 0000 0000
    8 : 0000 0000 0000 0000 0000
    9 : 0000 0000 0000 0000 0000
    a : 0000 0000 0000 0000 0000
    b : 0000 0000 0000 0000 0000
    c : 0000 0000 0000 0000 0000
    d : 0000 0000 0000 0000 0000
    e : 0000 0000 0000 0000 0000
    f : 0000 0000 0000 0000 0000
    10 : 0000 0000 0000 0000 0000
    11 : 0000 0000 0000 0000 0000
    12 : 0000 0000 0000 0000 0000
    13 : 0000 0000 0000 0000 0000
    14 : 0006 0006 0006 0006 0006
    15 : 0000 0000 0000 0000 0000
    16 : 0000 0000 0000 0000 0000
    17 : 0000 0000 0000 0000 0000
    18 : 0000 0000 0000 0000 0000
    19 : 0000 0000 0000 0000 0000
    1a : 0000 0000 0000 0000 0000
    1b : 0000 0000 0000 0000 0000
    1c : 0000 0000 0000 0000 0000
    1d : 0000 0000 0000 0000 0000
    1e : 0000 0000 0000 0000 0000
    1f : 0000 0000 0000 0000 0000
    20 : 0000 0000 0000 0000 0000
    21 : 0000 0000 0000 0000 0000
    22 : 0000 0000 0000 0000 0000
    23 : 0000 0000 0000 0000 0000
    24 : 0000 0000 0000 0000 0000
    25 : 0000 0000 0000 0000 0000
    26 : 0000 0000 0000 0000 0000
    27 : 0000 0000 0000 0000 0000
    28 : 0000 0000 0000 0000 0000
    29 : 0000 0000 0000 0000 0000
    2a : 0000 0000 0000 0000 0000
    2b : 0000 0000 0000 0000 0000
    2c : 0000 0000 0000 0000 0000
    2d : 0000 0000 0000 0000 0000
    2e : 0000 0000 0000 0000 0000
    2f : 0000 0000 0000 0000 0000
    30 : 0000 0000 0000 0000 0000
    31 : 0000 0000 0000 0000 0000
    32 : 0000 0000 0000 0000 0000
    33 : 0000 0000 0000 0000 0000
    34 : 0000 0000 0000 0000 0000
    35 : 0000 0000 0000 0000 0000
    36 : 0000 0000 0000 0000 0000
    37 : 0000 0000 0000 0000 0000
    38 : 0000 0000 0000 0000 0000
    39 : 0000 0000 0000 0000 0000
    3a : 0000 0000 0000 0000 0000
    3b : 0000 0000 0000 0000 0000
    3c : 0000 0000 0000 0000 0000
    3d : 0000 0000 0000 0000 0000
    3e : 0000 0000 0000 0000 0000
    3f : 0000 0000 0000 0000 0000
    40 : 0000 0000 0000 0000 0000
    41 : 0000 0000 0000 0000 0000
    42 : 0000 0000 0000 0000 0000
    43 : 0000 0000 0000 0000 0000
    44 : 0000 0000 0000 0000 0000
    45 : 0000 0000 0000 0000 0000
    46 : 0000 0000 0000 0000 0000
    47 : 0000 0000 0000 0000 0000
    48 : 0000 0000 0000 0000 0000
    49 : 0000 0000 0000 0000 0000
    4a : 0000 0000 0000 0000 0000
    4b : 0000 0000 0000 0000 0000
    4c : 0000 0000 0000 0000 0000
    4d : 0000 0000 0000 0000 0000
    4e : 0000 0000 0000 0000 0000
    4f : 0000 0000 0000 0000 0000
    50 : 0000 0000 0000 0000 0000
    51 : 0000 0000 0000 0000 0000
    52 : 0000 0000 0000 0000 0000
    53 : 0000 0000 0000 0000 0000
    54 : 0000 0000 0000 0000 0000
    55 : 0000 0000 0000 0000 0000
    56 : 0000 0000 0000 0000 0000
    57 : 0000 0000 0000 0000 0000
    58 : 0000 0000 0000 0000 0000
    59 : 0000 0000 0000 0000 0000
    5a : 0000 0000 0000 0000 0000
    5b : 0000 0000 0000 0000 0000
    5c : 0000 0000 0000 0000 0000
    5d : 0000 0000 0000 0000 0000
    5e : 0000 0000 0000 0000 0000
    5f : 0000 0000 0000 0000 0000
    60 : 0000 0000 0000 0000 0000
    61 : 0000 0000 0000 0000 0000
    62 : 0000 0000 0000 0000 0000
    63 : 0000 0000 0000 0000 0000
    64 : 0000 0000 0000 0000 0000
    65 : 0000 0000 0000 0000 0000
    66 : 0000 0000 0000 0000 0000
    67 : 0000 0000 0000 0000 0000
    68 : 0000 0000 0000 0000 0000
    69 : 0000 0000 0000 0000 0000
    6a : 0000 0000 0000 0000 0000
    6b : 0000 0000 0000 0000 0000
    6c : 0000 0000 0000 0000 0000
    6d : 0000 0000 0000 0000 0000
    6e : 0000 0000 0000 0000 0000
    6f : 0000 0000 0000 0000 0000
    70 : 0000 0000 0000 0000 0000
    71 : 0000 0000 0000 0000 0000
    72 : 0000 0000 0000 0000 0000
    73 : 0000 0000 0000 0000 0000
    74 : 0000 0000 0000 0000 0000
    75 : 0000 0000 0000 0000 0000
    76 : 0000 0000 0000 0000 0000
    77 : 0000 0000 0000 0000 0000
    78 : 0000 0000 0000 0000 0000
    79 : 0000 0000 0000 0000 0000
    7a : 0000 0000 0000 0000 0000
    7b : 0000 0000 0000 0000 0000
    7c : 0000 0000 0000 0000 0000
    7d : 0000 0000 0000 0000 0000
    7e : 0000 0000 0000 0000 0000
    7f : 0000 0000 0000 0000 0000
    8000 : 0000 0000 0000 0000 0000
    8001 : 8187 8187 8187 8187 8187
    8002 : 6a24 6a24 6a24 6a24 6a24
    8003 : 5d09 5d09 5d09 5d09 5d09
    8004 : 63f3 63f3 63f3 63f3 63f3
    8005 : 8b32 8b32 8b32 8b32 8b32
    8006 : c000 c000 c000 c000 c000
    8007 : 83f6 83f6 83f6 83f6 83f6
    8008 : 3030 3030 3030 3030 3030
    8009 : 00d1 00d1 00d1 00d1 00d1
    800a : 1040 1040 1040 1040 1040
    800b : 0094 0094 0094 0094 0094
    800c : 00eb 00eb 00eb 00eb 00eb
    800d : cb3f cb3f cb3f cb3f cb3f
    800e : 0000 0000 0000 0000 0000
    800f : 1000 1000 1000 1000 1000
    8010 : 0000 0000 0000 0000 0000
    8011 : 00c0 00c0 00c0 00c0 00c0
    8012 : 0000 0000 0000 0000 0000
    8013 : 0000 0000 0000 0000 0000
    8014 : 0000 0000 0000 0000 0000
    8015 : 0000 0000 0000 0000 0000
    8016 : 0000 0000 0000 0000 0000
    8017 : 0000 0000 0000 0000 0000
    8018 : 0000 0000 0000 0000 0000
    8019 : 0000 0000 0000 0000 0000
    801a : 0000 0000 0000 0000 0000
    801b : 0000 0000 0000 0000 0000
    801c : 0000 0000 0000 0000 0000
    801d : 0000 0000 0000 0000 0000
    801e : 0000 0000 0000 0000 0000
    801f : 0000 0000 0000 0000 0000
    8020 : 0000 0000 0000 0000 0000
    8021 : 0000 0000 0000 0000 0000
    8022 : 0000 0000 0000 0000 0000
    8023 : 0000 0000 0000 0000 0000
    8024 : 0000 0000 0000 0000 0000
    8025 : 0000 0000 0000 0000 0000
    8026 : 0000 0000 0000 0000 0000
    8027 : 0000 0000 0000 0000 0000
    8028 : 0000 0000 0000 0000 0000
    8029 : 0000 0000 0000 0000 0000
    802a : 0000 0000 0000 0000 0000
    802b : 0000 0000 0000 0000 0000
    802c : 0000 0000 0000 0000 0000
    802d : 0000 0000 0000 0000 0000
    802e : 0000 0000 0000 0000 0000
    802f : 0000 0000 0000 0000 0000
    8030 : 0000 0000 0000 0000 0000
    8031 : 0000 0000 0000 0000 0000
    8032 : 0000 0000 0000 0000 0000
    8033 : 0000 0000 0000 0000 0000
    8034 : 0000 0000 0000 0000 0000
    8035 : 0000 0000 0000 0000 0000
    8036 : 0000 0000 0000 0000 0000
    8037 : 0000 0000 0000 0000 0000
    8038 : 0000 0000 0000 0000 0000
    8039 : 0000 0000 0000 0000 0000
    803a : 0000 0000 0000 0000 0000
    803b : 0000 0000 0000 0000 0000
    803c : 0000 0000 0000 0000 0000
    803d : 0000 0000 0000 0000 0000
    803e : 0000 0000 0000 0000 0000
    803f : 0000 0000 0000 0000 0000
    8040 : 0000 0000 0000 0000 0000
    8041 : 0000 0000 0000 0000 0000
    8042 : 0000 0000 0000 0000 0000
    8043 : 0000 0000 0000 0000 0000
    8044 : 0000 0000 0000 0000 0000
    8045 : 0000 0000 0000 0000 0000
    8046 : 0000 0000 0000 0000 0000
    8047 : 0000 0000 0000 0000 0000
    8048 : 0000 0000 0000 0000 0000
    8049 : 0000 0000 0000 0000 0000
    804a : 0000 0000 0000 0000 0000
    804b : 0000 0000 0000 0000 0000
    804c : 0000 0000 0000 0000 0000
    804d : 0000 0000 0000 0000 0000
    804e : 0062 0062 0062 0062 0062
    804f : 07a7 07a7 07a7 07a7 07a7
    8050 : 2956 2956 2956 2956 2956
    8051 : 2e70 2e70 2e70 2e70 2e70
    8052 : 5580 5580 5580 5580 5580
    8053 : 005e 005e 005e 005e 005e
    8054 : 52b4 52b4 52b4 52b4 52b4
    8055 : 0e14 0e14 0e14 0e14 0e14
    8056 : 0148 0148 0148 0148 0148
    8057 : 06e2 06e2 06e2 06e2 06e2
    8058 : 0dbd 0dbd 0dbd 0dbd 0dbd
    8059 : 001d 001d 001d 001d 001d
    805a : 0000 0000 0000 0000 0000
    805b : 1917 1917 1917 1917 1917
    805c : 312c 312c 312c 312c 312c
    805d : 10b1 10b1 10b1 10b1 10b1
    805e : 000b 000b 000b 000b 000b
    805f : 480f 480f 480f 480f 480f
    8060 : 0175 0175 0175 0175 0175
    8061 : 2e2e 2e2e 2e2e 2e2e 2e2e
    8062 : 0000 0000 0000 0000 0000
    8063 : 4064 4064 4064 4064 4064
    8064 : 2222 1111 2222 2222 2222
    8065 : 0000 0000 0001 0000 0000
    8066 : 0001 0000 0001 0001 0000
    8067 : 0001 0000 0001 0001 0001
    8068 : 0001 0001 0000 0000 0001
    8069 : d0d0 d0d0 d0d0 d0d0 d0d0
    806a : d0d0 d0d0 d0d0 d0d0 d0d0
    806b : 0000 0000 0000 0000 0000
    806c : 1916 1916 1916 1916 1916
    806d : 0000 0000 0000 0000 0000
    806e : 888b 888b 888b 888b 888b
    806f : 67ef 67ef 67ef 67ef 67ef
    8070 : 0300 0300 0300 0300 0300
    8071 : 0000 0000 0000 0000 0000
    8072 : 0000 0000 0000 0000 0000
    8073 : 0000 0000 0000 0000 0000
    8074 : 0000 0000 0000 0000 0000
    8075 : 0000 0000 0000 0000 0000
    8076 : 0000 0000 0000 0000 0000
    8077 : 0000 0000 0000 0000 0000
    8078 : 0000 0000 0000 0000 0000
    8079 : 0000 0000 0000 0000 0000
    807a : 0000 0000 0000 0000 0000
    807b : 0000 0000 0000 0000 0000
    807c : 0000 0000 0000 0000 0000
    807d : 0000 0000 0000 0000 0000
    807e : 0000 0000 0000 0000 0000
    807f : 0000 0000 0000 0000 0000
    
    ### PHY MMD7 ###
    
    ADDR : PHY0 PHY1 PHY2 PHY3 PHY4
    -----+-------------------------
    0 : 2000 2000 2000 2000 2000
    1 : 0000 0000 0000 0000 0000
    2 : 0000 0000 0000 0000 0000
    3 : 0000 0000 0000 0000 0000
    4 : 0000 0000 0000 0000 0000
    5 : 0089 0089 0089 0089 0089
    6 : 0000 0000 0000 0000 0000
    7 : 0000 0000 0000 0000 0000
    8 : 0000 0000 0000 0000 0000
    9 : 0000 0000 0000 0000 0000
    a : 0000 0000 0000 0000 0000
    b : 0000 0000 0000 0000 0000
    c : 0000 0000 0000 0000 0000
    d : 0000 0000 0000 0000 0000
    e : 0000 0000 0000 0000 0000
    f : 0000 0000 0000 0000 0000
    10 : 0000 0000 0000 0000 0000
    11 : 0000 0000 0000 0000 0000
    12 : 0000 0000 0000 0000 0000
    13 : 0000 0000 0000 0000 0000
    14 : 0000 0000 0000 0000 0000
    15 : 0000 0000 0000 0000 0000
    16 : 0000 0000 0000 0000 0000
    17 : 0000 0000 0000 0000 0000
    18 : 0000 0000 0000 0000 0000
    19 : 0000 0000 0000 0000 0000
    1a : 0000 0000 0000 0000 0000
    1b : 0000 0000 0000 0000 0000
    1c : 0000 0000 0000 0000 0000
    1d : 0000 0000 0000 0000 0000
    1e : 0000 0000 0000 0000 0000
    1f : 0000 0000 0000 0000 0000
    20 : 0000 0000 0000 0000 0000
    21 : 0000 0000 0000 0000 0000
    22 : 0000 0000 0000 0000 0000
    23 : 0000 0000 0000 0000 0000
    24 : 0000 0000 0000 0000 0000
    25 : 0000 0000 0000 0000 0000
    26 : 0000 0000 0000 0000 0000
    27 : 0000 0000 0000 0000 0000
    28 : 0000 0000 0000 0000 0000
    29 : 0000 0000 0000 0000 0000
    2a : 0000 0000 0000 0000 0000
    2b : 0000 0000 0000 0000 0000
    2c : 0000 0000 0000 0000 0000
    2d : 0000 0000 0000 0000 0000
    2e : 0000 0000 0000 0000 0000
    2f : 0000 0000 0000 0000 0000
    30 : 0000 0000 0000 0000 0000
    31 : 0000 0000 0000 0000 0000
    32 : 0000 0000 0000 0000 0000
    33 : 0000 0000 0000 0000 0000
    34 : 0000 0000 0000 0000 0000
    35 : 0000 0000 0000 0000 0000
    36 : 0000 0000 0000 0000 0000
    37 : 0000 0000 0000 0000 0000
    38 : 0000 0000 0000 0000 0000
    39 : 0000 0000 0000 0000 0000
    3a : 0000 0000 0000 0000 0000
    3b : 0000 0000 0000 0000 0000
    3c : 0000 0000 0000 0000 0000
    3d : 0000 0000 0000 0000 0000
    3e : 0000 0000 0000 0000 0000
    3f : 0000 0000 0000 0000 0000
    40 : 0000 0000 0000 0000 0000
    41 : 0000 0000 0000 0000 0000
    42 : 0000 0000 0000 0000 0000
    43 : 0000 0000 0000 0000 0000
    44 : 0000 0000 0000 0000 0000
    45 : 0000 0000 0000 0000 0000
    46 : 0000 0000 0000 0000 0000
    47 : 0000 0000 0000 0000 0000
    48 : 0000 0000 0000 0000 0000
    49 : 0000 0000 0000 0000 0000
    4a : 0000 0000 0000 0000 0000
    4b : 0000 0000 0000 0000 0000
    4c : 0000 0000 0000 0000 0000
    4d : 0000 0000 0000 0000 0000
    4e : 0000 0000 0000 0000 0000
    4f : 0000 0000 0000 0000 0000
    50 : 0000 0000 0000 0000 0000
    51 : 0000 0000 0000 0000 0000
    52 : 0000 0000 0000 0000 0000
    53 : 0000 0000 0000 0000 0000
    54 : 0000 0000 0000 0000 0000
    55 : 0000 0000 0000 0000 0000
    56 : 0000 0000 0000 0000 0000
    57 : 0000 0000 0000 0000 0000
    58 : 0000 0000 0000 0000 0000
    59 : 0000 0000 0000 0000 0000
    5a : 0000 0000 0000 0000 0000
    5b : 0000 0000 0000 0000 0000
    5c : 0000 0000 0000 0000 0000
    5d : 0000 0000 0000 0000 0000
    5e : 0000 0000 0000 0000 0000
    5f : 0000 0000 0000 0000 0000
    60 : 0000 0000 0000 0000 0000
    61 : 0000 0000 0000 0000 0000
    62 : 0000 0000 0000 0000 0000
    63 : 0000 0000 0000 0000 0000
    64 : 0000 0000 0000 0000 0000
    65 : 0000 0000 0000 0000 0000
    66 : 0000 0000 0000 0000 0000
    67 : 0000 0000 0000 0000 0000
    68 : 0000 0000 0000 0000 0000
    69 : 0000 0000 0000 0000 0000
    6a : 0000 0000 0000 0000 0000
    6b : 0000 0000 0000 0000 0000
    6c : 0000 0000 0000 0000 0000
    6d : 0000 0000 0000 0000 0000
    6e : 0000 0000 0000 0000 0000
    6f : 0000 0000 0000 0000 0000
    70 : 0000 0000 0000 0000 0000
    71 : 0000 0000 0000 0000 0000
    72 : 0000 0000 0000 0000 0000
    73 : 0000 0000 0000 0000 0000
    74 : 0000 0000 0000 0000 0000
    75 : 0000 0000 0000 0000 0000
    76 : 0000 0000 0000 0000 0000
    77 : 0000 0000 0000 0000 0000
    78 : 0000 0000 0000 0000 0000
    79 : 0000 0000 0000 0000 0000
    7a : 0000 0000 0000 0000 0000
    7b : 0000 0000 0000 0000 0000
    7c : 0000 0000 0000 0000 0000
    7d : 0000 0000 0000 0000 0000
    7e : 0000 0000 0000 0000 0000
    7f : 0000 0000 0000 0000 0000
    8000 : 0000 0000 0000 0000 0000
    8001 : 0000 0000 0000 0000 0000
    8002 : 0000 0000 0000 0000 0000
    8003 : 0000 0000 0000 0000 0000
    8004 : 0000 0000 0000 0000 0000
    8005 : 0000 0000 0000 0000 0000
    8006 : 0000 0000 0000 0000 0000
    8007 : 0000 0000 0000 0000 0000
    8008 : 0000 0000 0000 0000 0000
    8009 : 0000 0000 0000 0000 0000
    800a : 0000 0000 0000 0000 0000
    800b : 0000 0000 0000 0000 0000
    800c : 0000 0000 0000 0000 0000
    800d : 0000 0000 0000 0000 0000
    800e : 0000 0000 0000 0000 0000
    800f : 0000 0000 0000 0000 0000
    8010 : 0000 0000 0000 0000 0000
    8011 : 0000 0000 0000 0000 0000
    8012 : 0000 0000 0000 0000 0000
    8013 : 0000 0000 0000 0000 0000
    8014 : 0000 0000 0000 0000 0000
    8015 : 0000 0000 0000 0000 0000
    8016 : 0000 0000 0000 0000 0000
    8017 : a000 a000 a000 a000 a000
    8018 : 0000 0000 0000 0000 0000
    8019 : 0000 0000 0000 0000 0000
    801a : 392a 392a 392a 392a 392a
    801b : 0000 0000 0000 0000 0000
    801c : 0000 0000 0000 0000 0000
    801d : 0000 0000 0000 0000 0000
    801e : 00c0 00c0 00c0 00c0 00c0
    801f : 0000 0000 0000 0000 0000
    8020 : 0000 0000 0000 0000 0000
    8021 : 0000 0000 0000 0000 0000
    8022 : 0000 0000 0000 0000 0000
    8023 : 0000 0000 0000 0000 0000
    8024 : 0d10 0d10 0d10 0d10 0d10
    8025 : 0d0d 0d0d 0d0d 0d0d 0d0d
    8026 : 0a0a 0a0a 0a0a 0a0a 0a0a
    8027 : 8a05 8a05 8a05 8a05 8a05
    8028 : 001f 001f 001f 001f 001f
    8029 : 0000 0000 0000 0000 0000
    802a : 0000 0000 0000 0000 0000
    802b : 0000 0000 0000 0000 0000
    802c : 0000 0000 0000 0000 0000
    802d : 0000 0000 0000 0000 0000
    802e : 0000 0000 0000 0000 0000
    802f : 0000 0000 0000 0000 0000
    8030 : 190f 190f 190f 190f 190f
    8031 : 0e05 0e05 0e05 0e05 0e05
    8032 : 0008 0008 0008 0008 0008
    8033 : 0400 0400 0400 0400 0400
    8034 : 0000 0000 0000 0000 0000
    8035 : 0000 0000 0000 0000 0000
    8036 : 0000 0000 0000 0000 0000
    8037 : 0000 0000 0000 0000 0000
    8038 : 026a 0000 0000 0000 0000
    8039 : 0cb9 0cb9 0cb9 0cb9 0cb9
    803a : 08a1 08a1 08a1 08a1 08a1
    803b : 0000 0000 0000 0000 0000
    803c : 0000 0000 0000 0000 0000
    803d : 0000 0000 0000 0000 0000
    803e : 0000 0000 0000 0000 0000
    803f : 0000 0000 0000 0000 0000
    8040 : 0000 0000 0000 0000 0000
    8041 : 0000 0000 0000 0000 0000
    8042 : 0000 0000 0000 0000 0000
    8043 : 0000 0000 0000 0000 0000
    8044 : 0000 0000 0000 0000 0000
    8045 : 0000 0000 0000 0000 0000
    8046 : 0000 0000 0000 0000 0000
    8047 : 0000 0000 0000 0000 0000
    8048 : 0000 0000 0000 0000 0000
    8049 : 0000 0000 0000 0000 0000
    804a : 0000 0000 0000 0000 0000
    804b : 00f0 00f0 00f0 00f0 00f0
    804c : 0007 0007 0007 0007 0007
    804d : 0000 0000 0000 0000 0000
    804e : 0000 0000 0000 0000 0000
    804f : 0000 0000 0000 0000 0000
    8050 : 0000 0000 0000 0000 0000
    8051 : 0000 0000 0000 0000 0000
    8052 : 0000 0000 0000 0000 0000
    8053 : 0000 0000 0000 0000 0000
    8054 : 0000 0000 0000 0000 0000
    8055 : 0000 0000 0000 0000 0000
    8056 : 0000 0000 0000 0000 0000
    8057 : 0000 0000 0000 0000 0000
    8058 : 0000 0000 0000 0000 0000
    8059 : 0000 0000 0000 0000 0000
    805a : 0000 0000 0000 0000 0000
    805b : 0000 0000 0000 0000 0000
    805c : 0000 0000 0000 0000 0000
    805d : 0000 0000 0000 0000 0000
    805e : 0000 0000 0000 0000 0000
    805f : 0000 0000 0000 0000 0000
    8060 : 0000 0000 0000 0000 0000
    8061 : 0000 0000 0000 0000 0000
    8062 : 0000 0000 0000 0000 0000
    8063 : 0000 0000 0000 0000 0000
    8064 : 0000 0000 0000 0000 0000
    8065 : 0000 0000 0000 0000 0000
    8066 : 0000 0000 0000 0000 0000
    8067 : 0000 0000 0000 0000 0000
    8068 : 0000 0000 0000 0000 0000
    8069 : 0000 0000 0000 0000 0000
    806a : 0000 0000 0000 0000 0000
    806b : 0000 0000 0000 0000 0000
    806c : 0000 0000 0000 0000 0000
    806d : 0000 0000 0000 0000 0000
    806e : 0000 0000 0000 0000 0000
    806f : 0000 0000 0000 0000 0000
    8070 : 0000 0000 0000 0000 0000
    8071 : 0000 0000 0000 0000 0000
    8072 : 0000 0000 0000 0000 0000
    8073 : 0000 0000 0000 0000 0000
    8074 : 0000 0000 0000 0000 0000
    8075 : 0000 0000 0000 0000 0000
    8076 : 0000 0000 0000 0000 0000
    8077 : 0000 0000 0000 0000 0000
    8078 : 0000 0000 0000 0000 0000
    8079 : 0000 0000 0000 0000 0000
    807a : 0000 0000 0000 0000 0000
    807b : 0000 0000 0000 0000 0000
    807c : 0000 0000 0000 0000 0000
    807d : 0000 0000 0000 0000 0000
    807e : 0000 0000 0000 0000 0000
    807f : 0000 0000 0000 0000 0000
    
    ### L2SW ###
    
    ADDR : +0       +4       +8       +c
    -----+------------------------------------
    0 : 00001302 80000080 01000000 06000000
    10 : 002613a0 f0107650 00002586 00003f1f
    20 : 3f000e00 0001008b 00000000 00000000
    30 : 80000700 00000000 0f000000 00000000
    40 : 20700aaa 00000000 000088a8 00000000
    50 : cc36cc36 ca36ca36 c936c936 03ffff00
    60 : 00000001 00000000 00000000 00000000
    70 : b00ee060 03707f07 000005ee 0000004e
    80 : 00001280 000012c2 00001280 00001280
    90 : 00001280 0000004e 00000000 00000000
    a0 : 00000000 00000000 00000000 00000000
    b0 : 00000000 00000000 00000000 00000608
    c0 : 00000000 00000000 80901040 00000000
    d0 : fffbff7e 00000001 00000100 000303ff
    e0 : c74164de
    
    100 : 00000000 00000000 00000000 00000000
    110 : 00000000 00000000 00000000 00000000
    120 : 00240024 00000000 00240024 00000000
    130 : 00110011 00000000 00240024 00000000
    140 : 00240024 00000000 00240024 00000000
    150 : 00240024 00000000 00240024 00000000
    160 : 00240024 00000000 00240024
    
    200 : 00000001 00005000 00400040 00000000
    210 : 00000000 00000000 00000000 00000000
    220 : 00000000 00000000 00000000 00000000
    230 : 00000000 00000000 00000000 00000000
    240 : 00000000 00000000 00000000 00000000
    250 : 00000000 00000000 00000000 00000000
    260 : 00000000 20000000 00000000 00000000
    270 : 0000000f
    
    400 : 00000000 00000000 00000000 00000000
    410 : 00000000 00000000 00000000 00000000
    420 : 00010001 00003040 00020001 00003040
    430 : 00010001 00003040 00010001 00003040
    440 : 00010001 00003040 00010001 00003040
    450 : 00020001 00003040
    
    600 : 00000000 00000000 00000000 00000000
    610 : 00000000 00000000 d0e8002b 00000000
    620 : 001000f0 007f7f7f 00000000 00000000
    630 : 00000000 11111111 22222222 33333333
    640 : 44444444 55555555 66666666 77777777
    650 : 76543210 00000000 00000000 00000000
    660 : 0014003c 00000018 00007000 00140040
    670 : 00000018 00007000 00140039 00000018
    680 : 00007000 00140035 00000018 00007000
    690 : 0014002d 00000018 00007000 0014001d
    6a0 : 00000018 00007000 00140002 00000018
    6b0 : 00007000 00000000 00000000 00000000
    6c0 : 00000000 00000000 00000000 00000000
    6d0 : 00000000 00000000 00000000 00000000
    6e0 : 00000000 00000000 00000000 00000000
    6f0 : 00000000 00000000 00000000 00000000
    700 : 00000000 00000000 00000000 00000000
    710 : ffffffff ffffffff ffffffff
    
    800 : 01200188 00000000 007f000e 00000000
    810 : 54332201 33221100 00000000 00000000
    820 : 00000000 00000000 00000000 00000000
    830 : 10841041 00041041 00041041 00041041
    840 : 00041041 10841041 10841041 00000000
    850 : 00000000 00000000 00000000 00000000
    860 : 00000000 00000000 00000000 00000000
    870 : 00000000 00000000 00000000 00000000
    880 : 00000000 00000000 00000000 00000000
    890 : 7fff7fff 7fff7fff 7fff7fff 7fff7fff
    8a0 : 7fff7fff 7fff7fff 00000000 00000002
    8b0 : 7fff7fff 7fff7fff 7fff7fff 7fff7fff
    8c0 : 7fff7fff 7fff7fff 00000000 00000002
    8d0 : 7fff7fff 7fff7fff 7fff7fff 7fff7fff
    8e0 : 7fff7fff 7fff7fff 00000000 00000002
    8f0 : 7fff7fff 7fff7fff 7fff7fff 7fff7fff
    900 : 7fff7fff 7fff7fff 00000000 00000002
    910 : 7fff7fff 7fff7fff 7fff7fff 7fff7fff
    920 : 7fff7fff 7fff7fff 00000000 00000002
    930 : 7fff7fff 7fff7fff 7fff7fff 7fff7fff
    940 : 7fff7fff 7fff7fff 00000000 00000002
    950 : 7fff7fff 7fff7fff 7fff7fff 7fff7fff
    960 : 7fff7fff 7fff7fff 00000000 00000002
    970 : 28000000 000001c0 28000000 000001c2
    980 : 28000000 000001c2 28000000 000001c2
    990 : 28000000 000001c2 28000000 000001c2
    9a0 : 28000000 000001c0 00000000 00000000
    9b0 : 003a004a 003a004a 003a004a 003a004a
    9c0 : 003a004a 003a004a 003a004a 00000000
    9d0 : 00000000 00000000 00000000 00000000
    9e0 : 00000000 00000000 00000000 00000000
    9f0 : 00000000 00000000 00000000 00000000
    a00 : 00007fff 00047fff 00007fff 00047fff
    a10 : 00007fff 00047fff 00007fff 00047fff
    a20 : 00007fff 00047fff 00007fff 00047fff
    a30 : 00007fff 00047fff 00007fff 00047fff
    a40 : 00007fff 00047fff 00007fff 00047fff
    a50 : 00007fff 00047fff 00007fff 00047fff
    a60 : 00007fff 00047fff 00007fff 00047fff
    a70 : 00007fff 00047fff 00007fff 00047fff
    a80 : 00007fff 00047fff 00007fff 00047fff
    a90 : 00007fff 00047fff 00007fff 00047fff
    aa0 : 00007fff 00047fff 00007fff 00047fff
    ab0 : 00007fff 00047fff 00007fff 00047fff
    ac0 : 00007fff 00047fff 00007fff 00047fff
    ad0 : 00007fff 00047fff 00007fff 00047fff
    ae0 : 00007fff 00047fff 00007fff 00047fff
    af0 : 00007fff 00047fff 00007fff 00047fff
    b00 : 18407fff 00047fff 00000000 00000000
    b10 : 18407fff 00047fff 00000000 00000000
    b20 : 18407fff 00047fff 00000000 00000000
    b30 : 18407fff 00047fff 00000000 00000000
    b40 : 18407fff 00047fff 00000000 00000000
    b50 : 18407fff 00047fff 00000000 00000000
    b60 : 18407fff 00047fff 00000000 00000000
    b70 : 00012345
    
    c00 : 00000000 00000000 00000000 00000000
    c10 : 00000000 00000000 00000000 00000000
    c20 : 00000000 00000000 00000000 00000000
    c30 : 00000000 0500015e 00000000 00000000
    c40 : 00000000 00000000 00000000 00000000
    c50 : 00000000 00000000 00000000 00000000
    c60 : 00000000 00000000 00000000 00000000
    c70 : 00010001 00010001 00010001 00000001
    c80 : 03333333
    

Kernel

RootFSのsquashfsを破損しており、マウントできずKernel Panicを起こしboot loop。

  • bootlog

    U-Boot 2012.07 [Standard IPQ806X.LN,local] (May 20 2016 - 11:16:41)
    
    smem ram ptable found: ver: 0 len: 5
    DRAM:  491 MiB
    NAND:  ipq_nand: unknown NAND device manufacturer: 0 device: 0
    ipq_nand: failed to identify device
    SF: Detected S25FL256S with page size 64 KiB, total 32 MiB
    ipq_spi: page_size: 0x100, sector_size: 0x10000, size: 0x2000000
    32 MiB
    MMC:   
    *** Warning - bad CRC, using default environment
    
    PCI0 Link Intialized
    PCI1 Link Intialized
    In:    serial
    Out:   serial
    Err:   serial
    PRODUCTDATA CRC Verify OK.
    Net:   MAC1 addr:98:f1:99:**:**:**
    athrs17_reg_init: complete
    athrs17_vlan_config ...done
    S17c init  done
    MAC2 addr:98:f1:99:**:**:**
    eth0, eth1
    now booting auto ...
    MMC Device 0 not found
    MMC Device 0 not found
    
    NAND read: device 1 offset 0x860000, size 0x200000
     2097152 bytes read: OK
       Image Name:   Linux-3.4.103
       Image Type:   ARM Linux Kernel Image (uncompressed)
       Data Size:    1923472 Bytes = 1.8 MiB
       Load Address: 41508000
       Entry Point:  41508000
       Verifying Checksum ... OK
       Loading Kernel Image ... OK
    OK
    info: "mtdparts" not set
    Using machid 0x1260 from environment
    
    Starting kernel ...
    
    [    0.000000] Booting Linux on physical CPU 0
    [    0.000000] Linux version 3.4.103 (araki@junmple-build) (gcc version 4.6.3 20120201 (prerelease) (Linaro GCC 4.6-2012.02) ) #1 SMP PREEMPT Fri Jan 18 19:23:35 JST 2019
    [    0.000000] CPU: ARMv7 Processor [512f04d0] revision 0 (ARMv7), cr=10c5387d
    [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
    [    0.000000] Machine: NECPF Rotary board based Qualcomm Atheros AP148 reference board
    [    0.000000] msm_reserve_memory: 0x44000000, 0x600000
    [    0.000000] msm_reserve_memory: 0x44600000, 0x200000
    [    0.000000] memory pool 3 (start 5fc00000 size 400000) initialized
    [    0.000000] Memory policy: ECC disabled, Data cache writealloc
    [    0.000000] smem_find(137, 80): wrong size 72
    [    0.000000] socinfo_init: v6, id=202, ver=2.0, raw_id=2064, raw_ver=2064, hw_plat=0,  hw_plat_ver=65536
    [    0.000000]  accessory_chip=0 hw_plat_subtype=0
    [    0.000000] PERCPU: Embedded 8 pages/cpu @c0c67000 s10496 r8192 d14080 u32768
    [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 121642
    [    0.000000] Kernel command line: console=ttyHSL1,115200n8 root=mtd:rootfs rootfstype=squashfs restart.download_mode=0 reboot=1
    [    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
    [    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
    [    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
    [    0.000000] Memory: 43MB 436MB = 479MB total
    [    0.000000] Memory: 477300k/489588k available, 13196k reserved, 0K highmem
    [    0.000000] Virtual kernel memory layout:
    [    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    [    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    [    0.000000]     vmalloc : 0xdf000000 - 0xff000000   ( 512 MB)
    [    0.000000]     lowmem  : 0xc0000000 - 0xdeb00000   ( 491 MB)
    [    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    [    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
    [    0.000000]       .text : 0xc0008000 - 0xc053d938   (5335 kB)
    [    0.000000]       .init : 0xc0600000 - 0xc0702900   (1035 kB)
    [    0.000000]       .data : 0xc0704000 - 0xc07a1700   ( 630 kB)
    [    0.000000]        .bss : 0xc07a1724 - 0xc0863638   ( 776 kB)
    [    0.000000] SLUB: Genslabs=11, HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
    [    0.000000] Preemptible hierarchical RCU implementation.
    [    0.000000] NR_IRQS:1689
    [    0.000000] sched_clock: 32 bits at 32kHz, resolution 31240ns, wraps every 134175798ms
    [    0.000000] Console: colour dummy device 80x30
    [    0.150390] Calibrating delay using timer specific routine.. 12.55 BogoMIPS (lpj=62795)
    [    0.150421] pid_max: default: 32768 minimum: 301
    [    0.150921] Mount-cache hash table entries: 512
    [    0.152483] CPU: Testing write buffer coherency: ok
    [    0.152702] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
    [    0.152733] Setting up static identity map for 0x41870488 - 0x41870510
    [    0.155045] CPU1: Booted secondary processor
    [    0.155107] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
    [    0.155201] Brought up 2 CPUs
    [    0.155232] SMP: Total of 2 processors activated (25.11 BogoMIPS).
    [    0.169728] dummy: 
    [    0.170446] NET: Registered protocol family 16
    [    0.171227] AXI: msm_bus_fabric_init_driver(): msm_bus_fabric_init_driver
    [    0.173789] meminfo_init: smem ram ptable found: ver: 0 len: 5
    [    0.173820] Found 1 memory banks grouped into 8 memory regions
    [    0.174101] gpiochip_add: registered GPIOs 0 to 151 on device: msmgpio
    [    0.174789] smem_find(137, 80): wrong size 72
    [    0.174882] socinfo_init: v6, id=202, ver=2.0, raw_id=2064, raw_ver=2064, hw_plat=0,  hw_plat_ver=65536
    [    0.174882]  accessory_chip=0 hw_plat_subtype=0
    [    0.174945] msm_rpm_init: RPM firmware 3.0.16777371
    [    0.182255] clk_tbl_nss - loaded
    [    0.209559] msm_dmov_memcpy_init: Success
    [    0.216994] sps:BAM 0x12244000 enabled: ver:0x5, number of pipes:20
    [    0.217025] sps:BAM 0x12244000 is registered.
    [    0.217275] sps:sps is ready.
    [    0.250796] msm_pcie_setup: link initialized
    [    0.251171] PCI host bridge to bus 0000:00
    [    0.251202] pci_bus 0000:00: root bus resource [mem 0x08000000-0x0fefffff]
    [    0.251702] PCI: bus0: Fast back to back transfers disabled
    [    0.251702] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
    [    0.252421] PCI: bus1: Fast back to back transfers disabled
    [    0.290909] msm_pcie_setup: link initialized
    [    0.291252] PCI host bridge to bus 0000:02
    [    0.291283] pci_bus 0000:02: root bus resource [mem 0x2e000000-0x31efffff]
    [    0.291721] PCI: bus2: Fast back to back transfers disabled
    [    0.291752] pci 0000:02:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
    [    0.292564] PCI: bus3: Fast back to back transfers disabled
    [    0.411246] msm_pcie_setup: link initialization failed
    [    0.411465] pci 0000:02:00.0: BAR 8: assigned [mem 0x2e000000-0x2e1fffff]
    [    0.411496] pci 0000:03:00.0: BAR 0: assigned [mem 0x2e000000-0x2e1fffff 64bit]
    [    0.411527] pci 0000:02:00.0: PCI bridge to [bus 03-03]
    [    0.411558] pci 0000:02:00.0:   bridge window [mem 0x2e000000-0x2e1fffff]
    [    0.411621] PCI: enabling device 0000:02:00.0 (0140 -> 0143)
    [    0.411683] pci 0000:00:00.0: BAR 8: assigned [mem 0x08000000-0x081fffff]
    [    0.411715] pci 0000:01:00.0: BAR 0: assigned [mem 0x08000000-0x081fffff 64bit]
    [    0.411746] pci 0000:00:00.0: PCI bridge to [bus 01-01]
    [    0.411746] pci 0000:00:00.0:   bridge window [mem 0x08000000-0x081fffff]
    [    0.411808] PCI: enabling device 0000:00:00.0 (0140 -> 0143)
    [    0.432521] bio: create slab  at 0
    [    0.434020] SCSI subsystem initialized
    [    0.435863] spi_qsd spi_qsd.5: master is unqueued, this is deprecated
    [    0.438519] spi_qsd spi_qsd.6: master is unqueued, this is deprecated
    [    0.442517] Switching to clocksource gp_timer
    [    0.463199] NET: Registered protocol family 2
    [    0.472602] IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
    [    0.473227] TCP established hash table entries: 16384 (order: 5, 131072 bytes)
    [    0.473414] TCP bind hash table entries: 16384 (order: 5, 131072 bytes)
    [    0.473601] TCP: Hash tables configured (established 16384 bind 16384)
    [    0.473633] TCP: reno registered
    [    0.473633] UDP hash table entries: 256 (order: 1, 8192 bytes)
    [    0.473664] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
    [    0.474070] NET: Registered protocol family 1
    [    0.476194] Partition(from smem) SBL1 -- Offset:0 Size:20000
    [    0.476226] Partition(from smem) MIBIB -- Offset:20000 Size:20000
    [    0.476226] Partition(from smem) SBL2 -- Offset:40000 Size:40000
    [    0.476257] Partition(from smem) SBL3 -- Offset:80000 Size:80000
    [    0.476257] Partition(from smem) DDRCONFIG -- Offset:100000 Size:10000
    [    0.476288] Partition(from smem) SSD -- Offset:110000 Size:10000
    [    0.476288] Partition(from smem) TZ -- Offset:120000 Size:80000
    [    0.476319] Partition(from smem) RPM -- Offset:1a0000 Size:80000
    [    0.476319] Partition(from smem) APPSBL -- Offset:220000 Size:80000
    [    0.476351] Partition(from smem) APPSBLENV -- Offset:2a0000 Size:10000
    [    0.476382] Partition(from smem) PRODUCTDATA -- Offset:2b0000 Size:30000
    [    0.476382] Partition(from smem) ART -- Offset:2e0000 Size:40000
    [    0.476413] Partition(from smem) TP -- Offset:320000 Size:40000
    [    0.476413] Partition(from smem) TINY -- Offset:360000 Size:500000
    [    0.476444] Partition(from smem) HLOS -- Offset:860000 Size:200000
    [    0.476476] Partition(from smem) rootfs -- Offset:a60000 Size:0
    [    0.489347] acpuclk-ipq806x acpuclk-ipq806x: SPEED BIN: 0
    [    0.489347] acpuclk-ipq806x acpuclk-ipq806x: ACPU PVS: 1
    [    0.496376] acpuclk-ipq806x acpuclk-ipq806x: CPU0: 6 frequencies supported
    [    0.496376] acpuclk-ipq806x acpuclk-ipq806x: CPU1: 6 frequencies supported
    [    0.497875] msm_rpm_log_probe: OK
    [    0.519556] squashfs: version 4.0 (2009/01/31) Phillip Lougher
    [    0.519587] jffs2: version 2.2. (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) © 2001-2006 Red Hat, Inc.
    [    0.521493] msgmni has been set to 932
    [    0.523898] Asymmetric key parser 'x509' registered
    [    0.523961] io scheduler noop registered
    [    0.523992] io scheduler deadline registered (default)
    [    0.525710] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
    [    0.527835] msm_serial_hs: probe of msm_serial_hs.0 failed with error -2
    [    0.528147] msm_serial_hs module loaded
    [    0.528397] msm_serial_hsl: detected port #1
    [    0.528584] msm_serial_hsl.1: ttyHSL1 at MMIO 0x16340000 (irq = 184) is a MSM
    [    0.529053] msm_serial_hsl: console setup on port #1
    [    1.288566] console [ttyHSL1] enabled
    [    1.297282] msm_serial_hsl: driver initialized
    [    1.306060] ahci ahci.0: forcing PORTS_IMPL to 0x1
    [    1.309871] ahci ahci.0: AHCI 0001.0300 32 slots 1 ports 6 Gbps 0x1 impl platform mode
    [    1.317775] ahci ahci.0: flags: ncq sntf pm led clo only pmp pio slum part ccc apst 
    [    1.326772] scsi0 : ahci_platform
    [    1.329803] ata1: SATA max UDMA/133 mmio [mem 0x29000000-0x2900017f] port 0x100 irq 241
    [    1.339643] m25p80 spi5.0: found s25fl256s1, expected s25fl512s
    [    1.344579] m25p80 spi5.0: s25fl256s1 (32768 Kbytes)
    [    1.350046] Creating 16 MTD partitions on "m25p80":
    [    1.354482] 0x000000000000-0x000000020000 : "SBL1"
    [    1.360980] 0x000000020000-0x000000040000 : "MIBIB"
    [    1.366604] 0x000000040000-0x000000080000 : "SBL2"
    [    1.372039] 0x000000080000-0x000000100000 : "SBL3"
    [    1.377569] 0x000000100000-0x000000110000 : "DDRCONFIG"
    [    1.383536] 0x000000110000-0x000000120000 : "SSD"
    [    1.388878] 0x000000120000-0x0000001a0000 : "TZ"
    [    1.393939] 0x0000001a0000-0x000000220000 : "RPM"
    [    1.399000] 0x000000220000-0x0000002a0000 : "APPSBL"
    [    1.404467] 0x0000002a0000-0x0000002b0000 : "APPSBLENV"
    [    1.410059] 0x0000002b0000-0x0000002e0000 : "PRODUCTDATA"
    [    1.415682] mtdoops: Attached to MTD device 10
    [    1.420368] 0x0000002e0000-0x000000320000 : "ART"
    [    1.426085] 0x000000320000-0x000000360000 : "TP"
    [    1.431583] 0x000000360000-0x000000860000 : "TINY"
    [    1.437425] 0x000000860000-0x000000a60000 : "HLOS"
    [    1.443236] 0x000000a60000-0x000002000000 : "rootfs"
    [    1.449109] mtd: partition "rootfs" set to be root filesystem
    [    1.455232] mtd: partition "rootfs_data" created automatically, ofs=1810000, len=7F0000 
    [    1.462324] 0x000001810000-0x000002000000 : "rootfs_data"
    [    1.501280] GPIO Bitbanged MDIO: probed
    [    1.504967] i2c /dev entries driver
    [    1.514557] cpuidle: using governor ladder
    [    1.517650] cpuidle: using governor menu
    [    1.522930] nf_conntrack version 0.5.0 (7457 buckets, 29828 max)
    [    1.529334] TCP: cubic registered
    [    1.531646] NET: Registered protocol family 17
    [    1.536488] Bridge firewalling registered
    [    1.540049] 8021q: 802.1Q VLAN Support v1.8
    [    1.545079] VFP support v0.3: implementor 51 architecture 64 part 4d variant 2 rev 0
    [    1.551983] Registering SWP/SWPB emulation handler
    [    1.556794] clock_late_init: Removing enables held for handed-off clocks
    [    1.572852] no pmic restart interrupt specified
    [    1.682536] ata1: SATA link down (SStatus 0 SControl 300)
    [    1.690846] SQUASHFS error: unable to read id index table
    [    1.772539] List of all partitions:
    [    1.775007] 1f00             128 mtdblock0  (driver?)
    [    1.780037] 1f01             128 mtdblock1  (driver?)
    [    1.785067] 1f02             256 mtdblock2  (driver?)
    [    1.790096] 1f03             512 mtdblock3  (driver?)
    [    1.795126] 1f04              64 mtdblock4  (driver?)
    [    1.800156] 1f05              64 mtdblock5  (driver?)
    [    1.805217] 1f06             512 mtdblock6  (driver?)
    [    1.810246] 1f07             512 mtdblock7  (driver?)
    [    1.815276] 1f08             512 mtdblock8  (driver?)
    [    1.820306] 1f09              64 mtdblock9  (driver?)
    [    1.825335] 1f0a             192 mtdblock10  (driver?)
    [    1.830459] 1f0b             256 mtdblock11  (driver?)
    [    1.835582] 1f0c             256 mtdblock12  (driver?)
    [    1.840706] 1f0d            5120 mtdblock13  (driver?)
    [    1.845829] 1f0e            2048 mtdblock14  (driver?)
    [    1.850952] 1f0f           22144 mtdblock15  (driver?)
    [    1.856076] 1f10            8128 mtdblock16  (driver?)
    [    1.861199] No filesystem could mount root, tried:  squashfs
    [    1.866822] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,15)
    [    1.875257] Linux (none) 3.4.103 #1 SMP PREEMPT Fri Jan 18 19:23:35 JST 2019 armv7l
    [    1.882911] date: 1970-01-01 09:00:01
    [    1.886566] CPU0: stopping
    [    1.889253] [] (unwind_backtrace+0x0/0x124) from [] (handle_IPI+0x1a8/0x1dc)
    [    1.898000] [] (handle_IPI+0x1a8/0x1dc) from [] (gic_handle_irq+0xb0/0xbc)
    [    1.906591] [] (gic_handle_irq+0xb0/0xbc) from [] (__irq_svc+0x40/0x70)
    [    1.914932] Exception stack(0xc0705f30 to 0xc0705f78)
    [    1.919962] 5f20:                                     00000000 00000000 00000001 00000000
    [    1.928116] 5f40: 00000000 00000000 00000003 c0766aa4 4150406a 512f04d0 00000000 00000000
    [    1.936269] 5f60: a0a0a0a0 c0705f78 c009992c c0041594 60000013 ffffffff
    [    1.942892] [] (__irq_svc+0x40/0x70) from [] (msm_cpuidle_enter+0x68/0x78)
    [    1.951483] [] (msm_cpuidle_enter+0x68/0x78) from [] (cpuidle_enter+0x14/0x18)
    [    1.960418] [] (cpuidle_enter+0x14/0x18) from [] (cpuidle_idle_call+0xa0/0x140)
    [    1.969447] [] (cpuidle_idle_call+0xa0/0x140) from [] (cpu_idle+0x60/0xf4)
    [    1.978038] [] (cpu_idle+0x60/0xf4) from [] (rest_init+0x88/0xa0)
    [    1.985848] [] (rest_init+0x88/0xa0) from [] (start_kernel+0x338/0x444)
    [    1.994189] [] (start_kernel+0x338/0x444) from [] (0x41508040)
    [    2.451421] Rebooting in 5 seconds..
    [    7.451452] Going down for restart now
    
    

Hyper-V Server 2016 + Windows 10 1809でのVM設定メモ (PowerShell)

Windows Hyper-V Server 2016上に、Windows 10 1809のHyper-V マネージャーからVMを作成した際、嵌ったのでメモ。

通常通りVMを作成したところ、セキュアブートの有効/無効切り替えがVM設定画面のどこにも無く、Linuxをブートするのに必要なセキュアブートの無効化ができなかった。
代替として、PowerShellにより設定できた。

  • VM名を取得する。Hyper-V マネージャーから対象のVM名を確認するか、PowerShellで Get-VM を実行して確認する。
    [tofu-h81whs16]: PS C:\Users\Administrator\Documents> Get-VM
    
    Name      State   CPUUsage(%) MemoryAssigned(M) Uptime           Status Version
    ----      -----   ----------- ----------------- ------           ------ -------
    XU18_test Running 11          1024              00:12:54.6510000 正常稼働中  8.0    
    
  • VMのセキュアブート設定を確認する。PowerShellから
    Get-VMFirmware -VMName "(VM名)"
    を実行し、 “SecureBoot” 列を確認する。

    [tofu-h81whs16]: PS C:\Users\Administrator\Documents> Get-VMFirmware -VMName "XU18_test"
    
    VMName    SecureBoot SecureBootTemplate PreferredNetworkBootProtocol BootOrder              
    ------    ---------- ------------------ ---------------------------- ---------              
    XU18_test On         MicrosoftWindows   IPv4                         {Drive, Drive, Network}
    
  • セキュアブートを無効化する。PowerShellで
    Set-VMFirmware -VMName "(VM名)" -EnableSecureBoot Off
    を実行する。

    [tofu-h81whs16]: PS C:\Users\Administrator\Documents> Set-VMFirmware -VMName "XU18_test" -EnableSecureBoot Off
    

    VMが起動している状態ではエラーが出て変更できない。シャットダウンまたは停止してから実行する。
    実行後、再度セキュアブートの状態を確認する。

    [tofu-h81whs16]: PS C:\Users\Administrator\Documents> Get-VMFirmware -VMName "XU18_test"
    
    VMName    SecureBoot SecureBootTemplate PreferredNetworkBootProtocol BootOrder              
    ------    ---------- ------------------ ---------------------------- ---------              
    XU18_test Off        MicrosoftWindows   IPv4                         {Drive, Drive, Network}
    

Windows Hyper-V Server 2016でのファイアウォールグループ有効化

現在ビルド鯖で仮想マシンのホストOSとして稼働しているWindows Server 2012 R2のサポート終了に備えて、Windows Hyper-V Server 2016を試していた際に気になったのでメモ。
従来使用されていた(らしい)netsh advfirewall は既に非推奨らしいメッセージが表示されるため

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

PS C:\WINDOWS\system32> netsh
netsh>advfirewall
Windows の将来のバージョンで、Windows Firewall with Advanced Security の Netsh 機能が削除される可能性が
あります。

現在 Windows Firewall with Advanced Security の構成および管理に netsh を使用している場合は、Windows PowerShell に
移行することをお勧めします。

Windows Firewall with Advanced Security を管理するためのコマンドの一覧を表示するには、Windows PowerShell プロンプト
に「Get-Command -Module NetSecurity」と入力してください。

Windows Firewall with Advanced Security 用の PowerShell コマンドの詳細については、
https://go.microsoft.com/fwlink/?LinkId=217627 を参照してください。
netsh advfirewall>

、移行先として推奨されているPowerShellで行えないか色々探し、それらしきものを見つけた。

Hyper-V Server 2016のリモート管理環境構築-(3)サーバー側設定 | Yu’n Craft
で紹介されている下記

netsh
advfirewall
firewall
set rule group="リモート デスクトップ" new enable=yes
set rule group="ファイルとプリンターの共有" new enable=yes
set rule group="Windows リモート管理" new enable=yes
set rule group="リモート イベントのログ管理" new enable=yes
set rule group="リモート ボリューム管理" new enable=yes
exit

の場合、PowerShellでは以下で代用できた。

Enable-NetFirewallRule -DisplayGroup "リモート デスクトップ"
Enable-NetFirewallRule -DisplayGroup "ファイルとプリンターの共有"
Enable-NetFirewallRule -DisplayGroup "Windows リモート管理"
Enable-NetFirewallRule -DisplayGroup "リモート イベントのログ管理"
Enable-NetFirewallRule -DisplayGroup "リモート ボリューム管理"

これでWindows Hyper-V Server 2016に対するリモートデスクトップと “Hyper-V マネージャー” 、 “コンピューターの管理(一部)” が通るようになった。サーバのAdministratorは予めクライアント側 (Windows 10 1809) でcmdkeyを用いて認証情報を追加し、TrustedHostsも追加済み。

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:/# 

WN-DX1167R debugflagメモ

システムのデバッグモードを設定する debugflag のメモ。
sys debugflag による設定前後で、”Factory” パーティション内の 0xFE75 の値が変化する。

  • sys debugflag 0 -> 0xFE75: 0x00(debug無効)
  • sys debugflag 1 -> 0xFE75: 0x01(debug有効)
root@WN-DX1167R:/tmp/mtd# sys debugflag
DebugFlag: 0
root@WN-DX1167R:/tmp/mtd# hexdump -n $((0x100)) -v -C -s $((0xfe00)) /dev/mtd3
0000fe00  4d 69 74 72 61 73 74 61  72 00 54 65 63 68 6e 6f  |Mitrastar.Techno|
0000fe10  6c 6f 67 79 20 43 6f 72  70 2e 00 00 00 00 00 00  |logy Corp.......|
0000fe20  4d 69 43 41 50 2d 33 33  32 33 43 00 00 00 00 00  |MiCAP-3323C.....|
0000fe30  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
0000fe40  31 39 35 36 30 35 32 37  00 00 00 00 00 00 00 00  |19560527........|
0000fe50  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
0000fe60  53 30 39 30 59 30 30 30  30 30 30 30 30 00 00 13  |S090Y00000000...|
0000fe70  49 55 aa 00 04 00 ff ff  5a 59 ff ff 00 00 00 00  |IU......ZY......|
0000fe80  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
0000fe90  00 00 00 00 00 00 00 00  00 01 1c 03 08 06 20 18  |.............. .|
0000fea0  14 37 44 4d 69 43 41 50  2d 33 33 32 33 43 00 00  |.7DMiCAP-3323C..|
0000feb0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
0000fec0  00 00 00 41 30 42 00 00  00 00 00 00 00 00 00 00  |...A0B..........|
0000fed0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
0000fee0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
0000fef0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
0000ff00
root@WN-DX1167R:/tmp/mtd# sys debugflag 1
PASS
root@WN-DX1167R:/tmp/mtd# hexdump -n $((0x100)) -v -C -s $((0xfe00)) /dev/mtd3
0000fe00  4d 69 74 72 61 73 74 61  72 00 54 65 63 68 6e 6f  |Mitrastar.Techno|
0000fe10  6c 6f 67 79 20 43 6f 72  70 2e 00 00 00 00 00 00  |logy Corp.......|
0000fe20  4d 69 43 41 50 2d 33 33  32 33 43 00 00 00 00 00  |MiCAP-3323C.....|
0000fe30  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
0000fe40  31 39 35 36 30 35 32 37  00 00 00 00 00 00 00 00  |19560527........|
0000fe50  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
0000fe60  53 30 39 30 59 30 30 30  30 30 30 30 30 00 00 13  |S090Y00000000...|
0000fe70  49 55 aa 00 04 01 ff ff  5a 59 ff ff 00 00 00 00  |IU......ZY......|
0000fe80  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
0000fe90  00 00 00 00 00 00 00 00  00 01 1c 03 08 06 20 18  |.............. .|
0000fea0  14 37 44 4d 69 43 41 50  2d 33 33 32 33 43 00 00  |.7DMiCAP-3323C..|
0000feb0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
0000fec0  00 00 00 41 30 42 00 00  00 00 00 00 00 00 00 00  |...A0B..........|
0000fed0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
0000fee0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
0000fef0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
0000ff00