WXR-2533DHP pinmux ctl_reg

それっぽい値が取れたのでメモ。

レジスタ参考

計算式等

pinmux_base:	0x800000
ctl_reg_offset:	0x1000 + 0x10 * pin_id
ctl_reg:		pinmux_base + ctl_reg_offset

mux_bit: 2
pull_bit: 0
drv_bit: 6

# func (mux)
func = (ctl_reg >> mux_bit) & 7

# pull (bias)
pull = (ctl_reg >> pull_bit) & 3

# drive strength
drive_strength = (((ctl_reg >> drv_bit) & 7) + 1) * 2

static const char * const pulls_keeper[] = {
	"no pull",
	"pull down",
	"keeper",
	"pull up"
};

static const char * const pulls_no_keeper[] = {
	"no pull",
	"pull down",
	"pull up",
};

devmem2を利用して取得した実際の値

###  U-Boot
pin  reg     val  func  pull  drv
0    801000  c4   1     0     8
1    801010  2c4  1     0     8
2    801020  1    0     1     2
3    801030  1    0     1     2
4    801040  1    0     1     2
5    801050  1    0     1     2
6    801060  100  0     0     a   (=10)
7    801070  300  0     0     a
8    801080  300  0     0     a
9    801090  300  0     0     a
10   8010a0  344  1     0     c   (=12)
11   8010b0  344  1     0     c
12   8010c0  4    1     0     2
13   8010d0  4    1     0     2
14   8010e0  1    0     1     2
15   8010f0  300  0     0     a
16   801100  300  0     0     a
17   801110  1    0     1     2
18   801120  105  1     1     a
19   801130  105  1     1     a
20   801140  303  0     3     a
21   801150  1c5  1     1     10  (=16)????
22   801160  300  0     0     a
23   801170  300  0     0     a
24   801180  300  0     0     a
25   801190  300  0     0     a
26   8011a0  300  0     0     a
27   8011b0  2c8  2     0     8
28   8011c0  2c8  2     0     8
29   8011d0  2c8  2     0     8
30   8011e0  2c8  2     0     8
31   8011f0  2c8  2     0     8
32   801200  2c8  2     0     8
33   801210  1    0     1     2
34   801220  304  1     0     a
35   801230  304  1     0     a
36   801240  304  1     0     a
37   801250  304  1     0     a
38   801260  304  1     0     a
39   801270  307  1     3     a
40   801280  306  1     2     a
41   801290  306  1     2     a
42   8012a0  306  1     2     a
43   8012b0  306  1     2     a
44   8012c0  306  1     2     a
45   8012d0  306  1     2     a
46   8012e0  306  1     2     a
47   8012f0  306  1     2     a
48   801300  1    0     1     2
49   801310  1    0     1     2
50   801320  1    0     1     2
51   801330  c8   2     0     8
52   801340  c8   2     0     8
53   801350  300  0     0     a
54   801360  100  0     0     a
55   801370  100  0     0     a
56   801380  100  0     0     a
57   801390  100  0     0     a
58   8013a0  1    0     1     2
59   8013b0  c8   2     0     8
60   8013c0  c8   2     0     8
61   8013d0  c8   2     0     8
62   8013e0  c8   2     0     8
63   8013f0  300  0     3     a
64   801400  100  0     0     a
65   801410  100  0     0     a
66   801420  1    0     1     2
67   801430  1    0     1     2
68   801440  1    0     1     2

###  Kernel
/sys/kernel/debug/gpio にエントリがあるピン、及び rgmii2, nand, spi のみ調べた

