カテゴリー: ath79

WR8750Nメモ

  • WR8750NからOpenWrtのKernel Loaderが実行できるところまで行った
  • Kernel LoaderがLZMAを展開中(または展開直後)に例外吐いてhard resetが掛かる
  • データのchecksum算出方法は依然として謎
    • data length値(hex)が2byteに収まる場合単純なIPヘッダチェックサムと同じ算出方法、2byteを超える場合は計算方法に何らかの変化が生じる模様
    • checksum算出範囲: data length~data lengthに示すdata終端

コード

devadd/wr8750n – musashino-build/openwrt

イメージ生成コード
plain.binは作業用の仮のモノ。

define Device/nec_wr8750n
  ATH_SOC := ar9344
  DEVICE_TITLE := NEC Aterm WR8750N
  KERNEL := kernel-bin | append-dtb | lzma | loader-kernel
  KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | loader-kernel
  LOADER_TYPE := bin
  IMAGES += plain.bin
  IMAGE/plain.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
    append-rootfs | pad-rootfs
  DEVICE_PACKAGES := kmod-usb-core kmod-usb2
endef
TARGET_DEVICES += nec_wr8750n

エラー

boot> start tftp load openwrt-ath79-generic-nec_wr8750
end tftp load length = 3505264
start memory load ... 
memory load complete
  begin  : 0x80060000
  length : 3505240
  startup: 0x80060000
boot
begin  : 0x80060000
length : 3505240
startup: 0x80060000
option: 0x0


OpenWrt kernel loader for AR7XXX/AR9XXX
Copyright (C) 2011 Gabor Juhos 
Decompressing kernel... 
                       @

exception!!
ExcCode:10 "Reserved instruction exception"

afbf001c (param1) 0c01ff11 (param2) 00402025 (param3) 
8fbf001c (param4) 03e00008 (errno) 40008028 (cause) 
27bdffe0 (ctx) 00003825 (fpcsr) 6c0d1a80 (badvaddr) 
afa00014 (pad) 10004002 (sr) 80a00c10 (epc) 
00000001 (lo) 00000000 (hi) 
00000000 (zero) a0080000 (at) 80ab1a80 (v0) 80a00d80 (v1) 
ffffffe0 (a0) 80a01510 (a1) 00000001 (a2) 80a01511 (a3) 
80a00258 (t0) 0000000a (t1) 80a015fd (t2) 00a51a9e (t3) 
00000000 (t4) 01000000 (t5) 80d59c04 (t6) 80a0028c (t7) 
80a00900 (s0) 80060000 (s1) 0000030d (s2) 005f0e3f (s3) 
00000001 (s4) 2cfa97a1 (s5) 80d5a930 (s6) 00000010 (s7) 
00000035 (t8) 80a00120 (t9) 00000028 (k0) 0000007c (k1) 
e087c52b (gp) 80d59c00 (sp) 00000001 (fp) 80a00bec (ra) 

call trace
pc: 80a00c10



IPL:HARD-RESET
(以降通常のブートシーケンス)

手順

※Windows使用する場合。

  • WR8750Nをブート
  • ESC連打でブートを止める
  • Bootloaderのコンソールに入る
  • tftpd 実行
  • Windows側で tftp -i 192.168.0.1 PUT filename
    (Windowsのpublicファイアウォールは切るかtftpポートを開ける)
  • WR8750N側でロードされる
  • boot 実行
広告

WR8750N

Switch

zone WAN LAN
port
(WR8750N)
WAN LAN1 LAN2 LAN3 LAN4
port
(AR8327)
port1 port2 port3 port4 port5

MAC

  • LAN: 1C:B1:7F:xx:xx:00 (config, 0x6 (hex))
  • WAN: 1C:B1:7F:xx:xx:01 (config, 0xc (hex))
  • 2.4G: 1C:B1:7F:xx:xx:02 (config, 0x0 (hex))
  • 5G: 1C:B1:7F:xx:xx:03 (config, 0x12 (hex))

Bootloader

chiron

  • help
    boot> help
    support commands ...
    load             load module
    boot             boot loaded module
    tftpd            start tftpd [tftpd [IP] [bfn]]
    dlmode           set tftpd download mode [bfn]
    reboot           reboot system
    help             help command
    macaddr          macaddr read/write
    configid         configid read/write
    randomkey        randomkey read/write
    serial           serial number read/write
    pkg_info         show package information
    presetid         preset id read/write
    version          show boot version
    mhx              mhx utility
    tp               test program
    errorlog         errorlog command
    additional       additional command
    rf-serial        rf-serial command
    time             Time command
    debug            debug command
    ?                help command
    

  • version
    boot> version
    boot version: 1.0.0
    system version: 2.36.21
    TP Version = 1.0.0
    

  • pkg_info
    boot> pkg_info
      PKG NAME : Orthos-HP
      CPU   : Atheros/AR9344
      RAM   : 128Mbyte
      Flash : 8Mbyte
        Device         : MX25L6405D(Macronix)
        Top Address    : 0xbf000000
        Config Address : 0xbf020000
        System Address : 0xbf040000
      Ether PHY : Atheros/AR8327(SW)
      DIPSW : 0x1
    

  • debug fs ls
    boot> debug fs ls
    Firmware            3514260 bytes
    total 8126464, avail 4583040 bytes
    

  • debug ?
    boot> debug ?
    support commands ...
    memory           memory read/write
    flash            flash driver r/w
    fs               file system r/w
    load             load test (calc chksum)
    exception        exception
    register         display register
    watchdog         do watchdog reset
    tlb              tlb register
    cache            cache control
    mii              mii control
    l2sw             l2sw control
    ether            ether control
    pci              pci control
    btimer_start     test btimer
    btimer_stop      test btimer
    

  • debug l2sw register dump
    boot> debug l2sw register dump
    PHY:
    00 1000 1000 1000 1000 1000 
    01 7949 796d 7949 7949 7949 
    02 004d 004d 004d 004d 004d 
    03 d033 d033 d033 d033 d033 
    04 1de1 1de1 1de1 1de1 1de1 
    05 0000 cde1 0000 0000 0000 
    06 0004 000f 0004 0004 0004 
    07 2801 2801 2801 2801 2801 
    08 0000 0000 0000 0000 0000 
    09 0200 0200 0200 0200 0200 
    0a 0000 7801 0000 0000 0000 
    0b 0000 0000 0000 0000 0000 
    0c 0000 0000 0000 0000 0000 
    0d 0000 0000 0000 0000 0000 
    0e 0000 0000 0000 0000 0000 
    0f 2000 2000 2000 2000 2000 
    10 0862 0862 0862 0862 0862 
    11 0010 bc1e 0010 0010 0010 
    12 0000 0000 0000 0000 0000 
    13 0000 7400 0000 0000 0000 
    14 002c 002c 002c 002c 002c 
    15 0000 0000 0000 0000 0000 
    16 04e8 04e8 04e8 04e8 04e8 
    17 0000 0000 0000 0000 0000 
    18 3200 3200 3200 3200 3200 
    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 02ee 02ee 02ee 02ee 02ee 
    1f 0000 0000 0000 0000 0000 
    
    DEBUG:
    00 02ee 02ee 02ee 02ee 02ee 
    01 02b2 ffd0 01b1 02b2 01b1 
    02 3110 3f0f 3220 3110 3220 
    03 3e22 3eff 3e11 3e22 3e11 
    04 bbbb bbbb bbbb bbbb bbbb 
    05 3c47 3c47 3c47 3c47 3c47 
    06 0000 0000 0000 0000 0000 
    07 0000 0000 0000 0000 0000 
    08 1c00 1c00 1c00 1c00 1c00 
    09 8000 8000 8000 8000 8000 
    0a 3000 3000 3000 3000 3000 
    0b bc40 bc40 bc40 bc40 bc40 
    0c 6001 0800 6001 6001 6001 
    0d 2820 0100 2820 2820 c820 
    0e 0003 0020 0003 0003 0003 
    0f 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 3220 3220 3220 3220 3220 
    16 8000 ffff 8000 8000 8000 
    17 0000 0409 0000 0000 0000 
    18 62ea 62ea 62ea 62ea 62ea 
    19 01f4 01f4 01f4 01f4 01f4 
    1a 01d7 01d7 01d7 01d7 01d7 
    1b 0176 0176 0176 0176 0176 
    1c 3cbb 3cbb 3cbb 3cbb 3cbb 
    1d 00ec 00ec 00ec 00ec 00ec 
    1e 0076 0076 0076 0076 0076 
    1f 0000 b000 0000 0000 0000 
    20 0000 7fff 0000 0000 0000 
    21 2d15 2d15 2d15 2d15 2d15 
    22 1f6a 1f6a 1f6a 1f6a 1f6a 
    23 a200 9780 a200 a200 a200 
    24 1000 0f11 1000 1000 1000 
    25 0000 0000 0000 0000 0000 
    26 0000 0028 0000 0000 0000 
    27 1000 1000 1000 1000 1000 
    28 0000 0000 0000 0000 0000 
    29 b6dd b6dd b6dd b6dd b6dd 
    2a 0000 0000 0000 0000 0000 
    2b 3a98 3a98 3a98 3a98 3a98 
    2c 0000 0000 0000 0000 0000 
    2d 0000 fd01 0000 0000 0000 
    2e 0000 00fe 0000 0000 0000 
    2f 0000 7fff 0000 0000 0000 
    30 0000 0ef5 0000 0000 0000 
    31 0000 01fb 0000 0000 0000 
    32 2200 1780 2200 2200 2200 
    33 2200 1880 2200 2200 2200 
    34 2200 1880 2200 2200 2200 
    35 0000 0000 0000 0000 0000 
    36 e12c e12c e12c e12c e12c 
    37 6000 6080 6000 6000 6000 
    38 1111 1111 1111 1111 1111 
    39 7359 7359 7359 7359 7359 
    3a ee6b ee6b ee6b ee6b ee6b 
    3b 4646 4646 4646 4646 4646 
    3c 4646 4646 4646 4646 4646 
    3d 68e0 68e0 68e0 68e0 68e0 
    3e e0d8 2058 e0d8 e0d8 e0d8 
    3f 8000 ffff 8000 8000 8000 
    
    L2SW:
    0000 00001202 07a00000 00000000 00000000 
    0010 20261320 f0107650 00002d0e 00003f1f 
    0020 3f500800 00010000 00000000 00000000 
    0030 80000301 00000000 0f000000 00000000 
    0040 00700000 00000000 000088a8 00000000 
    0050 cc36cc36 ca36ca36 c936c936 03ffff00 
    0060 00000001 00000000 00000000 00000000 
    0070 b00e6060 03707f07 000005ee 0000004e 
    0080 00000200 00000f4e 00000200 00000200 
    0090 00000200 00001080 00000000 00000000 
    00a0 00000000 00000000 00000000 00000000 
    00b0 00000000 00000000 00000000 00000000 
    00c0 00000000 00000000 80901040 00000000 
    00d0 7fff7ff7 00003fff 00000100 00000000 
    00e0 c70164ce 0002a545 2dc11c9c 00000000 
    00f0 00000000 00000000 00000000 00000000 
    0100 00000000 00000000 00000000 00000000 
    0110 00000000 00000000 00000000 00000000 
    0120 00240024 00000000 00240024 00000000 
    0130 00110011 00000000 00240024 00000000 
    0140 00240024 00000000 00240024 00000000 
    0150 00240024 00000000 00240024 00000000 
    0160 00240024 00000000 00240024 00000000 
    0170 00000000 00000000 00000000 00000000 
    0180 00000000 00000000 00000000 00000000 
    0190 00000000 00000000 00000000 00000000 
    01a0 00000000 00000000 00000000 00000000 
    01b0 00000000 00000000 00000000 00000000 
    01c0 00000000 00000000 00000000 00000000 
    01d0 00000000 00000000 00000000 00000000 
    01e0 00000000 00000000 00000000 00000000 
    01f0 00000000 00000000 00000000 00000000 
    0200 00000001 00005000 00400040 00000000 
    0210 00000000 00000000 00000000 00000000 
    0220 00000000 00000000 00000000 00000000 
    0230 00000000 00000000 00000000 00000000 
    0240 00000000 00000000 00000000 00000000 
    0250 00000000 00000000 00000000 00000000 
    0260 00000000 00000000 00000000 00000000 
    0270 0000000f 00000000 00000000 00000000 
    0280 00000000 00000000 00000000 00000000 
    0290 00000000 00000000 00000000 00000000 
    02a0 00000000 00000000 00000000 00000000 
    02b0 00000000 00000000 00000000 00000000 
    02c0 00000000 00000000 00000000 00000000 
    02d0 00000000 00000000 00000000 00000000 
    02e0 00000000 00000000 00000000 00000000 
    02f0 00000000 00000000 00000000 00000000 
    0400 00000000 00000000 00000000 00000000 
    0410 00000000 00000000 000c0a80 00000000 
    0420 00010001 00002040 00020001 00001040 
    0430 00010001 00001040 00010001 00001040 
    0440 00010001 00001040 00010001 00001040 
    0450 00010001 00003040 00000000 00000000 
    0460 00000000 00000000 00000000 00000000 
    0470 00000000 00000000 00000000 00000000 
    0480 00000000 00000000 00000000 00000000 
    0490 00000000 00000000 00000000 00000000 
    04a0 00000000 00000000 00000000 00000000 
    04b0 00000000 00000000 00000000 00000000 
    04c0 00000000 00000000 00000000 00000000 
    04d0 00000000 00000000 00000000 00000000 
    04e0 00000000 00000000 00000000 00000000 
    04f0 00000000 00000000 00000000 00000000 
    0600 00000000 00000000 00000000 00000001 
    0610 00000000 00000002 50e8002b 00000000 
    0620 000000f0 003f3f3f 00000000 00000000 
    0630 00000000 11111111 22222222 33333333 
    0640 44444444 55555555 66666666 77777777 
    0650 76543210 00000000 00000000 00000000 
    0660 0014027e 00000018 00007000 0004027d 
    0670 00000018 00007000 0014027b 00000018 
    0680 00007000 00140277 00000018 00007000 
    0690 0014026f 00000018 00007000 0014025f 
    06a0 00000018 00007000 00000000 00000018 
    06b0 00007000 00000000 00000000 00000000 
    06c0 00000000 00000000 00000000 00000000 
    06d0 00000000 00000000 00000000 00000000 
    06e0 00000000 00000000 00000000 00000000 
    06f0 00000000 00000000 00000000 00000000 
    0800 01200188 00000000 0000000e 00000000 
    0810 54332201 33221100 00000000 00000000 
    0820 00000000 00000000 00000000 00000000 
    0830 10841041 00041041 00041041 00041041 
    0840 00041041 10841041 10841041 00000000 
    0850 00000000 00000000 00000000 00000000 
    0860 00000000 00000000 00000000 00000000 
    0870 00000000 00000000 00000000 00000000 
    0880 00000000 00000000 00000000 00000000 
    0890 7fff7fff 7fff7fff 7fff7fff 7fff7fff 
    08a0 7fff7fff 7fff7fff 00000000 00000002 
    08b0 7fff7fff 7fff7fff 7fff7fff 7fff7fff 
    08c0 7fff7fff 7fff7fff 00000000 00000002 
    08d0 7fff7fff 7fff7fff 7fff7fff 7fff7fff 
    08e0 7fff7fff 7fff7fff 00000000 00000002 
    08f0 7fff7fff 7fff7fff 7fff7fff 7fff7fff 
    0c00 00000000 00000000 00000000 00000000 
    0c10 00000000 00000000 00000000 00000000 
    0c20 00000000 00000000 00000000 00000000 
    0c30 00000000 00000000 00000000 00000000 
    0c40 00000000 00000000 00000000 00000000 
    0c50 00000000 00000000 00000000 00000000 
    0c60 00000000 00000000 00000000 00000000 
    0c70 00010001 00010001 00010001 00000001 
    0c80 00000000 00000000 00000000 00000000 
    0c90 00000000 00000000 00000000 00000000 
    0ca0 00000000 00000000 00000000 00000000 
    0cb0 00000000 00000000 00000000 00000000 
    0cc0 00000000 00000000 00000000 00000000 
    0cd0 00000000 00000000 00000000 00000000 
    0ce0 00000000 00000000 00000000 00000000 
    0cf0 00000000 00000000 00000000 00000000 
    0e00 00072401 00000000 00000000 007f0000 
    0e10 00000000 00000000 00000000 00000000 
    0e20 00000000 00000000 00000000 00000000 
    0e30 00000000 00000000 00200a53 00000000 
    0e40 00000000 00000000 00000000 00000000 
    0e50 00000000 00000000 00000000 000c0a80 
    0e60 00000000 00000000 00000000 00000000 
    0e70 00000000 00000000 00000000 00000000 
    0e80 00000000 00000000 00000000 00000000 
    0e90 00000000 00000000 00000000 00000000 
    0ea0 00000000 00000000 00000000 00000000 
    0eb0 00000000 00000000 00000000 00000000 
    0ec0 00000000 00000000 00000000 00000000 
    0ed0 00000000 00000000 00000000 00000000 
    0ee0 00000000 00000000 00000000 00000000 
    0ef0 00000000 00000000 00000000 00000000 
    
    VTU:
    0: 001b55e0 00010005
    1: 001bff60 00020005
    
    ATU:
    0: d8e63fb3 80045c9a 00000106 00000006 m:5c:9a:d8:**:**:** p:..o.... v:1
    

  • debug memory read 0xb805002c 1
    boot> debug memory read 0xb805002c 1
    b805002c:06000000
    

  • debug memory read 0xb8070000 1
    boot> debug memory read 0xb8070000 1
    b8070000:00000001
    

Kernel (NetBSD)

  • Bootlog
    IPL:HARD-RESET
    memory test ... ok
    flinstall OK
    
    boot version: 1.0.0
    
    PKG "Orthos-HP"
    CPU "Atheros/AR9344"
    Revision 212.1 CLOCK 560.0 MHz
    HEAP MEMORY 262144 bytes
    Boot:InitFilesystem
    phy0.1: "Atheros/AR8327(SW)"
    phy0.0: "Atheros/AR8327(phy)"
    active ch:0
    post start
    DRAM Test ..... PASS
    Timer test .... PASS
    FLASH CHKSUM .. PASS
    LAN Test ..... 
    LoopBack count 0 .. 
    phy0.1: "Atheros/AR8327(SW)"
    phy0.0: "Atheros/AR8327(phy)"
    active ch:0
    active ch:1
    phy0.1: "Atheros/AR8327(SW)"
    phy0.0: "Atheros/AR8327(phy)"
    active ch:0
    PASS
    Package TYPE = 0x01
    post success
    now booting Firmware ...
    loaded Firmware
    config=0x80208483 status=0x00000000
    mips_pdcache_write_through=0
    mips_picache_line_size=32 mips_pdcache_line_size=32
      pagemask: 0x00000000
      status: 0x00000000
      config: 0x80208483
      cause: 0x00000000
    load memory 0x197f000, 0x6681000
    load memory 0x1000, 0x5f000
    Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002
        The NetBSD Foundation, Inc.  All rights reserved.
    Copyright (c) 1982, 1986, 1989, 1991, 1993
        The Regents of the University of California.  All rights reserved.
    
    NetBSD 1.6.1 (ORTHOS.tmp) #0: 2013-09-13 12:35:59 JST
        kubota@A00-30-04938:/home/kubota/aaa/git/hituji/build/orthos/kernel-obj/ORTHOS.tmp
    
    total memory = 128 MB
    avail memory = 98288 KB
    using 1024 buffers containing 4096 KB of memory
    mainbus0 (root)
    cpu0 at mainbus0: MIPS 74Kc (0x1974c) Rev. 76 with software emulated floating point
    cpu0: 64KB/32B 4-way set-associative L1 Instruction cache, 32 TLB entries
    cpu0: 32KB/32B 4-way set-associative write-back L1 Data cache
    arspi0 at mainbus0
    arflash0 at mainbus0 addr 0xbf000000 size 8388608 bytes
    flash: id 0xc2 type 0x16 addr 0xbf000000 size 8388608 bytes
    pfmg: carrier mode 0 pkgid 0x10701 configid 0xff
    arrtc0 at mainbus0
    argiu0 at mainbus0
    btnu0 at argiu0 port 15
    btnu1 at argiu0 port 16
    btnu2 at argiu0 port 3
    athq0 at mainbus0
    athq0: WLAN MAC ADDRESS (1c:b1:7f:00:a5:02)
    Restoring Cal data from Flash
    dfs_attach: use DFS enhancements
    DFS min filter rssiThresh = 18
    DFS max pulse dur = 151 ticks
    ath_get_caps[5308] rx chainmask mismatch actual 3 sc_chainmak 0
    ath_get_caps[5283] tx chainmask mismatch actual 3 sc_chainmak 0
    athq0: LSDK-9.2.0_U10.1020 mac 768.0 phy 2093.11 radio 0.0
     chan  Freq     HT                       DFS
     1     2412nbg  HT20 HT40PLUS            N
     2     2417nbg  HT20 HT40PLUS            N
     3     2422nbg  HT20 HT40PLUS            N
     4     2427nbg  HT20 HT40PLUS            N
     5     2432nbg  HT20 HT40PLUS HT40MINUS  N
     6     2437nbg  HT20 HT40PLUS HT40MINUS  N
     7     2442nbg  HT20 HT40PLUS HT40MINUS  N
     8     2447nbg  HT20 HT40PLUS HT40MINUS  N
     9     2452nbg  HT20 HT40PLUS HT40MINUS  N
     10    2457nbg  HT20          HT40MINUS  N
     11    2462nbg  HT20          HT40MINUS  N
     12    2467nbg  HT20          HT40MINUS  N
     13    2472nbg  HT20          HT40MINUS  N
    athq0: Atheros 9340: memt=0x80371c80, memh=0xb8100000 
    com0 at mainbus0: ns16550a, working fifo
    com0: console
    ehci0 at mainbus0ehci0: EHCI version 1.0
    usb0 at ehci0: USB revision 2.0
    uhub0 at usb0
    uhub0: AR7100 EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
    uhub0: 1 port with 1 removable, self powered
    ageth0 at mainbus0
    ath27swlphy0 at ageth0 phy 1: Atheros AR8327 10/100/1000 L2SW, rev. 3
    ath27swlphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, auto, 1000baseT-FDX FLAG0, 1000baseT-FDX FLAG1
    ageth1 at mainbus0
    ath27swsphy0 at ageth1 phy 0: Atheros AR8327 10/100/1000 L2SW, rev. 3
    ath27swsphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, auto
    arpcieu0 at mainbus0:
    pci0 at arpcieu0 bus 0
    pci0: memory space enabled
    athq1 at pci0 dev 0 function 0
    athq1: WLAN MAC ADDRESS (1c:b1:7f:00:a5:03)
    __ath_attach: Set global_scn[1]
    ACBKMinfree = 48
    ACBEMinfree = 32
    ACVIMinfree = 16
    ACVOMinfree = 0
    CABMinfree = 48
    UAPSDMinfree = 0
    Restoring Cal data from Flash
    dfs_attach: use DFS enhancements
    DFS min filter rssiThresh = 18
    DFS max pulse dur = 151 ticks
    ath_get_caps[5308] rx chainmask mismatch actual 3 sc_chainmak 0
    ath_get_caps[5283] tx chainmask mismatch actual 3 sc_chainmak 0
    athq1: LSDK-9.2.0_U10.1020 mac 448.3 phy 0.0 radio 0.0
     chan  Freq     HT                       DFS
     36    5180na   HT20 HT40PLUS            N
     40    5200na   HT20          HT40MINUS  N
     44    5220na   HT20 HT40PLUS            N
     48    5240na   HT20          HT40MINUS  N
     52    5260na   HT20 HT40PLUS            Y
     56    5280na   HT20          HT40MINUS  Y
     60    5300na   HT20 HT40PLUS            Y
     64    5320na   HT20          HT40MINUS  Y
     100   5500na   HT20 HT40PLUS            Y
     104   5520na   HT20          HT40MINUS  Y
     108   5540na   HT20 HT40PLUS            Y
     112   5560na   HT20          HT40MINUS  Y
     116   5580na   HT20 HT40PLUS            Y
     120   5600na   HT20          HT40MINUS  Y
     124   5620na   HT20 HT40PLUS            Y
     128   5640na   HT20          HT40MINUS  Y
     132   5660na   HT20 HT40PLUS            Y
     136   5680na   HT20          HT40MINUS  Y
     140   5700na   HT20                     Y
    athq1: Atheros 9380: memt=0x80371c80, memh=0xb0000000 
    rtc: CLOCK INITIALIZED 
    kevt0: 
    logbuf: using 655360 bytes logging area
    md0: internal 21504 KB image area
    uhub1 at uhub0 port 1
    uhub1: vendor 0x0409 product 0x005a, class 9/0, rev 2.00/1.00, addr 2
    uhub1: single transaction translator
    uhub1: 4 ports with 4 removable, self powered
    boot device: 
    root on md0a dumps on md0b
    root file system type: ffs
    Tue Jan  1 00:00:02 JST 2013
    /usr/local/www/.htpasswd file not exists.(ignore)
    Setting tty flags.
    Building databases...
    wlan_vap_create : enter. devhandle=0x81952be0, opmode=IEEE80211_M_HOSTAP, flags=0x1
    wlan_vap_create : exit. devhandle=0x81952be0, opmode=IEEE80211_M_HOSTAP, flags=0x1.
    wlan_vap_create : enter. devhandle=0x81952be0, opmode=IEEE80211_M_HOSTAP, flags=0x1
    wlan_vap_create : exit. devhandle=0x81952be0, opmode=IEEE80211_M_HOSTAP, flags=0x1.
    wlan_vap_create : enter. devhandle=0xc00f4030, opmode=IEEE80211_M_HOSTAP, flags=0x1
    wlan_vap_create : exit. devhandle=0xc00f4030, opmode=IEEE80211_M_HOSTAP, flags=0x1.
    wlan_vap_create : enter. devhandle=0xc00f4030, opmode=IEEE80211_M_HOSTAP, flags=0x1
    wlan_vap_create : exit. devhandle=0xc00f4030, opmode=IEEE80211_M_HOSTAP, flags=0x1.
    Starting wificonfig
    encrypt key mode AES
    encrypt key mode AES
    Starting evtmgr.
    Starting dlnamgr.
    Starting clid.
    Starting inetd.
    Starting procmon.
    Starting wzcm.
    Tue Jan  1 00:00:06 JST 2013
    
    NetBSD/messimips (Amnesiac) (console)
    
    login: 
    

WN-AG300DGR stock -> OpenWrt (ath79)

おおよそ組み上がり、(たぶん)最後のテストとしてfactoryファームの動作確認。

Stopping processmanager ...            OK
Stopping DDNS ...            OK
Stopping DHCP server ...            Closing ntpclient ...            Stopping DDNS ...            OK
Stopping LLTD ...            FAILED
FAILED
lld2d is still running kill it again.
vpnClose ...
wanClose ...
Close WAN: eth0.2 ...
Stopping DNS Proxy ...            OK
Starting sxuptpClose ...           Done !
OK
Stopping processmanager ...            OK
Stopping DHCP server ...            Stopping httpd server ...            OK
vpnClose ...
wanClose ...
Close WAN: eth0.2 ...
Stopping radio1 ....              Stopping WLAN ....              OK
OK
SW modules close completed
starting pid 5312, tty '': '/etc/reboot.sh'
/etc/reboot.sh: line 2: cannot create /proc/sys/kernel/printk: nonexistent directory
starting pid 5322, tty '': '/etc/reboot.sh'
/etc/reboot.sh: line 2: cannot create /proc/sys/kernel/printk: nonexistent directory
The system is gSignal 15 received - terminating
Signal 15 received - terminating
Sending SIGKILL to all processes
Requesting system reboot


U-Boot 1.2.6 (Jun 29 2012 - 16:01:45)
U-boot MI124
DRAM:  
sri
Wasp 1.1
wasp_ddr_initial_config(254): (16bit) ddr2 init
64 MB
Top of RAM usable for U-Boot at: 84000000
Reserving 231k for U-Boot at: 83fc4000
Reserving 192k for malloc() at: 83f94000
Reserving 44 Bytes for Board Info at: 83f93fd4
Reserving 36 Bytes for Global Data at: 83f93fb0
Reserving 128k for boot params() at: 83f73fb0
Stack Pointer at: 83f73f98
Now running in RAM - U-Boot at: 83fc4000
id read 0xc217
venid=c2,devid=17
Unknown flash device
Flash: 16 MB
pcie module ID is correct 0x30168c 
In:    serial
Out:   serial
Err:   serial
Net:   ag934x_enet_initialize...
No valid address in Flash. Using fixed address
 wasp  reset mask:c03300 
WASP  ----> S17 PHY *
: cfg1 0x7 cfg2 0x7114
eth0: 00:03:7f:09:0b:ad
athrs17_reg_init: complete
eth0 up
eth0
ag934x_enet_initialize...
No valid address in Flash. Using fixed address
 wasp  reset mask:c03300 
WASP  ----> S17 PHY *
: cfg1 0xf cfg2 0x7114
eth0: 00:03:7f:09:0b:ad
eth0 up
eth0

Please choose the operation: 
   1: Load system code to SDRAM via TFTP. 
   3: Boot system code via Flash (default).
   4: Entr boot command line interface.
                                                                                                                               0  
   
3: System Boot system code via Flash.
## Booting image at 9f040000 ...
   Image Name:   MIPS OpenWrt Linux-4.14.79
   Created:      2018-11-10  14:13:03 UTC
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    1601981 Bytes =  1.5 MB
   Load Address: 80060000
   Entry Point:  80060000
   Verifying Checksum at 0x9f040040 ...OK
   Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80060000) ...
## Giving linux memsize in bytes, 67108864

Starting kernel ...

[    0.000000] Linux version 4.14.79 (musashino205@Taiha.Net) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r0+8446-568be2bd68)) #0 Sat Nov 10 14:13:03 2018
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001974c (MIPS 74Kc)
[    0.000000] MIPS: machine is I-O DATA WN-AG300DGR
[    0.000000] SoC: Atheros AR9342 rev 1
[    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, VIPT, cache 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+0x8c/0x474 with crng_init=0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line: console=ttyS0,115200 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=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 58272K/65536K available (3734K kernel code, 145K rwdata, 904K rodata, 1224K init, 204K bss, 7264K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 51
[    0.000000] CPU clock: 535.000 MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7144898866 ns
[    0.000011] sched_clock: 32 bits at 267MHz, resolution 3ns, wraps every 8027976190ns
[    0.008248] Calibrating delay loop... 266.64 BogoMIPS (lpj=1333248)
[    0.094814] pid_max: default: 32768 minimum: 301
[    0.099911] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.106908] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.119387] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.129811] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.136335] pinctrl core: initialized pinctrl subsystem
[    0.143000] NET: Registered protocol family 16
[    0.155738] PCI host bridge /ahb/apb/pcie-controller@180c0000 ranges:
[    0.162609]  MEM 0x0000000010000000..0x0000000013ffffff
[    0.168121]   IO 0x0000000000000000..0x0000000000000000
[    0.194700] PCI host bridge to bus 0000:00
[    0.199041] pci_bus 0000:00: root bus resource [mem 0x10000000-0x13ffffff]
[    0.206343] pci_bus 0000:00: root bus resource [io  0x0000]
[    0.212217] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    0.219384] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.228285] pci 0000:00:00.0: BAR 0: assigned [mem 0x10000000-0x1001ffff 64bit]
[    0.236058] pci 0000:00:00.0: BAR 6: assigned [mem 0x10020000-0x1002ffff pref]
[    0.244390] clocksource: Switched to clocksource MIPS
[    0.250977] NET: Registered protocol family 2
[    0.256503] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.263871] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.270643] TCP: Hash tables configured (established 1024 bind 1024)
[    0.277515] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.283691] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.290663] NET: Registered protocol family 1
[    0.300766] Crashlog allocated RAM at address 0x3f00000
[    0.307884] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[    0.320350] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.326555] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.347692] io scheduler noop registered
[    0.351830] io scheduler deadline registered (default)
[    0.357737] ar7200-usb-phy usb-phy: phy reset is missing
[    0.365641] pinctrl-single 1804002c.pinmux: 544 pins at pa b804002c size 68
[    0.374187] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    0.381815] console [ttyS0] disabled
[    0.385689] 18020000.uart: ttyS0 at MMIO 0x18020000 (irq = 8, base_baud = 1562500) is a 16550A
[    0.394804] console [ttyS0] enabled
[    0.394804] console [ttyS0] enabled
[    0.402355] bootconsole [early0] disabled
[    0.402355] bootconsole [early0] disabled
[    0.418448] m25p80 spi0.0: mx25l12805d (16384 Kbytes)
[    0.423744] 7 fixed-partitions partitions found on MTD device spi0.0
[    0.430367] Creating 7 MTD partitions on "spi0.0":
[    0.435338] 0x000000000000-0x000000030000 : "u-boot"
[    0.441467] 0x000000030000-0x000000040000 : "u-boot-env"
[    0.447971] 0x000000040000-0x000000f50000 : "firmware"
[    0.475930] 2 uimage-fw partitions found on MTD device firmware
[    0.482069] 0x000000040000-0x0000001d0000 : "kernel"
[    0.488104] 0x0000001d0000-0x000000f50000 : "rootfs"
[    0.494070] mtd: device 4 (rootfs) set to be root filesystem
[    0.500021] 1 squashfs-split partitions found on MTD device rootfs
[    0.506428] 0x0000006e0000-0x000000f50000 : "rootfs_data"
[    0.512891] 0x000000f50000-0x000000f90000 : "manufacture"
[    0.519439] 0x000000f90000-0x000000fa0000 : "backup"
[    0.525549] 0x000000fa0000-0x000000ff0000 : "storage"
[    0.531668] 0x000000ff0000-0x000001000000 : "art"
[    0.538836] libphy: Fixed MDIO Bus: probed
[    0.884815] libphy: ag71xx_mdio: probed
[    0.891675] switch0: Atheros AR8327 rev. 2 switch registered on mdio-bus.0
[    1.544491] ag71xx 19000000.eth: invalid MAC address, using random address
[    1.885582] ag71xx 19000000.eth: connected to PHY at mdio-bus.0:00 [uid=004dd033, driver=Atheros AR8216/AR8236/AR8316]
[    1.897391] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:RGMII
[    1.906679] NET: Registered protocol family 10
[    1.916681] Segment Routing with IPv6
[    1.920582] NET: Registered protocol family 17
[    1.925297] 8021q: 802.1Q VLAN Support v1.8
[    1.938210] VFS: Mounted root (squashfs filesystem) readonly on device 31:4.
[    1.953498] Freeing unused kernel memory: 1224K
[    1.958215] This architecture does not have kernel memory protection.
[    2.554438] random: fast init done
[    2.665220] init: Console is alive
[    2.668995] init: - watchdog -
[    4.250027] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    4.486584] usbcore: registered new interface driver usbfs
[    4.492382] usbcore: registered new interface driver hub
[    4.498050] usbcore: registered new device driver usb
[    4.549089] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    4.567564] SCSI subsystem initialized
[    4.578182] ehci-platform: EHCI generic platform driver
[    4.583923] ehci-platform 1b000000.usb: EHCI Host Controller
[    4.589872] ehci-platform 1b000000.usb: new USB bus registered, assigned bus number 1
[    4.598108] ehci-platform 1b000000.usb: irq 3, io mem 0x1b000000
[    4.624421] ehci-platform 1b000000.usb: USB 2.0 started, EHCI 1.00
[    4.631871] hub 1-0:1.0: USB hub found
[    4.636347] hub 1-0:1.0: 1 port detected
[    4.646317] usbcore: registered new interface driver usb-storage
[    4.653677] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    4.663277] init: - preinit -
[    5.972933] random: jshn: uninitialized urandom read (4 bytes read)
[    6.278310] random: jshn: uninitialized urandom read (4 bytes read)
[    6.722333] random: jshn: uninitialized urandom read (4 bytes read)
[    7.054624] urandom_read: 3 callbacks suppressed
[    7.054634] random: jshn: uninitialized urandom read (4 bytes read)
[    8.239205] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    8.245398] IPv6: ADDRCONF(NETDEV_UP): eth0.1: link is not ready
[    8.305822] 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.315684] eth0: link up (1000Mbps/Full duplex)
[    9.320638] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[    9.327690] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.1: link becomes ready
[   11.510664] mount_root: loading kmods from internal overlay
[   11.564171] kmodloader: loading kernel modules from //etc/modules-boot.d/*
[   11.573039] kmodloader: done loading kernel modules from //etc/modules-boot.d/*
[   12.542861] block: attempting to load /etc/config/fstab
[   12.554598] block: unable to load configuration (fstab: Entry not found)
[   12.561623] block: no usable configuration
[   12.566901] mount_root: jffs2 not ready yet, using temporary tmpfs overlay
[   12.626528] urandom-seed: Seed file not found (/etc/urandom.seed)
[   12.773715] procd: - early -
[   12.777263] procd: - watchdog -
[   13.474402] eth0: link down
[   13.507923] procd: - watchdog -
[   13.511493] procd: - ubus -
[   13.677651] random: ubusd: uninitialized urandom read (4 bytes read)
[   13.877918] random: ubusd: uninitialized urandom read (4 bytes read)
[   13.886292] procd: - init -
Please press Enter to activate this console.
[   14.473893] kmodloader: loading kernel modules from /etc/modules.d/*
[   14.629712] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   14.661929] Loading modules backported from Linux version v4.19-rc5-0-g6bf4ca7fbc85
[   14.669909] Backport generated by backports.git v4.19-rc5-1-0-g05571dcd
[   14.765265] ip_tables: (C) 2000-2006 Netfilter Core Team
[   14.784874] nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
[   14.904288] usbcore: registered new interface driver ums-alauda
[   14.931470] usbcore: registered new interface driver ums-cypress
[   14.949806] usbcore: registered new interface driver ums-datafab
[   14.960569] usbcore: registered new interface driver ums-freecom
[   14.969417] usbcore: registered new interface driver ums-isd200
[   14.978153] usbcore: registered new interface driver ums-jumpshot
[   14.986882] usbcore: registered new interface driver ums-karma
[   14.996062] usbcore: registered new interface driver ums-sddr09
[   15.004897] usbcore: registered new interface driver ums-sddr55
[   15.013818] usbcore: registered new interface driver ums-usbat
[   15.054310] xt_time: kernel timezone is -0000
[   15.146398] PPP generic driver version 2.4.2
[   15.158642] NET: Registered protocol family 24
[   15.215803] ath9k 18100000.wmac: Direct firmware load for ath9k-eeprom-ahb-18100000.wmac.bin failed with error -2
[   15.226471] ath9k 18100000.wmac: Falling back to user helper
[   15.496276] ieee80211 phy0: Atheros AR9340 Rev:1 mem=0xb8100000, irq=11
[   15.503537] PCI: Enabling device 0000:00:00.0 (0000 -> 0002)
[   15.624740] ieee80211 phy1: Atheros AR9300 Rev:3 mem=0xb0000000, irq=13
[   15.804970] kmodloader: done loading kernel modules from /etc/modules.d/*
[   34.516931] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   34.556522] device eth0 entered promiscuous mode
[   34.563371] br-lan: port 1(eth0.1) entered blocking state
[   34.569046] br-lan: port 1(eth0.1) entered disabled state
[   34.575034] device eth0.1 entered promiscuous mode
[   34.664690] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   34.764798] IPv6: ADDRCONF(NETDEV_UP): eth0.2: link is not ready
[   35.555969] eth0: link up (1000Mbps/Full duplex)
[   35.560819] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   35.634617] br-lan: port 1(eth0.1) entered blocking state
[   35.640213] br-lan: port 1(eth0.1) entered forwarding state
[   35.646234] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.2: link becomes ready
[   35.754475] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   39.112728] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
[   39.184715] jffs2_build_filesystem(): unlocking the mtd device... 
[   39.184728] done.
[   39.193099] jffs2_build_filesystem(): erasing all blocks after the end marker... 
[  100.259717] done.
[  100.269500] jffs2: notice: (1736) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[  100.699228] overlayfs: upper fs does not support tmpfile.



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

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

BHR-4GRV2とKernel 4.14

最近BHR-4GRV2が公式のbuildbotにおいてar71xx/tinyをfailさせる一因になっていたので、それに関連するメモ。

どうする

ar71xx/tinyのほうは今から変更するのは厳しいため、諦める。
一方ath79/tinyのほうは、ath79がまだ公式ではビルドされていないこともあって変更の余地はあるため、以下のように変更しようかと思案中。→ 既存のサポートに対する修正としてPRを投げた。
この変更を行うと、ar71xxからのsysupgradeができない*、factoryファームを作れないなどの弊害は出る。
(*: 正確にはar71xxからsysupgradeで書き込むことはできるけど、U-Bootの環境変数を変更してから実行しないと再起動後にath79のKernelを起動できず止まる。危険なのでar71xx -> ath79は不可にしてしまうほうが良さそう。)

rootfs,kernelをfirmwareとして結合
Kernelがサイズ制限を受ける原因となっているmtdパーティションの構成を変更し、生成されたKernelのサイズに従って柔軟にRootfsの位置が変化できる “firmware” パーティションを使用する。
U-BootのKernelオフセットを変更
前項でmtdパーティションの構成を変更しただけではU-Bootが起動時にKernelを見つけられなくなるため、U-Bootの環境変数内に格納されているオフセットを変更する。
メーカーファーム -> OpenWrtインストール方法の変更
mtdパーティションを変更した場合、本来のKernelサイズ制限を超過するKernelが許容されるようになるため、factoryは作成できなくなる。
これに伴い、メーカーファームからOpenWrtへ入れ替える方法を以下の通りに変更する。

  • ECOボタンを押しながらinitramfsファームでブート
  • initramfsファーム上でU-Bootの環境変数を変更
  • squashfs-sysupgradeファームでsysupgrade
  • 完了

ざっくりと日本語で書く分には楽だけれども、英文で詳細に記述するのはしんどい。

WZR-HP-G302H A1A0 stock -> OpenWrt (ath79)

とりあえずここまで来たのでメモ。

MidLayer.c(544) ML_RemoveFileInDirectory :DEBUG:ent->d_name = gatedesc.xml
MidLayer.c(544) ML_RemoveFileInDirectory :DEBUG:ent->d_name = ligd.gif
MidLayer.c(544) ML_RemoveFileInDirectory :DEBUG:ent->d_name = L3FwdSCPD.xml
MidLayer.c(544) ML_RemoveFileInDirectory :DEBUG:ent->d_name = gateicfgSCPD.xml
MidLayer.c(544) ML_RemoveFileInDirectory :DEBUG:ent->d_name = gateconnSCPD.xml
MidLayer.c(544) ML_RemoveFileInDirectory :DEBUG:ent->d_name = gateinfoSCPD.xml
MidLayer.c(544) ML_RemoveFileInDirectory :DEBUG:ent->d_name = messages
ip_nat_pptp version 3.0 unloaded
ip_conntrack_pptp version 3.1 unloaded
cgi.c(3596) UploadCgi :x:MEMORY CHECK...
MidLayer.c(1914) ML_CheckMemory :X:MemFree = 38596
MidLayer.c(1918) ML_CheckMemory :X:Buffers = 3300
MidLayer.c(1922) ML_CheckMemory :X:Cached = 11968
MidLayer.c(1926) ML_CheckMemory :X:Active = 9444
MidLayer.c(1930) ML_CheckMemory :X:Inactive = 6816
Sep 30 17:04:47 udhcpd: Request incoming from Tofu-QM77W10(len:12)
Sep 30 17:04:47 udhcpd: sending OFFER of 192.168.11.2 Tofu-QM77W10
cgi.c(2776) Check_TagVersion :INFO :pTarget = WZR-HP-G302H : a_pProduct = WZR-HP-G302H
cgi.c(2681) check_specification :DEBUG:U-bootSpecification  = M_00000001(JP)
cgi.c(2684) check_specification :DEBUG:NewFirmSpecification = M_ffffffff
cgi.c(4165) UploadCgi :INFO:(iUbootHwRev):4 (iHwVersion):4 ...tag[hwv]...
wanctl-lib.c(4937) StopPppModemSession :x:StopPppModemSession
watchdogd-ath.c(42) watchdog_stop :WD:Watchdog Stopped
watchdogd.c(11) watchdogd_term :WD:Terminate Watchdog Daemon
debug : Enter [BRCTL_ADD_IF] 
cgi.c(4203) UploadCgi :ERR:wlconfig_down() call 
rcUtil.c(2949) Wireless_Rmmod :ERR:####### Wireless_Rmmod #########
ag7240_ring_free start Freeing at 0x83ef6400
ag7240_ring_free done  Freeing at 0x0
ag7240_ring_free start Freeing at 0x83ed0000
ag7240_ring_free done  Freeing at 0x0
ag7240_cleanup Freeing at 0x810a0000
ag7240_cleanup Freeing at 0x83f34000
AG7240: cleanup done
cgi.c(4254) UploadCgi :X:begin update firmware size 7012356
MidLayerFlashNvram.c(929) MLF_WriteFirmWare :debug:

==== Firmware UPDATE (timestamp=1538327116) ====

MidLayerFlashNvram.c(1007) MLF_WriteFirmWare :debug:block size      = 131072
MidLayerFlashNvram.c(1008) MLF_WriteFirmWare :debug:write block cnt = 54/54
MidLayerFlashNvram.c(1010) MLF_WriteFirmWare :debug:verify error cnt= 0
Restarting system.
.
In:    serial
Out:   serial
Err:   serial
Memory Test
uboot use  83F6BFB0 - 84000000
Memory Test start(80000000) end(83F00000) size(03F00000)
Pattern 00000000  Writing...  Reading...
Memory Test OK
### buf_ver=[1.08] U-Boot Ver.=[1.08]
### build_date(env)=[Sep 26 2011 - 00:19:46] build_date(bin)=[Sep 26 2011 - 00:19:46]
ag7240_enet_initialize...
Reading MAC Address from ENV(0x83f8c2f8)
No valid address in Flash. Using fixed address
Virian MDC CFG Value ==> 4
: cfg1 0x7 cfg2 0x7014
eth0: 02:aa:bb:cc:dd:1a
eth0 up
Virian MDC CFG Value ==> 4
: cfg1 0xf cfg2 0x7214
eth1: 00:03:7f:09:0b:ad
ATHRS26: resetting s26
ATHRS26: s26 reset done
eth1 up
eth0  02:AA:BB:CC:DD:1A
, eth1  00:03:7F:09:0B:AD

dup 1 speed 1000

tftp server(receive) go, waiting:4[sec]
Load address: 0x81f00000

TftpServer Timeout;
no file was loaded.
change bootargs
console=ttyS0,115200 root=31:03 rootfstype=jffs2 init=/sbin/init mtdparts=ar7240-nor0:256k(u-boot),64k(u-boot-env),1152k@384k(uImage),6592k@1536k(rootfs),64k@320k(ART),64k@8128k(properties) mem=64M product_rev=1 UART=1
## Booting image at bf060000 ...
   Image Name:   MIPS OpenWrt Linux-4.14.72
   Created:      2018-09-30  16:32:17 UTC
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    1600513 Bytes =  1.5 MB
   Load Address: 80060000
   Entry Point:  80060000
   Verifying Checksum ... crc32_fw: bf060040 - bf1e6c40 (len:00186c01) calc...
crc32_fw: range1 bf060040 - bf1e6c40
OK
   Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80060000) ...
## Giving linux memsize in bytes, 67108864

Starting kernel ...

[    0.000000] Linux version 4.14.72 (musashino205@Taiha.Net) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r0+8209-28be5abff2)) #0 Sun Sep 30 16:32:17 2018
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019374 (MIPS 24Kc)
[    0.000000] MIPS: machine is Buffalo WZR-HP-G302H A1A0
[    0.000000] SoC: Atheros AR7242 rev 1
[    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, VIPT, cache 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+0x8c/0x474 with crng_init=0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line: console=ttyS0,115200 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=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 58272K/65536K available (3731K kernel code, 144K rwdata, 900K rodata, 1232K init, 204K bss, 7264K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 51
[    0.000000] CPU clock: 400.000 MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[    0.000013] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    0.007902] Calibrating delay loop... 265.42 BogoMIPS (lpj=1327104)
[    0.094148] pid_max: default: 32768 minimum: 301
[    0.099067] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.105670] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.119001] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.128868] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.135060] pinctrl core: initialized pinctrl subsystem
[    0.141622] NET: Registered protocol family 16
[    0.154794] PCI host bridge /ahb/apb/pcie-controller@180c0000 ranges:
[    0.161306]  MEM 0x0000000010000000..0x0000000013ffffff
[    0.166515]   IO 0x0000000000000000..0x0000000000000000
[    0.196643] PCI host bridge to bus 0000:00
[    0.200758] pci_bus 0000:00: root bus resource [mem 0x10000000-0x13ffffff]
[    0.207675] pci_bus 0000:00: root bus resource [io  0x0000]
[    0.213232] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    0.220008] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.228601] pci 0000:00:00.0: BAR 0: assigned [mem 0x10000000-0x1000ffff 64bit]
[    0.236828] clocksource: Switched to clocksource MIPS
[    0.243323] NET: Registered protocol family 2
[    0.248907] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.255884] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.262305] TCP: Hash tables configured (established 1024 bind 1024)
[    0.268866] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.274717] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.281338] NET: Registered protocol family 1
[    0.292021] Crashlog allocated RAM at address 0x3f00000
[    0.299062] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[    0.312887] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.318756] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.340892] io scheduler noop registered
[    0.344813] io scheduler deadline registered (default)
[    0.350483] ar7200-usb-phy usb-phy: phy reset is missing
[    0.356361] pinctrl-single 18040028.pinmux: 64 pins at pa b8040028 size 8
[    0.363838] gpio-export gpio-export: 1 gpio(s) exported
[    0.370155] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    0.377534] console [ttyS0] disabled
[    0.381161] 18020000.uart: ttyS0 at MMIO 0x18020000 (irq = 8, base_baud = 12500000) is a 16550A
[    0.389914] console [ttyS0] enabled
[    0.389914] console [ttyS0] enabled
[    0.396940] bootconsole [early0] disabled
[    0.396940] bootconsole [early0] disabled
[    0.414439] m25p80 spi0.0: mx25l12805d (16384 Kbytes)
[    0.423161] m25p80 spi0.1: mx25l12805d (16384 Kbytes)
[    0.429819] Concatenating MTD devices:
[    0.433600] (0): "spi0.0"
[    0.436232] (1): "spi0.1"
[    0.438948] into device "virtual_flash"
[    0.442867] 5 fixed-partitions partitions found on MTD device virtual_flash
[    0.449884] Creating 5 MTD partitions on "virtual_flash":
[    0.455325] 0x000000000000-0x000000040000 : "u-boot"
[    0.461384] 0x000000040000-0x000000050000 : "u-boot-env"
[    0.467837] 0x000000050000-0x000000060000 : "art"
[    0.473570] 0x000000060000-0x000001fc0000 : "firmware"
[    0.566161] 2 uimage-fw partitions found on MTD device firmware
[    0.572181] 0x000000060000-0x0000001f0000 : "kernel"
[    0.578268] 0x0000001f0000-0x000001fc0000 : "rootfs"
[    0.584202] mtd: device 7 (rootfs) set to be root filesystem
[    0.590005] 1 squashfs-split partitions found on MTD device rootfs
[    0.596232] 0x000000710000-0x000001fc0000 : "rootfs_data"
[    0.602709] 0x000001fc0000-0x000002000000 : "user_property"
[    0.610874] libphy: Fixed MDIO Bus: probed
[    0.957282] libphy: ag71xx_mdio: probed
[    0.963160] switch0: Atheros AR8316 rev. 1 switch registered on mdio-bus.0
[    1.308015] ar8316: Using port 4 as switch port
[    1.316999] ag71xx 19000000.eth: connected to PHY at mdio-bus.0:00 [uid=004dd041, driver=Atheros AR8216/AR8236/AR8316]
[    1.328648] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:RGMII
[    1.337615] NET: Registered protocol family 10
[    1.347393] Segment Routing with IPv6
[    1.351217] NET: Registered protocol family 17
[    1.355740] 8021q: 802.1Q VLAN Support v1.8
[    1.368247] VFS: Mounted root (squashfs filesystem) readonly on device 31:7.
[    1.385592] Freeing unused kernel memory: 1232K
[    1.390178] This architecture does not have kernel memory protection.
[    2.199278] init: Console is alive
[    2.202972] init: - watchdog -
[    2.506877] random: fast init done
[    4.199341] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    4.433962] usbcore: registered new interface driver usbfs
[    4.439682] usbcore: registered new interface driver hub
[    4.445151] usbcore: registered new device driver usb
[    4.500580] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    4.520351] SCSI subsystem initialized
[    4.531126] ehci-platform: EHCI generic platform driver
[    4.536737] ehci-platform 1b000000.usb: EHCI Host Controller
[    4.542542] ehci-platform 1b000000.usb: new USB bus registered, assigned bus number 1
[    4.550595] ehci-platform 1b000000.usb: irq 3, io mem 0x1b000000
[    4.576853] ehci-platform 1b000000.usb: USB 2.0 started, EHCI 1.00
[    4.584260] hub 1-0:1.0: USB hub found
[    4.588559] hub 1-0:1.0: 1 port detected
[    4.599322] usbcore: registered new interface driver usb-storage
[    4.606620] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    4.616201] init: - preinit -
[    6.283016] random: jshn: uninitialized urandom read (4 bytes read)
[    6.683508] random: jshn: uninitialized urandom read (4 bytes read)
[    6.987658] random: jshn: uninitialized urandom read (4 bytes read)
[    7.944696] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    7.950754] IPv6: ADDRCONF(NETDEV_UP): eth0.1: link is not ready
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
[    8.055429] urandom_read: 2 callbacks suppressed
[    8.055441] random: procd: uninitialized urandom read (4 bytes read)
[    8.988068] eth0: link up (1000Mbps/Full duplex)
[    8.992781] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[    8.999724] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.1: link becomes ready
[   12.224097] mount_root: loading kmods from internal overlay
[   12.289121] kmodloader: loading kernel modules from //etc/modules-boot.d/*
[   12.303259] kmodloader: done loading kernel modules from //etc/modules-boot.d/*
[   14.099491] block: attempting to load /etc/config/fstab
[   14.112486] block: unable to load configuration (fstab: Entry not found)
[   14.119434] block: no usable configuration
[   14.124671] mount_root: jffs2 not ready yet, using temporary tmpfs overlay
[   14.195533] urandom-seed: Seed file not found (/etc/urandom.seed)
[   14.383408] procd: - early -
[   14.386436] procd: - watchdog -
[   15.072066] procd: - watchdog -
[   15.075590] procd: - ubus -
[   15.227033] eth0: link down
[   15.274096] random: ubusd: uninitialized urandom read (4 bytes read)
[   15.282312] random: ubusd: uninitialized urandom read (4 bytes read)
[   15.321668] random: ubusd: uninitialized urandom read (4 bytes read)
[   15.329897] procd: - init -
Please press Enter to activate this console.
[   16.259843] kmodloader: loading kernel modules from /etc/modules.d/*
[   16.315705] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   16.397841] u32 classifier
[   16.400573]     input device check on
[   16.404250]     Actions configured
[   16.436388] Mirror/redirect action on
[   16.471634] nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
[   16.511505] Loading modules backported from Linux version v4.19-rc5-0-g6bf4ca7fbc85
[   16.519280] Backport generated by backports.git v4.19-rc5-1-0-g05571dcd
[   16.540955] ip_tables: (C) 2000-2006 Netfilter Core Team
[   16.768411] usbcore: registered new interface driver ums-alauda
[   16.793751] usbcore: registered new interface driver ums-cypress
[   16.829054] usbcore: registered new interface driver ums-datafab
[   16.858789] usbcore: registered new interface driver ums-freecom
[   16.872809] usbcore: registered new interface driver ums-isd200
[   16.888744] usbcore: registered new interface driver ums-jumpshot
[   16.899802] usbcore: registered new interface driver ums-karma
[   16.909492] usbcore: registered new interface driver ums-sddr09
[   16.918752] usbcore: registered new interface driver ums-sddr55
[   16.928219] usbcore: registered new interface driver ums-usbat
[   16.990244] xt_time: kernel timezone is -0000
[   17.097575] PPP generic driver version 2.4.2
[   17.105637] NET: Registered protocol family 24
[   17.172996] ath9k 0000:00:00.0: Direct firmware load for ath9k-eeprom-pci-0000:00:00.0.bin failed with error -2
[   17.183223] ath9k 0000:00:00.0: Falling back to user helper
[   17.405325] ath: phy0: Ignoring endianness difference in EEPROM magic bytes.
[   17.435119] ieee80211 phy0: Atheros AR9280 Rev:2 mem=0xb0000000, irq=11
[   17.484404] kmodloader: done loading kernel modules from /etc/modules.d/*
[   37.932217] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   38.079402] br-lan: port 1(eth0.1) entered blocking state
[   38.084848] br-lan: port 1(eth0.1) entered disabled state
[   38.090794] device eth0.1 entered promiscuous mode
[   38.095622] device eth0 entered promiscuous mode
[   38.159916] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   38.254532] IPv6: ADDRCONF(NETDEV_UP): eth0.2: link is not ready
[   38.988474] eth0: link up (1000Mbps/Full duplex)
[   38.993184] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   39.066992] br-lan: port 1(eth0.1) entered blocking state
[   39.072443] br-lan: port 1(eth0.1) entered forwarding state
[   39.078351] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.2: link becomes ready
[   39.216938] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   56.456485] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
[   56.497036] jffs2_build_filesystem(): unlocking the mtd device... 
[   56.497054] done.
[   56.505205] jffs2_build_filesystem(): erasing all blocks after the end marker... 
[  123.186918] random: crng init done
[  123.197880] random: 1 urandom warning(s) missed due to ratelimiting
[  259.047585] done.
[  259.049589] jffs2: notice: (2163) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[  259.533926] overlayfs: upper fs does not support tmpfile.



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

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

Atheros/QCA Ethernet PLLレジスタメモ

Atheros/QCA SoCのEthernet PLLレジスタのアドレスのメモ。

SoC Address (GE0) Address (GE1)
AR7130 0x18050010 0x18050014
AR7141
AR7161
AR7242 0x1805002C
AR9130 0x18050014 0x18050018
AR9132
AR9341 0x1805002C
AR9342
AR9344
QCA9533
QCA9556 0x18050048 (SGMII)
QCA9558
(QCA9557)
0x18050028 (XMII) 0x18050048 (SGMII)
QCA956X
(QCA9561, QCA9563)
0x18050048 (SGMII),
0x1805002C (other)

WRC-300GHBK2-I stock -> OpenWrt (ath79)

factoryファームをsquashfsとinitramfsの両方でそれぞれ作ってみた際のログをメモ。

squashfs

mtd-splitが上手く機能せず、rootfsが作られないためpanicする

starting pid 1063, tty '': '/etc/shutdown'
cannot run '/etc/shutdown': No such file or directory
The system is going down NOW!
Sending SIGTERM to all processes
Sending SIGKILL to all processes
Requesting system reboot


U-Boot 1.1.4 (Jun  8 2015 - 17:12:13)

ap152 - Dragonfly 1.0DRAM:  
sri
ath_ddr_initial_config(283): (ddr2 init)
ath_sys_frequency: cpu 775 ddr 650 ahb 258
Tap values = (0x11, 0x11, 0x11, 0x11)
64 MB
Top of RAM usable for U-Boot at: 84000000
Reserving 206k for U-Boot at: 83fcc000
Reserving 192k for malloc() at: 83f9c000
Reserving 44 Bytes for Board Info at: 83f9bfd4
Reserving 36 Bytes for Global Data at: 83f9bfb0
Reserving 128k for boot params() at: 83f7bfb0
Stack Pointer at: 83f7bf98
Now running in RAM - U-Boot at: 83fcc000
Flash Manuf Id 0xc2, DeviceId0 0x20, DeviceId1 0x17
flash size 8MB, sector count = 128
Flash:  8 MB
*** Warning *** : PCIe WLAN Module not found !!!
In:    serial
Out:   serial
Err:   serial
Net:   ath_gmac_enet_initialize...
Fetching MAC Address from 0x83fee72c
ath_gmac_enet_initialize: reset mask:c02200 
athr_mgmt_init ::done
Dragonfly  ----> S17 PHY *
athrs17_reg_init: complete
SGMII in forced mode
athr_gmac_sgmii_setup SGMII done
: cfg1 0x80000000 cfg2 0x7114
eth0: 00:00:00:00:00:00
eth0 up
eth0
Setting 0x181162c0 to 0x40802100
EDX wan_power_down!
Hit any key to stop autoboot:  0 
## Booting image at bf070000 ...
   Image Name:   MIPS OpenWrt Linux-4.14.67
   Created:      2018-09-03  18:05:27 UTC
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    1587567 Bytes =  1.5 MB
   Load Address: 80060000
   Entry Point:  80060000
   Verifying Checksum at 0xbf07008c ...OK
   Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80060000) ...
## Giving linux memsize in bytes, 67108864

Starting kernel ...

[    0.000000] Linux version 4.14.67 (musashino205@Taiha.Net) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r0+7999-c87e672578)) #0 Mon Sep 3 18:05:27 2018
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019750 (MIPS 74Kc)
[    0.000000] MIPS: machine is ELECOM WRC-300GHBK2-I
[    0.000000] SoC: Qualcomm Atheros QCA956X ver 1 rev 0
[    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, VIPT, cache 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+0x8c/0x474 with crng_init=0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line: console=ttyS0,115200n8 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=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 58332K/65536K available (3704K kernel code, 151K rwdata, 896K rodata, 1192K init, 212K bss, 7204K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 51
[    0.000000] CPU clock: 775.000 MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 4932285024 ns
[    0.000007] sched_clock: 32 bits at 387MHz, resolution 2ns, wraps every 5541893118ns
[    0.008222] Calibrating delay loop... 385.84 BogoMIPS (lpj=1929216)
[    0.074769] pid_max: default: 32768 minimum: 301
[    0.079793] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.086772] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.097648] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.108043] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.114536] pinctrl core: initialized pinctrl subsystem
[    0.120863] NET: Registered protocol family 16
[    0.145119] clocksource: Switched to clocksource MIPS
[    0.151356] NET: Registered protocol family 2
[    0.156593] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.163950] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.170695] TCP: Hash tables configured (established 1024 bind 1024)
[    0.177523] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.183688] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.190567] NET: Registered protocol family 1
[    0.198675] Crashlog allocated RAM at address 0x3f00000
[    0.205311] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[    0.216152] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.222294] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.240103] io scheduler noop registered
[    0.244234] io scheduler deadline registered (default)
[    0.251259] pinctrl-single 1804002c.pinmux: 512 pins at pa b804002c size 64
[    0.259529] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    0.266858] console [ttyS0] disabled
[    0.270657] 18020000.uart: ttyS0 at MMIO 0x18020000 (irq = 8, base_baud = 1562500) is a 16550A
[    0.279789] console [ttyS0] enabled
[    0.279789] console [ttyS0] enabled
[    0.287342] bootconsole [early0] disabled
[    0.287342] bootconsole [early0] disabled
[    0.301194] m25p80 spi0.0: mx25l6405d (8192 Kbytes)
[    0.306324] 6 fixed-partitions partitions found on MTD device spi0.0
[    0.312884] Creating 6 MTD partitions on "spi0.0":
[    0.317852] 0x000000000000-0x000000040000 : "u-boot"
[    0.323665] 0x000000040000-0x000000050000 : "u-boot-env"
[    0.329863] 0x000000050000-0x000000070000 : "nvram"
[    0.335610] 0x000000070000-0x0000007e0000 : "firmware"
[    0.362560] 0x0000007e0000-0x0000007f0000 : "hwconfig"
[    0.368549] 0x0000007f0000-0x000000800000 : "ART"
[    0.374902] libphy: Fixed MDIO Bus: probed
[    0.715479] libphy: ag71xx_mdio: probed
[    0.722442] switch0: Atheros AR8337 rev. 2 switch registered on mdio-bus.0
[    1.716281] ag71xx 19000000.eth: connected to PHY at mdio-bus.0:00 [uid=004dd036, driver=Atheros AR8216/AR8236/AR8316]
[    1.727871] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:SGMII
[    1.736002] NET: Registered protocol family 10
[    1.744078] Segment Routing with IPv6
[    1.748001] NET: Registered protocol family 17
[    1.752631] 8021q: 802.1Q VLAN Support v1.8
[    1.759053] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[    1.766824] Please append a correct "root=" boot option; here are the available partitions:
[    1.775464] 1f00             256 mtdblock0 
[    1.775468]  (driver?)
[    1.782213] 1f01              64 mtdblock1 
[    1.782216]  (driver?)
[    1.788969] 1f02             128 mtdblock2 
[    1.788971]  (driver?)
[    1.795726] 1f03            7616 mtdblock3 
[    1.795729]  (driver?)
[    1.802479] 1f04              64 mtdblock4 
[    1.802482]  (driver?)
[    1.809236] 1f05              64 mtdblock5 
[    1.809239]  (driver?)
[    1.815990] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    1.825043] Rebooting in 1 seconds..

initramfs

OpenWrtで起動後、追加でsquashfs-sysupgradeファームを使用してのsysupgradeが必要

starting pid 1925, tty '': '/etc/shutdown'
cannot run '/etc/shutdown': No such file or directory
The system is going down NOW!
Sending SIGTERM to all processes
Sending SIGKILL to all processes
Requesting system reboot


U-Boot 1.1.4 (Jun  8 2015 - 17:12:13)

ap152 - Dragonfly 1.0DRAM:  
sri
ath_ddr_initial_config(283): (ddr2 init)
ath_sys_frequency: cpu 775 ddr 650 ahb 258
Tap values = (0x11, 0x11, 0x11, 0x11)
64 MB
Top of RAM usable for U-Boot at: 84000000
Reserving 206k for U-Boot at: 83fcc000
Reserving 192k for malloc() at: 83f9c000
Reserving 44 Bytes for Board Info at: 83f9bfd4
Reserving 36 Bytes for Global Data at: 83f9bfb0
Reserving 128k for boot params() at: 83f7bfb0
Stack Pointer at: 83f7bf98
Now running in RAM - U-Boot at: 83fcc000
Flash Manuf Id 0xc2, DeviceId0 0x20, DeviceId1 0x17
flash size 8MB, sector count = 128
Flash:  8 MB
*** Warning *** : PCIe WLAN Module not found !!!
In:    serial
Out:   serial
Err:   serial
Net:   ath_gmac_enet_initialize...
Fetching MAC Address from 0x83fee72c
ath_gmac_enet_initialize: reset mask:c02200 
athr_mgmt_init ::done
Dragonfly  ----> S17 PHY *
athrs17_reg_init: complete
SGMII in forced mode
athr_gmac_sgmii_setup SGMII done
: cfg1 0x80000000 cfg2 0x7114
eth0: 00:00:00:00:00:00
eth0 up
eth0
Setting 0x181162c0 to 0x40802100
EDX wan_power_down!
Hit any key to stop autoboot:  0 
## Booting image at bf070000 ...
   Image Name:   MIPS OpenWrt Linux-4.14.67
   Created:      2018-09-04  12:54:11 UTC
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    5176522 Bytes =  4.9 MB
   Load Address: 80060000
   Entry Point:  80060000
   Verifying Checksum at 0xbf07008c ...OK
   Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80060000) ...
## Giving linux memsize in bytes, 67108864

Starting kernel ...

[    0.000000] Linux version 4.14.67 (musashino205@Taiha.Net) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r0+8001-850e97cf88)) #0 Tue Sep 4 12:54:11 2018
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019750 (MIPS 74Kc)
[    0.000000] MIPS: machine is ELECOM WRC-300GHBK2-I
[    0.000000] SoC: Qualcomm Atheros QCA956X ver 1 rev 0
[    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, VIPT, cache 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+0x8c/0x474 with crng_init=0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line: console=ttyS0,115200n8 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=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 47580K/65536K available (3704K kernel code, 151K rwdata, 896K rodata, 11944K init, 212K bss, 17956K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 51
[    0.000000] CPU clock: 775.000 MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 4932285024 ns
[    0.000007] sched_clock: 32 bits at 387MHz, resolution 2ns, wraps every 5541893118ns
[    0.008215] Calibrating delay loop... 385.84 BogoMIPS (lpj=1929216)
[    0.074760] pid_max: default: 32768 minimum: 301
[    0.079785] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.086765] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.097644] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.108044] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.114538] pinctrl core: initialized pinctrl subsystem
[    0.120868] NET: Registered protocol family 16
[    0.145025] clocksource: Switched to clocksource MIPS
[    0.151267] NET: Registered protocol family 2
[    0.156507] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.163859] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.170603] TCP: Hash tables configured (established 1024 bind 1024)
[    0.177432] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.183598] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.190476] NET: Registered protocol family 1
[    0.402463] Crashlog allocated RAM at address 0x3f00000
[    0.409141] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[    0.419933] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.426117] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.501449] io scheduler noop registered
[    0.505624] io scheduler deadline registered (default)
[    0.512604] pinctrl-single 1804002c.pinmux: 512 pins at pa b804002c size 64
[    0.520892] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    0.528225] console [ttyS0] disabled
[    0.532022] 18020000.uart: ttyS0 at MMIO 0x18020000 (irq = 8, base_baud = 1562500) is a 16550A
[    0.541153] console [ttyS0] enabled
[    0.541153] console [ttyS0] enabled
[    0.548707] bootconsole [early0] disabled
[    0.548707] bootconsole [early0] disabled
[    0.562708] m25p80 spi0.0: mx25l6405d (8192 Kbytes)
[    0.567841] 6 fixed-partitions partitions found on MTD device spi0.0
[    0.574401] Creating 6 MTD partitions on "spi0.0":
[    0.579372] 0x000000000000-0x000000040000 : "u-boot"
[    0.585255] 0x000000040000-0x000000050000 : "u-boot-env"
[    0.591393] 0x000000050000-0x000000070000 : "nvram"
[    0.597115] 0x000000070000-0x0000007e0000 : "firmware"
[    0.624328] 0x0000007e0000-0x0000007f0000 : "hwconfig"
[    0.630334] 0x0000007f0000-0x000000800000 : "ART"
[    0.636731] libphy: Fixed MDIO Bus: probed
[    0.975387] libphy: ag71xx_mdio: probed
[    1.001365] switch0: Atheros AR8337 rev. 2 switch registered on mdio-bus.0
[    1.996188] ag71xx 19000000.eth: connected to PHY at mdio-bus.0:00 [uid=004dd036, driver=Atheros AR8216/AR8236/AR8316]
[    2.007773] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:SGMII
[    2.015928] NET: Registered protocol family 10
[    2.024062] Segment Routing with IPv6
[    2.027982] NET: Registered protocol family 17
[    2.032614] 8021q: 802.1Q VLAN Support v1.8
[    2.102790] Freeing unused kernel memory: 11944K
[    2.107587] This architecture does not have kernel memory protection.
[    2.125611] init: Console is alive
[    2.129298] init: - watchdog -
[    2.152027] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    2.162103] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    2.179988] init: - preinit -
[    2.348667] random: jshn: uninitialized urandom read (4 bytes read)
[    2.419946] random: jshn: uninitialized urandom read (4 bytes read)
[    2.613320] random: jshn: uninitialized urandom read (4 bytes read)
[    3.459856] urandom_read: 2 callbacks suppressed
[    3.459863] random: procd: uninitialized urandom read (4 bytes read)
[    3.476395] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    3.482475] IPv6: ADDRCONF(NETDEV_UP): eth0.1: link is not ready
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
[    4.496347] eth0: link up (1000Mbps/Full duplex)
[    4.501201] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[    4.508048] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.1: link becomes ready
[    5.375022] random: fast init done
[    6.620496] procd: - early -
[    6.623550] procd: - watchdog -
[    7.167825] procd: - watchdog -
[    7.171298] procd: - ubus -
[    7.180592] random: ubusd: uninitialized urandom read (4 bytes read)
[    7.224629] random: ubusd: uninitialized urandom read (4 bytes read)
[    7.231629] random: ubusd: uninitialized urandom read (4 bytes read)
[    7.239036] procd: - init -
Please press Enter to activate this console.
[    7.417997] kmodloader: loading kernel modules from /etc/modules.d/*
[    7.437914] ip6_tables: (C) 2000-2006 Netfilter Core Team
[    7.461698] Loading modules backported from Linux version wt-2017-11-01-0-gfe248fc2c180
[    7.470010] Backport generated by backports.git v4.14-rc2-1-31-g86cf0e5d
[    7.509680] ip_tables: (C) 2000-2006 Netfilter Core Team
[    7.537770] nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
[    7.607064] xt_time: kernel timezone is -0000
[    7.615168] eth0: link down
[    7.663878] PPP generic driver version 2.4.2
[    7.670472] NET: Registered protocol family 24
[    7.729532] ieee80211 phy0: Atheros AR9561 Rev:0 mem=0xb8100000, irq=2
[    7.765405] kmodloader: done loading kernel modules from /etc/modules.d/*
[   18.298916] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   18.306397] eth0: link up (1000Mbps/Full duplex)
[   18.311190] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   18.346565] br-lan: port 1(eth0.1) entered blocking state
[   18.352146] br-lan: port 1(eth0.1) entered disabled state
[   18.358031] device eth0.1 entered promiscuous mode
[   18.363014] device eth0 entered promiscuous mode
[   18.426140] br-lan: port 1(eth0.1) entered blocking state
[   18.431731] br-lan: port 1(eth0.1) entered forwarding state
[   18.437675] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   19.375261] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[  126.705063] random: crng init done
[  126.708587] random: 1 urandom warning(s) missed due to ratelimiting



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

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

concatテスト

cs-gpiosの0列挙テスト

BHR-4GRV (flash: OpenWrt ar71xx)

root@OpenWrt:/# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 01000000 00010000 "flash0"
mtd1: 01000000 00010000 "flash1"
mtd2: 02000000 00010000 "test"
root@OpenWrt:/# hexdump -n 128 -C /dev/mtd2
00000000  10 00 00 ff 00 00 00 00  10 00 00 fd 00 00 00 00  |................|
00000010  10 00 0e 0a 00 00 00 00  10 00 0e 08 00 00 00 00  |................|
00000020  10 00 0e 06 00 00 00 00  10 00 0e 04 00 00 00 00  |................|
00000030  10 00 0e 02 00 00 00 00  10 00 0e 00 00 00 00 00  |................|
00000040  10 00 0d fe 00 00 00 00  10 00 0d fc 00 00 00 00  |................|
00000050  10 00 0d fa 00 00 00 00  10 00 0d f8 00 00 00 00  |................|
00000060  10 00 0d f6 00 00 00 00  10 00 0d f4 00 00 00 00  |................|
00000070  10 00 0d f2 00 00 00 00  10 00 0d f0 00 00 00 00  |................|
00000080
root@OpenWrt:/# hexdump -n 128 -C -s 16777216 /dev/mtd2
01000000  19 85 20 03 00 00 00 0c  f0 60 dc 98 ff ff ff ff  |.. ......`......|
01000010  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*
01000080
root@OpenWrt:/# hexdump -n 128 -C -s 393216 /dev/mtd2
00060000  27 05 19 56 ce 95 53 42  5b 5f 3b ed 00 14 d9 38  |'..V..SB[_;....8|
00060010  80 06 00 00 80 06 00 00  5a 70 33 5f 05 05 02 03  |........Zp3_....|
00060020  4d 49 50 53 20 4f 70 65  6e 57 72 74 20 4c 69 6e  |MIPS OpenWrt Lin|
00060030  75 78 2d 34 2e 39 2e 31  31 31 00 00 00 00 00 00  |ux-4.9.111......|
00060040  6d 00 00 80 00 8c 76 42  00 00 00 00 00 00 00 6f  |m.....vB.......o|
00060050  fd ff ff a3 b7 7f 4c 39  d8 58 0e 99 7a 6e db 3c  |......L9.X..zn.f.Y!...B|
00060070  56 1d a3 83 45 31 ab b6  78 88 1c 74 b0 c5 60 8c  |V...E1..x..t..`.|
00060080
root@OpenWrt:/# hexdump -n 128 -C -s 1073152 /dev/mtd2
00106000  91 98 b3 4e d4 26 61 76  dc 3c 94 c0 ae 56 e5 e9  |...N.&av.<...V..|
00106010  ba 86 72 1a ec b1 19 52  8c 45 9a 47 0b a2 09 08  |..r....R.E.G....|
00106020  60 82 73 7a f1 3f 31 7d  23 7f b9 d6 6e 6b 32 db  |`.sz.?1}#...nk2.|
00106030  0e 02 a0 10 4a 13 9e 97  37 31 8a 75 f5 d2 72 14  |....J...71.u..r.|
00106040  a7 e0 7e 58 47 23 53 9f  7a e6 ec 3d 03 46 10 7f  |..~XG#S.z..=.F..|
00106050  e8 84 2c 4f 85 39 51 fb  73 55 5e 8b 43 03 2f 63  |..,O.9Q.sU^.C./c|
00106060  ed a7 dd 26 47 ee fe 2a  78 d7 3b 1b 18 fa 8d 7d  |...&G..*x.;....}|
00106070  5a ee 13 ef 26 41 79 a1  0e c7 fd 1d dc 69 0d a6  |Z...&Ay......i..|
00106080

WZR-HP-G450H (flash: OpenWrt ar71xx)

root@OpenWrt:/# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 01000000 00010000 "flash0"
mtd1: 01000000 00010000 "flash1"
mtd2: 00040000 00010000 "u-boot"
mtd3: 00010000 00010000 "u-boot-env"
mtd4: 00010000 00010000 "ART"
mtd5: 01f80000 00010000 "firmware"
mtd6: 0014d978 00010000 "kernel"
mtd7: 01e32688 00010000 "rootfs"
mtd8: 01bf0000 00010000 "rootfs_data"
mtd9: 00020000 00010000 "user_property"
root@OpenWrt:/# hexdump -n 128 -C /dev/mtd0
00000000  10 00 00 ff 00 00 00 00  10 00 00 fd 00 00 00 00  |................|
00000010  10 00 0e 0a 00 00 00 00  10 00 0e 08 00 00 00 00  |................|
00000020  10 00 0e 06 00 00 00 00  10 00 0e 04 00 00 00 00  |................|
00000030  10 00 0e 02 00 00 00 00  10 00 0e 00 00 00 00 00  |................|
00000040  10 00 0d fe 00 00 00 00  10 00 0d fc 00 00 00 00  |................|
00000050  10 00 0d fa 00 00 00 00  10 00 0d f8 00 00 00 00  |................|
00000060  10 00 0d f6 00 00 00 00  10 00 0d f4 00 00 00 00  |................|
00000070  10 00 0d f2 00 00 00 00  10 00 0d f0 00 00 00 00  |................|
00000080
root@OpenWrt:/# hexdump -n 128 -C /dev/mtd1
00000000  19 85 20 03 00 00 00 0c  f0 60 dc 98 ff ff ff ff  |.. ......`......|
00000010  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*
00000080
root@OpenWrt:/# hexdump -n 128 -C -s 393216 /dev/mtd0
00060000  27 05 19 56 ce 95 53 42  5b 5f 3b ed 00 14 d9 38  |'..V..SB[_;....8|
00060010  80 06 00 00 80 06 00 00  5a 70 33 5f 05 05 02 03  |........Zp3_....|
00060020  4d 49 50 53 20 4f 70 65  6e 57 72 74 20 4c 69 6e  |MIPS OpenWrt Lin|
00060030  75 78 2d 34 2e 39 2e 31  31 31 00 00 00 00 00 00  |ux-4.9.111......|
00060040  6d 00 00 80 00 8c 76 42  00 00 00 00 00 00 00 6f  |m.....vB.......o|
00060050  fd ff ff a3 b7 7f 4c 39  d8 58 0e 99 7a 6e db 3c  |......L9.X..zn.f.Y!...B|
00060070  56 1d a3 83 45 31 ab b6  78 88 1c 74 b0 c5 60 8c  |V...E1..x..t..`.|
00060080
root@OpenWrt:/# hexdump -n 128 -C -s 393216 /dev/mtd1
00060000  19 85 20 03 00 00 00 0c  f0 60 dc 98 ff ff ff ff  |.. ......`......|
00060010  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*
00060080

WZR-450HP (flash: stock firmware)

root@OpenWrt:/# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 01000000 00010000 "flash0"
mtd1: 01000000 00010000 "flash1"
mtd2: 00040000 00010000 "u-boot"
mtd3: 00010000 00010000 "u-boot-env"
mtd4: 00010000 00010000 "ART"
mtd5: 01f80000 00010000 "firmware"
mtd6: 00020000 00010000 "user_property"
root@OpenWrt:/# hexdump -n 128 -C /dev/mtd0
00000000  10 00 00 ff 00 00 00 00  10 00 00 fd 00 00 00 00  |................|
00000010  10 00 0e 0a 00 00 00 00  10 00 0e 08 00 00 00 00  |................|
00000020  10 00 0e 06 00 00 00 00  10 00 0e 04 00 00 00 00  |................|
00000030  10 00 0e 02 00 00 00 00  10 00 0e 00 00 00 00 00  |................|
00000040  10 00 0d fe 00 00 00 00  10 00 0d fc 00 00 00 00  |................|
00000050  10 00 0d fa 00 00 00 00  10 00 0d f8 00 00 00 00  |................|
00000060  10 00 0d f6 00 00 00 00  10 00 0d f4 00 00 00 00  |................|
00000070  10 00 0d f2 00 00 00 00  10 00 0d f0 00 00 00 00  |................|
00000080
root@OpenWrt:/# hexdump -n 128 -C /dev/mtd1
00000000  e1 85 49 e5 46 e1 5f a0  98 be 7e 69 ae da 56 e5  |..I.F._...~i..V.|
00000010  a8 6d 8a c8 9f 48 dc fa  9d 5e 31 b4 67 a5 ca e1  |.m...H...^1.g...|
00000020  ac 08 f8 4b 05 93 57 40  f6 70 8e ef cf 52 c1 76  |...K..W@.p...R.v|
00000030  09 43 1b 02 d7 31 7b 65  bd f9 8d d4 fd aa ab 21  |.C...1{e.......!|
00000040  1c f1 58 4a e5 b8 37 83  39 dc 83 b7 c1 de 78 7c  |..XJ..7.9.....x||
00000050  2f 99 71 c2 80 fa 21 fc  83 9c e1 0e 67 ab 6e af  |/.q...!.....g.n.|
00000060  4e 84 af 4a 9c da 10 0e  b0 14 0e 21 f4 7c 85 74  |N..J.......!.|.t|
00000070  9f 68 cd 47 bb 3e 8c ed  2a 14 96 67 ab 7f b6 d3  |.h.G.>..*..g....|
00000080
root@OpenWrt:/# hexdump -n 128 -C -s 393216 /dev/mtd0
00060000  27 05 19 56 53 dc 8c f3  50 86 70 79 01 4d 4f c0  |'..VS...P.py.MO.|
00060010  80 00 20 00 80 20 aa 00  4c ef 47 8e 05 05 02 03  |.. .. ..L.G.....|
00060020  4c 69 6e 75 78 20 52 6f  6f 74 66 73 20 43 6f 6d  |Linux Rootfs Com|
00060030  62 69 6e 65 64 20 49 6d  61 67 65 00 00 00 00 00  |bined Image.....|
00060040  5d 00 00 80 00 14 da 2b  00 00 00 00 00 00 00 6f  |]......+.......o|
00060050  fd ff ff a3 b7 7f 63 c5  55 7e bc 4d 37 52 96 27  |......c.U~.M7R.'|
00060060  37 85 77 0a 76 7c 9c ea  33 4a 4b eb b9 9b 7a 11  |7.w.v|..3JK...z.|
00060070  fb ce b9 ab b8 84 af 65  80 b3 ea fc c0 23 1a c6  |.......e.....#..|
00060080
root@OpenWrt:/# hexdump -n 128 -C -s 393216 /dev/mtd1
00060000  15 2e cf e6 ba ab ab 10  5d d2 aa 77 3b cf 40 1e  |........]..w;.@.|
00060010  c9 67 cb e1 ec ed 0f fb  ab e9 ac ee be 5c 73 2c  |.g...........\s,|
00060020  6e f7 7d d2 11 c4 38 e1  a8 c7 8e 00 4d 10 6d fb  |n.}...8.....M.m.|
00060030  cb f3 1d c6 5e 6f c1 9b  77 94 d8 bb ce 99 49 05  |....^o..w.....I.|
00060040  a5 3c 3a b1 9e 50 2b 3d  64 57 68 f9 46 fa 8e 4f  |.<:..P+=dWh.F..O|
00060050  25 78 cc 6e 13 b1 11 57  e9 66 2b 65 cd 53 bc 3c  |%x.n...W.f+e.S.<|
00060060  c2 e3 3c c1 fd 6b b3 16  66 3d dd a1 86 67 4e c5  |..<..k..f=...gN.|
00060070  77 57 55 51 92 d3 7f e5  77 90 53 3b 47 b7 fd 21  |wWUQ....w.S;G..!|
00060080

WZR-HP-AG300H (flash: LEDE-Project ar71xx)

root@OpenWrt:/# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 01000000 00010000 "flash0"
mtd1: 01000000 00010000 "flash1"
mtd2: 00040000 00010000 "u-boot"
mtd3: 00010000 00010000 "u-boot-env"
mtd4: 00010000 00010000 "art"
mtd5: 01f90000 00010000 "firmware"
mtd6: 00132c9d 00010000 "kernel"
mtd7: 01e5d363 00010000 "rootfs"
mtd8: 01c40000 00010000 "rootfs_data"
mtd9: 00010000 00010000 "user_property"
root@OpenWrt:/# hexdump -n 128 -C /dev/mtd0
00000000  10 00 00 ff 00 00 00 00  10 00 00 fd 00 00 00 00  |................|
00000010  10 00 0d bb 00 00 00 00  10 00 0d b9 00 00 00 00  |................|
00000020  10 00 0d b7 00 00 00 00  10 00 0d b5 00 00 00 00  |................|
00000030  10 00 0d b3 00 00 00 00  10 00 0d b1 00 00 00 00  |................|
00000040  10 00 0d af 00 00 00 00  10 00 0d ad 00 00 00 00  |................|
00000050  10 00 0d ab 00 00 00 00  10 00 0d a9 00 00 00 00  |................|
00000060  10 00 0d a7 00 00 00 00  10 00 0d a5 00 00 00 00  |................|
00000070  10 00 0d a3 00 00 00 00  10 00 0d a1 00 00 00 00  |................|
00000080
root@OpenWrt:/# hexdump -n 128 -C /dev/mtd1
00000000  19 85 20 03 00 00 00 0c  f0 60 dc 98 ff ff ff ff  |.. ......`......|
00000010  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*
00000080
root@OpenWrt:/# hexdump -n 128 -C -s 393216 /dev/mtd0
00060000  27 05 19 56 71 ea f2 22  58 f4 ea 39 00 13 2c 5d  |'..Vq.."X..9..,]|
00060010  80 06 00 00 80 06 00 00  d7 f7 fa 62 05 05 02 03  |...........b....|
00060020  4d 49 50 53 20 4f 70 65  6e 57 72 74 20 4c 69 6e  |MIPS OpenWrt Lin|
00060030  75 78 2d 34 2e 34 2e 36  31 00 00 00 00 00 00 00  |ux-4.4.61.......|
00060040  6d 00 00 80 00 54 50 3d  00 00 00 00 00 00 00 6f  |m....TP=.......o|
00060050  fd ff ff a3 b7 7f 4c 34  f7 ff a2 21 7a 6e db 3c  |......L4...!zn.<|
00060060  ec 7d 4e a1 71 78 8f 3e  66 2e 59 21 bd 1c e1 42  |.}N.qx.>f.Y!...B|
00060070  56 1d a3 82 70 38 49 ad  39 9f 6d b4 15 7c 07 97  |V...p8I.9.m..|..|
00060080
root@OpenWrt:/# hexdump -n 128 -C -s 393216 /dev/mtd1
00060000  19 85 20 03 00 00 00 0c  f0 60 dc 98 ff ff ff ff  |.. ......`......|
00060010  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*
00060080

WZR-HP-G301NH stock -> OpenWrt (ath79)

やっとここまで来たのでメモ。
(ar71xxのイメージ生成コードを現在のコードに読み替えてfactoryファーム作ったけれども、ar71xxのfactoryファームでOpenWrt化した事例が少ない(ほとんどtftpファーム)のは何故だろうとか)

cgi.c(3381) UploadCgi :x:btpd STOP-SUCCESS (0 sec)
MidLayer.c(544) ML_RemoveFileInDirectory :DEBUG:ent->d_name = gatedesc.xml
MidLayer.c(544) ML_RemoveFileInDirectory :DEBUG:ent->d_name = ligd.gif
MidLayer.c(544) ML_RemoveFileInDirectory :DEBUG:ent->d_name = L3FwdSCPD.xml
MidLayer.c(544) ML_RemoveFileInDirectory :DEBUG:ent->d_name = gateicfgSCPD.xml
MidLayer.c(544) ML_RemoveFileInDirectory :DEBUG:ent->d_name = gateconnSCPD.xml
MidLayer.c(544) ML_RemoveFileInDirectory :DEBUG:ent->d_name = gateinfoSCPD.xml
MidLayer.c(544) ML_RemoveFileInDirectory :DEBUG:ent->d_name = messages
ip_nat_pptp version 3.0 unloaded
ip_conntrack_pptp version 3.1 unloaded
cgi.c(3596) UploadCgi :x:MEMORY CHECK...
MidLayer.c(1914) ML_CheckMemory :X:MemFree = 37812
MidLayer.c(1918) ML_CheckMemory :X:Buffers = 3216
MidLayer.c(1922) ML_CheckMemory :X:Cached = 11444
MidLayer.c(1926) ML_CheckMemory :X:Active = 9192
MidLayer.c(1930) ML_CheckMemory :X:Inactive = 6460
cgi.c(2776) Check_TagVersion :INFO :pTarget = WZR-HP-G300NH : a_pProduct = WZR-HP-G300NH
cgi.c(2681) check_specification :DEBUG:U-bootSpecification  = M_00000001(JP)
cgi.c(2684) check_specification :DEBUG:NewFirmSpecification = M_ffffffff
cgi.c(4165) UploadCgi :INFO:(iUbootHwRev):3 (iHwVersion):3 ...tag[hwv]...
watchdogd-ath.c(42) watchdog_stop :WD:Watchdog Stopped
watchdogd.c(11) watchdogd_term :WD:Terminate Watchdog Daemon
VAP-IF UP COUNT = 0
debug : Enter [BRCTL_ADD_IF] 
cgi.c(4203) UploadCgi :ERR:wlconfig_down() call 
rcUtil.c(2917) Wireless_Rmmod :ERR:####### Wireless_Rmmod #########
VAP-IF UP COUNT = 0
VAP-IF UP COUNT = 0
VAP-IF UP COUNT = 0
VAP-IF UP COUNT = 0
rcUtil.c(2949) Wireless_Rmmod :####:rmmod ath_ahb : SUCCESS
ag7100_ring_free Freeing at 0x83506400
ag7100_ring_free Freeing at 0x836f6000
Badness in local_bh_enable at kernel/softirq.c:140
Call Trace: []  []  []  []  []  []  []  []  []  []  []  []  []  []  []  []  []  []  []  []  []  []  []  []  []  []  []  []  [] 
Badness in local_bh_enable at kernel/softirq.c:140
Call Trace: []  []  []  []  []  []  []  []  []  []  []  []  []  []  []  []  []  []  []  []  []  []  []  []  []  []  []  []  [] 
Badness in local_bh_enable at kernel/softirq.c:140
Call Trace: []  []  []  []  []  []  []  []  []  []  []  []  []  []  []  []  []  []  []  []  []  []  []  []  []  []  []  []  []  [] 
Badness in local_bh_enable at kernel/softirq.c:140
Call Trace: []  []  []  []  []  []  []  []  []  []  []  []  []  []  []  []  []  []  []  []  []  []  []  []  []  []  []  []  []  [] 
ag7100_ring_free Freeing at 0x83506000
ag7100_ring_free Freeing at 0x83261000
BUFFALO: stop polling thread
ag7100_cleanup Freeing at 0x834c4000
ag7100_cleanup Freeing at 0x834e0000
AG7100: cleanup done
cgi.c(4251) UploadCgi :X:begin update firmware size 7208964
Restarting system.
.


BUFFALO U-BOOT Ver 1.07
AP83--539 (ar9100) U-boot 0.0.12
64 MB
Memory Test (address line)
Memory Test start(0x00000000) end(0x04000000) size(67108864)
Data line test start:0x00000000 pattern 0x00000001 0x00000003 0x00000007 0x0000000F 0x00000005 0x00000015 0x00000055 0xAAAAAAAA 
Address line test start:0x00000000 len:0x4000000 pattern 0xAAAAAAAA 0x55555555  
Fill test patnum:5 
fill Pattern 5555AAAA  Writing...   Reading...
fill Pattern AAAA5555  Writing...   Reading...
fill Pattern 0000FFFF  Writing...   Reading...
fill Pattern FFFF0000  Writing...   Reading...
fill Pattern AAAAAAAA  Writing...   Reading...
Top of RAM usable for U-Boot at: 84000000
Reserving 275k for U-Boot at: 83fb8000
Reserving 256k for malloc() at: 83f78000
Reserving 44 Bytes for Board Info at: 83f77fd4
Reserving 36 Bytes for Global Data at: 83f77fb0
Reserving 128k for boot params() at: 83f57fb0
Stack Pointer at: 83f57f98
Now running in RAM - U-Boot at: 83fb8000
Dev ID2:2222
Dev ID3:2201
Name: AMD-SPANSION Flash id: 0x1227E, Size: 33554432 bytes.
Flash: 32 MB
In:    serial
Out:   serial
Err:   serial
Memory Test
uboot use  83F57FB0 - 84000000
Memory Test start(80000000) end(83F00000) size(03F00000)
Pattern 00000000  Writing...  Reading...
Memory Test OK
### buf_ver=[1.07] U-Boot Ver.=[1.07]
### build_date(env)=[Dec 21 2009 - 10:37:30] build_date(bin)=[Dec 21 2009 - 10:37:30]
ag7100_enet_initialize...
: cfg1 0xf cfg2 0x7114
RTL8366 series driver, reading model-id...
  ID:0x5937, REV:0x0
rtl8366rb_phy_setup  ethUnit=0
Realtek 8366RB switch ID:0x5937 REV:0x3
Realtek Greeen Ethernet Setup
eth0: 02:aa:bb:cc:dd:1a
eth0 up
: cfg1 0x7 cfg2 0x7114
RTL8366 series driver, reading model-id...
eth1: 02:aa:bb:cc:dd:1a
eth1 up
eth0  02:AA:BB:CC:DD:1A
, eth1  02:AA:BB:CC:DD:1A

Trying eth0
eth0 is duplex
ag7100_check_link: _100BASET
dup 1 speed 100
CFG_PLL_FREQ=5
CFG_HZ=bebc200
cpu pll=1050
eth pll=1032
eth0 clk pll=13000a44
eth0 mii=12
eth0 cfg1=f
eth0 cfg2=7115
eth0 fcfg_0=1f1f00
eth0 fcfg_1=7ff0000
eth0 fcfg_2=fff
eth0 fcfg_3=780008
eth0 fcfg_4=3ffff
eth0 fcfg_5=3ffff

tftp server(receive) go, waiting:4[sec]
Trying eth1
eth1 link down
FAIL
Trying eth0
eth0 is duplex
ag7100_check_link: _100BASET
Load address: 0x81f00000
checksum bad
checksum bad
checksum bad
checksum bad
checksum bad
checksum bad
checksum bad
checksum bad
checksum bad
checksum bad
checksum bad
checksum bad
checksum bad

TftpServer Timeout;
no file was loaded.
## Booting image at be060000 ...
   Image Name:   MIPS OpenWrt Linux-4.14.66
   Created:      2018-08-25   4:23:41 UTC
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    1589409 Bytes =  1.5 MB
   Load Address: 80060000
   Entry Point:  80060000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80060000) ...
## Giving linux memsize in bytes, 67108864

Starting kernel ...

[    0.000000] Linux version 4.14.66 (musashino205@Taiha.Net) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r0+7931-7b0aaec124)) #0 Fri Aug 24 15:28:48 2018
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019374 (MIPS 24Kc)
[    0.000000] MIPS: machine is Buffalo WZR-HP-G301NH
[    0.000000] SoC: Atheros AR9132 rev 2
[    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, VIPT, cache 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+0x8c/0x474 with crng_init=0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line: console=ttyS0,115200 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=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 58340K/65536K available (3708K kernel code, 148K rwdata, 896K rodata, 1192K init, 212K bss, 7196K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 51
[    0.000000] CPU clock: 400.000 MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[    0.000013] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    0.007897] Calibrating delay loop... 265.42 BogoMIPS (lpj=1327104)
[    0.094148] pid_max: default: 32768 minimum: 301
[    0.099055] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.105654] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.117809] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.127672] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.133846] pinctrl core: initialized pinctrl subsystem
[    0.140249] NET: Registered protocol family 16
[    0.172933] clocksource: Switched to clocksource MIPS
[    0.179370] NET: Registered protocol family 2
[    0.184771] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.191743] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.198157] TCP: Hash tables configured (established 1024 bind 1024)
[    0.204706] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.210549] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.217168] NET: Registered protocol family 1
[    0.226674] Crashlog allocated RAM at address 0x3f00000
[    0.233474] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[    0.246817] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.252632] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.273043] io scheduler noop registered
[    0.276963] io scheduler deadline registered (default)
[    0.282491] ar7200-usb-phy usb-phy: phy reset is missing
[    0.288949] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    0.296238] console [ttyS0] disabled
[    0.299857] 18020000.uart: ttyS0 at MMIO 0x18020000 (irq = 8, base_baud = 12500000) is a 8250
[    0.308430] console [ttyS0] enabled
[    0.308430] console [ttyS0] enabled
[    0.315455] bootconsole [early0] disabled
[    0.315455] bootconsole [early0] disabled
[    0.325150] 1e000000.cfi: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x000001 Chip ID 0x002201
[    0.335285] Amd/Fujitsu Extended Query Table at 0x0040
[    0.340461]   Amd/Fujitsu Extended Query version 1.3.
[    0.345565] number of CFI chips: 1
[    0.353772] 5 fixed-partitions partitions found on MTD device 1e000000.cfi
[    0.360698] Creating 5 MTD partitions on "1e000000.cfi":
[    0.366098] 0x000000000000-0x000000040000 : "u-boot"
[    0.372163] 0x000000040000-0x000000060000 : "u-boot-env"
[    0.378582] 0x000000060000-0x000001fc0000 : "firmware"
[    0.392540] 2 uimage-fw partitions found on MTD device firmware
[    0.398572] 0x000000060000-0x000000200000 : "kernel"
[    0.404604] 0x000000200000-0x000001fc0000 : "rootfs"
[    0.410503] mtd: device 4 (rootfs) set to be root filesystem
[    0.416287] 1 squashfs-split partitions found on MTD device rootfs
[    0.422508] 0x000000740000-0x000001fc0000 : "rootfs_data"
[    0.428946] 0x000001fc0000-0x000001fe0000 : "user_property"
[    0.435612] 0x000001fe0000-0x000002000000 : "art"
[    0.441964] Realtek RTL8366RB ethernet switch driver version 0.2.4
[    0.448319] rtl8366rb rtl8366: cannot find mdio node phandle
[    0.454051] rtl8366rb rtl8366: using GPIO pins 19 (SDA) and 20 (SCK)
[    0.460601] rtl8366rb rtl8366: RTL5937 ver. 3 chip found
[    0.553890] libphy: rtl8366: probed
[    0.559405] libphy: Fixed MDIO Bus: probed
[    0.904778] ag71xx 19000000.eth: connected to PHY at fixed-0:00 [uid=00000000, driver=Generic PHY]
[    0.914674] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:RGMII
[    1.255273] ag71xx 1a000000.eth: connected to PHY at rtl8366:04 [uid=001cc961, driver=Generic PHY]
[    1.265168] eth1: Atheros AG71xx at 0xba000000, irq 5, mode:RGMII
[    1.274277] NET: Registered protocol family 10
[    1.284564] Segment Routing with IPv6
[    1.288389] NET: Registered protocol family 17
[    1.292908] 8021q: 802.1Q VLAN Support v1.8
[    1.304347] VFS: Mounted root (squashfs filesystem) readonly on device 31:4.
[    1.318794] Freeing unused kernel memory: 1192K
[    1.323379] This architecture does not have kernel memory protection.
[    2.060078] init: Console is alive
[    2.063850] init: - watchdog -
[    2.475987] random: fast init done
[    3.715189] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    3.912355] usbcore: registered new interface driver usbfs
[    3.918048] usbcore: registered new interface driver hub
[    3.923545] usbcore: registered new device driver usb
[    3.967370] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    3.984873] SCSI subsystem initialized
[    3.994880] ehci-platform: EHCI generic platform driver
[    4.000444] ehci-platform 1b000100.usb: EHCI Host Controller
[    4.006232] ehci-platform 1b000100.usb: new USB bus registered, assigned bus number 1
[    4.014254] ehci-platform 1b000100.usb: irq 3, io mem 0x1b000100
[    4.042954] ehci-platform 1b000100.usb: USB 2.0 started, EHCI 1.00
[    4.050274] hub 1-0:1.0: USB hub found
[    4.054574] hub 1-0:1.0: 1 port detected
[    4.064262] usbcore: registered new interface driver usb-storage
[    4.071406] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    4.081075] init: - preinit -
[    5.509863] random: jshn: uninitialized urandom read (4 bytes read)
[    5.903788] random: jshn: uninitialized urandom read (4 bytes read)
[    6.141590] random: jshn: uninitialized urandom read (4 bytes read)
[    7.021486] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    7.027523] IPv6: ADDRCONF(NETDEV_UP): eth0.1: link is not ready
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
[    7.125870] urandom_read: 2 callbacks suppressed
[    7.125880] random: procd: uninitialized urandom read (4 bytes read)
[    8.093286] eth0: link up (1000Mbps/Full duplex)
[    8.097958] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[    8.104876] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.1: link becomes ready
[   10.319608] mount_root: loading kmods from internal overlay
[   10.371893] kmodloader: loading kernel modules from //etc/modules-boot.d/*
[   10.385991] kmodloader: done loading kernel modules from //etc/modules-boot.d/*
[   11.083067] block: attempting to load /etc/config/fstab
[   11.091161] block: unable to load configuration (fstab: Entry not found)
[   11.098089] block: no usable configuration
[   11.103278] mount_root: jffs2 not ready yet, using temporary tmpfs overlay
[   11.171017] urandom-seed: Seed file not found (/etc/urandom.seed)
[   11.314181] procd: - early -
[   11.317204] procd: - watchdog -
[   11.986992] procd: - watchdog -
[   11.990483] procd: - ubus -
[   12.050897] random: ubusd: uninitialized urandom read (4 bytes read)
[   12.061550] random: ubusd: uninitialized urandom read (4 bytes read)
[   12.068614] random: ubusd: uninitialized urandom read (4 bytes read)
[   12.076273] procd: - init -
Please press Enter to activate this console.
[   12.333023] eth0: link down
[   12.798150] kmodloader: loading kernel modules from /etc/modules.d/*
[   12.844798] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   12.879938] Loading modules backported from Linux version wt-2017-11-01-0-gfe248fc2c180
[   12.888062] Backport generated by backports.git v4.14-rc2-1-31-g86cf0e5d
[   12.925075] ip_tables: (C) 2000-2006 Netfilter Core Team
[   12.969275] nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
[   13.081787] usbcore: registered new interface driver ums-alauda
[   13.090463] usbcore: registered new interface driver ums-cypress
[   13.099241] usbcore: registered new interface driver ums-datafab
[   13.107815] usbcore: registered new interface driver ums-freecom
[   13.116597] usbcore: registered new interface driver ums-isd200
[   13.125336] usbcore: registered new interface driver ums-jumpshot
[   13.134043] usbcore: registered new interface driver ums-karma
[   13.143189] usbcore: registered new interface driver ums-sddr09
[   13.151935] usbcore: registered new interface driver ums-sddr55
[   13.160927] usbcore: registered new interface driver ums-usbat
[   13.202164] xt_time: kernel timezone is -0000
[   13.290271] PPP generic driver version 2.4.2
[   13.297911] NET: Registered protocol family 24
[   13.460667] ieee80211 phy0: Atheros AR9100 MAC/BB Rev:7 AR2133 RF Rev:a2 mem=0xb80c0000, irq=2
[   13.591307] kmodloader: done loading kernel modules from /etc/modules.d/*
[   32.171855] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
[   32.226501] jffs2_build_filesystem(): unlocking the mtd device... 
[   32.226515] done.
[   32.234735] jffs2_build_filesystem(): erasing all blocks after the end marker... 
[   33.282544] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   33.296405] eth0: link up (1000Mbps/Full duplex)
[   33.301081] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   33.379321] br-lan: port 1(eth0.1) entered blocking state
[   33.384834] br-lan: port 1(eth0.1) entered disabled state
[   33.390685] device eth0.1 entered promiscuous mode
[   33.395577] device eth0 entered promiscuous mode
[   33.478773] br-lan: port 1(eth0.1) entered blocking state
[   33.484280] br-lan: port 1(eth0.1) entered forwarding state
[   33.490131] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   33.649443] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[   34.333154] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[  127.812267] random: crng init done
[  127.815710] random: 1 urandom warning(s) missed due to ratelimiting



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

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

BHR-4GRV2 stock -> OpenWrt (ath79)

やっとこさここまで到達したので、とりあえずメモ。
現在ath79のBHR-4GRV2にはfactoryファームはありません。そのため、このインストール方法も使用できません。

normalFILE: /tmp/uhttp-upgrade.img is download successfully!
Killed
Monitor.sh starting.......
Start of fw_blink_cnt.sh -------------------------------------------------
End of fw_blink_cnt.sh -------------------------------------------------
handle_request:2838 post request found and fw update
 file is imgupg.cgi
handle_request:2839 path is (null)
handle_request:2851 accept post file is imgupg.cgi
writing uImage            [###                      ]  12%handle_request:2838 post request found and fw update
 file is apply.cgi
handle_request:2839 path is /html/fwupdate_wait_reboot.html
handle_request:2851 accept post file is apply.cgi
post_apply enter len+1 = 53, buffer size=32767
unset apply_running ###########################################
###########################################
writing rootfs            [######################## ]  98%[ 3412.500000] Removing MTD device #3 (rootfs_data) with use count 1
[ 3412.520000] Restarting system.


BUFFALO U-Boot Ver 1.06 (Apr  3 2014 - 16:26:57)

ap135 - CPU :Scorpion 1.0 , CPU:720MHZ, DRAM:300MHZ, ABH:200MHZ
DRAM:  16bit, ddr2 init, 64 MB

Top of RAM usable for U-Boot at: 84000000
Reserving 274k for U-Boot at: 83fb8000
Reserving 192k for malloc() at: 83f88000
Reserving 44 Bytes for Board Info at: 83f87fd4
Reserving 36 Bytes for Global Data at: 83f87fb0
Reserving 128k for boot params() at: 83f67fb0
Stack Pointer at: 83f67f98
Now running in RAM - U-Boot at: 83fb8000
Flash Manuf Id 0xc2, DeviceId0 0x20, DeviceId1 0x18
flash size 16MB, sector count = 256
Flash: 16 MB
*** Warning - bad CRC, using default environment

*** Warning *** : PCIe WLAN Module not found !!!
*** Warning *** : PCIe WLAN Module not found !!!
In:    serial
Out:   serial
Err:   serial
Net:   ath_gmac_enet_initialize...
athrs_sgmii_res_cal: cal value = 0x6
Fetching MAC Address from 0x83fdaca0
Fetching MAC Address from 0x83fdaca0
ath_gmac_enet_initialize: reset mask:c02200 
Scorpion  ----> S17 PHY *
athrs17_reg_init: complete
: cfg1 0x80000000 cfg2 0x7114
eth0: dc:fb:02:6e:68:d0
eth0 up
athrs17_reg_init_wan done
SGMII in forced mode
athr_gmac_sgmii_setup SGMII done
: cfg1 0x800c0000 cfg2 0x7214
eth1: dc:fb:02:6e:68:d1
eth1 up
eth0, eth1
Memory Test Start
Test start(0x80000000) end(83f00000) size(3f00000) 
Pattern: 55555555
Pattern: AAAAAAAA
Pattern: 00000000
Memory Test Pass 

Setting 0x18116290 to 0x4489a14f
Hit any key to stop autoboot:  0 
## Booting image at 9fe80000 ...
   Image Name:   MIPS OpenWrt Linux-4.14.60
   Created:      2018-08-06  15:29:45 UTC
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    1353942 Bytes =  1.3 MB
   Load Address: 80060000
   Entry Point:  80060000
   Verifying Checksum at 0x9fe80040 ...OK
   Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80060000) ...
## Giving linux memsize in bytes, 67108864

Starting kernel ...

[    0.000000] Linux version 4.14.60 (musashino205@Taiha.Net) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r0+7766-010a8f4911)) #0 Mon Aug 6 15:29:45 2018
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019750 (MIPS 74Kc)
[    0.000000] MIPS: machine is Buffalo BHR-4GRV2
[    0.000000] SoC: Qualcomm Atheros QCA9558 ver 1 rev 0
[    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, VIPT, cache 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 0x8044372c with crng_init=0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line: console=ttyS0,115200n8 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=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 59108K/65536K available (3380K kernel code, 132K rwdata, 460K rodata, 1204K init, 203K bss, 6428K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 51
[    0.000000] CPU clock: 720.000 MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 5309056796 ns
[    0.000008] sched_clock: 32 bits at 360MHz, resolution 2ns, wraps every 5965232126ns
[    0.008295] Calibrating delay loop... 358.80 BogoMIPS (lpj=1794048)
[    0.074983] pid_max: default: 32768 minimum: 301
[    0.080080] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.087120] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.098281] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.108781] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.115336] pinctrl core: initialized pinctrl subsystem
[    0.121745] NET: Registered protocol family 16
[    0.127142] Can't analyze schedule() prologue at 803a8d74
[    0.149640] clocksource: Switched to clocksource MIPS
[    0.155977] NET: Registered protocol family 2
[    0.161330] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.168755] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.175564] TCP: Hash tables configured (established 1024 bind 1024)
[    0.182458] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.188685] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.195644] NET: Registered protocol family 1
[    0.203915] Crashlog allocated RAM at address 0x3f00000
[    0.210619] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[    0.221743] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.227947] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.246230] io scheduler noop registered
[    0.250441] io scheduler deadline registered (default)
[    0.257780] pinctrl-single 1804002c.pinmux: 512 pins at pa b804002c size 64
[    0.266196] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    0.273638] console [ttyS0] disabled
[    0.277473] 18020000.uart: ttyS0 at MMIO 0x18020000 (irq = 8, base_baud = 2500000) is a 16550A
[    0.286690] console [ttyS0] enabled
[    0.286690] console [ttyS0] enabled
[    0.294110] bootconsole [early0] disabled
[    0.294110] bootconsole [early0] disabled
[    0.308076] m25p80 spi0.0: mx25l12805d (16384 Kbytes)
[    0.313291] 6 fixed-partitions partitions found on MTD device spi0.0
[    0.319747] Creating 6 MTD partitions on "spi0.0":
[    0.324610] 0x000000000000-0x000000040000 : "u-boot"
[    0.330379] 0x000000040000-0x000000050000 : "u-boot-env"
[    0.336444] 0x000000050000-0x000000e80000 : "rootfs"
[    0.342196] mtd: device 2 (rootfs) set to be root filesystem
[    0.347996] 1 squashfs-split partitions found on MTD device rootfs
[    0.354308] 0x000000390000-0x000000e80000 : "rootfs_data"
[    0.360443] 0x000000e80000-0x000000ff0000 : "kernel"
[    0.366144] 0x000000ff0000-0x000001000000 : "art"
[    0.371656] 0x000000050000-0x000000ff0000 : "firmware"
[    0.378001] libphy: Fixed MDIO Bus: probed
[    0.720008] libphy: ag71xx_mdio: probed
[    0.726503] switch0: Atheros AR8337 rev. 2 switch registered on mdio-bus.0
[    1.720807] ag71xx 19000000.eth: connected to PHY at mdio-bus.0:00 [uid=004dd036, driver=Atheros AR8216/AR8236/AR8316]
[    1.732250] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:RGMII
[    2.071234] ag71xx 1a000000.eth: connected to PHY at fixed-0:00 [uid=00000000, driver=Generic PHY]
[    2.080938] eth1: Atheros AG71xx at 0xba000000, irq 5, mode:SGMII
[    2.089090] NET: Registered protocol family 10
[    2.097921] Segment Routing with IPv6
[    2.101789] NET: Registered protocol family 17
[    2.106337] 8021q: 802.1Q VLAN Support v1.8
[    2.118915] VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
[    2.132577] Freeing unused kernel memory: 1204K
[    2.137171] This architecture does not have kernel memory protection.
[    2.539651] random: fast init done
[    4.476792] init: Console is alive
[    4.480494] init: - watchdog -
[    5.489037] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    5.761730] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    5.779466] init: - preinit -
[    7.439391] random: jshn: uninitialized urandom read (4 bytes read)
[    7.773934] random: jshn: uninitialized urandom read (4 bytes read)
[    7.950682] random: jshn: uninitialized urandom read (4 bytes read)
[    9.558602] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[    9.564644] IPv6: ADDRCONF(NETDEV_UP): eth1.1: link is not ready
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[    9.628011] urandom_read: 2 callbacks suppressed
 level
[    9.628017] random: procd: uninitialized urandom read (4 bytes read)
[   10.580772] eth1: link up (1000Mbps/Full duplex)
[   10.585483] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[   10.592174] IPv6: ADDRCONF(NETDEV_CHANGE): eth1.1: link becomes ready
[   13.198344] mount_root: jffs2 not ready yet, using temporary tmpfs overlay
[   13.227734] urandom-seed: Seed file not found (/etc/urandom.seed)
[   13.278175] procd: - early -
[   13.281976] procd: - watchdog -
[   13.699653] eth1: link down
[   14.084617] procd: - watchdog -
[   14.088050] procd: - ubus -
[   14.605407] random: ubusd: uninitialized urandom read (4 bytes read)
[   14.871764] random: ubusd: uninitialized urandom read (4 bytes read)
[   14.878621] random: ubusd: uninitialized urandom read (4 bytes read)
[   14.885951] procd: - init -
[   15.288694] kmodloader: loading kernel modules from /etc/modules.d/*
Please press Enter to activate this console.
[   15.835292] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   15.856593] Loading modules backported from Linux version wt-2017-11-01-0-gfe248fc2c180
[   15.864765] Backport generated by backports.git v4.14-rc2-1-31-g86cf0e5d
[   15.887829] ip_tables: (C) 2000-2006 Netfilter Core Team
[   15.927851] nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
[   16.013051] xt_time: kernel timezone is -0000
[   16.062994] PPP generic driver version 2.4.2
[   16.069498] NET: Registered protocol family 24
[   16.112465] kmodloader: done loading kernel modules from /etc/modules.d/*
[   33.465744] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
[   33.503387] jffs2_build_filesystem(): unlocking the mtd device... 
[   33.503396] done.
[   33.511660] jffs2_build_filesystem(): erasing all blocks after the end marker... 
[   34.841985] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[   34.856682] eth1: link up (1000Mbps/Full duplex)
[   34.881224] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[   34.932779] br-lan: port 1(eth1.1) entered blocking state
[   34.938267] br-lan: port 1(eth1.1) entered disabled state
[   34.944072] device eth1.1 entered promiscuous mode
[   34.948938] device eth1 entered promiscuous mode
[   35.058508] br-lan: port 1(eth1.1) entered blocking state
[   35.064038] br-lan: port 1(eth1.1) entered forwarding state
[   35.069854] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   35.157940] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   35.207232] IPv6: ADDRCONF(NETDEV_UP): eth0.2: link is not ready
[   35.859819] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   36.181150] eth0: link up (1000Mbps/Full duplex)
[   36.185905] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   36.244365] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.2: link becomes ready
[   84.283709] done.
[   84.285694] jffs2: notice: (1024) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[   84.477909] overlayfs: upper fs does not support tmpfile.
[  120.039890] random: crng init done
[  120.043353] random: 1 urandom warning(s) missed due to ratelimiting



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

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