タグ: QCA9563

GL-AR750S

偶然某氏より頂いたもの。ath79へサポートを追加するため、調べていく。GL・iNetのリポジトリではar71xxベースのコードが既に存在するため、難易度はそんなに高くは無いかな?というところ。
→ 大嘘。現状OpenWrtにはSPI-NANDドライバが無く、rootfsがubiで格納されているspi-nandチップを検出できない。ドライバをSPI-NANDサポート後のKernelからbackportする必要がある。
頂いてばかりでほんとに申し訳ないところ。何かそのうち返せるものがあれば。。

Switch

zone WAN LAN
port
(GL-AR750S)
WAN LAN2 LAN1
port
(AR8337)
port1 port2 port3

MAC

  • LAN: E4:95:6E:xx:xx:2E (art, 0x0 (hex))
  • WAN: E4:95:6E:xx:xx:2E (同上)
  • 2.4G: E4:95:6E:xx:xx:2E (art, 0x1002 (hex))
  • 5G: E4:95:6E:xx:xx:2F (LAN + 1)

Kernel

stock firmwareの裏側はほぼ素のOpenWrtのため、こちらから調べた。

  • uname -a
    root@GL-AR750S:~# uname -a
    Linux GL-AR750S 4.9.109 #0 Fri Jun 22 10:22:57 2018 mips GNU/Linux
    

  • cat /proc/version
    root@GL-AR750S:~# cat /proc/version
    Linux version 4.9.109 (***@***-*****-***) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r6910-323285a) ) #0 Fri Jun 22 10:22:57 2018
    

  • cat /proc/cpuinfo
    root@GL-AR750S:~# cat /proc/cpuinfo
    system type             : Qualcomm Atheros QCA956X ver 1 rev 0
    machine                 : GL-AR750S
    processor               : 0
    cpu model               : MIPS 74Kc V5.0
    BogoMIPS                : 385.84
    wait instruction        : yes
    microsecond timers      : yes
    tlb_entries             : 32
    extra interrupt vector  : yes
    hardware watchpoint     : yes, count: 4, address/irw mask: [0x0ffc, 0x0ffc, 0x0ffb, 0x0ffb]
    isa                     : mips1 mips2 mips32r1 mips32r2
    ASEs implemented        : mips16 dsp dsp2
    shadow register sets    : 1
    kscratch registers      : 0
    package                 : 0
    core                    : 0
    VCED exceptions         : not available
    VCEI exceptions         : not available
    

  • cat /proc/meminfo
    root@GL-AR750S:~# cat /proc/meminfo
    MemTotal:         124608 kB
    MemFree:           73624 kB
    MemAvailable:      64112 kB
    Buffers:            7864 kB
    Cached:            19772 kB
    SwapCached:            0 kB
    Active:            19932 kB
    Inactive:          11192 kB
    Active(anon):       4152 kB
    Inactive(anon):      156 kB
    Active(file):      15780 kB
    Inactive(file):    11036 kB
    Unevictable:           0 kB
    Mlocked:               0 kB
    SwapTotal:             0 kB
    SwapFree:              0 kB
    Dirty:                 0 kB
    Writeback:             0 kB
    AnonPages:          3500 kB
    Mapped:             4228 kB
    Shmem:               820 kB
    Slab:               9372 kB
    SReclaimable:       3312 kB
    SUnreclaim:         6060 kB
    KernelStack:         704 kB
    PageTables:          504 kB
    NFS_Unstable:          0 kB
    Bounce:                0 kB
    WritebackTmp:          0 kB
    CommitLimit:       62304 kB
    Committed_AS:      10872 kB
    VmallocTotal:    1048372 kB
    VmallocUsed:           0 kB
    VmallocChunk:          0 kB
    

  • cat /proc/mtd
    dev:    size   erasesize  name
    mtd0: 00040000 00010000 "u-boot"
    mtd1: 00010000 00010000 "u-boot-env"
    mtd2: 00010000 00010000 "art"
    mtd3: 00200000 00010000 "kernel"
    mtd4: 00cbf000 00010000 "reserved"
    mtd5: 08000000 00020000 "ubi"
    

  • dmesg
    無線は起動後に急いで切った。

    root@GL-AR750S:~# dmesg
    [    0.000000] Linux version 4.9.109 (luo@luo-B250M-D3H) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r6910-323285a) ) #0 Fri Jun 22 10:22:57 2018
    [    0.000000] bootconsole [early0] enabled
    [    0.000000] CPU0 revision is: 00019750 (MIPS 74Kc)
    [    0.000000] SoC: Qualcomm Atheros QCA956X ver 1 rev 0
    [    0.000000] Determined physical RAM map:
    [    0.000000]  memory: 08000000 @ 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-0x0000000007ffffff]
    [    0.000000] Movable zone start for each node
    [    0.000000] Early memory node ranges
    [    0.000000]   node   0: [mem 0x0000000000000000-0x0000000007ffffff]
    [    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
    [    0.000000] On node 0 totalpages: 32768
    [    0.000000] free_area_init_node: node 0, pgdat 804ee8a4, node_mem_map 81000020
    [    0.000000]   Normal zone: 256 pages used for memmap
    [    0.000000]   Normal zone: 0 pages reserved
    [    0.000000]   Normal zone: 32768 pages, LIFO batch:7
    [    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
    [    0.000000] pcpu-alloc: [0] 0
    [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
    [    0.000000] Kernel command line:  board=GL-AR750S console=ttyS0,115200 mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env),64k(art)ro,2048k(kernel),13052k(reserved);spi0.1:-(ubi) rootfstype=squashfs noinitrd
    [    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
    [    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
    [    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
    [    0.000000] Writing ErrCtl register=00000000
    [    0.000000] Readback ErrCtl register=00000000
    [    0.000000] Memory: 124420K/131072K available (3652K kernel code, 159K rwdata, 856K rodata, 188K init, 217K bss, 6652K 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] Clocks: CPU:775.000MHz, DDR:650.000MHz, AHB:258.333MHz, Ref:25.000MHz
    [    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.008223] Calibrating delay loop... 385.84 BogoMIPS (lpj=1929216)
    [    0.071033] pid_max: default: 32768 minimum: 301
    [    0.075985] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.082956] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.092574] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
    [    0.102978] futex hash table entries: 256 (order: -1, 3072 bytes)
    [    0.110405] NET: Registered protocol family 16
    [    0.116383] MIPS: machine is GL-AR750S
    [    0.359895] registering PCI controller with io_map_base unset
    [    0.378262] i2c-gpio i2c-gpio.0: using pins 5 (SDA) and 21 (SCL)
    [    0.384805] PCI host bridge to bus 0000:00
    [    0.389162] pci_bus 0000:00: root bus resource [mem 0x12000000-0x13ffffff]
    [    0.396403] pci_bus 0000:00: root bus resource [io  0x0001]
    [    0.402278] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
    [    0.409425] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
    [    0.417803] pci 0000:00:00.0: [168c:0050] type 00 class 0x028000
    [    0.417812] pci 0000:00:00.0: invalid calibration data
    [    0.423243] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x001fffff 64bit]
    [    0.423290] pci 0000:00:00.0: reg 0x30: [mem 0x00000000-0x0000ffff pref]
    [    0.423355] pci 0000:00:00.0: supports D1
    [    0.423363] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
    [    0.423549] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00
    [    0.423572] pci 0000:00:00.0: BAR 0: assigned [mem 0x12000000-0x121fffff 64bit]
    [    0.431318] pci 0000:00:00.0: BAR 6: assigned [mem 0x12200000-0x1220ffff pref]
    [    0.438935] pci 0000:00:00.0: using irq 40 for pin 1
    [    0.446715] clocksource: Switched to clocksource MIPS
    [    0.452953] NET: Registered protocol family 2
    [    0.458376] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.465733] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.472476] TCP: Hash tables configured (established 1024 bind 1024)
    [    0.479264] UDP hash table entries: 256 (order: 0, 4096 bytes)
    [    0.485430] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
    [    0.492293] NET: Registered protocol family 1
    [    0.496950] PCI: CLS 0 bytes, default 32
    [    0.499203] Crashlog allocated RAM at address 0x3f00000
    [    0.505502] workingset: timestamp_bits=30 max_order=15 bucket_order=0
    [    0.518286] squashfs: version 4.0 (2009/01/31) Phillip Lougher
    [    0.524428] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
    [    0.542359] io scheduler noop registered
    [    0.546493] io scheduler deadline registered (default)
    [    0.552320] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
    [    0.561227] console [ttyS0] disabled
    [    0.585062] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11, base_baud = 1562500) is a 16550A
    [    0.594159] console [ttyS0] enabled
    [    0.601708] bootconsole [early0] disabled
    [    0.615008] m25p80 spi0.0: found w25q128, expected m25p80
    [    0.629708] m25p80 spi0.0: w25q128 (16384 Kbytes)
    [    0.634589] 5 cmdlinepart partitions found on MTD device spi0.0
    [    0.640712] Creating 5 MTD partitions on "spi0.0":
    [    0.645665] 0x000000000000-0x000000040000 : "u-boot"
    [    0.652005] 0x000000040000-0x000000050000 : "u-boot-env"
    [    0.658861] 0x000000050000-0x000000060000 : "art"
    [    0.665016] 0x000000060000-0x000000260000 : "kernel"
    [    0.671500] 0x000000260000-0x000000f1f000 : "reserved"
    [    0.678665] spi-nand: Giga SPI NAND was found.
    [    0.683266] spi-nand: 128 MiB, block size: 128 KiB, page size: 2048, OOB size: 128
    [    0.691489] 1 cmdlinepart partitions found on MTD device spi0.1
    [    0.697640] Creating 1 MTD partitions on "spi0.1":
    [    0.702589] 0x000000000000-0x000008000000 : "ubi"
    [    1.156400] found bad block 7fe0000
    [    1.160604] libphy: Fixed MDIO Bus: probed
    [    1.173776] switch0: Atheros AR8337 rev. 2 switch registered on ag71xx-mdio.0
    [    1.902060] libphy: ag71xx_mdio: probed
    [    2.528162] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.0:00 [uid=004dd036, driver=Atheros AR8216/AR8236/AR8316]
    [    2.539704] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:SGMII
    [    2.547589] NET: Registered protocol family 10
    [    2.555277] NET: Registered protocol family 17
    [    2.559973] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
    [    2.573446] 8021q: 802.1Q VLAN Support v1.8
    [    2.582811] UBI: auto-attach mtd5
    [    2.586262] ubi0: attaching mtd5
    [    2.596728] random: fast init done
    [    7.262423] ubi0: scanning is finished
    [    7.317575] ubi0: attached mtd5 (name "ubi", size 128 MiB)
    [    7.323244] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
    [    7.330378] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
    [    7.337390] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
    [    7.344575] ubi0: good PEBs: 1023, bad PEBs: 1, corrupted PEBs: 0
    [    7.350873] ubi0: user volume: 2, internal volumes: 1, max. volumes count: 128
    [    7.358339] ubi0: max/mean erase counter: 2/0, WL threshold: 4096, image sequence number: 344389367
    [    7.367683] ubi0: available PEBs: 0, total reserved PEBs: 1023, PEBs reserved for bad PEB handling: 19
    [    7.377365] ubi0: background thread "ubi_bgt0d" started, PID 320
    [    7.387009] block ubiblock0_0: created from ubi0:0(rootfs)
    [    7.392684] ubiblock: device ubiblock0_0 (rootfs) set to be root filesystem
    [    7.399896] hctosys: unable to open rtc device (rtc0)
    [    7.426055] VFS: Mounted root (squashfs filesystem) readonly on device 254:0.
    [    7.434489] Freeing unused kernel memory: 188K
    [    7.439101] This architecture does not have kernel memory protection.
    [    8.326158] init: Console is alive
    [    8.329962] init: - watchdog -
    [   11.259095] kmodloader: loading kernel modules from /etc/modules-boot.d/*
    [   11.424459] usbcore: registered new interface driver usbfs
    [   11.430247] usbcore: registered new interface driver hub
    [   11.435804] usbcore: registered new device driver usb
    [   11.446145] exFAT: Version 1.2.9
    [   11.479059] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
    [   11.494259] SCSI subsystem initialized
    [   11.502408] ehci-platform: EHCI generic platform driver
    [   11.507931] ehci-platform ehci-platform.0: EHCI Host Controller
    [   11.514074] ehci-platform ehci-platform.0: new USB bus registered, assigned bus number 1
    [   11.524523] ehci-platform ehci-platform.0: irq 48, io mem 0x1b000000
    [   11.556751] ehci-platform ehci-platform.0: USB 2.0 started, EHCI 1.00
    [   11.564101] hub 1-0:1.0: USB hub found
    [   11.568276] hub 1-0:1.0: 1 port detected
    [   11.572633] ehci-platform ehci-platform.1: EHCI Host Controller
    [   11.578814] ehci-platform ehci-platform.1: new USB bus registered, assigned bus number 2
    [   11.589290] ehci-platform ehci-platform.1: irq 49, io mem 0x1b400000
    [   11.616735] ehci-platform ehci-platform.1: USB 2.0 started, EHCI 1.00
    [   11.624059] hub 2-0:1.0: USB hub found
    [   11.628269] hub 2-0:1.0: 1 port detected
    [   11.634894] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
    [   11.642664] ohci-platform: OHCI generic platform driver
    [   11.650271] uhci_hcd: USB Universal Host Controller Interface driver
    [   11.660623] usbcore: registered new interface driver usb-storage
    [   11.667487] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
    [   11.677595] init: - preinit -
    [   12.278192] usb 2-1: new high-speed USB device number 2 using ehci-platform
    [   12.589604] hub 2-1:1.0: USB hub found
    [   12.609157] hub 2-1:1.0: 4 ports detected
    [   12.945148] random: procd: uninitialized urandom read (4 bytes read)
    [   13.048272] usb 2-1.1: new high-speed USB device number 3 using ehci-platform
    [   13.274144] usb-storage 2-1.1:1.0: USB Mass Storage device detected
    [   13.287920] scsi host0: usb-storage 2-1.1:1.0
    [   13.359842] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
    [   14.358430] scsi 0:0:0:0: Direct-Access     Generic  STORAGE DEVICE   0233 PQ: 0 ANSI: 0
    [   14.371362] sd 0:0:0:0: [sda] Attached SCSI removable disk
    [   14.438395] eth0: link up (1000Mbps/Full duplex)
    [   14.443377] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
    [   16.627648] UBIFS (ubi0:1): background thread "ubifs_bgt0_1" started, PID 442
    [   16.920834] UBIFS (ubi0:1): recovery needed
    [   17.550131] UBIFS (ubi0:1): recovery completed
    [   17.554805] UBIFS (ubi0:1): UBIFS: mounted UBI device 0, volume 1, name "rootfs_data"
    [   17.562924] UBIFS (ubi0:1): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
    [   17.573176] UBIFS (ubi0:1): FS size: 116183040 bytes (110 MiB, 915 LEBs), journal size 5840896 bytes (5 MiB, 46 LEBs)
    [   17.584137] UBIFS (ubi0:1): reserved for root: 4952683 bytes (4836 KiB)
    [   17.590977] UBIFS (ubi0:1): media format: w4/r0 (latest is w4/r0), UUID EB673D7C-E244-4A1A-96AA-6589ADE8527C, small LPT model
    [   17.636116] mount_root: switching to ubifs overlay
    [   17.720883] urandom-seed: Seeding with /etc/urandom.seed
    [   17.908872] eth0: link down
    [   17.922029] procd: - early -
    [   17.925092] procd: - watchdog -
    [   18.521942] random: jshn: uninitialized urandom read (4 bytes read)
    [   18.588667] procd: - watchdog -
    [   18.592132] procd: - ubus -
    [   18.796256] random: ubusd: uninitialized urandom read (4 bytes read)
    [   18.884659] random: ubusd: uninitialized urandom read (4 bytes read)
    [   18.898509] procd: - init -
    [   20.931307] kmodloader: loading kernel modules from /etc/modules.d/*
    [   20.978385] ntfs: driver 2.1.32 [Flags: R/O MODULE].
    [   21.010241] tun: Universal TUN/TAP device driver, 1.6
    [   21.015465] tun: (C) 1999-2004 Max Krasnyansky 
    [   21.049229] ip6_tables: (C) 2000-2006 Netfilter Core Team
    [   21.080802] Netfilter messages via NETLINK v0.30.
    [   21.094517] ip_set: protocol 6
    [   21.163178] fuse init (API version 7.26)
    [   21.198780] usbcore: registered new interface driver cdc_acm
    [   21.204629] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
    [   21.228049] usbcore: registered new interface driver cdc_wdm
    [   21.240382] Loading modules backported from Linux version wt-2017-11-01-0-gfe248fc2c180
    [   21.248704] Backport generated by backports.git v4.14-rc2-1-31-g86cf0e5d
    [   21.277750] ip_tables: (C) 2000-2006 Netfilter Core Team
    [   21.297566] usbcore: registered new interface driver ipheth
    [   21.327962] nf_conntrack version 0.5.0 (2048 buckets, 8192 max)
    [   21.621487] usbcore: registered new interface driver usbserial
    [   21.627650] usbcore: registered new interface driver usbserial_generic
    [   21.634478] usbserial: USB Serial support registered for generic
    [   21.673466] wireguard: WireGuard 0.0.20180620 loaded. See www.wireguard.com for information.
    [   21.682234] wireguard: Copyright (C) 2015-2018 Jason A. Donenfeld . All Rights Reserved.
    [   21.778571] xt_time: kernel timezone is -0000
    [   21.790543] usbcore: registered new interface driver cdc_ether
    [   21.819567] usbcore: registered new interface driver cdc_ncm
    [   22.008228] usbcore: registered new interface driver cp210x
    [   22.014059] usbserial: USB Serial support registered for cp210x
    [   22.038053] usbcore: registered new interface driver huawei_cdc_ncm
    [   22.150154] PPP generic driver version 2.4.2
    [   22.165506] PPP MPPE Compression module registered
    [   22.175685] NET: Registered protocol family 24
    [   22.189316] usbcore: registered new interface driver qmi_wwan
    [   22.219423] usbcore: registered new interface driver rndis_host
    [   22.256774] usbcore: registered new interface driver sierra
    [   22.262642] usbserial: USB Serial support registered for Sierra USB modem
    [   22.290952] usbcore: registered new interface driver sierra_net
    [   22.367606] PCI: Enabling device 0000:00:00.0 (0000 -> 0002)
    [   22.375703] ath10k_pci 0000:00:00.0: pci irq legacy oper_irq_mode 1 irq_mode 0 reset_mode 0
    [   22.691315] ath10k_pci 0000:00:00.0: Direct firmware load for ath10k/pre-cal-pci-0000:00:00.0.bin failed with error -2
    [   22.702403] ath10k_pci 0000:00:00.0: Falling back to user helper
    [   30.939926] firmware ath10k!pre-cal-pci-0000:00:00.0.bin: firmware_loading_store: map pages failed
    [   30.958008] ath10k_pci 0000:00:00.0: Direct firmware load for ath10k/QCA9887/hw1.0/firmware-6.bin failed with error -2
    [   30.969087] ath10k_pci 0000:00:00.0: Falling back to user helper
    [   32.708941] firmware ath10k!QCA9887!hw1.0!firmware-6.bin: firmware_loading_store: map pages failed
    [   33.077190] ath10k_pci 0000:00:00.0: qca9887 hw1.0 target 0x4100016d chip_id 0x004000ff sub 0000:0000
    [   33.086749] ath10k_pci 0000:00:00.0: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 1
    [   33.099533] ath10k_pci 0000:00:00.0: firmware ver 10.2.4-1.0-00033 api 5 features no-p2p,ignore-otp,skip-clock-init,mfp,allows-mesh-bcast crc32 c232a0c3
    [   33.268684] ath10k_pci 0000:00:00.0: Direct firmware load for ath10k/QCA9887/hw1.0/board-2.bin failed with error -2
    [   33.279511] ath10k_pci 0000:00:00.0: Falling back to user helper
    [   33.466320] firmware ath10k!QCA9887!hw1.0!board-2.bin: firmware_loading_store: map pages failed
    [   33.486568] ath10k_pci 0000:00:00.0: board_file api 1 bmi_id N/A crc32 546cca0d
    [   34.786047] ath10k_pci 0000:00:00.0: htt-ver 2.1 wmi-op 5 htt-op 2 cal file max-sta 128 raw 0 hwcrypto 1
    [   34.928130] ath: EEPROM regdomain: 0x0
    [   34.928137] ath: EEPROM indicates default country code should be used
    [   34.928140] ath: doing EEPROM country->regdmn map search
    [   34.928151] ath: country maps to regdmn code: 0x3a
    [   34.928155] ath: Country alpha2 being used: US
    [   34.928158] ath: Regpair used: 0x3a
    [   35.007841] usbcore: registered new interface driver option
    [   35.013674] usbserial: USB Serial support registered for GSM modem (1-port)
    [   35.076414] usbcore: registered new interface driver rt2800usb
    [   35.110543] ath: EEPROM regdomain: 0x0
    [   35.110551] ath: EEPROM indicates default country code should be used
    [   35.110554] ath: doing EEPROM country->regdmn map search
    [   35.110566] ath: country maps to regdmn code: 0x3a
    [   35.110570] ath: Country alpha2 being used: US
    [   35.110573] ath: Regpair used: 0x3a
    [   35.120548] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht'
    [   35.124152] ieee80211 phy1: Atheros AR9561 Rev:0 mem=0xb8100000, irq=47
    [   35.187783] kmodloader: done loading kernel modules from /etc/modules.d/*
    [   45.361749] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
    [   45.381062] br-lan: port 1(eth0.1) entered blocking state
    [   45.386651] br-lan: port 1(eth0.1) entered disabled state
    [   45.392607] device eth0.1 entered promiscuous mode
    [   45.397595] device eth0 entered promiscuous mode
    [   45.430229] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
    [   45.473702] IPv6: ADDRCONF(NETDEV_UP): eth0.2: link is not ready
    [   46.715529] eth0: link up (1000Mbps/Full duplex)
    [   46.723175] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
    [   46.804760] br-lan: port 1(eth0.1) entered blocking state
    [   46.810384] br-lan: port 1(eth0.1) entered forwarding state
    [   46.816287] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.2: link becomes ready
    [   46.968826] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
    [   48.377861] fast-classifier: starting up
    [   48.382072] fast-classifier: registered
    [   55.894385] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
    [   55.915610] IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready
    [   55.929752] br-lan: port 2(wlan0) entered blocking state
    [   55.935250] br-lan: port 2(wlan0) entered disabled state
    [   55.941137] device wlan0 entered promiscuous mode
    [   55.962806] br-lan: port 3(wlan1) entered blocking state
    [   55.968347] br-lan: port 3(wlan1) entered disabled state
    [   55.974187] device wlan1 entered promiscuous mode
    [   57.216107] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
    [   57.222873] br-lan: port 3(wlan1) entered blocking state
    [   57.228390] br-lan: port 3(wlan1) entered forwarding state
    [   57.778998] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
    [   57.785725] br-lan: port 2(wlan0) entered blocking state
    [   57.791280] br-lan: port 2(wlan0) entered forwarding state
    [   78.289279] nf_conntrack: default automatic helper assignment has been turned off for security reasons and CT-based  firewall rule not found. Use the iptables CT target to attach helpers instead.
    [   79.816751] random: crng init done
    [   79.820277] random: 6 urandom warning(s) missed due to ratelimiting
    [  130.272445] device wlan0 left promiscuous mode
    [  130.277219] br-lan: port 2(wlan0) entered disabled state
    [  132.255789] device wlan1 left promiscuous mode
    [  132.260560] br-lan: port 3(wlan1) entered disabled state
    [ 2733.302008] ath: EEPROM regdomain: 0x8188
    [ 2733.302016] ath: EEPROM indicates we should expect a country code
    [ 2733.302020] ath: doing EEPROM country->regdmn map search
    [ 2733.302024] ath: country maps to regdmn code: 0x40
    [ 2733.302029] ath: Country alpha2 being used: JP
    [ 2733.302033] ath: Regpair used: 0x40
    [ 2733.302037] ath: regdomain 0x8188 dynamically updated by user
    [ 2733.306445] ath: EEPROM regdomain: 0x8188
    [ 2733.306448] ath: EEPROM indicates we should expect a country code
    [ 2733.306451] ath: doing EEPROM country->regdmn map search
    [ 2733.306455] ath: country maps to regdmn code: 0x40
    [ 2733.306458] ath: Country alpha2 being used: JP
    [ 2733.306461] ath: Regpair used: 0x40
    [ 2733.306464] ath: regdomain 0x8188 dynamically updated by user
    [ 2757.549210] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
    [ 2757.559092] br-lan: port 2(wlan0) entered blocking state
    [ 2757.564584] br-lan: port 2(wlan0) entered disabled state
    [ 2822.121600] IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready
    [ 2822.161342] br-lan: port 2(wlan1) entered blocking state
    [ 2822.166923] br-lan: port 2(wlan1) entered disabled state
    

広告

WG800HP

NEC機に、OpenWrtでサポート済みのSoCを搭載し、尚且つLinuxを搭載している機種が、サポート済みのWG2600HP以外にも無いかなぁと探していた際に見つけたもの。
いくつかの点からOpenWrtベースであることが予想されたので、やってみようと確保した。

Switch

stock firmware / OpenWrt

zone WAN LAN
port
(WG800HP)
WAN LAN1 LAN2 LAN3
port
(QCA8337)
port1 port2 port3 port4

MAC

  • LAN: C0:25:A2:xx:xx:B0 (board_data, 0x280 (text))
  • WAN: C0:25:A2:xx:xx:B1 (board_data, 0x480 (text))
  • 2.4G: C0:25:A2:xx:xx:B2 (board_data, 0x680 (text))
  • 5G: C0:25:A2:xx:xx:B3 (board_data, 0x880 (text))

U-Boot

Kernel入ってからu-bootのmtdを云々。

  • help
    ath> help
    ?       - alias for 'help'
    autoscr - run script from memory
    base    - print or set address offset
    bdinfo  - print Board Info structure
    boot    - boot default, i.e., run 'bootcmd'
    bootd   - boot default, i.e., run 'bootcmd'
    bootelf - Boot from an ELF image in memory
    bootm   - boot application image from memory
    bootp   - boot image via network using BootP/TFTP protocol
    bootvx  - Boot vxWorks from an ELF image
    cmp     - memory compare
    coninfo - print console devices and information
    cp      - memory copy
    crc32   - checksum calculation
    dhcp    - invoke DHCP client to obtain IP/boot params
    echo    - echo args to console
    erase   - erase FLASH memory
    ethreg  - Switch/PHY Reg rd/wr  utility
    exit    - exit script
    flinfo  - print FLASH memory information
    go      - start application at address 'addr'
    help    - print online help
    iminfo  - print header information for application image
    itest   - return true/false on integer compare
    loop    - infinite loop on address range
    mct   - simple RAM test
    md      - memory display
    mii     - MII utility commands
    mm      - memory modify (auto-incrementing)
    mtest   - simple RAM test
    mw      - memory write (fill)
    nfs     - boot image via network using NFS protocol
    nm      - memory modify (constant address)
    pci     - list and access PCI Configuration Space
    ping    - send ICMP ECHO_REQUEST to network host
    pll cpu-pll dither ddr-pll dither - Set to change CPU & DDR speed
    pll erase
    pll get
    printenv- print environment variables
    progmac - Set ethernet MAC addresses
    progmac2 - Set ethernet MAC addresses
    protect - enable or disable FLASH write protection
    rarpboot- boot image via network using RARP/TFTP protocol
    reset   - Perform RESET of the CPU
    run     - run commands in an environment variable
    saveenv - save environment variables to persistent storage
    setenv  - set environment variables
    sleep   - delay execution for some time
    test    - minimal test like /bin/sh
    tftpboot- boot image via network using TFTP protocol
    version - print monitor version
    

  • version
    ath> version
    
    Laser v1.0 (Nov  4 2015 - 10:48:50)
    

  • printenv
    ath> printenv
    bootdelay=2
    baudrate=115200
    ethaddr=0x00:0xaa:0xbb:0xcc:0xdd:0xee
    dir=
    lu=tftp 0x80060000 ${dir}u-boot.bin&&erase 0x9f000000 +$filesize&&cp.b $fileaddr 0x9f000000 $filesize
    lf=tftp 0x80060000 ${dir}ap152${bc}-jffs2&&erase 0x9f050000 +0x630000&&cp.b $fileaddr 0x9f050000 $filesize
    lk=tftp 0x80060000 ${dir}vmlinux${bc}.lzma.uImage&&erase 0x9f680000 +$filesize&&cp.b $fileaddr 0x9f680000 $filesize
    bc=_vlan_11ac_offload_s17
    bootargs=console=ttyS0,115200 root=31:03 rootfstype=jffs2 init=/sbin/init mtdparts=ath-nor0:256k(u-boot),64k(u-boot-env),6336k(rootfs),1408k(uImage),64k(mib0),64k(ART)
    ethact=eth0
    filesize=540004
    fileaddr=80060000
    ipaddr=192.168.1.2
    serverip=192.168.1.44
    bootcmd=bootm 0x9f050000
    stdin=serial
    stdout=serial
    stderr=serial
    
    Environment size: 743/65532 bytes
    

  • mii device
    ath> mii device
    MII devices: 'eth0' 
    Current device: 'eth0'
    

  • md.l 0x18050048 1
    ath> 
    ath> md.l 0x18050048
    18050048: 03000101    ....
    

  • ethreg 0x*
    ath> ethreg 0x4
    Read Reg: 0x00000004 = 0x00000080
    ath> ethreg 0x50
    Read Reg: 0x00000050 = 0xcc35cc35
    ath> ethreg 0x54
    Read Reg: 0x00000054 = 0xca35ca35
    ath> ethreg 0x58
    Read Reg: 0x00000058 = 0xc935c935
    ath> ethreg 0x5c
    Read Reg: 0x0000005c = 0x03ffff00
    ath> ethreg 0x7c
    Read Reg: 0x0000007c = 0x0000007e
    

Kernel

パスワードが掛けられているため、failsafe と console_password, pw.sh 辺りを色々ひっくり返す。

  • uname -a
    root@ATERM-****B1:/# uname -a
    Linux ATERM-****B1 3.3.8 #1 Tue Aug 30 09:32:58 CST 2016 mips GNU/Linux
    
  • cat /proc/version
    </span>
    root@ATERM-****B1:/# cat /proc/version
    Linux version 3.3.8 (*******@*********.******) (gcc version 4.6.3 20120201 (prerelease) (Linaro GCC 4.6-2012.02) ) #1 Tue Aug 30 09:32:58 CST 2016
    

  • cat /proc/cpuinfo
    root@ATERM-****B1:/# cat /proc/cpuinfo
    system type             : Qualcomm Atheros QCA956X rev 0
    machine                 : Qualcomm Atheros AP152 reference board
    processor               : 0
    cpu model               : MIPS 74Kc V5.0
    BogoMIPS                : 385.84
    wait instruction        : yes
    microsecond timers      : yes
    tlb_entries             : 32
    extra interrupt vector  : yes
    hardware watchpoint     : yes, count: 4, address/irw mask: [0x0000, 0x0d58, 0x0668, 0x0080]
    ASEs implemented        : mips16 dsp
    shadow register sets    : 1
    kscratch registers      : 0
    core                    : 0
    VCED exceptions         : not available
    VCEI exceptions         : not available
    

  • cat /proc/meminfo
    root@ATERM-67D2B1:/# cat /proc/meminfo
    MemTotal:          61308 kB
    MemFree:           14556 kB
    Buffers:            2872 kB
    Cached:             8128 kB
    SwapCached:            0 kB
    Active:             7728 kB
    Inactive:           5900 kB
    Active(anon):       3132 kB
    Inactive(anon):      164 kB
    Active(file):       4596 kB
    Inactive(file):     5736 kB
    Unevictable:           0 kB
    Mlocked:               0 kB
    SwapTotal:             0 kB
    SwapFree:              0 kB
    Dirty:                 0 kB
    Writeback:             0 kB
    AnonPages:          2644 kB
    Mapped:             2968 kB
    Shmem:               668 kB
    Slab:              22396 kB
    SReclaimable:       1476 kB
    SUnreclaim:        20920 kB
    KernelStack:         480 kB
    PageTables:          384 kB
    NFS_Unstable:          0 kB
    Bounce:                0 kB
    WritebackTmp:          0 kB
    CommitLimit:       30652 kB
    Committed_AS:      13760 kB
    VmallocTotal:    1048372 kB
    VmallocUsed:        1296 kB
    VmallocChunk:    1034428 kB
    

  • cat /proc/mtd
    root@ATERM-67D2B1:/# cat /proc/mtd
    dev:    size   erasesize  name
    mtd0: 00040000 00010000 "u-boot"
    mtd1: 00010000 00010000 "u-boot-env"
    mtd2: 00160000 00010000 "kernel"
    mtd3: 00590000 00010000 "rootfs"
    mtd4: 000a0000 00010000 "rootfs_data"
    mtd5: 00010000 00010000 "board_data"
    mtd6: 00010000 00010000 "art"
    mtd7: 006f0000 00010000 "firmware"
    

  • fw_printenv
    root@ATERM-**B1:/# fw_printenv
    bootdelay=2
    baudrate=115200
    ethaddr=0x00:0xaa:0xbb:0xcc:0xdd:0xee
    dir=
    lu=tftp 0x80060000 ${dir}u-boot.bin&&erase 0x9f000000 +$filesize&&cp.b $fileaddr 0x9f000000 $filesize
    lf=tftp 0x80060000 ${dir}ap152${bc}-jffs2&&erase 0x9f050000 +0x630000&&cp.b $fileaddr 0x9f050000 $filesize
    lk=tftp 0x80060000 ${dir}vmlinux${bc}.lzma.uImage&&erase 0x9f680000 +$filesize&&cp.b $fileaddr 0x9f680000 $filesize
    bc=_vlan_11ac_offload_s17
    bootargs=console=ttyS0,115200 root=31:03 rootfstype=jffs2 init=/sbin/init mtdparts=ath-nor0:256k(u-boot),64k(u-boot-env),6336k(rootfs),1408k(uImage),64k(mib0),64k(ART)
    stdin=serial
    stdout=serial
    stderr=serial
    ethact=eth0
    filesize=540004
    fileaddr=80060000
    ipaddr=192.168.1.2
    serverip=192.168.1.44
    bootcmd=bootm 0x9f050000
    

  • bootlog
    Laser v1.0 (Nov  4 2015 - 10:48:50)
    
    ap152 - Dragonfly 1.0DRAM:  
    sri
    ath_ddr_initial_config(278): (ddr2 init)
    ath_sys_frequency: cpu 775 ddr 650 ahb 258
    Tap values = (0xd, 0xd, 0xd, 0xd)
    64 MB
    Top of RAM usable for U-Boot at: 84000000
    Reserving 199k 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
    In:    serial
    Out:   serial
    Err:   serial
    Net:   ath_gmac_enet_initialize...
    No valid address in Flash. Using fixed address
    ath_gmac_enet_initialize: reset mask:c02200 
    athr_mgmt_init ::done
    Dragonfly  ----> S17 PHY *
    athrs17_reg_init: set S17_P1LOOKUP_CTRL_REG.
    athrs17_reg_init: complete
    SGMII in forced mode
    athr_gmac_sgmii_setup SGMII done
    : cfg1 0x80000000 cfg2 0x7114
    eth0: 00:03:7f:09:0b:ad
    eth0 up
    eth0
    Setting 0x181162c0 to 0x43862100
    Hit any key to stop autoboot:  0 
    ## Booting image at 9f050000 ...
       Image Name:   MIPS OpenWrt Linux-3.3.8
       Created:      2016-08-30   9:44:42 UTC
       Image Type:   MIPS Linux Multi-File Image (lzma compressed)
       Data Size:    1122886 Bytes =  1.1 MB
       Load Address: 80060000
       Entry Point:  80060000
       Contents:
       Image 0:  1122878 Bytes =  1.1 MB
       Verifying Checksum at 0x9f050040 ...OK
       Uncompressing Multi-File Image ... OK
    No initrd
    ## Transferring control to Linux (at address 80060000) ...
    ## Giving linux memsize in bytes, 67108864
    
    Starting kernel ...
    
    [    0.000000] Linux version 3.3.8 (*******@*********.******) (gcc version 4.6.3 20120201 (prerelease) (Linaro GCC 4.6-2012.02) ) #1 Tue Aug 30 09:32:58 CST 2016
    [    0.000000] bootconsole [early0] enabled
    [    0.000000] CPU revision is: 00019750 (MIPS 74Kc)
    [    0.000000] SoC: Qualcomm Atheros QCA956X rev 0
    [    0.000000] Clocks: CPU:775.000MHz, DDR:650.000MHz, AHB:258.333MHz, Ref:25.000MHz
    [    0.000000] Determined physical RAM map:
    [    0.000000]  memory: 04000000 @ 00000000 (usable)
    [    0.000000] Initrd not found or empty - disabling initrd
    [    0.000000] Zone PFN ranges:
    [    0.000000]   Normal   0x00000000 -> 0x00004000
    [    0.000000] Movable zone start PFN for each node
    [    0.000000] Early memory PFN ranges
    [    0.000000]     0: 0x00000000 -> 0x00004000
    [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
    [    0.000000] Kernel command line:  board=AP152 console=ttyS0,115200 mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,1408k(kernel),5696k(rootfs),640k(rootfs_data),64k(board_data),64k(art),7104k@0x50000(firmware) rootfstype=squashfs,jffs2 noinitrd
    [    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] 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] Writing ErrCtl register=00000000
    [    0.000000] Readback ErrCtl register=00000000
    [    0.000000] Memory: 61088k/65536k available (2365k kernel code, 4448k reserved, 651k data, 220k init, 0k highmem)
    [    0.000000] SLUB: Genslabs=9, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    [    0.000000] NR_IRQS:83
    [    0.000000] Calibrating delay loop... 385.84 BogoMIPS (lpj=1929216)
    [    0.060000] pid_max: default: 32768 minimum: 301
    [    0.060000] Mount-cache hash table entries: 512
    [    0.070000] Initialized recycle list for cpu 0.
    [    0.070000] NET: Registered protocol family 16
    [    0.080000] gpiochip_add: registered GPIOs 0 to 22 on device: ath79
    [    0.080000] MIPS: machine is Qualcomm Atheros AP152 reference board
    [    0.090000] mach-ap152: Disabling JTAG for AP152 board
    [    0.090000] registering PCI controller with io_map_base unset
    [    0.300000] bio: create slab  at 0
    [    0.310000] PCI host bridge to bus 0000:00
    [    0.310000] pci_bus 0000:00: root bus resource [mem 0x12000000-0x13ffffff]
    [    0.320000] pci_bus 0000:00: root bus resource [io  0x0001]
    [    0.320000] pci 0000:00:00.0: BAR 0: assigned [mem 0x12000000-0x121fffff 64bit]
    [    0.330000] pci 0000:00:00.0: BAR 6: assigned [mem 0x12200000-0x1220ffff pref]
    [    0.330000] pci 0000:00:00.0: using irq 40 for pin 1
    [    0.340000] Switching to clocksource MIPS
    [    0.340000] NET: Registered protocol family 2
    [    0.350000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.350000] TCP established hash table entries: 2048 (order: 2, 16384 bytes)
    [    0.360000] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
    [    0.360000] TCP: Hash tables configured (established 2048 bind 2048)
    [    0.370000] TCP reno registered
    [    0.370000] UDP hash table entries: 256 (order: 0, 4096 bytes)
    [    0.380000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
    [    0.380000] NET: Registered protocol family 1
    [    0.400000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
    [    0.400000] JFFS2 version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
    [    0.410000] msgmni has been set to 119
    [    0.420000] io scheduler noop registered
    [    0.420000] io scheduler deadline registered (default)
    [    0.430000] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
    [    0.450000] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11) is a 16550A
    [    0.460000] console [ttyS0] enabled, bootconsole disabled
    [    0.460000] console [ttyS0] enabled, bootconsole disabled
    [    0.470000] m25p80 spi0.0: found mx25l6405d, expected m25p80
    [    0.480000] m25p80 spi0.0: mx25l6405d (8192 Kbytes)
    [    0.480000] 8 cmdlinepart partitions found on MTD device spi0.0
    [    0.490000] Creating 8 MTD partitions on "spi0.0":
    [    0.500000] 0x000000000000-0x000000040000 : "u-boot"
    [    0.500000] 0x000000040000-0x000000050000 : "u-boot-env"
    [    0.510000] 0x000000050000-0x0000001b0000 : "kernel"
    [    0.510000] 0x0000001b0000-0x000000740000 : "rootfs"
    [    0.520000] mtd: partition "rootfs" set to be root filesystem
    [    0.530000] 0x000000740000-0x0000007e0000 : "rootfs_data"
    [    0.530000] 0x0000007e0000-0x0000007f0000 : "board_data"
    [    0.540000] 0x0000007f0000-0x000000800000 : "art"
    [    0.550000] 0x000000050000-0x000000740000 : "firmware"
    [    0.690000] ag71xx_mdio: probed
    [    0.700000] eth0: Atheros AG71xx at 0xb9000000, irq 4
    [    1.270000] eth0: Atheros AR8327 switch driver attached.
    [    2.500000] ag71xx ag71xx.0: eth0: connected to PHY at ag71xx-mdio.0:00 [uid=004dd036, driver=Atheros AR8216/AR8236/AR8316]
    [    2.510000] libera: File: drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c, Func: ag71xx_jate_proc_init, Line: 1454
    [    2.520000] TCP cubic registered
    [    2.520000] NET: Registered protocol family 17
    [    2.530000] Bridge firewalling registered
    [    2.530000] 8021q: 802.1Q VLAN Support v1.8
    [    2.540000] AP152 selftest start
    [    2.540000] ### of_selftest(): No testcase data in device tree; not running tests
    [    2.550000] VFS: Mounted root (squashfs filesystem) readonly on device 31:3.
    [    2.560000] Freeing unused kernel memory: 220k freed
    [    3.890000] gpio-keys-polled: init gpio-keys-polled
    - preinit -
    Press the [f] key and hit [enter] to enter failsafe mode
    [    5.510000] eth0: link up (1000Mbps/Full duplex)
    [    6.520000] eth0: link up (1000Mbps/Full duplex)
    - regular preinit -
    Reset to factory default
    - firstboot -
    [    8.560000] AP152 selftest stop
    [   11.390000] JFFS2 notice: (492) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
    switching to jffs2
    - init -
    [   23.280000] eth0: link down
    System Restored to Defaults
    [   28.660000] ssdk_plat_init start
    [   28.660000] Register QCA PHY driver
    [   28.980000] qca-ssdk module init succeeded!
    [   29.210000] Button Hotplug driver version 0.4.1
    [   29.240000] PPP generic driver version 2.4.2
    [   29.260000] btnctrl_proc: init btnctrl_proc
    [   29.320000] asf: module license 'Proprietary' taints kernel.
    [   29.330000] Disabling lock debugging due to kernel taint
    [   29.340000] ****Address of trace_timer :8319a590 
    [   29.650000] ath_hal: 0.9.17.1 (AR5416, AR9380, REGOPS_FUNC, WRITE_EEPROM, TX_DATA_SWAP, RX_DATA_SWAP, 11D)
    [   29.740000] ath_rate_atheros: Copyright (c) 2001-2005 Atheros Communications, Inc, All Rights Reserved
    [   29.760000] ath_dfs: Version 2.0.0
    [   29.760000] Copyright (c) 2005-2006 Atheros Communications, Inc. All Rights Reserved
    [   29.780000] ath_spectral: Version 2.0.0
    [   29.780000] Copyright (c) 2005-2009 Atheros Communications, Inc. All Rights Reserved
    [   29.790000] SPECTRAL module built on Aug 30 2016 09:14:08
    [   29.860000] ath_tx99: Version 2.0
    [   29.860000] Copyright (c) 2010 Atheros Communications, Inc, All Rights Reserved
    [   30.030000] ath_dev: Copyright (c) 2001-2007 Atheros Communications, Inc, All Rights Reserved
    [   31.590000] __ath_attach: Set global_scn[0]
    [   31.600000] *** All the minfree values should be  0002)
    [   31.820000] ath_pci 0000:00:00.0: ath DEBUG: sc=0x83ada600
    [   31.820000] 
    [   31.820000]  ol_ath_pci_configure : num_desired MSI set to 0
    [   31.830000] 
    [   31.830000]  Using PCI Legacy Interrupt
    [   32.840000] CE_per_engine_handler_adjust, base=83ada600 offset=57400 
    [   32.840000] CE_per_engine_handler_adjust, base=83ada600 offset=57800 
    [   32.860000] __ol_ath_attach: ath_attach TODO
    [   32.860000] __ol_ath_attach: dev name wifi1
    [   32.870000] ol_ath_set_default_tgt_config : AC Minfree buffer allocation through module param (umac.ko)
    [   32.880000]  OL_ACBKMinfree : 0
    [   32.880000]  OL_ACBEMinfree : 0
    [   32.890000]  OL_ACVIMinfree : 0
    [   32.890000]  OL_ACVOMinfree : 0
    [   32.890000] ol_ath_attach() BMI inited.
    [   32.900000] ol_ath_attach() BMI Get Target Info.
    [   32.900000] ol_ath_attach() TARGET TYPE: 7 Vers 0x4100016d
    [   32.910000] NUM_DEV=1 FWMODE=0x2 FWSUBMODE=0x0 FWBR_BUF 0
    [   32.910000] ol_ath_attach() configure Target .
    [   32.930000] qc98xx_verify_checksum: flash checksum passed: 0xa8ad
    [   32.930000] ol_transfer_bin_file 2136: Download Flash data len 2116
    [   32.940000] Swift firmware download
    [   32.950000] ol_transfer_bin_file 2066: Download Firmware data len 223832
    [   33.900000] ol_ath_attach() Download FW. 
    [   33.900000] ol_ath_attach() HT Create .
    [   33.910000] ol_ath_attach() HIF Claim.
    [   33.910000] ol_ath_attach() BMI Done. 
    [   33.920000] ol_ath_attach() WMI attached. wmi_handle 823f0000 
    [   33.920000] +HWT
    [   33.920000] SOC_RESET_CONTROL_ADDRESS : 800
    [   33.930000] CPU_INTR_ADDRESS = [2000000]
    [   33.930000] SOC_GLOBAL_RESET_ADDRESS = [0]
    [   33.940000] Rx_Filter : [0]
    [   33.940000] CE_per_engine_handler_adjust, base=83ada600 offset=57400 
    [   33.950000] CE_per_engine_handler_adjust, base=83ada600 offset=57800 
    [   33.950000] CE_per_engine_handler_adjust, base=83ada600 offset=57c00 
    [   33.960000] CE_per_engine_handler_adjust, base=83ada600 offset=58000 
    [   33.970000] CE_per_engine_handler_adjust, base=83ada600 offset=58400 
    [   33.970000] CE_per_engine_handler_adjust, base=83ada600 offset=58800 
    [   33.980000] CE_recv_buf_enqueue 653 Populate last entry 512 for CE 5
    [   33.990000] CE_recv_buf_enqueue 662 CE 5 wi 511 dest_ptr 0x1def020 nbytes 0 recv_ctxt 0x81d74a80
    [   34.000000] -HWT
    [   34.000000] HTC Service:0x0300 ep:1 TX flow control disabled
    [   34.010000] CE_pkt_dl_len_set CE 4 Pkt download length 64
    [   34.020000] ol_txrx_pdev_attach: 1424 tx desc's allocated ; range starts from 81a30000
    [   34.020000] HTC Service:0x0100 ep:2 TX flow control disabled
    [   34.030000] wmi_service_ready_event_rx:  WMI UNIFIED SERVICE READY event 
    [   34.040000] num_rf_chain : 00000001
    [   34.040000] ht_cap_info: : 0000085b
    [   34.050000] vht_cap_info : 338001b2
    [   34.050000] vht_supp_mcs : 0000fffe
    [   34.050000] LARGE_AP enabled. num_peers 144, num_vdevs 16, num_tids 256
    [   34.060000] idx 0 req 1  num_units 0 num_unit_info 2 unit size 408 actual units 145 
    [   34.070000] chunk 0 len 59160 requested ,ptr  0x1a40000 
    [   34.080000] FIRMWARE:P 145 V 16 T 443
    [   34.080000]  
    [   34.090000] wmi_ready_event_rx:  WMI UNIFIED READY event 
    [   34.090000] ol_ath_connect_htc() WMI is ready
    [   34.100000] ol_ath_set_host_app_area TODO
    [   34.100000] target uses HTT version 2.1; host uses 2.1
    [   34.110000] ol_ath_attach() connect HTC. 
    [   34.120000] bypasswmi : 0
    [   34.120000] ol_regdmn_start: reg-domain param: regdmn=0, countryName=, wModeSelect=FFFFFFFF, netBand=FFFFFFFF, extendedChanMode=0.
    [   34.130000] ol_regdmn_init_channels: !avail mode 0x1f9001 (0x2) flags 0x2150
    [   34.140000] ol_regdmn_init_channels: !avail mode 0x1f9001 (0x4) flags 0xa0
    [   34.140000] ol_regdmn_init_channels: !avail mode 0x1f9001 (0x8) flags 0xc0
    [   34.150000] ol_regdmn_init_channels: !avail mode 0x1f9001 (0x20) flags 0xd0
    [   34.160000] ol_regdmn_init_channels: !avail mode 0x1f9001 (0x40) flags 0x150
    [   34.170000] ol_regdmn_init_channels: !avail mode 0x1f9001 (0x800) flags 0x10080
    [   34.170000] ol_regdmn_init_channels: !avail mode 0x1f9001 (0x2000) flags 0x20080
    [   34.180000] ol_regdmn_init_channels: !avail mode 0x1f9001 (0x4000) flags 0x40080
    [   34.190000] Add VHT80 channel: 5210
    [   34.190000] Add VHT80 channel: 5290
    [   34.200000] Add VHT80 channel: 5530
    [   34.200000] Add VHT80 channel: 5610
    [   34.200000] Skipping VHT80 channel 5660
    [   34.210000] Skipping VHT80 channel 5680
    [   34.210000] Skipping VHT80 channel 5700
    [   34.220000] ol_ath_phyerr_attach: called
    [   34.220000] ieee80211_dfs_attach: reset cac_dfs_curch
    [   34.230000] OL Resmgr Init-ed
    [   34.230000] ol_if_spectral_setup
    [   34.230000] SPECTRAL : get_capability not registered
    [   34.240000] HAL_CAP_PHYDIAG : Capable
    [   34.240000] SPECTRAL : Need to fix the capablity check for RADAR (spectral_attach : 231)
    [   34.250000] SPECTRAL : get_capability not registered
    [   34.260000] HAL_CAP_RADAR   : Capable
    [   34.260000] SPECTRAL : Need to fix the capablity check for SPECTRAL
    [   34.260000]  (spectral_attach : 236)
    [   34.270000] SPECTRAL : get_capability not registered
    [   34.270000] HAL_CAP_SPECTRAL_SCAN : Capable
    [   34.280000] SPECTRAL : get_tsf64 not registered
    [   34.280000] spectral_init_netlink 52 NULL SKB
    [   34.290000] Green-AP : Green-AP : Attached
    [   34.290000] 
    [   34.290000] Green-AP : Attached
    [   34.300000] ol_if_dfs_setup: called 
    [   34.300000] ol_if_dfs_attach: called; ptr=81a59974, radar_info=831bfb78
    [   34.310000] ol_ath_rtt_meas_report_attach: called
    [   34.310000] ol_ath_attach() UMAC attach . 
    [   34.320000] ol_if_dfs_configure: called
    [   34.320000] ol_if_dfs_configure: MKK4 domain
    [   34.330000] ol_if_dfs_disable: called
    [   34.330000] ol_ath_attach: Calling ol_if_dfs_configure
    [   34.340000] osif_wrap_attach:280 osif wrap attached
    [   34.340000] osif_wrap_devt_init:900 osif wrap dev table init done
    [   34.350000] __ol_ath_attach: init tx/rx TODO
    [   34.350000] __ol_ath_attach: hard_header_len reservation 58
    [   34.370000] Initializing Pktlogs for 11ac
    [   34.390000] bonding: Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
    [   34.570000] ip_tables: (C) 2000-2006 Netfilter Core Team
    [   34.670000] NET: Registered protocol family 24
    [   34.680000] nf_conntrack version 0.5.0 (957 buckets, 3828 max)
    [   34.880000] xt_time: kernel timezone is -0000
    [   34.920000] [wifi1] FWLOG: [41041] WAL_DBGID_TX_AC_BUFFER_SET ( 0x3, 0x1e, 0x460, 0x460, 0x0 )
    [   34.930000] [wifi1] FWLOG: [41041] WAL_DBGID_TX_AC_BUFFER_SET ( 0x12, 0x1e, 0x460, 0x460, 0x0 )
    [   34.940000] [wifi1] FWLOG: [41041] WAL_DBGID_TX_AC_BUFFER_SET ( 0x45, 0x1e, 0x460, 0x460, 0x0 )
    [   34.950000] [wifi1] FWLOG: [41041] WAL_DBGID_TX_AC_BUFFER_SET ( 0x67, 0x1e, 0x460, 0x460, 0x0 )
    [   34.960000] [wifi1] FWLOG: [41046] WHAL_ERROR_RECV_STOPPCU ( 0x102980, 0x3 )
    [   34.960000] [wifi1] FWLOG: [41046] WHAL_ERROR_RESET_PM (  )
    [   34.970000] [wifi1] FWLOG: [41305] ANI Enable:  1
    [   35.130000] nf_conntrack_rtsp v0.6.21 loading
    [   35.150000] nf_nat_rtsp v0.6.21 loading
    
    Please press Enter to activate this console. [   41.090000] device eth0 entered promiscuous mode
    [   41.110000] device eth0.1 entered promiscuous mode
    [   42.760000] eth0: link up (1000Mbps/Full duplex)
    [   42.760000] br-lan: port 1(eth0.1) entered forwarding state
    [   42.770000] br-lan: port 1(eth0.1) entered forwarding state
    [   43.760000] eth0: link up (1000Mbps/Full duplex)
    [   44.770000] br-lan: port 1(eth0.1) entered forwarding state
    [   47.640000] ath_attach_dfs[12667] dfsdomain 3
    [   47.670000] wlan_vap_create : enter. devhandle=0x832d0380, opmode=IEEE80211_M_HOSTAP, flags=0x1
    [   47.680000] **ieee80211_vap_setup: reset last time and last up time**
    [   47.690000] wlan_vap_create : exit. devhandle=0x832d0380, opmode=IEEE80211_M_HOSTAP, flags=0x1.
    [   47.700000] VAP device ath0 created osifp: (81512380) os_if: (831d8000)
    [   47.780000] Set freq vap stop send + 831d8000
    [   47.780000] Set freq vap stop send -831d8000
    [   47.920000] Set wait done --831d8000
    [   47.970000]  
    [   47.970000]  DES SSID SET= 
    [   47.980000]  
    [   47.980000]  DES SSID SET=aterm-7e04ea-g 
    [   48.020000] wlan_vap_create : enter. devhandle=0x832d0380, opmode=IEEE80211_M_HOSTAP, flags=0x1
    [   48.030000] **ieee80211_vap_setup: reset last time and last up time**
    [   48.040000] wlan_vap_create : exit. devhandle=0x832d0380, opmode=IEEE80211_M_HOSTAP, flags=0x1.
    [   48.050000] VAP device ath01 created osifp: (8146c380) os_if: (815b8000)
    [   48.080000] Set freq vap stop send + 831d8000
    [   48.090000] Set freq vap stop send -831d8000
    [   48.220000] Set wait done --831d8000
    [   48.220000] Set freq vap stop send + 815b8000
    [   48.220000] Set freq vap stop send -815b8000
    [   48.360000] Set wait done --815b8000
    [   48.450000]  
    [   48.450000]  DES SSID SET= 
    [   48.470000]  
    [   48.470000]  DES SSID SET=aterm-7e04ea-gw 
    [   48.630000] --osif_vap_init: cac_dfs_curch=0 desired channel=-1--
    [   48.760000] 8021q: adding VLAN 0 to HW filter on device ath0
    [   49.910000] device ath0 entered promiscuous mode
    [   49.920000] br-lan: port 2(ath0) entered forwarding state
    [   49.920000] br-lan: port 2(ath0) entered forwarding state
    [   50.110000] device ath01 entered promiscuous mode
    [   50.310000] isCountryCodeValid: EEPROM regdomain 0x88
    [   50.310000] ol_regdmn_init_channels: !avail mode 0x1f9001 (0x2) flags 0x2150
    [   50.320000] ol_regdmn_init_channels: !avail mode 0x1f9001 (0x4) flags 0xa0
    [   50.330000] ol_regdmn_init_channels: !avail mode 0x1f9001 (0x8) flags 0xc0
    [   50.330000] ol_regdmn_init_channels: !avail mode 0x1f9001 (0x20) flags 0xd0
    [   50.340000] ol_regdmn_init_channels: !avail mode 0x1f9001 (0x40) flags 0x150
    [   50.350000] ol_regdmn_init_channels: !avail mode 0x1f9001 (0x800) flags 0x10080
    [   50.350000] ol_regdmn_init_channels: !avail mode 0x1f9001 (0x2000) flags 0x20080
    [   50.360000] ol_regdmn_init_channels: !avail mode 0x1f9001 (0x4000) flags 0x40080
    [   50.370000] Add VHT80 channel: 5210
    [   50.370000] Add VHT80 channel: 5290
    [   50.380000] Add VHT80 channel: 5530
    [   50.380000] Add VHT80 channel: 5610
    [   50.380000] Skipping VHT80 channel 5660
    [   50.390000] Skipping VHT80 channel 5680
    [   50.390000] Skipping VHT80 channel 5700
    [   50.410000] ath_ioctl: SIOC80211IFCREATE CALLED
    [   50.420000] wmi_unified_vdev_create_send: ID = 0 VAP Addr = c0:25:a2:**:**:b3:
    [   50.420000] **ieee80211_vap_setup: reset last time and last up time**
    [   50.430000] Setting dscp for vap id: 0
    [   50.430000] VAP device ath1 created osifp: (8153b380) os_if: (815d4000)
    [   50.460000] Set freq vap stop send + 815d4000
    [   50.460000] OL vap_stop +
    [   50.470000] ol_ath_vap_stopping=0 0
    [   50.470000] wmi_unified_vdev_stop_send for vap 0 (823f0000)
    [   50.480000] OL vap_stop -
    [   50.480000] STOPPED EVENT for vap 0 (823f0000)
    [   50.480000] Set freq vap stop send -815d4000
    [   50.620000] Set wait done --815d4000
    [   50.620000] DCS: ol_ath_disable_dcsim dcs state 0 
    [   50.630000] De-authenticating all the nodes before channel change 
    [   50.680000]  
    [   50.680000]  DES SSID SET= 
    [   50.690000]  
    [   50.690000]  DES SSID SET=aterm-7e04ea-a 
    [   50.730000] ath_ioctl: SIOC80211IFCREATE CALLED
    [   50.740000] wmi_unified_vdev_create_send: ID = 1 VAP Addr = c2:25:a2:**:**:b3:
    [   50.750000] **ieee80211_vap_setup: reset last time and last up time**
    [   50.750000] Setting dscp for vap id: 1
    [   50.760000] VAP device ath11 created osifp: (815f1380) os_if: (815f4000)
    [   50.790000] Set freq vap stop send + 815d4000
    [   50.790000] OL vap_stop +
    [   50.800000] ol_ath_vap_stopping=0 0
    [   50.800000] wmi_unified_vdev_stop_send for vap 0 (823f0000)
    [   50.810000] OL vap_stop -
    [   50.810000] STOPPED EVENT for vap 0 (823f0000)
    [   50.810000] Set freq vap stop send -815d4000
    [   50.950000] Set wait done --815d4000
    [   50.950000] Set freq vap stop send + 815f4000
    [   50.950000] OL vap_stop +
    [   50.960000] ol_ath_vap_stopping=0 0
    [   50.960000] wmi_unified_vdev_stop_send for vap 1 (823f0000)
    [   50.970000] OL vap_stop -
    [   50.970000] STOPPED EVENT for vap 1 (823f0000)
    [   50.970000] Set freq vap stop send -815f4000
    [   51.110000] Set wait done --815f4000
    [   51.110000] DCS: ol_ath_disable_dcsim dcs state 0 
    [   51.120000] De-authenticating all the nodes before channel change 
    [   51.130000] De-authenticating all the nodes before channel change 
    [   51.180000]  
    [   51.180000]  DES SSID SET= 
    [   51.190000]  
    [   51.190000]  DES SSID SET=aterm-7e04ea-ax 
    [   51.230000] --osif_vap_init: cac_dfs_curch=0 desired channel=-1--
    [   51.240000] OL vap_stop +
    [   51.240000] ol_ath_vap_stopping=0 0
    [   51.240000] wmi_unified_vdev_stop_send for vap 0 (823f0000)
    [   51.250000] OL vap_stop -
    [   51.250000] STOPPED EVENT for vap 0 (823f0000)
    [   51.390000] ic channel number: 109
    [   51.390000] ieee80211_acs_get_cusmode_channels: cus mode: 0x0  phy mode:0x13
    [   51.400000] channels for acs select: mode:0x0 will add 1 channels
    [   51.400000] channel: 36 
    [   51.410000] wmi_unified_scan_start_send for vap 0 (823f0000)
    [   51.410000] 8021q: adding VLAN 0 to HW filter on device ath1
    [   51.550000] mlme_create_infra_bss : Overriding HT40 channel with HT20 channel
    [   51.920000] br-lan: port 2(ath0) entered forwarding state
    [   52.120000] device ath1 entered promiscuous mode
    [   52.120000] br-lan: port 4(ath1) entered forwarding state
    [   52.130000] br-lan: port 4(ath1) entered forwarding state
    [   52.240000] device ath11 entered promiscuous mode
    [   52.770000]  ieee80211_ioctl_siwmode: imr.ifm_active=393856, new mode=3, valid=1 
    [   52.780000] --osif_vap_init: cac_dfs_curch=0 desired channel=6--
    [   52.780000] ath_vap_stopping=1
    [   52.930000] mlme_create_infra_bss : Overriding HT40 channel with HT20 channel
    [   53.260000] --osif_vap_init: cac_dfs_curch=0 desired channel=6--
    [   53.260000] ath_vap_stopping=1
    [   53.400000] mlme_create_infra_bss : Overriding HT40 channel with HT20 channel
    [   53.450000]  ieee80211_ioctl_siwmode: imr.ifm_active=66176, new mode=3, valid=1 
    [   53.470000] --osif_vap_init: cac_dfs_curch=0 desired channel=-1--
    [   54.130000] br-lan: port 4(ath1) entered forwarding state
    [   57.110000] OL vap_start +
    [   57.120000] wmi_unified_vdev_start_send for vap 0 (823f0000)
    [   57.120000] OL vap_start -
    [   57.130000] ol_vdev_start_resp_ev for vap 0 (823f0000)
    [   57.130000] ol_ath_vap_join: join operation is only for STA/IBSS mode
    [   57.140000] ol_ath_wmm_update:
    [   57.140000] ### ol_get_rate_code use mix rate!!  
    wmi_unified_vdev_up_send for vap 0 (823f0000)
    [   57.150000] Notification to UMAC VAP layer
    [   57.160000] OL vap_start +
    [   57.160000] wmi_unified_vdev_start_send for vap 0 (823f0000)
    [   57.170000] OL vap_start -
    [   57.170000] ol_vdev_start_resp_ev for vap 0 (823f0000)
    [   57.180000] ol_ath_vap_join: join operation is only for STA/IBSS mode
    [   57.180000] ### ol_get_rate_code use mix rate!!  
    wmi_unified_vdev_up_send for vap 0 (823f0000)
    [   57.190000] Notification to UMAC VAP layer
    [   57.490000] --osif_vap_init: cac_dfs_curch=0 desired channel=36--
    [   57.500000] ol_ath_vap_stopping=1 0
    [   57.500000] wmi_unified_vdev_stop_send for vap 0 (823f0000)
    [   57.510000] STOPPED EVENT for vap 0 (823f0000)
    [   57.650000] OL vap_start +
    [   57.650000] wmi_unified_vdev_start_send for vap 0 (823f0000)
    [   57.650000] OL vap_start -
    [   57.660000] ol_vdev_start_resp_ev for vap 0 (823f0000)
    [   57.660000] ol_ath_vap_join: join operation is only for STA/IBSS mode
    [   57.670000] ### ol_get_rate_code use mix rate!!  
    wmi_unified_vdev_up_send for vap 0 (823f0000)
    [   57.680000] Notification to UMAC VAP layer
    [   57.920000] [wifi1] FWLOG: [65230] WAL_DBGID_SECURITY_ENCR_EN (  )
    [   57.930000] [wifi1] FWLOG: [65230] WAL_DBGID_SECURITY_MCAST_KEY_SET ( 0x1 )
    Loading WLAN Partition
    GPIO Status Activated
    

WRC-1750GHBK2-I

WRC-1750GHBK2-Cの作業をするにあたり、恐らくハードが同じとは思われるが確信は持てなかった-Iも確保。本当に同じであるか確認していく。

Switch

zone WAN LAN
port
(WRC-1750GHBK2-I)
INTERNET LAN4 LAN3 LAN2 LAN1
port
(QCA8337N)
port1 port2 port3 port4 port5

MAC

  • ART, 0x1002 (2.4G)
  • ART, 0x5006 (5G)
  • LAN: xx:xx:xx:xx:xx:81
  • WAN: xx:xx:xx:xx:xx:80
  • 2.4G: xx:xx:xx:xx:xx:82
  • 5G: xx:xx:xx:xx:xx:83

U-Boot

  • help
    ath> help
    ?       - alias for 'help'
    autoscr - run script from memory
    base    - print or set address offset
    bdinfo  - print Board Info structure
    boot    - boot default, i.e., run 'bootcmd'
    bootd   - boot default, i.e., run 'bootcmd'
    bootelf - Boot from an ELF image in memory
    bootm   - boot application image from memory
    bootp   - boot image via network using BootP/TFTP protocol
    bootvx  - Boot vxWorks from an ELF image
    cmp     - memory compare
    coninfo - print console devices and information
    cp      - memory copy
    crc32   - checksum calculation
    dhcp    - invoke DHCP client to obtain IP/boot params
    echo    - echo args to console
    erase   - erase FLASH memory
    ethreg  - Switch/PHY Reg rd/wr  utility
    exit    - exit script
    flinfo  - print FLASH memory information
    go      - start application at address 'addr'
    help    - print online help
    iminfo  - print header information for application image
    itest   - return true/false on integer compare
    loop    - infinite loop on address range
    mct   - simple RAM test
    md      - memory display
    mii     - MII utility commands
    mm      - memory modify (auto-incrementing)
    mtest   - simple RAM test
    mw      - memory write (fill)
    nfs     - boot image via network using NFS protocol
    nm      - memory modify (constant address)
    pci     - list and access PCI Configuration Space
    ping    - send ICMP ECHO_REQUEST to network host
    pll cpu-pll dither ddr-pll dither - Set to change CPU & DDR speed
    pll erase
    pll get
    printenv- print environment variables
    progmac - Set ethernet MAC addresses
    progmac2 - Set ethernet MAC addresses
    protect - enable or disable FLASH write protection
    rarpboot- boot image via network using RARP/TFTP protocol
    reset   - Perform RESET of the CPU
    run     - run commands in an environment variable
    saveenv - save environment variables to persistent storage
    setenv  - set environment variables
    sleep   - delay execution for some time
    test    - minimal test like /bin/sh
    tftpboot- boot image via network using TFTP protocol
    version - print monitor version
    
  • version
    ath> version
    
    U-Boot 1.1.4 (Jun  2 2015 - 11:35:33)
    
  • printenv
    bootlogに *** Warning - bad CRC, using default environment が吐かれているため、実際とは異なる可能性もある
    ath> printenv
    bootargs=console=ttyS0,115200 root=31:02 rootfstype=jffs2 init=/sbin/init mtdparts=ath-nor0:256k(u-boot),64k(u-boot-env),6336k(rootfs),1408k(uImage),8256k(mib0),64k(ART)
    bootdelay=2
    baudrate=115200
    ethaddr=0x00:0xaa:0xbb:0xcc:0xdd:0xee
    ipaddr=192.168.1.1
    serverip=192.168.1.10
    dir=
    lu=tftp 0x80060000 ${dir}u-boot.bin&&erase 0x9f000000 +$filesize&&cp.b $fileaddr 0x9f000000 $filesize
    lf=tftp 0x80060000 ${dir}ap152${bc}-jffs2&&erase 0x9f050000 +0x630000&&cp.b $fileaddr 0x9f050000 $filesize
    lk=tftp 0x80060000 ${dir}vmlinux${bc}.lzma.uImage&&erase 0x9f680000 +$filesize&&cp.b $fileaddr 0x9f680000 $filesize
    stdin=serial
    stdout=serial
    stderr=serial
    ethact=eth0
    bootcmd=bootm 0xbf070000
    
    Environment size: 685/65532 bytes
    
  • mii device
    ath> mii device
    MII devices: 'eth0' 
    Current device: 'eth0'
    
  • md.l 0x18050048 1
    ath> md.l 0x18050048 1
    18050048: 03000101    ....
    
  • tftp
    WRC-300GHBK2-I, WRC-1750GHBK2-Cと同様、ethaddrがエラー
    ath> tftp
    Trying eth0
    dup 1 speed 1000
    *** ERROR: `ethaddr' not set
    Trying eth0
    
    ath> set ethaddr=; set ethaddr 00:aa:bb:cc:dd:ee; tftp
    eth_set_enetaddr(num=0, addr=00:aa:bb:cc:dd:ee)
    Setting new HW address on eth0
    New Address is             00:AA:BB:CC:DD:EE
    eth_set_enetaddr(num=0, addr=00:aa:bb:cc:dd:ee)
    Setting new HW address on eth0
    New Address is             00:AA:BB:CC:DD:EE
    Trying eth0
    *** Warning: no boot file name; using '0101A8C0.img'
    Using eth0 device
    TFTP from server 192.168.1.10; our IP address is 192.168.1.1
    Filename '0101A8C0.img'.
    Load address: 0x81000000
    Loading: *
    Abort
    

Kernel

パスワードを要求されるため、コンソールにログインできない。

  • bootlog (sw: RT)
    U-Boot 1.1.4 (Jun  2 2015 - 11:35:33)
    
    ap152 - Dragonfly 1.0DRAM:  
    sri
    ath_ddr_initial_config(283): (ddr2 init)
    ath_sys_frequency: cpu 775 ddr 650 ahb 258
    Tap values = (0xf, 0xf, 0xf, 0xf)
    128 MB
    Top of RAM usable for U-Boot at: 88000000
    Reserving 206k for U-Boot at: 87fcc000
    Reserving 192k for malloc() at: 87f9c000
    Reserving 44 Bytes for Board Info at: 87f9bfd4
    Reserving 36 Bytes for Global Data at: 87f9bfb0
    Reserving 128k for boot params() at: 87f7bfb0
    Stack Pointer at: 87f7bf98
    Now running in RAM - U-Boot at: 87fcc000
    Flash Manuf Id 0xc2, DeviceId0 0x20, DeviceId1 0x18
    flash size 16MB, sector count = 256
    Flash: 16 MB
    *** Warning - bad CRC, using default environment
    
    In:    serial
    Out:   serial
    Err:   serial
    Net:   ath_gmac_enet_initialize...
    Fetching MAC Address from 0x87fee72c
    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 0x4b962100
    EDX wan_power_down!
    Hit any key to stop autoboot:  0 
    ## Booting image at bf070000 ...
       Image Name:   Linux Kernel Image
       Created:      2016-10-06  15:08:15 UTC
       Image Type:   MIPS Linux Kernel Image (lzma compressed)
       Data Size:    7913332 Bytes =  7.5 MB
       Load Address: 80002000
       Entry Point:  80248130
       Verifying Checksum at 0xbf07008c ...OK
       Uncompressing Kernel Image ... OK
    No initrd
    ## Transferring control to Linux (at address 80248130) ...
    ## Giving linux memsize in bytes, 134217728
    
    Starting kernel ...
    
    Booting QCA956x
    Linux version 2.6.31--LSDK-10.2-00082-4 (Logitec@localhost.localdomain) (gcc version 4.3.3 (GCC) ) #2 Thu Oct 6 22:37:31 CST 2016
    flash_size passed from bootloader = 16
    arg 1: console=ttyS0,115200
    arg 2: root=31:02
    arg 3: rootfstype=jffs2
    arg 4: init=/sbin/init
    arg 5: mtdparts=ath-nor0:256k(u-boot),64k(u-boot-env),6336k(rootfs),1408k(uImage),8256k(mib0),64k(ART)
    arg 6: mem=128M
    cmdLine: console=ttyS0,115200 root=31:04 rootfstype=squashfs init=/sbin/init mtdparts=ath-nor0:256k(u-boot),64k(u-boot-env),128k(nvram),1088k(Kernel),14720k(RootFS),64k(hwconfig),64k(ART),15808k(Uimage) mem=128M 
    CPU revision is: 00019750 (MIPS 74Kc)
    ath_sys_frequency: cpu 775 ddr 650 ahb 258
    Determined physical RAM map:
     memory: 02000000 @ 00000000 (usable)
    User-defined physical RAM map:
     memory: 08000000 @ 00000000 (usable)
    Zone PFN ranges:
      Normal   0x00000000 -> 0x00008000
    Movable zone start PFN for each node
    early_node_map[1] active PFN ranges
        0: 0x00000000 -> 0x00008000
    Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
    Kernel command line: console=ttyS0,115200 root=31:04 rootfstype=squashfs init=/sbin/init mtdparts=ath-nor0:256k(u-boot),64k(u-boot-env),128k(nvram),1088k(Kernel),14720k(RootFS),64k(hwconfig),64k(ART),15808k(Uimage) mem=128M 
    PID hash table entries: 512 (order: 9, 2048 bytes)
    Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
    Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
    Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
    Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
    Writing ErrCtl register=00000000
    Readback ErrCtl register=00000000
    Memory: 112228k/131072k available (2346k kernel code, 18684k reserved, 582k data, 160k init, 0k highmem)
    NR_IRQS:128
    plat_time_init: plat time init done
    r4k_clockevent_init: Ignoring int_usable failure
    Console: colour dummy device 80x25
    Calibrating delay loop... 387.07 BogoMIPS (lpj=774144)
    Mount-cache hash table entries: 512
    
    ****************ALLOC***********************
     Packet mem: 80318ac0 (0xe00000 bytes)
    ********************************************
    
    NET: Registered protocol family 16
    ath_pcibios_init: bus 0
    ath_pcibios_init(255): PCI 0 CMD write: 0x356
    registering PCI controller with io_map_base unset
    bio: create slab  at 0
    SCSI subsystem initialized
    pci 0000:00:00.0: PME# supported from D0 D1 D3hot
    pci 0000:00:00.0: PME# disabled
    pcibios_map_irq: IRQ 76 for bus 0
    NET: Registered protocol family 2
    IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
    TCP established hash table entries: 4096 (order: 3, 32768 bytes)
    TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
    TCP: Hash tables configured (established 4096 bind 4096)
    TCP reno registered
    NET: Registered protocol family 1
    ATH GPIOC major 0
    squashfs: version 4.0 (2009/01/31) Phillip Lougher
    fuse init (API version 7.12)
    msgmni has been set to 219
    io scheduler noop registered
    io scheduler deadline registered (default)
    Initializing edx switch control...
    Done
    Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
    serial8250.0: ttyS0 at MMIO 0xb8020000 (irq = 19) is a 16550A
    console [ttyS0] enabled
    brd: module loaded
    PPP generic driver version 2.4.2
    PPP BSD Compression module registered
    NET: Registered protocol family 24
    8 cmdlinepart partitions found on MTD device ath-nor0
    Creating 8 MTD partitions on "ath-nor0":
    0x000000000000-0x000000040000 : "u-boot"
    0x000000040000-0x000000050000 : "u-boot-env"
    0x000000050000-0x000000070000 : "nvram"
    0x000000070000-0x000000180000 : "Kernel"
    0x000000180000-0x000000fe0000 : "RootFS"
    0x000000fe0000-0x000000ff0000 : "hwconfig"
    0x000000ff0000-0x000001000000 : "ART"
    0x000000070000-0x000000fe0000 : "Uimage"
    u32 classifier
        Performance counters on
    Netfilter messages via NETLINK v0.30.
    nf_conntrack version 0.5.0 (2048 buckets, 8192 max)
    CONFIG_NF_CT_ACCT is deprecated and will be removed soon. Please use
    nf_conntrack.acct=1 kernel parameter, acct=1 nf_conntrack module option or
    sysctl net.netfilter.nf_conntrack_acct=1 to enable it.
    ctnetlink v0.93: registering with nfnetlink.
    xt_time: kernel timezone is -0000
    ip_tables: (C) 2000-2006 Netfilter Core Team
    ClusterIP Version 0.8 loaded successfully
    arp_tables: (C) 2002 David S. Miller
    TCP cubic registered
    NET: Registered protocol family 10
    IPv6 over IPv4 tunneling driver
    NET: Registered protocol family 17
    dnshijack
    802.1Q VLAN Support v1.8 Ben Greear 
    All bugs added by David S. Miller 
    arch/mips/atheros/gpio.c (ath_simple_config_init) ATH_S17INT_GPIO: 10
    athwdt_init: Registering WDT success
    VFS: Mounted root (squashfs filesystem) readonly on device 31:4.
    Freeing unused kernel memory: 160k freed
    init started: BusyBox v1.12.1--LSDK-10.2-00082-4 (2016-10-06 22:33:09 CST)
    starting pid 15, tty '': '/etc/init.d/rcS sysinit'
    rc ver. 1.0.1
    Initializing...Success!
    Mounting file systems...Success!
    Creating devices...Success!
    Creating loopback device...Success!
    starting pid 24, tty '': '/etc/init.d/rcS start'
    rc ver. 1.0.1
    Initializing...Success!
    Loading dynamic libraries...Success!
    edx_gpio: module license 'unspecified' taints kernel.
    Disabling lock debugging due to kernel taint
    Initializing EDX GPIO...Done
    Acelink events notification ver. 1.6
    argv[0]=/sbin/ev_broker class=2 paction=NETDEV_REGISTER hold=NODE_NUM=227525 retval=0
    argv[0]=/sbin/ev_broker class=2 paction=NETDEV_UP hold=NODE_NUM=227525 retval=0
    argv[0]=/sbin/ev_broker class=2 paction=NETDEV_REGISTER hold=NODE_NUM=166798 retval=0
    NVRAM access daemon Ver. 1.0 Build 20161006223153
    daemonize process
    Starting L0000Config.so...Done ! (ret=0)
    Starting L0100WLANInterface.so...Done ! (ret=0)
    Starting L0130EthInterface.so...Done ! (ret=0)
    Interface doesn't accept private ioctl...
    HALDbg (8BE0): Operation not permitted
    Interface doesn't accept private ioctl...
    ForBiasAuto (8BE0): Operation not permitted
    Invalid command : setVowExt
    Invalid command : setKeySrchAlways
    Invalid command : set_vsp_enable
    Invalid command : setPhyRestartWar
    Invalid command : setVowExtStats
    Invalid command : bgscan
    Invalid command : extoffset
    Invalid command : bgscan
    Invalid command : extoffset
    Interface doesn't accept private ioctl...
    AMPDU (8BE0): Operation not permitted
    Interface doesn't accept private ioctl...
    AMPDUFrames (8BE0): Operation not permitted
    Interface doesn't accept private ioctl...
    AMPDULim (8BE0): Operation not permitted
    Invalid command : HALDbg
    Invalid command : ATHDebug
    Invalid command : setVowExt
    Invalid command : setKeySrchAlways
    Invalid command : set_vsp_enable
    Invalid command : setPhyRestartWar
    Invalid command : setVowExtStats
    Invalid command : bgscan
    Starting L0200LANConfig.so...Done ! (ret=0)
    1970-01-01 00:00:22: (server.c.915) can't have more connections than fds/2:  1024 824 
    udhcpd: max_leases=235 is too big, setting to 101
    start lld2d...
    start child_net...
    start Router mode accesscontrol...
    starting firewall...
    start house_keeper...
    Starting L0230LANServices.so...Done ! (ret=0)
    Starting L0300WANConfig.so...Done ! (ret=0)
    
    Please press Enter to activate this console. starting wan_event...
    wan_event done !
    Notice: caching turned off
    starting wan_event...
    starting wan_ready...
    starting firewall...
    killall: upnpd: no process killed
    firewall done !
    start sntp...
    start dns_relay...
    Notice: caching turned off
    start igmpproxy...
    start ddns...
    start forwarding mode...
    iptables: No chain/target/match by that name.
    stopping edx_redir...
    Notice: caching turned off
    Notice: caching turned off
    iptables: No chain/target/match by that name.
    iptables: No chain/target/match by that name.
    wan_ready done !
    wan_event done !
    

WRC-1750GHBK2-C

WRC-300GHBK2-Iを把握した同時期に把握していた上位機。こちらもQCA956xかつ、ソフトウェア的にWRC-300GHBK2-Iと似通っていることが予想されたため、今回購入。弄るにあたってメモ。
ハード構成はWRC-1750GHBK2-Iと恐らく同一。

Switch

zone WAN LAN
port
(WRC-1750GHBK2-C)
INTERNET LAN4 LAN3 LAN2 LAN1
port
(QCA8337N)
port1 port2 port3 port4 port5

MAC

  • ART, 0x1002 (2.4G)
  • ART, 0x5006 (5G)
  • LAN: xx:xx:xx:xx:xx:35
  • WAN: xx:xx:xx:xx:xx:34
  • 2.4G: xx:xx:xx:xx:xx:36
  • 5G: xx:xx:xx:xx:xx:37

U-Boot

  • help
    ath> help
    ?       - alias for 'help'
    autoscr - run script from memory
    base    - print or set address offset
    bdinfo  - print Board Info structure
    boot    - boot default, i.e., run 'bootcmd'
    bootd   - boot default, i.e., run 'bootcmd'
    bootelf - Boot from an ELF image in memory
    bootm   - boot application image from memory
    bootp   - boot image via network using BootP/TFTP protocol
    bootvx  - Boot vxWorks from an ELF image
    cmp     - memory compare
    coninfo - print console devices and information
    cp      - memory copy
    crc32   - checksum calculation
    dhcp    - invoke DHCP client to obtain IP/boot params
    echo    - echo args to console
    erase   - erase FLASH memory
    ethreg  - Switch/PHY Reg rd/wr  utility
    exit    - exit script
    flinfo  - print FLASH memory information
    go      - start application at address 'addr'
    help    - print online help
    iminfo  - print header information for application image
    itest   - return true/false on integer compare
    loop    - infinite loop on address range
    mct   - simple RAM test
    md      - memory display
    mii     - MII utility commands
    mm      - memory modify (auto-incrementing)
    mtest   - simple RAM test
    mw      - memory write (fill)
    nfs     - boot image via network using NFS protocol
    nm      - memory modify (constant address)
    pci     - list and access PCI Configuration Space
    ping    - send ICMP ECHO_REQUEST to network host
    pll cpu-pll dither ddr-pll dither - Set to change CPU & DDR speed
    pll erase
    pll get
    printenv- print environment variables
    progmac - Set ethernet MAC addresses
    progmac2 - Set ethernet MAC addresses
    protect - enable or disable FLASH write protection
    rarpboot- boot image via network using RARP/TFTP protocol
    reset   - Perform RESET of the CPU
    run     - run commands in an environment variable
    saveenv - save environment variables to persistent storage
    setenv  - set environment variables
    sleep   - delay execution for some time
    test    - minimal test like /bin/sh
    tftpboot- boot image via network using TFTP protocol
    version - print monitor version
    
  • version
    ath> version
    
    U-Boot 1.1.4 (Jun  2 2015 - 11:35:33)
    
  • printenv
    bootlogに *** Warning - bad CRC, using default environment が吐かれているため、実際とは異なる可能性もある
    ath> printenv
    bootargs=console=ttyS0,115200 root=31:02 rootfstype=jffs2 init=/sbin/init mtdparts=ath-nor0:256k(u-boot),64k(u-boot-env),6336k(rootfs),1408k(uImage),8256k(mib0),64k(ART)
    bootdelay=2
    baudrate=115200
    ethaddr=0x00:0xaa:0xbb:0xcc:0xdd:0xee
    ipaddr=192.168.1.1
    serverip=192.168.1.10
    dir=
    lu=tftp 0x80060000 ${dir}u-boot.bin&&erase 0x9f000000 +$filesize&&cp.b $fileaddr 0x9f000000 $filesize
    lf=tftp 0x80060000 ${dir}ap152${bc}-jffs2&&erase 0x9f050000 +0x630000&&cp.b $fileaddr 0x9f050000 $filesize
    lk=tftp 0x80060000 ${dir}vmlinux${bc}.lzma.uImage&&erase 0x9f680000 +$filesize&&cp.b $fileaddr 0x9f680000 $filesize
    stdin=serial
    stdout=serial
    stderr=serial
    ethact=eth0
    bootcmd=bootm 0xbf070000
    
    Environment size: 685/65532 bytes
    
  • mii device
    ath> mii device
    MII devices: 'eth0' 
    Current device: 'eth0'
    
  • md.l 0x18050048 1
    ath> md.l 0x18050048 1
    18050048: 03000101    ....
    
  • tftp
    WRC-300GHBK2-Iと同様、ethaddrがエラー
    ath> tftp
    Trying eth0
    dup 1 speed 1000
    *** ERROR: `ethaddr' not set
    Trying eth0
    

Kernel

パスワード要求されるため、コンソールにログインできない。

  • bootlog
    U-Boot 1.1.4 (Jun  2 2015 - 11:35:33)
    
    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)
    128 MB
    Top of RAM usable for U-Boot at: 88000000
    Reserving 206k for U-Boot at: 87fcc000
    Reserving 192k for malloc() at: 87f9c000
    Reserving 44 Bytes for Board Info at: 87f9bfd4
    Reserving 36 Bytes for Global Data at: 87f9bfb0
    Reserving 128k for boot params() at: 87f7bfb0
    Stack Pointer at: 87f7bf98
    Now running in RAM - U-Boot at: 87fcc000
    Flash Manuf Id 0xc2, DeviceId0 0x20, DeviceId1 0x18
    flash size 16MB, sector count = 256
    Flash: 16 MB
    *** Warning - bad CRC, using default environment
    
    In:    serial
    Out:   serial
    Err:   serial
    Net:   ath_gmac_enet_initialize...
    Fetching MAC Address from 0x87fee72c
    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 0x4b962100
    EDX wan_power_down!
    Hit any key to stop autoboot:  0 
    ## Booting image at bf070000 ...
       Image Name:   Linux Kernel Image
       Created:      2016-10-06  15:08:15 UTC
       Image Type:   MIPS Linux Kernel Image (lzma compressed)
       Data Size:    7913332 Bytes =  7.5 MB
       Load Address: 80002000
       Entry Point:  80248130
       Verifying Checksum at 0xbf07008c ...OK
       Uncompressing Kernel Image ... OK
    No initrd
    ## Transferring control to Linux (at address 80248130) ...
    ## Giving linux memsize in bytes, 134217728
    
    Starting kernel ...
    
    Booting QCA956x
    Linux version 2.6.31--LSDK-10.2-00082-4 (Logitec@localhost.localdomain) (gcc version 4.3.3 (GCC) ) #2 Thu Oct 6 22:37:31 CST 2016
    flash_size passed from bootloader = 16
    arg 1: console=ttyS0,115200
    arg 2: root=31:02
    arg 3: rootfstype=jffs2
    arg 4: init=/sbin/init
    arg 5: mtdparts=ath-nor0:256k(u-boot),64k(u-boot-env),6336k(rootfs),1408k(uImage),8256k(mib0),64k(ART)
    arg 6: mem=128M
    cmdLine: console=ttyS0,115200 root=31:04 rootfstype=squashfs init=/sbin/init mtdparts=ath-nor0:256k(u-boot),64k(u-boot-env),128k(nvram),1088k(Kernel),14720k(RootFS),64k(hwconfig),64k(ART),15808k(Uimage) mem=128M 
    CPU revision is: 00019750 (MIPS 74Kc)
    ath_sys_frequency: cpu 775 ddr 650 ahb 258
    Determined physical RAM map:
     memory: 02000000 @ 00000000 (usable)
    User-defined physical RAM map:
     memory: 08000000 @ 00000000 (usable)
    Zone PFN ranges:
      Normal   0x00000000 -> 0x00008000
    Movable zone start PFN for each node
    early_node_map[1] active PFN ranges
        0: 0x00000000 -> 0x00008000
    Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
    Kernel command line: console=ttyS0,115200 root=31:04 rootfstype=squashfs init=/sbin/init mtdparts=ath-nor0:256k(u-boot),64k(u-boot-env),128k(nvram),1088k(Kernel),14720k(RootFS),64k(hwconfig),64k(ART),15808k(Uimage) mem=128M 
    PID hash table entries: 512 (order: 9, 2048 bytes)
    Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
    Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
    Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
    Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
    Writing ErrCtl register=00000000
    Readback ErrCtl register=00000000
    Memory: 112228k/131072k available (2346k kernel code, 18684k reserved, 582k data, 160k init, 0k highmem)
    NR_IRQS:128
    plat_time_init: plat time init done
    r4k_clockevent_init: Ignoring int_usable failure
    Console: colour dummy device 80x25
    Calibrating delay loop... 387.07 BogoMIPS (lpj=774144)
    Mount-cache hash table entries: 512
    
    ****************ALLOC***********************
     Packet mem: 80318ac0 (0xe00000 bytes)
    ********************************************
    
    NET: Registered protocol family 16
    ath_pcibios_init: bus 0
    ath_pcibios_init(255): PCI 0 CMD write: 0x356
    registering PCI controller with io_map_base unset
    bio: create slab  at 0
    SCSI subsystem initialized
    pci 0000:00:00.0: PME# supported from D0 D1 D3hot
    pci 0000:00:00.0: PME# disabled
    pcibios_map_irq: IRQ 76 for bus 0
    NET: Registered protocol family 2
    IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
    TCP established hash table entries: 4096 (order: 3, 32768 bytes)
    TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
    TCP: Hash tables configured (established 4096 bind 4096)
    TCP reno registered
    NET: Registered protocol family 1
    ATH GPIOC major 0
    squashfs: version 4.0 (2009/01/31) Phillip Lougher
    fuse init (API version 7.12)
    msgmni has been set to 219
    io scheduler noop registered
    io scheduler deadline registered (default)
    Initializing edx switch control...
    Done
    Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
    serial8250.0: ttyS0 at MMIO 0xb8020000 (irq = 19) is a 16550A
    console [ttyS0] enabled
    brd: module loaded
    PPP generic driver version 2.4.2
    PPP BSD Compression module registered
    NET: Registered protocol family 24
    8 cmdlinepart partitions found on MTD device ath-nor0
    Creating 8 MTD partitions on "ath-nor0":
    0x000000000000-0x000000040000 : "u-boot"
    0x000000040000-0x000000050000 : "u-boot-env"
    0x000000050000-0x000000070000 : "nvram"
    0x000000070000-0x000000180000 : "Kernel"
    0x000000180000-0x000000fe0000 : "RootFS"
    0x000000fe0000-0x000000ff0000 : "hwconfig"
    0x000000ff0000-0x000001000000 : "ART"
    0x000000070000-0x000000fe0000 : "Uimage"
    u32 classifier
        Performance counters on
    Netfilter messages via NETLINK v0.30.
    nf_conntrack version 0.5.0 (2048 buckets, 8192 max)
    CONFIG_NF_CT_ACCT is deprecated and will be removed soon. Please use
    nf_conntrack.acct=1 kernel parameter, acct=1 nf_conntrack module option or
    sysctl net.netfilter.nf_conntrack_acct=1 to enable it.
    ctnetlink v0.93: registering with nfnetlink.
    xt_time: kernel timezone is -0000
    ip_tables: (C) 2000-2006 Netfilter Core Team
    ClusterIP Version 0.8 loaded successfully
    arp_tables: (C) 2002 David S. Miller
    TCP cubic registered
    NET: Registered protocol family 10
    IPv6 over IPv4 tunneling driver
    NET: Registered protocol family 17
    dnshijack
    802.1Q VLAN Support v1.8 Ben Greear 
    All bugs added by David S. Miller 
    arch/mips/atheros/gpio.c (ath_simple_config_init) ATH_S17INT_GPIO: 10
    athwdt_init: Registering WDT success
    VFS: Mounted root (squashfs filesystem) readonly on device 31:4.
    Freeing unused kernel memory: 160k freed
    init started: BusyBox v1.12.1--LSDK-10.2-00082-4 (2016-10-06 22:33:09 CST)
    starting pid 15, tty '': '/etc/init.d/rcS sysinit'
    rc ver. 1.0.1
    Initializing...Success!
    Mounting file systems...Success!
    Creating devices...Success!
    Creating loopback device...Success!
    starting pid 24, tty '': '/etc/init.d/rcS start'
    rc ver. 1.0.1
    Initializing...Success!
    Loading dynamic libraries...Success!
    edx_gpio: module license 'unspecified' taints kernel.
    Disabling lock debugging due to kernel taint
    Initializing EDX GPIO...Done
    Acelink events notification ver. 1.6
    argv[0]=/sbin/ev_broker class=2 paction=NETDEV_REGISTER hold=NODE_NUM=429414 retval=0
    argv[0]=/sbin/ev_broker class=2 paction=NETDEV_UP hold=NODE_NUM=173575 retval=0
    argv[0]=/sbin/ev_broker class=2 paction=NETDEV_REGISTER hold=NODE_NUM=197118 retval=0
    NVRAM access daemon Ver. 1.0 Build 20161006223153
    daemonize process
    Starting L0000Config.so...Done ! (ret=0)
    Starting L0100WLANInterface.so...Done ! (ret=0)
    Starting L0130EthInterface.so...Done ! (ret=0)
    Interface doesn't accept private ioctl...
    HALDbg (8BE0): Operation not permitted
    Interface doesn't accept private ioctl...
    ForBiasAuto (8BE0): Operation not permitted
    Invalid command : setVowExt
    Invalid command : setKeySrchAlways
    Invalid command : set_vsp_enable
    Invalid command : setPhyRestartWar
    Invalid command : setVowExtStats
    Invalid command : bgscan
    Invalid command : extoffset
    Invalid command : bgscan
    Invalid command : extoffset
    Interface doesn't accept private ioctl...
    AMPDU (8BE0): Operation not permitted
    Interface doesn't accept private ioctl...
    AMPDUFrames (8BE0): Operation not permitted
    Interface doesn't accept private ioctl...
    AMPDULim (8BE0): Operation not permitted
    Invalid command : HALDbg
    Invalid command : ATHDebug
    Invalid command : setVowExt
    Invalid command : setKeySrchAlways
    Invalid command : set_vsp_enable
    Invalid command : setPhyRestartWar
    Invalid command : setVowExtStats
    Invalid command : bgscan
    Starting L0200LANConfig.so...Done ! (ret=0)
    1970-01-01 00:00:22: (server.c.915) can't have more connections than fds/2:  1024 824 
    udhcpd: max_leases=235 is too big, setting to 101
    start lld2d...
    start child_net...
    start Router mode accesscontrol...
    starting firewall...
    start house_keeper...
    Starting L0230LANServices.so...Done ! (ret=0)
    starting wan_event...
    wan_event done !
    Starting L0300WANConfig.so...Done ! (ret=0)
    
    Please press Enter to activate this console. Notice: caching turned off
    Notice: caching turned off
    insmod: cannot insert '/sbin/edx_tables.ko': File exists
    device eth0.2 is already a member of a bridge; can't enslave it to bridge br0.
    insmod: cannot insert '/sbin/edx_m2u.ko': File exists
    starting wan_event...
    wan_event done !
    starting wan_event...
    udhcpc receive a leasefail for eth0.2
    wan_event done !
    

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

WRC-300GHBK2-I ethaddr

WRC-300GHBK2-Iでサポート作業をするにあたり、ビルドしたinitramfsファームでブートさせようとしたときに問題があったのでメモ。

WRC-300GHBK2-I

某フリマサイトで流し見ていたところ、11nまでながらGbEのこの機種を発見。調べたところQCA956xらしく、興味が出たので購入。弄っていくにあたってのメモ。

Switch

zone WAN LAN
port
(WRC-300GHBK2-I)
インターネット LAN4 LAN3 LAN2 LAN1
port
(QCA8337N)
port1 port2 port3 port4 port5

MAC

ART内0x1002 (2.4G)

  • LAN: xx:xx:xx:xx:xx:53
  • WAN: xx:xx:xx:xx:xx:52
  • 2.4G: xx:xx:xx:xx:xx:54

U-Boot

  • help
    ath> help
    ?       - alias for 'help'
    autoscr - run script from memory
    base    - print or set address offset
    bdinfo  - print Board Info structure
    boot    - boot default, i.e., run 'bootcmd'
    bootd   - boot default, i.e., run 'bootcmd'
    bootelf - Boot from an ELF image in memory
    bootm   - boot application image from memory
    bootp   - boot image via network using BootP/TFTP protocol
    bootvx  - Boot vxWorks from an ELF image
    cmp     - memory compare
    coninfo - print console devices and information
    cp      - memory copy
    crc32   - checksum calculation
    dhcp    - invoke DHCP client to obtain IP/boot params
    echo    - echo args to console
    erase   - erase FLASH memory
    ethreg  - Switch/PHY Reg rd/wr  utility
    exit    - exit script
    flinfo  - print FLASH memory information
    go      - start application at address 'addr'
    help    - print online help
    iminfo  - print header information for application image
    itest   - return true/false on integer compare
    loop    - infinite loop on address range
    mct   - simple RAM test
    md      - memory display
    mii     - MII utility commands
    mm      - memory modify (auto-incrementing)
    mtest   - simple RAM test
    mw      - memory write (fill)
    nfs     - boot image via network using NFS protocol
    nm      - memory modify (constant address)
    pci     - list and access PCI Configuration Space
    ping    - send ICMP ECHO_REQUEST to network host
    pll cpu-pll dither ddr-pll dither - Set to change CPU & DDR speed
    pll erase
    pll get
    printenv- print environment variables
    progmac - Set ethernet MAC addresses
    progmac2 - Set ethernet MAC addresses
    protect - enable or disable FLASH write protection
    rarpboot- boot image via network using RARP/TFTP protocol
    reset   - Perform RESET of the CPU
    run     - run commands in an environment variable
    saveenv - save environment variables to persistent storage
    setenv  - set environment variables
    sleep   - delay execution for some time
    test    - minimal test like /bin/sh
    tftpboot- boot image via network using TFTP protocol
    version - print monitor version
    

  • version
    ath> version
    
    U-Boot 1.1.4 (Jun  8 2015 - 17:12:13)
    

  • printenv
    bootlogを見るとbad CRCによりdefault environmentが使用されているため、以下は実際の値ではない可能性がある
    ath> printenv
    bootargs=console=ttyS0,115200 root=31:02 rootfstype=jffs2 init=/sbin/init mtdparts=ath-nor0:256k(u-boot),64k(u-boot-env),6336k(rootfs),1408k(uImage),64k(mib0),64k(ART)
    bootdelay=2
    baudrate=115200
    ethaddr=0x00:0xaa:0xbb:0xcc:0xdd:0xee
    ipaddr=192.168.1.1
    serverip=192.168.1.10
    dir=
    lu=tftp 0x80060000 ${dir}u-boot.bin&&erase 0x9f000000 +$filesize&&cp.b $fileaddr 0x9f000000 $filesize
    lf=tftp 0x80060000 ${dir}ap152${bc}-jffs2&&erase 0x9f050000 +0x630000&&cp.b $fileaddr 0x9f050000 $filesize
    lk=tftp 0x80060000 ${dir}vmlinux${bc}.lzma.uImage&&erase 0x9f680000 +$filesize&&cp.b $fileaddr 0x9f680000 $filesize
    stdin=serial
    stdout=serial
    stderr=serial
    ethact=eth0
    bootcmd=bootm 0xbf070000
    
    Environment size: 683/65532 bytes
    

  • mii device
    QCA9563はSGMIIのみ
    ath> mii device
    MII devices: 'eth0' 
    Current device: 'eth0'
    

Kernel

パスワード要求されるため、コンソールにログインできない。

  • bootlog
    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 - bad CRC, using default environment
    
    *** 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:   Linux Kernel Image
       Created:      2015-06-08   9:12:59 UTC
       Image Type:   MIPS Linux Kernel Image (lzma compressed)
       Data Size:    7298932 Bytes =  7 MB
       Load Address: 80002000
       Entry Point:  80248110
       Verifying Checksum at 0xbf07008c ...OK
       Uncompressing Kernel Image ... OK
    No initrd
    ## Transferring control to Linux (at address 80248110) ...
    ## Giving linux memsize in bytes, 67108864
    
    Starting kernel ...
    
    Booting QCA956x
    Linux version 2.6.31--LSDK-10.2.r2-00013-4 (root@localhost.localdomain) (gcc version 4.3.3 (GCC) ) #12 Wed May 27 19:26:20 CST 2015
    flash_size passed from bootloader = 8
    arg 1: console=ttyS0,115200
    arg 2: root=31:02
    arg 3: rootfstype=jffs2
    arg 4: init=/sbin/init
    arg 5: mtdparts=ath-nor0:256k(u-boot),64k(u-boot-env),6336k(rootfs),1408k(uImage),64k(mib0),64k(ART)
    arg 6: mem=64M
    cmdLine: console=ttyS0,115200 root=31:04 rootfstype=squashfs init=/sbin/init mtdparts=ath-nor0:256k(u-boot),64k(u-boot-env),128k(nvram),1088k(Kernel),6528k(RootFS),64k(hwconfig),64k(ART),7616k(Uimage) mem=64M 
    CPU revision is: 00019750 (MIPS 74Kc)
    ath_sys_frequency: cpu 775 ddr 650 ahb 258
    Determined physical RAM map:
     memory: 02000000 @ 00000000 (usable)
    User-defined physical RAM map:
     memory: 04000000 @ 00000000 (usable)
    Zone PFN ranges:
      Normal   0x00000000 -> 0x00004000
    Movable zone start PFN for each node
    early_node_map[1] active PFN ranges
        0: 0x00000000 -> 0x00004000
    Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
    Kernel command line: console=ttyS0,115200 root=31:04 rootfstype=squashfs init=/sbin/init mtdparts=ath-nor0:256k(u-boot),64k(u-boot-env),128k(nvram),1088k(Kernel),6528k(RootFS),64k(hwconfig),64k(ART),7616k(Uimage) mem=64M 
    PID hash table entries: 256 (order: 8, 1024 bytes)
    Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
    Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
    Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
    Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
    Writing ErrCtl register=00000000
    Readback ErrCtl register=00000000
    Memory: 47340k/65536k available (2346k kernel code, 18124k reserved, 582k data, 160k init, 0k highmem)
    NR_IRQS:128
    plat_time_init: plat time init done
    r4k_clockevent_init: Ignoring int_usable failure
    Console: colour dummy device 80x25
    Calibrating delay loop... 387.07 BogoMIPS (lpj=774144)
    Mount-cache hash table entries: 512
    
    ****************ALLOC***********************
     Packet mem: 80318ac0 (0xe00000 bytes)
    ********************************************
    
    NET: Registered protocol family 16
    ath_pcibios_init: bus 0
    ***** Warning PCIe 0 H/W not found !!!
    registering PCI controller with io_map_base unset
    bio: create slab  at 0
    SCSI subsystem initialized
    NET: Registered protocol family 2
    IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
    TCP established hash table entries: 2048 (order: 2, 16384 bytes)
    TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
    TCP: Hash tables configured (established 2048 bind 2048)
    TCP reno registered
    NET: Registered protocol family 1
    ATH GPIOC major 0
    squashfs: version 4.0 (2009/01/31) Phillip Lougher
    fuse init (API version 7.12)
    msgmni has been set to 92
    io scheduler noop registered
    io scheduler deadline registered (default)
    Initializing edx switch control...
    Done
    Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
    serial8250.0: ttyS0 at MMIO 0xb8020000 (irq = 19) is a 16550A
    console [ttyS0] enabled
    brd: module loaded
    PPP generic driver version 2.4.2
    PPP BSD Compression module registered
    NET: Registered protocol family 24
    8 cmdlinepart partitions found on MTD device ath-nor0
    Creating 8 MTD partitions on "ath-nor0":
    0x000000000000-0x000000040000 : "u-boot"
    0x000000040000-0x000000050000 : "u-boot-env"
    0x000000050000-0x000000070000 : "nvram"
    0x000000070000-0x000000180000 : "Kernel"
    0x000000180000-0x0000007e0000 : "RootFS"
    0x0000007e0000-0x0000007f0000 : "hwconfig"
    0x0000007f0000-0x000000800000 : "ART"
    0x000000070000-0x0000007e0000 : "Uimage"
    u32 classifier
        Performance counters on
    Netfilter messages via NETLINK v0.30.
    nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
    CONFIG_NF_CT_ACCT is deprecated and will be removed soon. Please use
    nf_conntrack.acct=1 kernel parameter, acct=1 nf_conntrack module option or
    sysctl net.netfilter.nf_conntrack_acct=1 to enable it.
    ctnetlink v0.93: registering with nfnetlink.
    xt_time: kernel timezone is -0000
    ip_tables: (C) 2000-2006 Netfilter Core Team
    ClusterIP Version 0.8 loaded successfully
    arp_tables: (C) 2002 David S. Miller
    TCP cubic registered
    NET: Registered protocol family 10
    IPv6 over IPv4 tunneling driver
    NET: Registered protocol family 17
    dnshijack
    802.1Q VLAN Support v1.8 Ben Greear 
    All bugs added by David S. Miller 
    arch/mips/atheros/gpio.c (ath_simple_config_init) ATH_S17INT_GPIO: 10
    athwdt_init: Registering WDT success
    VFS: Mounted root (squashfs filesystem) readonly on device 31:4.
    Freeing unused kernel memory: 160k freed
    init started: BusyBox v1.12.1--LSDK-10.2.r2-00013-4 (2015-01-27 17:03:31 CST)
    starting pid 15, tty '': '/etc/init.d/rcS sysinit'
    rc ver. 1.0.1
    Initializing...Success!
    Mounting file systems...Success!
    Creating devices...Success!
    Creating loopback device...Success!
    starting pid 24, tty '': '/etc/init.d/rcS start'
    rc ver. 1.0.1
    Initializing...Success!
    Loading dynamic libraries...Success!
    edx_gpio: module license 'unspecified' taints kernel.
    Disabling lock debugging due to kernel taint
    Initializing EDX GPIO...Done
    Acelink events notification ver. 1.6
    argv[0]=/sbin/ev_broker class=2 paction=NETDEV_REGISTER hold=NODE_NUM=255967 retval=0
    argv[0]=/sbin/ev_broker class=2 paction=NETDEV_UP hold=NODE_NUM=267765 retval=0
    argv[0]=/sbin/ev_broker class=2 paction=NETDEV_REGISTER hold=NODE_NUM=142878 retval=0
    NVRAM access daemon Ver. 1.0 Build 20150521134822
    daemonize process
    Starting L0000Config.so...Done ! (ret=0)
    Starting L0100WLANInterface.so...Done ! (ret=0)
    Starting L0130EthInterface.so...Done ! (ret=0)
    Interface doesn't accept private ioctl...
    HALDbg (8BE0): Operation not permitted
    Interface doesn't accept private ioctl...
    ForBiasAuto (8BE0): Operation not permitted
    Invalid command : setVowExt
    Invalid command : setKeySrchAlways
    Invalid command : set_vsp_enable
    Invalid command : setPhyRestartWar
    Invalid command : setVowExtStats
    Invalid command : bgscan
    Invalid command : extoffset
    Invalid command : bgscan
    Invalid command : extoffset
    Starting L0200LANConfig.so...Done ! (ret=0)
    1970-01-01 00:00:16: (server.c.915) can't have more connections than fds/2:  1024 824 
    udhcpd: max_leases=235 is too big, setting to 101
    start lld2d...
    start child_net...
    start Router mode accesscontrol...
    starting firewall...
    start house_keeper...
    Starting L0230LANServices.so...Done ! (ret=0)
    Starting L0300WANConfig.so...Done ! (ret=0)
    
    Please press Enter to activate this console. starting wan_event...
    wan_event done !
    Notice: caching turned off
    starting wan_event...
    starting wan_ready...
    starting firewall...
    killall: upnpd: no process killed
    firewall done !
    start sntp...
    start dns_relay...
    Notice: caching turned off
    start igmpproxy...
    start ddns...
    start forwarding mode...
    iptables: No chain/target/match by that name.
    stopping edx_redir...
    Notice: caching turned off
    iptables: No chain/target/match by that name.
    wan_ready done !
    wan_event done !
    
    starting pid 550, tty '': '-/bin/login'
    (none) login: