作者別: とーふ

アズールレーン アカウント復旧メモ

たまには非技術的メモ。
アズールレーンでトラブルがあり、ログインできなくなったのを復旧したメモ。

環境

端末: LG Nexus 5 32GBモデル(SIMフリー版)
OS: Android 6.0.1(パッチレベル: 2016/10/5)

発端

昨日(2019/11/15)未明、Google Play Storeからアズールレーンを更新後アプリを起動した際、データ更新中にNexus 5の不具合?のような不自然な挙動により何度か無線LANが突然切断され、アプリのデータ更新が2回ほど失敗するトラブルが起きた。
この後、更新自体は完了しログイン画面へ遷移したが、サーバ選択後タップしても、いくら待ってもロード中のまま進まなくなった。

症状

  • サーバ選択後タップしても、通常では1回のタップでサーバへログインするはずが1回目では行われない。ただし1回目のタップ時にわずかに引っかかるような挙動があり、何らかの処理が発生していると思われる。
  • 上記の後2回目のタップにより「LOADING…」が表示され、サーバへのログインが試行されている(と思われる)状態になる。しかし、いくら待っても通常のホーム画面へ遷移せず「LOADING…」が表示されたままとなる。

試したこと

原則として、アプリは絶対的に問題が無い(と思われる)状況下にならない限りアンインストールしない。

  • “症状” が発生している状態から一旦アプリを終了し再度立ち上げても、依然として同じ状態のまま。
  • アプリを一旦アンインストールしてインストールし直そうかと思ったが、引き継ぎコードを発行していないため止めた。
  • 一度 “症状” が起きたサーバではなく、他のサーバではどうかと思ったが、既にプレイ履歴があるサーバではいずれも同じ “症状” が発生し、ログインできなかった。
  • プレイ履歴の無いサーバでは、ログイン画面から遷移してチュートリアルが開始されるが、チュートリアル中に引き継ぎコード発行画面へ行くことはできず、またチュートリアルを進めていくと、その中の最初の編成画面で艦の配置をタップした時点で「LOADING…」のまま進行不能となった。
  • 手は尽くしたが引き継ぎコードの発行へたどり着けないと判断し、サポート窓口に問い合わせて引き継ぎコードを発行してもらうことにした。

問い合わせ

上記の症状も、もしアプリ側で対応できることがある場合に役に立つことがあるかなと、できるだけ詳細に問い合わせメールに記載した。

前提

本人確認のため、公式FAQの “アカウントについて” -> “引継ぎコードを保存していない状態でアンインストールしてしまった” にある通りの情報が必要となる。

  • サーバー名
  • プレイヤー名
  • ユーザーUID
  • ユーザーID
  • 引き継ぎコード発行時のスクリーンショット
  • 指揮官レベル
  • 所持キャラクターとレベル
  • 選択した初期キャラクター
  • ゲームを開始した日時
  • 最後のログイン時間
  • ゲーム内で設定した生年月日
  • ダイヤ購入記録

実際に送った内容

実際の情報はメールに書いているが、記事ではおおよそ特定できてしまう内容は記号に置き換えて伏せる。備考欄は問い合わせメールには記載していない

項目 内容 備考
サーバー名 ○○ 複数のサーバでプレイ履歴がある場合は、記録または記憶が明確に残っているサーバが良い。
プレイヤー名 ○○○○ 前述のサーバ内でプレイ中のプレイヤー名
ユーザーUID ○○○○○○○○ アプリをアンインストールしていなければ、ログイン時のサーバ名を選ぶ画面の右下辺りに書かれている “UID” が該当。
下のスクリーンショットでオレンジ枠で囲っている部分
Screenshot_20191116-151934.png
ユーザーID (未確認) ゲーム内のプロフィールで、プレイヤー名の下に記載されている “UID” が恐らく該当。
ログインすることはできないし、問い合わせメールを送った時点では記憶にも無いし記録も見つからず確認できていないので、本当に “(未確認)” と書いた。問い合わせメールを送ったしばらく後に、何年か前のスクリーンショットにプロフィール画面のものが残っているのを見つけ、特定した。
引き継ぎコード発行時のスクリーンショット 引き継ぎコードを発行していなかったため、この項目は無し。
指揮官レベル 不明、○○以上 あるレベル(○○)以上であることは確かだったが、明確な数字を記憶していなかったのでとりあえずこの通り書いた。
所持キャラクターとレベル ○○改 レベルxxx前後、△△改 レベルxxxなど とりあえず記憶が残っている2人を書いた。片方(○○)は明確なレベルが不明だったが、xxx辺りであることは確かだった。
選択した初期キャラクター ○○ 明確に記憶に残っていたため、それを記述。
ゲームを開始した日時 ○○○○年xx月△△日 ◇◇:□□頃 端末内に偶然初期キャラクターを選ぶ際のスクリーンショットが残っており、それの記録日時から日付とおおよその時刻を書いた。
最後のログイン時間 2019年11月14日 時刻不明 問題が起きた前日にはログインしていた。ただし時刻の記憶は無かったため、不明と書いた。
ゲーム内で設定した生年月日 ○○○○年xx月△△日 正直に正確に設定していたことを祈る。
ダイヤ購入記録 購入無し 購入したことは無いので、FAQにある通り “購入無し”。

結果

当日中にサポートから返信があり、引き継ぎ用のパスワードを発行してもらうことができた。
そして問題が無いと思われる状況になったことから、一旦アズールレーンをアンインストールして再度インストール、ゲームを立ち上げた際の引き継ぎ設定で、サポートから提供された引き継ぎ用情報を元に引き継ぎを行い、正常にログインすることができるようになった。
結局のところ、プロフィール画面のユーザーIDは送れなかったし、情報は所々曖昧だったものの引き継ぎ情報を発行してもらうことができたので良かった。サポート担当の方に感謝。

IISからWiki.jsにリーバスプロキシするメモ

とある事情から自宅サーバ環境下にWiki.jsを構築し、IISからリバースプロキシでアクセスするようにした。その際、トラブルでド嵌りしたのでメモ。

構成

IIS側

  • Windows Server 2012 R2
  • IIS 8.5

Wiki.js側

  • Ubuntu Server 18.04.3 LTS
  • node server (port: 3000)

症状

GitHub Authenticationを各種情報を設定の上有効化し、ログインからGitHubボタンを押すとリダイレクトが発生、この際正しいURLにリダイレクトされず404になる。
具体的には、リダイレクト先のURLに以下の違いが発生する。

https://github.com/login/oauth/authorize?response_type=code&redirect_uri=...
https://wiki.taiha.net/login/oauth/authorize?response_type=code&redirect_uri=...

本来URLのドメインはgithub.comになるが、何故かWikiのドメインが使用されてしまう。なお、Wiki.js側のローカルIPアドレスでアクセスした状態からリダイレクトを発生させた場合、正しくGitHubのログインへリダイレクトされた。このため、IISが原因であることが予想された。

どこを探しても対処法が見つからず、またいくつかそれらしき症状が報告されている質問はあるにはあったものの、いずれも回答が付いていなかった。
例:

対処

検索しつつ色々なサイトをボーっと眺めていると、 preserveHostHeader というのを見かけた。ただしこれ自体はログへの記録方法を設定するものであり、無関係。しかし構成エディタで同じ階層を眺めていると、 reverseRewriteHostInResponseHeaders なる項目を見つけた。検索してみると情報は少ないものの、どうもホスト名の書き換えに関わっている様に思え、デフォルトの True から False へ変更してみたところビンゴ。GitHubへのリダイレクトが正常に行われるようになった。

2019/11/07 追記: IIS Managerのサーバホーム(各バーチャルホストではない)-> “Application Request Routing Cache” -> “Server Proxy Settings…” -> “Reverse rewrite host in response headers” でも設定できた。

その他

メインのブログに置いている “ルータ関連メモ” 等非時系列的なコンテンツは、そのうち今回構築したWikiへの移行を考えています。

AML2-17GPメモ

実際に色々弄ってみながら使ってみた感想とかをメモ。

Web設定画面は “WAN/CONSOLE” ポートからしかアクセスできない?
デフォルトではVLAN1のみ設定され全ポートにタグ無しで割り当てられ、マネジメントVLANに1が設定されているが、WAN/CONSOLEポート以外からはWeb設定画面を開けていない。
せっかくの +1 ポートであるが、個人的には使わず管理用に残しておくのが安全という感想。
RESETボタンで初期化できないのが不便
本体のRESETボタンは電源的なリセットしかしない模様。誤った設定を行って保存したり、パスワードを忘れた場合などに復旧が少々難しい。これが上の “WAN/CONSOLE” ポートを使わず残すという話にも少し繋がる。
本体が比較的小型
Twitterで某氏よりコメントを頂いて気付いたけれども、確かに16ポート機としては小型かもしれない。既に同じ16ポートのtp-link TL-SG1016DEをサーバ用で稼働させているが、横幅がAML2-17GPでは59mm短い。
リンク確立後の疎通発生が遅い
購入してログインパスワードの消去と初期化を達成後、弄り始めてすぐこの問題に気付いた。結論としてはデフォルトでスパニングツリー設定が有効になっており、これによりツリーの構成等に時間が掛かり疎通が発生するまで遅延が発生していた模様。
メインの作業用デスクトップ機そばに設置してそれを接続する関係上、スリープからの復帰時などにネットワークがすぐに復帰せずストレスとなるため、ループには注意することとしてSTPを無効化しgot kotonaki。
多機能
業務用向けらしく、多機能。ただし、知識的な問題から今のところIEEE802.1Q VLAN機能など一部だけ使用。

AML2-17GP

吉川のハードオフで入手したジャンク品。購入してみたが、ログイン情報がデフォルトから変更されたまま初期化されていないためログインできず、パスワード忘れが原因で放出された可能性大。ちなみに購入した個体とは別にもう一台あった。
OpenWrtとしては何もできないが、パスワードを解除できないか探るためメモ。→ パスワード含めて全て初期化できた。
UART -> J14: 筐体リア側からVcc, GND, RX, TX

U-Boot

help

RTL838x# # help
?       - alias for 'help'
base    - print or set address offset
boardid - boardid  - Get/Set board model id

boota   - boota  - boot application image from one of dual images partition automatically

bootm   - boot application image from memory
bootp   - boot image via network using BOOTP/TFTP protocol
cmp     - memory compare
cp      - memory copy
crc32   - checksum calculation
env     - environment handling commands
erase   - erase FLASH memory
flinfo  - print FLASH memory information
go      - start application at address 'addr'
help    - print command description/usage
iminfo  - print header information for application image
loadb   - load binary file over serial line (kermit mode)
loady   - load binary file over serial line (ymodem mode)
loop    - infinite loop on address range
md      - memory display
mm      - memory modify (auto-incrementing address)
mtest   - simple RAM read/write test
mw      - memory write (fill)
nm      - memory modify (constant address)
ping    - send ICMP ECHO_REQUEST to network host
printenv- print environment variables
printsys- printsys - print system information variables

protect - enable or disable FLASH write protection
reset   - Perform RESET of the CPU
rtk     - rtk     - Realtek commands

run     - run commands in an environment variable
saveenv - save environment variables to persistent storage
savesys - savesys - save system information variables to persistent storage

setenv  - set environment variables
setsys  - setsys  - set system information variables

sf      - SPI flash sub-system
sleep   - delay execution for some time
tftpboot- boot image via network using TFTP protocol
version - print monitor, compiler and linker version

version

RTL838x# # version

U-Boot 2011.12.46351 (Mar 14 2014 - 16:33:56)
mips-linux-uclibc-gcc (GCC) 3.4.4 mipssde-6.03.00-20051020
GNU ld version 2.15.94 mipssde-6.03.00-20051020

printenv

RTL838x# # printenv
baudrate=115200
boardmodel=RTL8382M_INTPHY_8218B_8214FC_DEMO
bootcmd=boota
bootdelay=1
diagmode=4
ethact=rtl8380#0
ethaddr=B8:87:1E:03:B6:F1
file_linux=vmlinux.bix
file_linux2=vmlinux.bix
file_uboot=u-boot.bin
flashoffset_env=0x80000
flashoffset_linux=0x5a0000
flashoffset_linux2=0x12d0000
flashoffset_uboot=0x0
freemem=0x81000000
ipaddr=192.168.1.1
load_addr=0xb4100000
nuke_env=sf probe 0; sf erase $(flashoffset_env) +$(ssize_env)
rtkon=rtk network on;ping $(serverip)
serverip=192.168.1.111
ssize_env=0x10000
ssize_linux=0xd30000
ssize_linux2=0xd30000
ssize_uboot=0x80000
stderr=serial
stdin=serial
stdout=serial
up_linux=sf probe 0;sf read $(freemem) $(flashoffset_linux) $(ssize_linux);bootm $(freemem)
update_linux=tftp $(freemem) $(file_linux);sf probe 0;sf erase $(flashoffset_linux) $(ssize_linux);sf write $(fileaddr) $(flashoffset_linux) $(ssize_linux)
update_linux2=tftp $(freemem) $(file_linux2);sf probe 0;sf erase $(flashoffset_linux2) $(ssize_linux2);sf write $(fileaddr) $(flashoffset_linux2) $(ssize_linux2)
update_uboot=tftp $(freemem) $(file_uboot);sf probe 0;sf erase $(flashoffset_uboot) $(ssize_uboot);sf write $(fileaddr) $(flashoffset_uboot) $(ssize_uboot)

Environment size: 1246/65532 bytes

help

Kernel

コンソールにパスワードが掛けられている。WebUI/Telnetのログイン情報として設定されたものがシリアルコンソールにも適用される模様。

bootlog



U-Boot 2011.12.46351 (Mar 14 2014 - 16:33:56)

Board: RTL838x CPU:500MHz LXB:200MHz MEM:300MHz
DRAM:  128 MB
SPI-F: 1x32 MB
Loading 65536B env. variables from offset 0x80000
Switch Model: RTL8382M_INTPHY_8218B_8214FC_DEMO (Port Count: 17)
Switch Chip: RTL8382M
0. [0xbb00a000] 0. val = 0x2f39eb3f
0. [0xbb00a000] 1. val = 0x2f396b3f
0. val = 0x00ffff00
**************************************************
### Error chip ID = 0x0000ffff ###
**************************************************
#### RTL8218B config - MAC ID = 8 ####
Now Internal PHY
**************************************************
#### RTL8218B config - MAC ID = 16 ####
Now External 8218B
**************************************************
**** RTL8214FC config - MAC ID = 24 ****
Now External 8214FC
Net:   Net Initialization Skipped
rtl8380#0
Hit any key to stop autoboot:  0 
## Booting image from partition ... 0
## Booting kernel from Legacy Image at b45a0000 ...
   Image Name:   1.2.1
   Created:      2015-03-06  16:52:41 UTC
   Image Type:   MIPS Linux Kernel Image (gzip compressed)
   Data Size:    6175426 Bytes = 5.9 MB
   Load Address: 80000000
   Entry Point:  8026d000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK

Starting kernel ...

Linux version 2.6.19 (root@localhost.localdomain) (gcc version 3.4.4 mipssde-6.03.00-20051020) #33 PREEMPT Fri Mar 6 16:52:39 CST 2015
CPU revision is: 00019070
Determined physical RAM map:
 memory: 04000000 @ 00000000 (usable)
User-defined physical RAM map:
 memory: 04000000 @ 00000000 (usable)
Built 1 zonelists.  Total pages: 16256
Kernel command line: console=ttyS0,115200 mem=64M
Primary instruction cache 16kB, physically tagged, 4-way, linesize 16 bytes.
Primary data cache 16kB, 2-way, linesize 16 bytes.
Synthesized TLB refill handler (20 instructions).
Synthesized TLB load handler fastpath (32 instructions).
Synthesized TLB store handler fastpath (32 instructions).
Synthesized TLB modify handler fastpath (31 instructions).
PID hash table entries: 256 (order: 8, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 57240k/65536k available (2057k kernel code, 8240k reserved, 423k data, 5112k init, 0k highmem)
Mount-cache hash table entries: 512
Checking for 'wait' instruction...  available.
NET: Registered protocol family 16
NET: Registered protocol family 2
IP route cache hash table entries: 512 (order: -1, 2048 bytes)
TCP established hash table entries: 2048 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 2048 bind 1024)
TCP reno registered
squashfs: version 3.3 (2007/10/31) Phillip Lougher
squashfs: LZMA suppport for slax.org by jro
JFFS2 version 2.2. (NAND) (C) 2001-2006 Red Hat, Inc.
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
Serial: 8250/16550 driver $Revision: 1.90 $ 1 ports, IRQ sharing disabled
serial8250: ttyS0 at MMIO 0x0 (irq = 31) is a 16550A
loop: loaded (max 8 devices)
Probe: SPI CS1 Flash Type MX25L25635F
Creating 7 MTD partitions on "Total SPI FLASH":
0x00000000-0x00080000 : "LOADER"
0x00080000-0x00090000 : "BDINFO"
0x00090000-0x000a0000 : "SYSINFO"
0x000a0000-0x004a0000 : "JFFS2 CFG"
0x004a0000-0x005a0000 : "JFFS2 LOG"
0x005a0000-0x012d0000 : "RUNTIME"
0x012d0000-0x02000000 : "RUNTIME2"
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 10
IPv6 over IPv4 tunneling driver
NET: Registered protocol family 17
Freeing unused kernel memory: 5112k freed
Mount DEV File System....OK
Mount PROC File System........OK
Mount Main SQFS File System........OK
Mount Module SQFS File System....OK
Mount CFG JFFS2 File System....OK
Mount LOG JFFS2 File System....OK
Init RTCORE Driver Module....OK
Init RTK Driver Module....OK
Init Board Configuration Module....OK
Init SYS NIC Driver Module....OK
Init RTDRV Driver Module....OK
Init KSI Core Driver Module....OK
Init SKI Core Driver Module....OK
Init Board Module....
[board_poe_init] SYS_BM_8380_16GE_1GEC not need Init !!
OK
Init VLAN Aware Module....OK
Init Board Vendor Module....OK
Init Switch GVRP Module....OK
Init Switch STP Module....OK
Init Switch AUTHMGR Module....OK
Init Switch LACP Module....OK
Init Switch Multicast Module....OK
Init Switch IPSG Module....OK
Init Switch DHCP Module....OK
Init Switch DAI Module....OK
Init Switch Voice VLAN Module....OK
Init Switch LLDP Module....OK
Init Switch UDLD Module....OK
Init Switch MAC VLAN Module....OK
Init Switch Surveillance VLAN Module....OK
Init Custom Module....OK
[restore_action] resetdefault = 0 (0)

====== Defaults Initial [Start] ======
Init Switch Factory Default....OK
Init VLAN Factory Default....OK
Init Protocol VLAN Factory Default....OK
Init Vocie VLAN Factory Default....OK
Init Surveillance VLAN Factory Default....OK
Init Mirror Factory Default....OK
Init L2 Factory Default....OK
Init Trunk Factory Default....OK
Init Rate Factory Default....OK
Init QoS Factory Default....OK
Init LACP Factory Default....OK
Init EEE Factory Default....OK
Init DoS Factory Default....OK
Init IGMP Factory Default....OK
Init MVR Factory Default....OK
Init MLD Factory Default....OK
Init STP Factory Default....OK
Press any key to continue
Username:

WN-AC1167GR headerコマンドメモ

念のため

# header
usage:    head    [-h?]      -h This help
  -s    Source filename
  -d    Destination filename
  -a    Auto set parameter
  -t    Types:    
            bootloader (1)
            kernel (3)
            apps (5)
            factoryapps (11)
            userconfig (7)
            langpack (13)
            cust_logo (15)
  -v    Version
  -x    Recovery MD5 file [-u Magickey]
  -r    Vendor ID
  -p    Product ID
  -m    Magic Key(32 bits)
  -c    Code Version
# header -x wnac1167gr_v105.bin
### Decoding  image ####
Decode source file [wnac1167gr_v105.bin]
------- Header Info -------
Vendor  id:  0x0104
Product id:  0x0016
Hardware id:  0x01040016
Version id:  3047
Code Version:  1.5.0
Type: 0x3 [kernel]
comp_file_len:  3493888
comp_file_sum:  0x0
Header sum:  0x9c0
Magic key:  0x30471688
MD5 chksum:  8b2d257816a9d8347dc7422f6389b25
------------------------------
Decode finished, got file [wnac1167gr_v105.bin.bin] with size 3493888 bytes
header: Return OK

# header -x openwrt-ramips-mt7620-iodata_wn-ac1167gr-squashfs-factory.bin
### Decoding  image ####
Decode source file [openwrt-ramips-mt7620-iodata_wn-ac1167gr-squashfs-factory.bin]
------- Header Info -------
Vendor  id:  0x0104
Product id:  0x0016
Hardware id:  0x01040016
Version id:  3047
Code Version:  0.0.0
Type: 0x3 [kernel]
comp_file_len:  5505028
comp_file_sum:  0x0
Header sum:  0x0
Magic key:  0x30471688
MD5 chksum:  a70cf6fe8c264742dc128de672e7492
------------------------------
Decode finished, got file [openwrt-ramips-mt7620-iodata_wn-ac1167gr-squashfs-factory.bin.bin] with size 5505028 bytes
header: Return OK

WSR-2533DHPL factoryメモ

WSR-2533DHPLにおいて、”firmware” 領域内のKernel, RootFSを格納するtrxのMagicは特定のもの(0x5C436F74 (\Cot))でなければ、メーカーファーム上でのチェックで弾かれる模様。
こうなると、initramfsでfactoryを作るしかない。通常のsquashfsでは、trxのMagicをデフォルトの 0x48445230 (HDR0) から変更した場合、OpenWrtがRootFS領域の検出に失敗してマウントできず、boot loopを引き起こすと予想されるため。
WCR-1166DSでは、これが原因でfactoryファーム投入時にboot loopが発生していると思われる。

OpenWrtのコードで関係するのは ここここ

initramfsでのfactoryファーム生成は非常に面倒な上コード量が膨大になり、かつ可読性が著しく低下する傾向にあるので、正直やりたくない。やはり、factoryファームは無しにしてinitramfsファームを用いてブートの上sysupgradeするのが手っ取り早いか。

The tail length is 48! Update len to 7078136!
decodesize 7077892...
cp: can't stat '/usr/sbin/ubi*': No such file or directory
cp: can't stat '/usr/sbin/uboot_env': No such file or directory
token=tools, line=default
token=partitions, line=Kernel
token=Kernel, line=0x0:-
sector: Kernel -> offset=[0x0], write_len=[0x6c0004]
[get_all_mtd] MTD[0]: /dev/mtd0, 0x1000000, 0x10000, ALL
[get_all_mtd] MTD[1]: /dev/mtd1, 0x30000, 0x10000, Bootloader
[get_all_mtd] MTD[2]: /dev/mtd2, 0x10000, 0x10000, Config
[get_all_mtd] MTD[3]: /dev/mtd3, 0x10000, 0x10000, Factory
[get_all_mtd] MTD[4]: /dev/mtd4, 0x7c0000, 0x10000, Kernel
[get_all_mtd] MTD[5]: /dev/mtd5, 0x53b8f0, 0x10000, RootFS
[get_all_mtd] MTD[6]: /dev/mtd6, 0x7c0000, 0x10000, Kernel2
[get_all_mtd] MTD[7]: /dev/mtd7, 0x53b8f0, 0x10000, RootFS2
[get_all_mtd] MTD[8]: /dev/mtd8, 0x10000, 0x10000, glbcfg
[get_all_mtd] MTD[9]: /dev/mtd9, 0x10000, 0x10000, board_data
[merge_sector_info] sector[0]: name=[Kernel], dev=[/dev/mtd4], offset=[0], write_len=[7077892], max_allow_size=[8126464]
[validate_file] /tmp/upload2ev4Qs: Bad trx header, magic=810697800l
[update_image] Validate CRC fail!
[WARN]: upgrade failed!
upload return: 65280
Restarting system.

WSR-2533DHPL stock -> OpenWrt (Fail)

長らくメーカーファーム上でのチェックを通せずにいたが、buffalo-tagを弄ったところパスできるようになったが、その後OpenWrtでブートした際にRootFSをマウントできず止まった。

The tail length is 48! Update len to 7078136!
decodesize 7077892...
cp: can't stat '/usr/sbin/ubi*': No such file or directory
cp: can't stat '/usr/sbin/uboot_env': No such file or directory
token=tools, line=default
token=partitions, line=Kernel
token=Kernel, line=0x0:-
sector: Kernel -> offset=[0x0], write_len=[0x6c0004]
[get_all_mtd] MTD[0]: /dev/mtd0, 0x1000000, 0x10000, ALL
[get_all_mtd] MTD[1]: /dev/mtd1, 0x30000, 0x10000, Bootloader
[get_all_mtd] MTD[2]: /dev/mtd2, 0x10000, 0x10000, Config
[get_all_mtd] MTD[3]: /dev/mtd3, 0x10000, 0x10000, Factory
[get_all_mtd] MTD[4]: /dev/mtd4, 0x7c0000, 0x10000, Kernel
[get_all_mtd] MTD[5]: /dev/mtd5, 0x53b8f0, 0x10000, RootFS
[get_all_mtd] MTD[6]: /dev/mtd6, 0x7c0000, 0x10000, Kernel2
[get_all_mtd] MTD[7]: /dev/mtd7, 0x53b8f0, 0x10000, RootFS2
[get_all_mtd] MTD[8]: /dev/mtd8, 0x10000, 0x10000, glbcfg
[get_all_mtd] MTD[9]: /dev/mtd9, 0x10000, 0x10000, board_data
[merge_sector_info] sector[0]: name=[Kernel], dev=[/dev/mtd4], offset=[0], write_len=[7077892], max_allow_size=[8126464]
[validate_file] freeram=[59179008] bufferram=[3739648]
/tmp/uploadMs88aC: CRC OK
[do_default_update] filesize=[7077892], offset=[0]
[do_default_update] Erase MTD[Kernel]: start
[do_default_update] Erase MTD[Kernel]: end
[do_default_update] Write MTD[Kernel]: start
[do_default_update] Write MTD[Kernel]: end
[switch_bank] to 0, return 0
upload return: 0
MReconnect to midcore failed.
[mapi_tx_transc_req] write msg length fail Connection refused
Restarting system.

===================================================================
                MT7621   stage1 code 10:33:55 (ASIC)
                CPU=500000000 HZ BUS=166666666 HZ
==================================================================
Change MPLL source from XTAL to CR...
do MEMPLL setting..
MEMPLL Config : 0x11100000
3PLL mode + External loopback
=== XTAL-40Mhz === DDR-1200Mhz ===
PLL2 FB_DL: 0xb, 1/0 = 547/477 2D000000
PLL3 FB_DL: 0x15, 1/0 = 580/444 55000000
PLL4 FB_DL: 0x18, 1/0 = 744/280 61000000
do DDR setting..[01F40000]
Apply DDR3 Setting...(use customer AC)
          0    8   16   24   32   40   48   56   64   72   80   88   96  104  112  120
      --------------------------------------------------------------------------------
0000:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0001:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0002:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0003:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0004:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0005:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0006:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0007:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0008:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0009:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
000A:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
000B:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
000C:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
000D:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    1
000E:|    0    0    0    0    0    0    0    0    0    1    1    1    1    1    1    1
000F:|    0    0    0    0    1    1    1    1    1    1    1    1    1    1    0    0
0010:|    1    1    1    1    1    1    1    1    1    0    0    0    0    0    0    0
0011:|    1    1    1    1    0    0    0    0    0    0    0    0    0    0    0    0
0012:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0013:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0014:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0015:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0016:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0017:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0018:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0019:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001A:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001B:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001C:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001D:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001E:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001F:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
rank 0 coarse = 15
rank 0 fine = 72
B:|    0    0    0    0    0    0    0    0    0    0    1    1    1    0    0    0
opt_dle value:11
DRAMC_R0DELDLY[018]=00001E1F
==================================================================
                RX      DQS perbit delay software calibration 
==================================================================
1.0-15 bit dq delay value
==================================================================
bit|     0  1  2  3  4  5  6  7  8  9
--------------------------------------
0 |    13 13 15 15 11 12 13 10 9 10 
10 |    11 11 13 13 11 12 
--------------------------------------

==================================================================
2.dqs window
x=pass dqs delay value (min~max)center 
y=0-7bit DQ of every group
input delay:DQS0 =31 DQS1 = 30
==================================================================
bit     DQS0     bit      DQS1
0  (1~58)29  8  (1~56)28
1  (1~56)28  9  (1~54)27
2  (1~60)30  10  (1~59)30
3  (1~61)31  11  (1~57)29
4  (1~58)29  12  (1~58)29
5  (1~59)30  13  (1~55)28
6  (1~61)31  14  (1~60)30
7  (1~60)30  15  (1~57)29
==================================================================
3.dq delay value last
==================================================================
bit|    0  1  2  3  4  5  6  7  8   9
--------------------------------------
0 |    15 15 15 15 13 13 13 11 11 13 
10 |    11 12 14 15 11 13 
==================================================================
==================================================================
     TX  perbyte calibration 
==================================================================
DQS loop = 15, cmp_err_1 = ffff0000 
dqs_perbyte_dly.last_dqsdly_pass[0]=15,  finish count=1 
dqs_perbyte_dly.last_dqsdly_pass[1]=15,  finish count=2 
DQ loop=15, cmp_err_1 = ffff01ae
DQ loop=14, cmp_err_1 = ffff0180
DQ loop=13, cmp_err_1 = ffff0080
dqs_perbyte_dly.last_dqdly_pass[1]=13,  finish count=1 
DQ loop=12, cmp_err_1 = ffff0000
dqs_perbyte_dly.last_dqdly_pass[0]=12,  finish count=2 
byte:0, (DQS,DQ)=(9,8)
byte:1, (DQS,DQ)=(9,8)
20,data:99
[EMI] DRAMC calibration passed

===================================================================
                MT7621   stage1 code done 
                CPU=500000000 HZ BUS=166666666 HZ
===================================================================


U-Boot 1.1.3 (Aug  5 2016 - 17:01:25) 0.02

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

Config XHCI 40M PLL 
******************************
Software System Reset Occurred
******************************
flash manufacture id: ef, device id 40 18
find flash: W25Q128BV
============================================ 
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: 16 MBytes NOR Flash
Date:Aug  5 2016  Time:17:01:25
============================================ 
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

Please choose the operation: 
   1: Load system code to SDRAM via TFTP. 
   2: Load system code then write to Flash via TFTP. 
   3: Boot system code via Flash (default).
   4: Entr boot command line interface.
   7: Load Boot Loader code then write to Flash via Serial. 
   9: Load Boot Loader code then write to Flash via TFTP.                                                                  0 
   
3: System Boot system code via Flash0.
## Booting image at bc050000 ...

=================================================
Check image validation:
Image1 Trx Check --> 
## check_trx, crc=-575298866, *crc_ret=-575298866.
OK
Image1 Header Magic Number --> OK
Image1 Header Checksum --> OK
Image1 Data Checksum --> OK

=================================================

=================================================
Check image validation:
Image2 Trx Check --> 
## check_trx, crc=-1234505007, *crc_ret=-1234505007.
OK
Image2 Header Magic Number --> OK
Image2 Header Checksum --> OK
Image2 Data Checksum --> OK

=================================================
## check Image1 return 0, check Image2 return 0, Image1 crc=-575298866, Image2 crc=-1234505007.
Image1 is ok!
Image2 is not same as Image1, copy Image1 to Image2!

Copy Image:
Image1(0x50000) to Image2(0x810000), size=0x68E000
........................................................................................................
........................................................................................................
.
.
Done!
   Image Name:   MIPS OpenWrt Linux-4.14.143
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    2006978 Bytes =  1.9 MB
   Load Address: 80001000
   Entry Point:  80001000
   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.143 (musashino205@Taiha.Net) (gcc version 7.4.0 (OpenWrt GCC 7.4.0 r0+11016-9bf7431d38)) #0 SMP Sun Sep 15 14:46:05 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 Buffalo WSR-2533DHPL
[    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+0x9c/0x4d8 with crng_init=0
[    0.000000] percpu: Embedded 14 pages/cpu s26064 r8192 d23088 u57344
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32480
[    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=000492b0
[    0.000000] Readback ErrCtl register=000492b0
[    0.000000] Memory: 121868K/131072K available (4789K kernel code, 246K rwdata, 1036K rodata, 1276K init, 254K bss, 9204K 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.015496] Calibrating delay loop... 586.13 BogoMIPS (lpj=2930688)
[    0.087822] pid_max: default: 32768 minimum: 301
[    0.097183] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.110205] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.126315] Hierarchical SRCU implementation.
[    0.135850] smp: Bringing up secondary CPUs ...
[    0.146319] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.146329] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.146340] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.146477] CPU1 revision is: 0001992f (MIPS 1004Kc)
[    0.205169] Synchronize counters for CPU 1: done.
[    0.276364] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.276372] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.276381] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.276458] CPU2 revision is: 0001992f (MIPS 1004Kc)
[    0.326109] Synchronize counters for CPU 2: done.
[    0.387189] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.387197] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.387205] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.387279] CPU3 revision is: 0001992f (MIPS 1004Kc)
[    0.445677] Synchronize counters for CPU 3: done.
[    0.505287] smp: Brought up 1 node, 4 CPUs
[    0.517696] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.537183] futex hash table entries: 1024 (order: 3, 32768 bytes)
[    0.549730] pinctrl core: initialized pinctrl subsystem
[    0.561419] NET: Registered protocol family 16
[    0.579962] pull PCIe RST: RALINK_RSTCTRL = 4000000
[    0.890005] release PCIe RST: RALINK_RSTCTRL = 7000000
[    0.900071] ***** Xtal 40MHz *****
[    0.906803] release PCIe RST: RALINK_RSTCTRL = 7000000
[    0.917011] Port 0 N_FTS = 1b105000
[    0.923908] Port 1 N_FTS = 1b105000
[    0.930833] Port 2 N_FTS = 1b102800
[    2.089681] PCIE2 no card, disable it(RST&CLK)
[    2.098375]  -> 21007f2
[    2.103193] PCIE0 enabled
[    2.108394] PCIE1 enabled
[    2.113573] PCI host bridge /pcie@1e140000 ranges:
[    2.123096]  MEM 0x0000000060000000..0x000000006fffffff
[    2.133463]   IO 0x000000001e160000..0x000000001e16ffff
[    2.143829] PCI coherence region base: 0xbfbf8000, mask/settings: 0x60000000
[    2.167190] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    2.178509] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    2.189746] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    2.202416] PCI host bridge to bus 0000:00
[    2.210435] pci_bus 0000:00: root bus resource [mem 0x60000000-0x6fffffff]
[    2.224099] pci_bus 0000:00: root bus resource [io  0xffffffff]
[    2.235844] 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.267225] pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000]
[    2.280256] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000]
[    2.294069] pci 0000:00:01.0: BAR 0: no space for [mem size 0x80000000]
[    2.307198] pci 0000:00:01.0: BAR 0: failed to assign [mem size 0x80000000]
[    2.321029] pci 0000:00:00.0: BAR 8: assigned [mem 0x60000000-0x600fffff]
[    2.334502] pci 0000:00:01.0: BAR 8: assigned [mem 0x60100000-0x601fffff]
[    2.347983] pci 0000:00:00.0: BAR 1: assigned [mem 0x60200000-0x6020ffff]
[    2.361468] pci 0000:00:01.0: BAR 1: assigned [mem 0x60210000-0x6021ffff]
[    2.374952] pci 0000:01:00.0: BAR 0: assigned [mem 0x60000000-0x600fffff 64bit]
[    2.389463] pci 0000:00:00.0: PCI bridge to [bus 01]
[    2.399292] pci 0000:00:00.0:   bridge window [mem 0x60000000-0x600fffff]
[    2.412791] pci 0000:02:00.0: BAR 0: assigned [mem 0x60100000-0x601fffff 64bit]
[    2.427308] pci 0000:00:01.0: PCI bridge to [bus 02]
[    2.437130] pci 0000:00:01.0:   bridge window [mem 0x60100000-0x601fffff]
[    2.452070] clocksource: Switched to clocksource GIC
[    2.463868] NET: Registered protocol family 2
[    2.473126] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    2.486864] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
[    2.499464] TCP: Hash tables configured (established 1024 bind 1024)
[    2.512225] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    2.523722] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    2.536386] NET: Registered protocol family 1
[    2.782013] 4 CPUs re-calibrate udelay(lpj = 2924544)
[    2.793455] Crashlog allocated RAM at address 0x3f00000
[    2.804005] workingset: timestamp_bits=14 max_order=15 bucket_order=1
[    2.821011] random: fast init done
[    2.831197] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    2.842705] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    2.865629] io scheduler noop registered
[    2.873357] io scheduler deadline registered (default)
[    2.884372] Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
[    2.898171] console [ttyS0] disabled
[    2.905238] 1e000c00.uartlite: ttyS0 at MMIO 0x1e000c00 (irq = 19, base_baud = 3125000) is a 16550A
[    2.923164] console [ttyS0] enabled
[    2.923164] console [ttyS0] enabled
[    2.936951] bootconsole [early0] disabled
[    2.936951] bootconsole [early0] disabled
[    2.954651] MediaTek Nand driver init, version v2.1 Fix AHB virt2phys error
[    2.968911] spi-mt7621 1e000b00.spi: sys_freq: 220000000
[    2.989274] m25p80 spi0.0: w25q128 (16384 Kbytes)
[    2.998721] 7 fixed-partitions partitions found on MTD device spi0.0
[    3.011375] Creating 7 MTD partitions on "spi0.0":
[    3.020931] 0x000000000000-0x000000030000 : "u-boot"
[    3.031863] 0x000000030000-0x000000040000 : "u-boot-env"
[    3.043397] 0x000000040000-0x000000050000 : "factory"
[    3.054441] 0x000000050000-0x000000810000 : "firmware"
[    3.068725] 0x000000810000-0x000000fd0000 : "Kernel2"
[    3.079818] 0x000000fd0000-0x000000fe0000 : "glbcfg"
[    3.090684] 0x000000fe0000-0x000001000000 : "board_data"
[    3.102869] libphy: Fixed MDIO Bus: probed
[    3.174069] libphy: mdio: probed
[    4.582213] mtk_soc_eth 1e100000.ethernet: loaded mt7530 driver
[    4.594638] mtk_soc_eth 1e100000.ethernet eth0: mediatek frame engine at 0xbe100000, irq 20
[    4.613452] NET: Registered protocol family 10
[    4.623865] Segment Routing with IPv6
[    4.631241] NET: Registered protocol family 17
[    4.640193] 8021q: 802.1Q VLAN Support v1.8
[    4.650825] hctosys: unable to open rtc device (rtc0)
[    4.661736] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[    4.676655] Please append a correct "root=" boot option; here are the available partitions:
[    4.693291] 1f00             192 mtdblock0 
[    4.693298]  (driver?)
[    4.706301] 1f01              64 mtdblock1 
[    4.706306]  (driver?)
[    4.719316] 1f02              64 mtdblock2 
[    4.719321]  (driver?)
[    4.732340] 1f03            7936 mtdblock3 
[    4.732346]  (driver?)
[    4.745348] 1f04            7936 mtdblock4 
[    4.745353]  (driver?)
[    4.758356] 1f05              64 mtdblock5 
[    4.758361]  (driver?)
[    4.771362] 1f06             128 mtdblock6 
[    4.771368]  (driver?)
[    4.784386] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    4.802463] Rebooting in 1 seconds..

WRC-1167FS stock -> OpenWrt

とりあえずfactoryファームを正しい状態にdecodeされる形で組めたので、投入テスト。
stockで SQUASHFS error が大量に吐かれるのは何だろうか…(出ないこともあった)

------- ELECOM1701 Header Info
Image Header Size      : 0x0038
Image Header ID        : ELECOM
Image Product Name     : WRC-1167FS
Image Version          : 0.00
------------------------------
------- Header Info
Image Header Size      : 0x0074
Image Header Magic Code: 0x031d6129
Image Data Size        : 6291456
Image Type             : 0x6 [kernel_elecom1701]
Compression Type       : 0x0
Model ID               : 0x00228000
Build Date             : 1970-01-1
Version Firmware       : 
Version Code SCM       : 
Version Config         :                                 
Data CRC Checksum      : 0x337EBA50
Header CRC Checksum    : 0x0
------------------------------
FWHANDLE, DECODE PASS
Erasing blocks: 96/96 (100%)
Writing data: 6144k/6144k (100%)
Verifying data: 6144k/6144k (100%)
The system is going down NOW!
[43306.704000] SQUASHFS error: zlib_inflate error, data probably corrupt
[43306.728000] SQUASHFS error: squashfs_read_data failed to read block 0x1d6305
[43306.740000] SQUASHFS error: Unable to read fragment cache entry [1d6305]
[43306.756000] SQUASHFS error: Unable to read page, block 1d6305, size 9161
[43306.768000] SQUASHFS error: Unable to read fragment cache entry [1d6305]
[43306.780000] SQUASHFS error: Unable to read page, block 1d6305, size 9161
[43306.796000] SQUASHFS error: Unable to read fragment cache entry [1d6305]
[43306.808000] SQUASHFS error: Unable to read page, block 1d6305, size 9161
[43306.820000] SQUASHFS error: Unable to read fragment cache entry [1d6305]
[43306.836000] SQUASHFS error: Unable to read page, block 1d6305, size 9161
[43306.848000] SQUASHFS error: Unable to read fragment cache entry [1d6305]
[43306.864000] SQUASHFS error: Unable to read page, block 1d6305, size 9161
[43306.876000] SQUASHFS error: Unable to read fragment cache entry [1d6305]
[43306.888000] SQUASHFS error: Unable to read page, block 1d6305, size 9161
[43306.904000] SQUASHFS error: Unable to read fragment cache entry [1d6305]
[43306.916000] SQUASHFS error: Unable to read page, block 1d6305, size 9161
[43306.928000] SQUASHFS error: Unable to read fragment cache entry [1d6305]
[43306.944000] SQUASHFS error: Unable to read page, block 1d6305, size 9161
[43306.956000] SQUASHFS error: Unable to read fragment cache entry [1d6305]
[43306.972000] SQUASHFS error: Unable to read page, block 1d6305, size 9161
[43306.984000] SQUASHFS error: Unable to read fragment cache entry [1d6305]
[43306.996000] SQUASHFS error: Unable to read page, block 1d6305, size 9161
[43307.012000] SQUASHFS error: Unable to read fragment cache entry [1d6305]
[43307.024000] SQUASHFS error: Unable to read page, block 1d6305, size 9161
[43307.036000] SQUASHFS error: Unable to read fragment cache entry [1d6305]
[43307.052000] SQUASHFS error: Unable to read page, block 1d6305, size 9161
[43307.064000] SQUASHFS error: Unable to read fragment cache entry [1d6305]
[43307.080000] SQUASHFS error: Unable to read page, block 1d6305, size 9161
[43307.092000] SQUASHFS error: Unable to read fragment cache entry [1d6305]
[43307.104000] SQUASHFS error: Unable to read page, block 1d6305, size 9161
Sent SIGKILL to all processes
Requesting system reboot
[43308.712000] Restarting system.
[04060C09][04060C09]
DDR Calibration DQS reg = 00008787


U-Boot 1.1.3 (Oct 23 2017 - 16:14:35)

Board: Ralink APSoC DRAM:  64 MB
relocate_code Pointer at: 83fa0000
******************************
Software System Reset Occurred
******************************
flash manufacture id: ef, device id 40 18
find flash: W25Q128BV
============================================ 
Ralink UBoot Version: 5.0.0.0
-------------------------------------------- 
ASIC 7628_MP (Port5None)
DRAM component: 512 Mbits DDR, width 16
DRAM bus: 16 bit
Total memory: 64 MBytes
Flash component: SPI Flash
Date:Oct 23 2017  Time:16:14:35
============================================ 
icache: sets:512, ways:4, linesz:32 ,total:65536
dcache: sets:256, ways:4, linesz:32 ,total:32768 

 ##### The CPU freq = 580 MHZ #### 
 estimate memory size = 64 Mbytes
RESET MT7628 PHY!!!!!!
Please choose the operation: 
   1: Load system code to SDRAM via TFTP. 
   2: Load system code then write to Flash via TFTP. 
   3: Boot system code via Flash (default).
   4: Entr boot command line interface.
   7: Load Boot Loader code then write to Flash via Serial. 
   9: Load Boot Loader code then write to Flash via TFTP. 
default: 3                                                                                                                 0 
   
3: System Boot system code via Flash.
## Booting image at bc050000 ...
   Image Name:   MIPS OpenWrt Linux-4.14.143
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    1669570 Bytes =  1.6 MB
   Load Address: 80000000
   Entry Point:  80000000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80000000) ...
## Giving linux memsize in MB, 64

Starting kernel ...