pin  reg     val  func  pull  drv
0    801000  c0   0     0     8
1    801010  2c4  1     0     8
2    801020  
3    801030  200  0     0     2
4    801040  
5    801050  
6    801060  3    0     3     2
7    801070  203  0     3     2
8    801080  203  0     3     2
9    801090  203  0     3     2
10   8010a0  
11   8010b0  
12   8010c0  
13   8010d0  
14   8010e0  
15   8010f0  203  0     3     2
16   801100  203  0     3     2
17   801110  
18   801120  105  1     1     a
19   801130  105  1     1     a
20   801140  107  1     3     a
21   801150  145  1     1     c
22   801160  203  0     3     2
23   801170  203  0     3     2
24   801180  203  0     3     2
25   801190  203  0     3     2
26   8011a0  200  0     0     2
27   8011b0  c8   2     0     8
28   8011c0  c8   2     0     8
29   8011d0  c8   2     0     8
30   8011e0  c8   2     0     8
31   8011f0  c8   2     0     8
32   801200  c8   2     0     8
33   801210  
34   801220  304  1     0     a
35   801230  304  1     0     a
36   801240  304  1     0     a
37   801250  304  1     0     a
38   801260  304  1     0     a
39   801270  307  1     3     a
40   801280  306  1     2     a
41   801290  306  1     2     a
42   8012a0  306  1     2     a
43   8012b0  306  1     2     a
44   8012c0  306  1     2     a
45   8012d0  306  1     2     a
46   8012e0  306  1     2     a
47   8012f0  306  1     2     a
48   801300  200  0     0     2
49   801310  
50   801320  
51   801330  c8   2     0     8
52   801340  c8   2     0     8
53   801350  200  0     0     2
54   801360  3    0     3     2
55   801370  3    0     3     2
56   801380  3    0     3     2
57   801390  3    0     3     2
58   8013a0  3    0     3     2
59   8013b0  c8   2     0     8
60   8013c0  c8   2     0     8
61   8013d0  c8   2     0     8
62   8013e0  c8   2     0     8
63   8013f0  200  0     0     2
64   801400  3    0     3     2
65   801410  3    0     3     2
66   801420  
67   801430  3    0     3     2
68   801440  203  0     3     2
広告

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
    

WR8750Nメモ (3)

ブートが成功しかけた時のログ
io schedulerのregister、pinmuxのregister、earlyprintk -> ttyS0への切り替えなど、なんらかのタイミングでsoft-reset掛かる

start tftp load openwrt-ath79-tiny-nec_wr8750n-i
end tftp load length = 3583343
start memory load ... 
memory load complete
  begin  : 0x80060000
  length : 3583319
  startup: 0x80060000
boot
begin  : 0x80060000
length : 3583319
startup: 0x80060000
option: 0x0
[    0.000000] Linux version 4.14.87 (tofu@tofu-z77hvub18_openwrt) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r8695-1eb39ece8d)) #0 Tue Dec 11 13:11:03 2018
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001974c (MIPS 74Kc)
[    0.000000] MIPS: machine is NEC Aterm WR8750N
[    0.000000] SoC: Atheros AR9344 rev 1
[    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] random: get_random_bytes called from 0x8045772c with crng_init=0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: console=ttyS0,9600 rootfstype=squashfs,jffs2
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 120448K/131072K available (3444K kernel code, 139K rwdata, 468K rodata, 4772K init, 195K bss, 10624K 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: 560.000 MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6825930166 ns
[    0.000011] sched_clock: 32 bits at 280MHz, resolution 3ns, wraps every 7669584382ns
[    0.092708] Calibrating delay loop... 278.93 BogoMIPS (lpj=1394688)
[    0.237625] pid_max: default: 32768 minimum: 301
[    0.293070] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.372219] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.460495] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.578166] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.651120] pinctrl core: initialized pinctrl subsystem
[    0.714584] NET: Registered protocol family 16
[    0.768472] Can't analyze schedule() prologue at 803b8ee4
[    0.851006] clocksource: Switched to clocksource MIPS
[    0.912540] NET: Registered protocol family 2
[    0.965460] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    1.048781] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    1.124770] TCP: Hash tables configured (established 1024 bind 1024)
[    1.200908] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    1.270713] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    1.345915] NET: Registered protocol family 1
[    1.511715] Crashlog allocated RAM at address 0x3f00000
[    1.575637] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    1.657573] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    1.727362] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[   
IPL:SOFT-RESET

WR8750Nメモ (2)

data format in NEC firmware

     |  0x0 - 0x3  |  0x4 - 0x7  |  0x8 - 0xB  |  0xC - 0xF  |
     +-------------+-------------+-------------+-------------+
 0x0 |  Data Flag  | Data Length | Data Offset |   checksum  |
     +-------------+-------------+-------------+-------------+
0x10 |  Load Addr  | Entry Point |           Data            |
     +-------------+-------------+---------------------------+
0x20 |                         Data                          |
     +-------------+-------------+---------------------------+
...

Note: checksumは上位2 byteのみ、下位2 byteは0埋め

例 (initramfs + loader, LOADER_TYPE := gz):

     |  0x0 - 0x3  |  0x4 - 0x7  |  0x8 - 0xB  |  0xC - 0xF  |
     +-------------+-------------+-------------+-------------+
 0x0 |  8002 7FFD  |  0035 8260  |  0000 0018  |  B002 0000  |
     +-------------+-------------+-------------+-------------+
0x10 |  8006 0000  |  8006 0000  |  1F8B 0800     0000 0000  |
     +-------------+-------------+---------------------------+
0x20 |  0203 8CB8     0550 5D4D     B726 7C70     7709 EEEE  |
     +-------------+-------------+---------------------------+
...

https://qiita.com/yamori813/items/8dccf20843f31c57ccd3

“Data Flag” in data header

|  0x0 - 0x1  |  0x2 - 0x3  |
+-------------+-------------+
|     Flag    |  NOT(Flag)  |
+-------------+-------------+

loader-kernel の LOADER_TYPE は bin/gzip どちらも下記を適切に記述すると Loader は起動できる

bin gzip
0x0 – 0x1 0x2 – 0x3 0x0 – 0x1 0x2 – 0x3
0x0002 0xFFFD 0x8002 0x7FFD

WR8750Nメモ

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

コード

devadd/wr8750n – musashino-build/openwrt

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

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

エラー

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


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

exception!!
ExcCode:10 "Reserved instruction exception"

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

call trace
pc: 80a00c10



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

手順

※Windows使用する場合。

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

WR8750N

Switch

未確認

MAC

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

Bootloader

chiron

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

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

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

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

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

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

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

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

Kernel (NetBSD)

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

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
    

WN-AG300DGR stock -> OpenWrt (ath79)

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

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


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

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

Starting kernel ...

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



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

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

WN-AG300DGR

いつものように某フリマサイトを流し見ていた際に見つけた機種。調べてみるとAR934xらしいと思われたため、今回購入した。
弄っていくのでメモ。

Switch

zone WAN LAN
port
(WN-AG300DGR)
インターネット LAN4 LAN3 LAN2 LAN1
port
(AR8327N)
port5 port4 port3 port2 port1

MAC

  • LAN: 34:76:C5:xx:xx:78 (u-boot-env, ethaddr)
  • WAN: 34:76:C5:xx:xx:7A (u-boot-env, wanaddr)
  • 2.4G: 34:76:C5:xx:xx:78
  • 5G: 34:76:C5:xx:xx:79

U-Boot

  • help
    ar7240> help
    ?       - alias for 'help'
    autoscr - run script from memory
    base    - print or set address offset
    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
    echo    - echo args to console
    erase   - erase FLASH memory
    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
    imls    - list all images found in flash
    itest   - return true/false on integer compare
    loadb   - load binary file over serial line (kermit mode)
    loads   - load S-Record file over serial line
    loady   - load binary file over serial line (ymodem mode)
    loop    - infinite loop on address range
    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
    printenv- print environment variables
    progmac - 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
    ar7240> version
    
    U-Boot 1.2.6 (Jun 29 2012 - 16:01:45)
    

  • printenv
    ar7240> printenv
    bootargs=console=ttyS0,115200 root=31:02 rootfstype=squashfs,jffs2 init=/sbin/init mtdparts=ar7240-nor0:256k(u-boot),64k(u-boot-env),2752k(rootfs),896k(uImage),64k(NVRAM),64k(ART)
    bootcmd=bootm 0x9f040000
    bootdelay=4
    baudrate=115200
    ethaddr="34:76:C5:**:**:78"
    ipaddr=192.168.1.1
    serverip=192.168.1.101
    sn=000890267
    hw_ver=1.0.0
    hw_id=030A0047
    pro_id=000
    country=000
    domain=1
    wanaddr=34:76:C5:**:**:7A
    wlanaddr=00:AA:BB:CC:DD:12
    snextra=00000000B7G000890267
    bootfile=uImage
    dir=
    bc=mi124_f1e
    lu=tftp 0x80060000 ${dir}u-boot.bin&&erase 0x9f000000 +$filesize;cp.b $fileaddr 0x9f000000 $filesize
    lf=tftp 0x80060000 ${dir}${bc}-jffs2&&erase 0x9f050000 +$filesize;cp.b $fileaddr 0x9f050000 $filesize
    lk=tftp 0x80060000 ${dir}vmlinux_${bc}.lzma.uImage&&erase 0x9f300000 +$filesize;cp.b $fileaddr 0x9f300000 $filesize
    ethact=eth0
    op_mode=0
    uboot_ver=1.2.6.351
    stdin=serial
    stdout=serial
    stderr=serial
    
    Environment size: 894/65532 bytes
    

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

  • md.l 0x1805002c 1
    ar7240> md.l 0x1805002c 1
    1805002c: 06000000    ....
    

Kernel

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

  • uname -a
    # uname -a
    Linux WN-AG300DGR 2.6.34.5 #2 Thu Sep 7 16:36:28 CST 2017 mips unknown
    

  • cat /proc/version
    # cat /proc/version
    Linux version 2.6.34.5 (root@Norkay-BM6835-BM6635-BP6335) (gcc version 4.3.4 (Buildroot 2010.05) ) #2 Thu Sep 7 16:36:28 CST 2017
    
  • cat /proc/cpuinfo
    # cat /proc/cpuinfo
    system type             : Atheros AR934x
    processor               : 0
    cpu model               : MIPS 74Kc V4.12
    BogoMIPS                : 267.26
    CPUClock                : 535
    wait instruction        : yes
    microsecond timers      : yes
    tlb_entries             : 32
    extra interrupt vector  : yes
    hardware watchpoint     : yes, count: 4, address/irw mask: [0x0000, 0x0ff8, 0x0ff8, 0x0ff8]
    ASEs implemented        : mips16 dsp
    shadow register sets    : 1
    core                    : 0
    VCED exceptions         : not available
    VCEI exceptions         : not available
    
  • cat /proc/meminfo
    # cat /proc/meminfo
    MemTotal:          62020 kB
    MemFree:           25452 kB
    Buffers:            2644 kB
    Cached:            10944 kB
    SwapCached:            0 kB
    Active:             5592 kB
    Inactive:           9712 kB
    Active(anon):       2120 kB
    Inactive(anon):      144 kB
    Active(file):       3472 kB
    Inactive(file):     9568 kB
    Unevictable:         400 kB
    Mlocked:               0 kB
    SwapTotal:             0 kB
    SwapFree:              0 kB
    Dirty:                 0 kB
    Writeback:             0 kB
    AnonPages:          2128 kB
    Mapped:             2624 kB
    Shmem:               148 kB
    Slab:              16156 kB
    SReclaimable:        776 kB
    SUnreclaim:        15380 kB
    KernelStack:         528 kB
    PageTables:          372 kB
    NFS_Unstable:          0 kB
    Bounce:                0 kB
    WritebackTmp:          0 kB
    CommitLimit:       31008 kB
    Committed_AS:       6848 kB
    VmallocTotal:    1048372 kB
    VmallocUsed:        1188 kB
    VmallocChunk:    1033456 kB
    
  • cat /proc/mtd
    # cat /proc/mtd
    dev:    size   erasesize  name
    mtd0: 01000000 00010000 "ALL"
    mtd1: 00030000 00010000 "Bootloader"
    mtd2: 00010000 00010000 "Config"
    mtd3: 00f10000 00010000 "Kernel"
    mtd4: 00da0000 00010000 "apps"
    mtd5: 00040000 00010000 "manufacture"
    mtd6: 00010000 00010000 "backup"
    mtd7: 00050000 00010000 "storage"
    mtd8: 00010000 00010000 "caldata"
    
  • bootlog (op_mode=0)
    U-Boot 1.2.6 (Jun 29 2012 - 16:01:45)
    U-boot MI124
    DRAM:  
    sri
    Wasp 1.1
    wasp_ddr_initial_config(254): (16bit) ddr2 init
    64 MB
    Top of RAM usable for U-Boot at: 84000000
    Reserving 231k for U-Boot at: 83fc4000
    Reserving 192k for malloc() at: 83f94000
    Reserving 44 Bytes for Board Info at: 83f93fd4
    Reserving 36 Bytes for Global Data at: 83f93fb0
    Reserving 128k for boot params() at: 83f73fb0
    Stack Pointer at: 83f73f98
    Now running in RAM - U-Boot at: 83fc4000
    id read 0xc217
    venid=c2,devid=17
    Unknown flash device
    Flash: 16 MB
    pcie module ID is correct 0x30168c 
    In:    serial
    Out:   serial
    Err:   serial
    Net:   ag934x_enet_initialize...
    No valid address in Flash. Using fixed address
     wasp  reset mask:c03300 
    WASP  ----> S17 PHY *
    : cfg1 0x7 cfg2 0x7114
    eth0: 00:03:7f:09:0b:ad
    athrs17_reg_init: complete
    eth0 up
    eth0
    ag934x_enet_initialize...
    No valid address in Flash. Using fixed address
     wasp  reset mask:c03300 
    WASP  ----> S17 PHY *
    : cfg1 0xf cfg2 0x7114
    eth0: 00:03:7f:09:0b:ad
    eth0 up
    eth0
    
    Please choose the operation: 
       1: Load system code to SDRAM via TFTP. 
       3: Boot system code via Flash (default).
       4: Entr boot command line interface.
                                                                                                                                   0  
       
    3: System Boot system code via Flash.
    ## Booting image at 9f040000 ...
       Image Name:   Linux Kernel Image
       Created:      2017-09-07   8:36:32 UTC
       Image Type:   MIPS Linux Kernel Image (lzma compressed)
       Data Size:    1468045 Bytes =  1.4 MB
       Load Address: 80002000
       Entry Point:  80006110
       Verifying Checksum at 0x9f040040 ...OK
       Uncompressing Kernel Image ... OK
    No initrd
    ## Transferring control to Linux (at address 80006110) ...
    ## Giving linux memsize in bytes, 67108864
    
    Starting kernel ...
    
    Booting Atheros AR934x
    init started: BusyBox v1.7.5 (2017-09-07 16:33:23 CST)
    starting pid 717, tty '/dev/console': '/sbin/config_init'
    mknod: /dev/ttyS0: File exists
    mknod: /dev/ttyS1: File exists
    Config Init version: 1.07.000.52 date: 2017/09/07
    Sun Jan  1 00:00:00 UTC 2017
    ln: /lib/./modules: File exists
    starting pid 777, tty '/dev/ttyS0': '/sbin/config_term'
    ************************************************************************
    *                              WN-AG300DGR                             *
    ************************************************************************
    
    KernelApp/Ramdisk Ver:1.07.000.52                        Date:2017/09/07
    password: 
    

  • bootlog (op_mode=1)
    U-Boot 1.2.6 (Jun 29 2012 - 16:01:45)
    U-boot MI124
    DRAM:  
    sri
    Wasp 1.1
    wasp_ddr_initial_config(254): (16bit) ddr2 init
    64 MB
    Top of RAM usable for U-Boot at: 84000000
    Reserving 231k for U-Boot at: 83fc4000
    Reserving 192k for malloc() at: 83f94000
    Reserving 44 Bytes for Board Info at: 83f93fd4
    Reserving 36 Bytes for Global Data at: 83f93fb0
    Reserving 128k for boot params() at: 83f73fb0
    Stack Pointer at: 83f73f98
    Now running in RAM - U-Boot at: 83fc4000
    id read 0xc217
    venid=c2,devid=17
    Unknown flash device
    Flash: 16 MB
    pcie module ID is correct 0x30168c 
    In:    serial
    Out:   serial
    Err:   serial
    Net:   ag934x_enet_initialize...
    No valid address in Flash. Using fixed address
     wasp  reset mask:c03300 
    WASP  ----> S17 PHY *
    : cfg1 0x7 cfg2 0x7114
    eth0: 00:03:7f:09:0b:ad
    athrs17_reg_init: complete
    eth0 up
    eth0
    ag934x_enet_initialize...
    No valid address in Flash. Using fixed address
     wasp  reset mask:c03300 
    WASP  ----> S17 PHY *
    : cfg1 0xf cfg2 0x7114
    eth0: 00:03:7f:09:0b:ad
    eth0 up
    eth0
    
    Please choose the operation: 
       1: Load system code to SDRAM via TFTP. 
       3: Boot system code via Flash (default).
       4: Entr boot command line interface.
                                                                                                                                   2  
    You choosed 3
    
                                                                                                                                    0 
       
    3: System Boot system code via Flash.
    ## Booting image at 9f040000 ...
       Image Name:   Linux Kernel Image
       Created:      2017-09-07   8:36:32 UTC
       Image Type:   MIPS Linux Kernel Image (lzma compressed)
       Data Size:    1468045 Bytes =  1.4 MB
       Load Address: 80002000
       Entry Point:  80006110
       Verifying Checksum at 0x9f040040 ...OK
       Uncompressing Kernel Image ... OK
    No initrd
    ## Transferring control to Linux (at address 80006110) ...
    ## Giving linux memsize in bytes, 67108864
    
    Starting kernel ...
    
    Booting Atheros AR934x
    init started: BusyBox v1.7.5 (2017-09-07 16:33:23 CST)
    starting pid 717, tty '/dev/console': '/sbin/config_init'
    mknod: /dev/ttyS0: File exists
    mknod: /dev/ttyS1: File exists
    Config Init version: 1.07.000.52 date: 2017/09/07
    Sun Jan  1 00:00:00 UTC 2017
    ln: /lib/./modules: File exists
    starting pid 776, tty '/dev/ttyS0': '/sbin/config_term'
    ************************************************************************
    *                              WN-AG300DGR                             *
    ************************************************************************
    
    KernelApp/Ramdisk Ver:1.07.000.52                        Date:2017/09/07
    password: Application Ver:1.07.000.55            Date:2017/09/07
    
    cat: can't open '/apps/lib/modules/2.6.34/modulesApp.dep': No such file or directory
    ln: /sbin/apps_init: File exists
    ln: /sbin/factory_apps_init: File exists
    ln: /sbin/opmode.sh: File exists
    createShareMem keyid 7001 shmId 0
    Set Str value fail but len not in 1 to 32
    checkpApCfg i=29 [ap2ssid]
    Set Str value fail but len not in 1 to 32
    checkpApCfg i=47 [ap3ssid]
    checkpApCfg error!!
    MSGQ_GETID: Cannot get message queue for key[fwmanager]!
    MSGQ_CREATE: create message queue for key[fwmanager], msgQ Id 0
    CTRL_INTERFACE:[/var/sysconfd_if]  CTRL_INTERFACE_IF:[if0]
    
    System Monitoring
    *********************************************************************
    Initializing system environment
    Setting up /tmp directory ...
    Setting up loopback device ...
    ***************************************************
    Radio_1 is in   Access Point[0]
    Radio_2 is in   Access Point[0]
    System is in    AP Router[0]
    ***************************************************
    SEM_GETID got id -1
    Mac: 0, rtcTime:1483228802
    dmesg: klogctl: Function not implemented
    Open file err: /var/cpumhz!
    Starting system logging daemon ...OK
    Setting up Ethernet devices ...
    OK
    Configuring Bridge device ...          OK
    Setting the host&domain name ...Finished.
    Configuring net ...          OK
    Configuring LAN device ...          OK
    
    
    #############################################
    Initialize Radio setting ... OK
    Configuring radio1 setting ... 
    Configuring Atheros device index:0... wifiname=wifi0 , macaddr=34:76:C5:05:F9:78Encryption using WEP ...      
    Encryption using WEP ...      
     ... finished.
    Set Atheros power to 25 (dBm)
    Encryption using WPAWPA2_PSK ...
    Encryption using TKIP CCMP ...
    No WPA/WPA2 Encryption
    No WPA/WPA2 Encryption
    Starting Hostapd ...            OK
    System Debug : gWlan24GOff[-1].
    System Debug : gWlan5GOff[-1].
    System Debug : childSSIDoff[-1].
    athOpen OK
    OK
    
    
    #############################################
    Initialize Radio setting ... OK
    Configuring radio2 setting ... 
    Configuring Atheros device index:1... wifiname=wifi1 , macaddr=34:76:C5:05:F9:79Encryption using WEP ...      
     ... finished.
    Set Atheros power to 25 (dBm)
    Encryption using WPA2-PSK ...
    Encryption using AES ...
    Starting Hostapd ...            OK
    System Debug : gWlan24GOff[-1].
    System Debug : gWlan5GOff[-1].
    System Debug : childSSIDoff[-1].
    athOpen OK
    OK
    Wan Manager...
    Configuring WAN device[WAN0] ...
    Obtaining IP address from DHCP ... 
    No PHY Link
    Set Domain Routing for FLET'S Square Connection...            
    Starting DNS Proxy ...            OK
    Starting DHCP(udhcpd) server ...            FAILED
    Starting FW manager ...           OK
    Starting ntpclient ...            
    Setup tc for QoS ... Disabled
    
    SCHEDULE, ServiceWlanLowRateInit ...service_index[0].
    
    SCHEDULE, ServiceWlsRadioOffInit ...service_index[1].
    
    SCHEDULE, Service5GWlanLowRateInit ...service_index[2].
    
    SCHEDULE, Service5GWlsRadioOffInit ...service_index[3].
    
    SCHEDULE, ServiceLedOffInit ...service_index[4].
    
    SCHEDULE, ServiceLanOffInit ...service_index[5].
    
    SCHEDULE, ServiceWanOffInit ...service_index[6].
    
    SCHEDULE, ServiceLanLowRateInit ...service_index[7].
    
    SCHEDULE, ServicePowerLedInit ...service_index[8].
    
    
    Schedule starting  [scheduleOpen], ...wait result..
    Schedule result :[Disable (No rules)]. 
    
    
    New Schedule starting   .....wait result..
    scheduleOpen2 ,Do all Service init function.
    
    SCHEDULE, ServiceChildStaPassInit ...service_index[0],[do_nothing] 
    
    SCHEDULE, ServiceChildSSIDOnInit ...service_index[1]. 
    
    SCHEDULE, ServiceChildStaDataResetInit ...service_index[2],[do_nothing] 
    New Schedule starting result: OK 
    Configuring network routing and filtering ...Iptable restart VPN ACL ...VPN ACL ...
    OK
    Configuring Bridge filtering ...OK
    Starting SiteBlock server ...            
    Netpacket Filter Open ....              sysGetKernelInfo: netv :1.0
    Kernel netpkt ver netv: 1.0
    OK
    Starting DDNS  ...  Disabled
    Starting UPNPD  ...  WAN Speed = 10 Mbps
    FAILED
    IGMP Proxy is disabled...  Starting HTTPD server ...           OK
    Staring ALG...           OK
    Starting LLTD ...           OK
    Initialization has completed
    *We used 15.570000 seconds to initialize all modules*
    pSEM_GETID got id 65538
    [RMGMT DBG] RMGMT_VERSION: 3.42.32
    Best channel is 1
    Best channel is 40
    *** PROCESS MANAGER Starts ***
    Processmanager update modules
    Reload WAN: eth0.2 ...
    Close WAN: eth0.2 ...
    Configuring WAN device[WAN0] ...
    Obtaining IP address from DHCP ... 
    Err: read_to_buf failed to open file /proc/2895/status!
    No PHY Link
    VPN Disconnect ...
    Phy(eth0.2) link disconnected ...Wait for link recover
    Restarting Iptables ....Clean iptable...OK
    Configuring network routing and filtering ...Iptable restart VPN ACL ...VPN ACL ...
    OK
    OK
    Reloading dnsProxy ...            Stopping DNS Proxy ...            OK
    Set Domain Routing for FLET'S Square Connection...            
    Starting DNS Proxy ...            Err: read_to_buf failed to open file /proc/4184/status!
    Err: read_to_buf failed to open file /proc/4185/status!
    OK
    Processmanager update modules
    
    !!! wrong password !!! 
    password:
    

BHR-4GRV2

既にath79へ移植済みではあるものの、kernelサイズに絡んで重大な変更が必要になったので、念のためメモ。

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
    download - Download Image or Uboot to flash
    echo    - echo args to console
    erase   - erase FLASH memory
    ethreg    - S26 PHY Reg rd/wr  utility
    exit    - exit script
    flinfo  - print FLASH memory information
    go      - start application at address 'addr'
    help    - print online help
    hwclear - clear hardware variables to persistent storage
    hwcommit - save hardware variables to persistent storage
    hwget   - Hardware variables get
    hwset   - Hardware variables set
    iminfo  - print header information for application image
    itest   - return true/false on integer compare
    loop    - infinite loop on address range
    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
    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
    
    BUFFALO U-Boot Ver 1.06 (Apr  3 2014 - 16:26:57)
    

  • printenv
    メーカーファームではu-boot-envが空であり、u-boot内のデフォルト値が表示される模様。
    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)
    bootcmd=bootm 0x9fe80000
    bootdelay=2
    baudrate=115200
    ethaddr=0x00:0xaa:0xbb:0xcc:0xdd:0xee
    uu=tftp 0x80060000 bhr4grv2-uboot.bin; erase 0x9f000000 +0x40000; cp.b ${fileaddr} 0x9f000000 ${filesize}
    uk=tftp 0x80060000 bhr4grv2-kernel.bin; erase 0x9fe80000 +0x170000; cp.b ${fileaddr} 0x9fe80000 ${filesize}
    uf=tftp 0x80060000 bhr4grv2-rootfs-squashfs.bin; erase 0x9f050000 +de0000 ; cp.b ${fileaddr} 0x9f050000 ${filesize}
    inspection_env=set bootargs console=ttyS0,115200 rootfstype=ramfs rdinit=/etc/preinit rw board=RUBBERDUCK mtdparts=spi0.0:256k(u-boot),64k(u-boot-env),14528k(rootfs),1472k(kernel),64k(art),16000k@0x50000(firmware) mem=64M 
    ramboot=set bootargs console=ttyS0,115200 rootfstype=ramfs rdinit=/etc/preinit rw root=/dev/ram0 mtdparts=ath-nor0:256k(u-boot)ro,64k(u-boot-env),14528k(rootfs),1472k(kernel),64k(art);tftp 0x81000000 bhr4grv2-uImage-initramfs-gzip.bin;bootm 0x81000000 
    resetenv=protect off 1:4-4;erase 1:4-4 
    dir=
    lu=tftp 0x80060000 ${dir}u-boot.bin&&erase 0x9f000000 +$filesize&&cp.b $fileaddr 0x9f000000 $filesize
    lf=tftp 0x80060000 ${dir}ap135${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
    filesize=2f5ad4
    fileaddr=81000000
    ipaddr=192.168.12.1
    serverip=192.168.12.10
    
    Environment size: 1567/65532 bytes
    

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

  • md.l 0x18050028 1
    ath> md.l 0x18050028 1
    18050028: 96000000    ....
    

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

Kernel

OpenWrtインストール済みのため、ひとまず省略