[    0.000000] Linux version 4.14.143 (musashino205@Taiha.Net) (gcc version 7.4.0 (OpenWrt GCC 7.4.0 r0+11022-f01af852e5)) #0 Sun Sep 15 03:19:24 2019
[    0.000000] Board has DDR2
[    0.000000] Analog PMU set to hw control
[    0.000000] Digital PMU set to hw control
[    0.000000] SoC Type: MediaTek MT7628AN ver:1 eco:2
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019655 (MIPS 24KEc)
[    0.000000] MIPS: machine is ELECOM WRC-1167FS
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 04000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] random: get_random_bytes called from start_kernel+0x98/0x4a0 with crng_init=0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16240
[    0.000000] Kernel command line: console=ttyS0,57600 rootfstype=squashfs,jffs2
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Writing ErrCtl register=000779f0
[    0.000000] Readback ErrCtl register=000779f0
[    0.000000] Memory: 58372K/65536K available (3919K kernel code, 185K rwdata, 892K rodata, 1204K init, 206K bss, 7164K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 256
[    0.000000] intc: using register map from devicetree
[    0.000000] CPU Clock: 580MHz
[    0.000000] timer_probe: no matching timers found
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6590553264 ns
[    0.000010] sched_clock: 32 bits at 290MHz, resolution 3ns, wraps every 7405115902ns
[    0.015371] Calibrating delay loop... 385.84 BogoMIPS (lpj=1929216)
[    0.087589] pid_max: default: 32768 minimum: 301
[    0.096986] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.109944] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.130499] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.149876] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.162027] pinctrl core: initialized pinctrl subsystem
[    0.173329] NET: Registered protocol family 16
[    0.290156] mt7620-pci 10140000.pcie: Port 0 N_FTS = 1b105000
[    0.451172] PCI host bridge /pcie@10140000 ranges:
[    0.460516]  MEM 0x0000000020000000..0x000000002fffffff
[    0.470830]   IO 0x0000000010160000..0x000000001016ffff
[    0.500056] mt7621_gpio 10000600.gpio: registering 32 gpios
[    0.511272] mt7621_gpio 10000600.gpio: registering 32 gpios
[    0.522397] mt7621_gpio 10000600.gpio: registering 32 gpios
[    0.534247] PCI host bridge to bus 0000:00
[    0.542215] pci_bus 0000:00: root bus resource [mem 0x20000000-0x2fffffff]
[    0.555863] pci_bus 0000:00: root bus resource [io  0xffffffff]
[    0.567501] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    0.580917] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.597737] pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000]
[    0.610732] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000]
[    0.624454] pci 0000:00:00.0: BAR 8: assigned [mem 0x20000000-0x200fffff]
[    0.637870] pci 0000:00:00.0: BAR 9: assigned [mem 0x20100000-0x201fffff pref]
[    0.652146] pci 0000:00:00.0: BAR 1: assigned [mem 0x20200000-0x2020ffff]
[    0.665570] pci 0000:01:00.0: BAR 0: assigned [mem 0x20000000-0x200fffff 64bit]
[    0.680026] pci 0000:01:00.0: BAR 6: assigned [mem 0x20100000-0x2010ffff pref]
[    0.694282] pci 0000:00:00.0: PCI bridge to [bus 01]
[    0.704078] pci 0000:00:00.0:   bridge window [mem 0x20000000-0x200fffff]
[    0.717505] pci 0000:00:00.0:   bridge window [mem 0x20100000-0x201fffff pref]
[    0.736698] clocksource: Switched to clocksource MIPS
[    0.747967] NET: Registered protocol family 2
[    0.757384] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.771089] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.783600] TCP: Hash tables configured (established 1024 bind 1024)
[    0.796304] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.807770] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.820453] NET: Registered protocol family 1
[    0.832838] Crashlog allocated RAM at address 0x3f00000
[    0.844881] workingset: timestamp_bits=14 max_order=14 bucket_order=0
[    0.864744] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.876196] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.908291] io scheduler noop registered
[    0.915904] io scheduler deadline registered (default)
[    0.927039] Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
[    0.940675] console [ttyS0] disabled
[    0.947712] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 28, base_baud = 2500000) is a 16550A
[    0.965533] console [ttyS0] enabled
[    0.965533] console [ttyS0] enabled
[    0.979266] bootconsole [early0] disabled
[    0.979266] bootconsole [early0] disabled
[    0.996371] spi-mt7621 10000b00.spi: sys_freq: 193333333
[    1.021181] m25p80 spi0.0: w25q128 (16384 Kbytes)
[    1.030557] 5 fixed-partitions partitions found on MTD device spi0.0
[    1.043143] Creating 5 MTD partitions on "spi0.0":
[    1.052647] 0x000000000000-0x000000030000 : "u-boot"
[    1.063444] 0x000000030000-0x000000040000 : "u-boot-env"
[    1.074905] 0x000000040000-0x000000050000 : "factory"
[    1.085896] 0x000000050000-0x000000780000 : "firmware"
[    1.100090] 2 uimage-fw partitions found on MTD device firmware
[    1.111878] Creating 2 MTD partitions on "firmware":
[    1.121728] 0x000000000000-0x000000197a02 : "kernel"
[    1.132503] 0x000000197a02-0x000000730000 : "rootfs"
[    1.143221] mtd: device 5 (rootfs) set to be root filesystem
[    1.156083] 1 squashfs-split partitions found on MTD device rootfs
[    1.168396] 0x0000005f0000-0x000000730000 : "rootfs_data"
[    1.180046] 0x000000780000-0x000000800000 : "storage"
[    1.191697] libphy: Fixed MDIO Bus: probed
[    1.212238] rt3050-esw 10110000.esw: link changed 0x00
[    1.224104] mtk_soc_eth 10100000.ethernet eth0: mediatek frame engine at 0xb0100000, irq 5
[    1.242355] NET: Registered protocol family 10
[    1.255536] Segment Routing with IPv6
[    1.262985] NET: Registered protocol family 17
[    1.271879] 8021q: 802.1Q VLAN Support v1.8
[    1.286868] VFS: Mounted root (squashfs filesystem) readonly on device 31:5.
[    1.307441] Freeing unused kernel memory: 1204K
[    1.316404] This architecture does not have kernel memory protection.
[    1.970141] init: Console is alive
[    1.977215] init: - watchdog -
[    2.550349] random: fast init done
[    2.756372] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    2.937396] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    2.962292] init: - preinit -
[    4.384411] rt3050-esw 10110000.esw: link changed 0x00
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3[    4.583806] random: procd: uninitialized urandom read (4 bytes read)
] or [4] key and hit [enter] to select the debug level
[    7.720341] mount_root: jffs2 not ready yet, using temporary tmpfs overlay
[    7.764542] urandom-seed: Seed file not found (/etc/urandom.seed)
[    7.904087] procd: - early -
[    7.909996] procd: - watchdog -
[    7.920624] rt3050-esw 10110000.esw: link changed 0x10
[    8.505187] procd: - watchdog -
[    8.511829] procd: - ubus -
[    8.593332] random: ubusd: uninitialized urandom read (4 bytes read)
[    8.605999] rt3050-esw 10110000.esw: link changed 0x18
[    8.727290] random: ubusd: uninitialized urandom read (4 bytes read)
[    8.740510] random: ubusd: uninitialized urandom read (4 bytes read)
[    8.754288] procd: - init -
Please press Enter to activate this console.
[    9.916960] kmodloader: loading kernel modules from /etc/modules.d/*
[   10.140706] urngd: v1.0.0 started.
[   10.235574] nat46: module (version 683fbd2b765506332a1af141545652bf58f03166) loaded.
[   10.283603] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   10.316489] Loading modules backported from Linux version v5.3-rc4-0-gd45331b00ddb
[   10.331554] Backport generated by backports.git v5.3-rc4-1-0-g4ec72687
[   10.398397] ip_tables: (C) 2000-2006 Netfilter Core Team
[   10.442233] nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
[   10.682682] xt_time: kernel timezone is -0000
[   10.977902] random: crng init done
[   10.984640] random: 6 urandom warning(s) missed due to ratelimiting
[   11.034113] mt76_wmac 10300000.wmac: ASIC revision: 76280001
[   12.068989] mt76_wmac 10300000.wmac: Firmware Version: 20151201
[   12.080789] mt76_wmac 10300000.wmac: Build Time: 20151201183641
[   12.106712] mt76_wmac 10300000.wmac: firmware init done
[   12.320920] mt76x2e 0000:01:00.0: card - bus=0x1, slot = 0x0 irq=4
[   12.333476] mt76x2e 0000:01:00.0: ASIC revision: 76120044
[   13.305510] mt76x2e 0000:01:00.0: ROM patch build: 20141115060606a
[   13.323665] mt76x2e 0000:01:00.0: Firmware Version: 0.0.00
[   13.334612] mt76x2e 0000:01:00.0: Build: 1
[   13.342731] mt76x2e 0000:01:00.0: Build Time: 201507311614____
[   13.376709] mt76x2e 0000:01:00.0: Firmware running!
[   13.413026] PPP generic driver version 2.4.2
[   13.434463] NET: Registered protocol family 24
[   13.457255] kmodloader: done loading kernel modules from /etc/modules.d/*
[   81.007133] rt3050-esw 10110000.esw: link changed 0x00
[   84.725977] rt3050-esw 10110000.esw: link changed 0x10
[   85.210456] rt3050-esw 10110000.esw: link changed 0x18
[   87.717761] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
[   87.766439] br-lan: port 1(eth0.1) entered blocking state
[   87.777384] br-lan: port 1(eth0.1) entered disabled state
[   87.788486] device eth0.1 entered promiscuous mode
[   87.798020] device eth0 entered promiscuous mode
[   87.822336] jffs2_build_filesystem(): unlocking the mtd device... 
[   87.822399] done.
[   87.838517] jffs2_build_filesystem(): erasing all blocks after the end marker... 
[   87.963432] br-lan: port 1(eth0.1) entered blocking state
[   87.989006] br-lan: port 1(eth0.1) entered forwarding state
[   88.000788] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   88.797252] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   92.168458] done.
[   92.172311] jffs2: notice: (1302) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[   92.572867] overlayfs: upper fs does not support tmpfile.



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

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt SNAPSHOT, r0+11022-f01af852e5
 -----------------------------------------------------
=== 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:/#

WRC-1167FS factoryトラブルメモ

OpenWrtのfactoryを投げ込んだらFlashに書き込まれたデータが何故か化けていて、ブートに失敗した。
blocksizeか何かでピッタリでなければ正しい状態にdecodeできない?要検証

rm: '/tmp/nginx' is a directory
------- ELECOM1701 Header Info
Image Header Size      : 0x0038
Image Header ID        : ELECOM
Image Product Name     : WRC-1167FS
Image Version          : 0.00
------------------------------
------- Header Info
Image Header Size      : 0x0074
Image Header Magic Code: 0x031d6129
Image Data Size        : 6291460
Image Type             : 0x6 [kernel_elecom1701]
Compression Type       : 0x0
Model ID               : 0x00228000
Build Date             : 1970-01-1
Version Firmware       : 
Version Code SCM       : 
Version Config         :                                 
Data CRC Checksum      : 0x56D08D59
Header CRC Checksum    : 0x0
------------------------------
FWHANDLE, DECODE PASS
Erasing blocks: 97/97 (100%)
Writing data: 6144k/6144k (100%)
Verifying data: 6144k/6144k (100%)
The system is going down NOW!
[12500.716000] SQUASHFS error: zlib_inflate error, data probably corrupt
[12500.728000] SQUASHFS error: squashfs_read_data failed to read block 0x1d6305
[12500.744000] SQUASHFS error: Unable to read fragment cache entry [1d6305]
[12500.756000] SQUASHFS error: Unable to read page, block 1d6305, size 9161
[12500.772000] SQUASHFS error: Unable to read fragment cache entry [1d6305]
[12500.784000] SQUASHFS error: Unable to read page, block 1d6305, size 9161
[12500.796000] SQUASHFS error: Unable to read fragment cache entry [1d6305]
[12500.812000] SQUASHFS error: Unable to read page, block 1d6305, size 9161
[12500.824000] SQUASHFS error: Unable to read fragment cache entry [1d6305]
[12500.836000] SQUASHFS error: Unable to read page, block 1d6305, size 9161
[12500.852000] SQUASHFS error: Unable to read fragment cache entry [1d6305]
[12500.864000] SQUASHFS error: Unable to read page, block 1d6305, size 9161
[12500.880000] SQUASHFS error: Unable to read fragment cache entry [1d6305]
[12500.892000] SQUASHFS error: Unable to read page, block 1d6305, size 9161
[12500.904000] SQUASHFS error: Unable to read fragment cache entry [1d6305]
[12500.920000] SQUASHFS error: Unable to read page, block 1d6305, size 9161
[12500.932000] SQUASHFS error: Unable to read fragment cache entry [1d6305]
[12500.944000] SQUASHFS error: Unable to read page, block 1d6305, size 9161
[12500.960000] SQUASHFS error: Unable to read fragment cache entry [1d6305]
[12500.972000] SQUASHFS error: Unable to read page, block 1d6305, size 9161
[12500.988000] SQUASHFS error: Unable to read fragment cache entry [1d6305]
[12501.000000] SQUASHFS error: Unable to read page, block 1d6305, size 9161
[12501.012000] SQUASHFS error: Unable to read fragment cache entry [1d6305]
[12501.028000] SQUASHFS error: Unable to read page, block 1d6305, size 9161
[12501.040000] SQUASHFS error: Unable to read fragment cache entry [1d6305]
[12501.052000] SQUASHFS error: Unable to read page, block 1d6305, size 9161
[12501.068000] SQUASHFS error: Unable to read fragment cache entry [1d6305]
[12501.080000] SQUASHFS error: Unable to read page, block 1d6305, size 9161
[12501.096000] SQUASHFS error: Unable to read fragment cache entry [1d6305]
[12501.108000] SQUASHFS error: Unable to read page, block 1d6305, size 9161
Sent SIGKILL to all processes
Requesting system reboot
[12502.724000] Restarting system.
[04060C09][04060C09]
DDR Calibration DQS reg = 00008787


U-Boot 1.1.3 (Oct 23 2017 - 16:14:35)

Board: Ralink APSoC DRAM:  64 MB
relocate_code Pointer at: 83fa0000
******************************
Software System Reset Occurred
******************************
flash manufacture id: ef, device id 40 18
find flash: W25Q128BV
============================================ 
Ralink UBoot Version: 5.0.0.0
-------------------------------------------- 
ASIC 7628_MP (Port5None)
DRAM component: 512 Mbits DDR, width 16
DRAM bus: 16 bit
Total memory: 64 MBytes
Flash component: SPI Flash
Date:Oct 23 2017  Time:16:14:35
============================================ 
icache: sets:512, ways:4, linesz:32 ,total:65536
dcache: sets:256, ways:4, linesz:32 ,total:32768 

 ##### The CPU freq = 580 MHZ #### 
 estimate memory size = 64 Mbytes
RESET MT7628 PHY!!!!!!
Please choose the operation: 
   1: Load system code to SDRAM via TFTP. 
   2: Load system code then write to Flash via TFTP. 
   3: Boot system code via Flash (default).
   4: Entr boot command line interface.
   7: Load Boot Loader code then write to Flash via Serial. 
   9: Load Boot Loader code then write to Flash via TFTP. 
default: 3                                                                                                                 0 
   
3: System Boot system code via Flash.
## Booting image at bc050000 ...
Bad Magic Number,23071856
[04060C0A][04060C09]
DDR Calibration DQS reg = 00008788


U-Boot 1.1.3 (Oct 23 2017 - 16:14:35)

Board: Ralink APSoC DRAM:  64 MB
relocate_code Pointer at: 83fa0000
flash manufacture id: ef, device id 40 18
find flash: W25Q128BV
============================================ 
Ralink UBoot Version: 5.0.0.0
-------------------------------------------- 
ASIC 7628_MP (Port5None)
DRAM component: 512 Mbits DDR, width 16
DRAM bus: 16 bit
Total memory: 64 MBytes
Flash component: SPI Flash
Date:Oct 23 2017  Time:16:14:35
============================================ 
icache: sets:512, ways:4, linesz:32 ,total:65536
dcache: sets:256, ways:4, linesz:32 ,total:32768 

 ##### The CPU freq = 580 MHZ #### 
 estimate memory size = 64 Mbytes
RESET MT7628 PHY!!!!!!
Please choose the operation: 
   1: Load system code to SDRAM via TFTP. 
   2: Load system code then write to Flash via TFTP. 
   3: Boot system code via Flash (default).
   4: Entr boot command line interface.
   7: Load Boot Loader code then write to Flash via Serial. 
   9: Load Boot Loader code then write to Flash via TFTP. 
default: 3

You choosed 4
                                                                                                                           0 

   
4: System Enter Boot Command Line Interface.

U-Boot 1.1.3 (Oct 23 2017 - 16:14:35)
MT7628 # md.l 0xbc050000
bc050000: 56180723 80312a9f de177f59 81781b04    #..V.*1.Y.....x.
bc050010: 00010284 00010284 2aa7bc3c 03030701    ........<..*....
bc050020: 53514b49 65714d24 7473556a 6e684e24    IKQS$MqejUst$Nhn
bc050030: 342c7a71 2e35332a 00323635 00010204    qz,4*35.562.....
bc050040: 80010269 509b7404 00010204 6f010204    i....t.P.......o
bc050050: a3fefdf9 8ef57db3 13fd43af a5c420ff    .....}...C... ..
bc050060: ef8d81a3 e0847128 5535138d 2fec8ed9    ....(q....5U.../
bc050070: b265d1b9 891febac 2bb7882c ef2ca1a3    ..e.....,..+..,.
bc050080: d602d7fa 951fb8c1 e13b60b3 2c0ed234    .........`;.4..,
bc050090: 79e713b1 9f5bb1be 2a74e0d2 bdd5abff    ...y..[...t*....
bc0500a0: 866b3de9 e8ff9092 e276aa26 13a4f17f    .=k.....&.v.....
bc0500b0: a8c306b1 4c7be526 71891b32 2e649c65    ....&.{L2..qe.d.
bc0500c0: 2926ac8c 2c41af92 e5322fbd 0c4b90df    ..&)..A,./2...K.
bc0500d0: f3f5cf52 814c5b0b b0db23da d50388b3    R....[L..#......
bc0500e0: c9e33000 5781c900 832dea55 a2f5d883    .0.....WU.-.....
bc0500f0: 21604dcd b38d66cb 44bd8db4 9affad64    .M`!.f.....Dd...
MT7628 # 

WRC-1167FS fwhandleコマンドメモ

メーカーファームウェアにて、投入されたファームウェアのdecodeを行う fwhandle コマンドのメモ。

/tmp # tftp -r wrc-1167fs_v1.03.bin 192.168.1.133 -g
wrc-1167fs_v1.03.bin 100% |*******************************|  6080k  0:00:00 ETA
/tmp # ls -alh
drwxrwxrwx    3 root     root           0 Sep 14 22:38 .
drwxr-xr-x   17 root     root           0 Sep 14 22:38 ..
-rw-r--r--    1 root     root           5 Sep 14 22:36 dhcpc.lease
-rw-r--r--    1 root     root           3 Sep 14 22:36 dns.suffix
drwxr-xr-x    5 root     root           0 Jan  1  2017 nginx
-rw-r--r--    1 root     root        5.9M Sep 14 22:38 wrc-1167fs_v1.03.bin
/tmp # fwhandle
usage:    head    [-h?]      -h This help
  -s    Source filename
  -d    Destination filename
  -a    Auto set parameter
  -t    Types:    
            bootloader (0)
            state_config (2)
            kernel (3)
            kernel_elecom1700 (5)
            kernel_elecom1701 (6)
            config (1)
            token (4)
  -x    Recovery MD5 file [-u ih_magic]
  -v    FW Version
 -D     Build date
/tmp # fwhandle -t kernel_elecom1701 -x wrc-1167fs_v1.03.bin 
------- ELECOM1701 Header Info
Image Header Size      : 0x0038
Image Header ID        : ELECOM
Image Product Name     : WRC-1167FS
Image Version          : 1.03
------------------------------
------- Header Info
Image Header Size      : 0x0074
Image Header Magic Code: 0x031d6129
Image Data Size        : 6225920
Image Type             : 0x6 [kernel_elecom1701]
Compression Type       : 0x0
Model ID               : 0x00228000
Build Date             : 2017-10-16
Version Firmware       : 1.03
Version Code SCM       : 0abafddb6
Version Config         : e46a8e6df70adbb54129ee057f1ffd35
Data CRC Checksum      : 0x30C2B056
Header CRC Checksum    : 0xff9
------------------------------
FWHANDLE, DECODE PASS
/tmp # ls -alh
drwxrwxrwx    3 root     root           0 Sep 14 22:39 .
drwxr-xr-x   17 root     root           0 Sep 14 22:38 ..
-rw-r--r--    1 root     root           5 Sep 14 22:36 dhcpc.lease
-rw-r--r--    1 root     root           3 Sep 14 22:36 dns.suffix
drwxr-xr-x    5 root     root           0 Jan  1  2017 nginx
-rw-r--r--    1 root     root        5.9M Sep 14 22:39 wrc-1167fs_v1.03.bin.bin