カテゴリー: ath79

WR8750N fixed-regulatorメモ

WR8750N/WR9500N/WG600HPではいくつかGPIOをHIGHで出さなければ機能しないデバイスがあり、それらについてfixed-regulatorのDeviceTree binding (compatible = "regulator-fixed") を使用する場合の挙動確認用メモ。

USB-Vbus
ath79内の他のdtsでは問題無いようではあるものの、Aterm 3機種ではブート中に無効化されてしまった。こうなると、USBポートにDC 5V電源が供給されずデバイスが使用できない。
ノード内に regulator-always-on; を付加した場合は無効化されず有効なまま。

無効化される場合のログ

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

welcome to boot console
Password:
boot> tftpd
tftpd start 192.168.0.1
boot> start tftp load openwrt-ath79-tiny-nec_wr8750n-i
end tftp load length = 3442316
start memory load ... 
memory load complete
  begin  : 0x80060000
  length : 3442292
  startup: 0x80060000
boot
begin  : 0x80060000
length : 3442292
startup: 0x80060000
option: 0x0


OpenWrt kernel loader for AR7XXX/AR9XXX
Copyright (C) 2011 Gabor Juhos 
Decompressing kernel... done!
Starting kernel at 80060000...

[    0.000000] Linux version 4.14.101 (musashino205@Taiha.Net) (gcc version 7.4.0 (OpenWrt GCC 7.4.0 r0+9362-3cf839bf27)) #0 Sun Feb 17 11:18:45 2019
[    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 0x8045d72c 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: 117812K/131072K available (3467K kernel code, 136K rwdata, 472K rodata, 7372K init, 195K bss, 13260K 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.000010] sched_clock: 32 bits at 280MHz, resolution 3ns, wraps every 7669584382ns
[    0.092710] Calibrating delay loop... 278.93 BogoMIPS (lpj=1394688)
[    0.237626] pid_max: default: 32768 minimum: 301
[    0.293067] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.372218] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.461311] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.579001] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.651956] pinctrl core: initialized pinctrl subsystem
[    0.715407] NET: Registered protocol family 16
[    0.769307] Can't analyze schedule() prologue at 803beb1c
[    0.836254] PCI host bridge /ahb/apb/pcie-controller@180c0000 ranges:
[    0.913369]  MEM 0x0000000010000000..0x0000000013ffffff
[    0.975830]   IO 0x0000000000000000..0x0000000000000000
[    1.059606] PCI host bridge to bus 0000:00
[    1.108577] pci_bus 0000:00: root bus resource [mem 0x10000000-0x13ffffff]
[    1.190796] pci_bus 0000:00: root bus resource [io  0x0000]
[    1.257459] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    1.338683] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    1.433994] pci 0000:00:00.0: BAR 0: assigned [mem 0x10000000-0x1001ffff 64bit]
[    1.521455] pci 0000:00:00.0: BAR 6: assigned [mem 0x10020000-0x1002ffff pref]
[    1.608447] clocksource: Switched to clocksource MIPS
[    1.670048] NET: Registered protocol family 2
[    1.722993] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    1.806319] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    1.882308] TCP: Hash tables configured (established 1024 bind 1024)
[    1.958477] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    2.028229] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    2.103447] NET: Registered protocol family 1
[    2.300316] Crashlog allocated RAM at address 0x3f00000
[    2.364123] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    2.446224] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    2.515993] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    2.706900] io scheduler noop registered
[    2.753847] io scheduler deadline registered (default)
[    2.815602] ar7200-usb-phy usb-phy: phy reset is missing
[    2.881456] pinctrl-single 1804002c.pinmux: 544 pins at pa b804002c size 68
[    2.965880] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    3.042684] console [ttyS0] disabled
[    3.085437] 18020000.uart: ttyS0 at MMIO 0x18020000 (irq = 8, base_baud = 2500000) is a 16550A
[    3.188462] console [ttyS0] enabled
[    3.188462] console [ttyS0] enabled
[    3.271732] bootconsole [early0] disabled
[    3.271732] bootconsole [early0] disabled
[    3.373903] m25p80 spi0.0: mx25l6405d (8192 Kbytes)
[    3.432289] 4 fixed-partitions partitions found on MTD device spi0.0
[    3.508338] Creating 4 MTD partitions on "spi0.0":
[    3.565649] 0x000000000000-0x000000020000 : "u-boot"
[    3.625861] 0x000000020000-0x000000030000 : "config"
[    3.686072] 0x000000030000-0x000000040000 : "art"
[    3.743173] 0x000000040000-0x000000800000 : "firmware"
[    3.814900] libphy: Fixed MDIO Bus: probed
[    4.198841] libphy: ag71xx_mdio: probed
[    4.269237] switch0: Atheros AR8327 rev. 2 switch registered on mdio-bus.0
[    5.339625] ag71xx 19000000.eth: connected to PHY at mdio-bus.0:00 [uid=004dd033, driver=Atheros AR8216/AR8236/AR8316]
[    5.468299] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:RGMII
[    5.543245] NET: Registered protocol family 10
[    5.600101] Segment Routing with IPv6
[    5.644025] NET: Registered protocol family 17
[    5.697555] 8021q: 802.1Q VLAN Support v1.8
[    5.750794] usb_vbus: disabling
[    5.823669] Freeing unused kernel memory: 7372K
[    5.877886] This architecture does not have kernel memory protection.
[    5.968851] init: Console is alive
[    6.009792] init: - watchdog -
[    6.068664] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    6.160539] usbcore: registered new interface driver usbfs
[    6.226283] usbcore: registered new interface driver hub
[    6.289932] usbcore: registered new device driver usb
[    6.356625] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    6.436541] ehci-platform: EHCI generic platform driver
[    6.499101] random: fast init done
[    6.540019] ehci-platform 1b000000.usb: EHCI Host Controller
[    6.607799] ehci-platform 1b000000.usb: new USB bus registered, assigned bus number 1
[    6.701547] ehci-platform 1b000000.usb: irq 3, io mem 0x1b000000
[    6.798491] ehci-platform 1b000000.usb: USB 2.0 started, EHCI 1.00
[    6.873338] hub 1-0:1.0: USB hub found
[    6.918714] hub 1-0:1.0: 1 port detected
[    6.967320] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    7.064183] init: - preinit -
[    7.322505] random: jshn: uninitialized urandom read (4 bytes read)
[    7.397627] usb 1-1: new high-speed USB device number 2 using ehci-platform
[    7.571547] random: jshn: uninitialized urandom read (4 bytes read)
[    7.759977] random: procd: uninitialized urandom read (4 bytes read)
[    7.836445] hub 1-1:1.0: USB hub found
[    7.928501] hub 1-1:1.0: 4 ports detected
[    8.377822] urandom_read: 4 callbacks suppressed
[    8.377831] random: jshn: uninitialized urandom read (4 bytes read)
[    9.265951] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    9.335906] IPv6: ADDRCONF(NETDEV_UP): eth0.1: link is not ready
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[   10.449722] eth0: link up (1000Mbps/Full duplex)
[   10.506481] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   10.586000] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.1: link becomes ready
[   12.652859] eth0: link down
[   12.705540] procd: - early -
[   12.740359] procd: - watchdog -
[   13.324256] procd: - watchdog -
[   13.362195] procd: - ubus -
[   13.402672] random: ubusd: uninitialized urandom read (4 bytes read)
[   13.479944] random: ubusd: uninitialized urandom read (4 bytes read)
[   13.557503] procd: - init -
Please press Enter to activate this console.
[   13.784410] kmodloader: loading kernel modules from /etc/modules.d/*
[   13.864552] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   13.940076] Loading modules backported from Linux version v4.19.7-0-g61c68f2a2af0
[   14.029655] Backport generated by backports.git v4.19.7-1-0-g148b072d
[   14.109759] ip_tables: (C) 2000-2006 Netfilter Core Team
[   14.182075] nf_conntrack version 0.5.0 (2048 buckets, 8192 max)
[   14.311244] xt_time: kernel timezone is -0000
[   14.419646] PPP generic driver version 2.4.2
[   14.473306] NET: Registered protocol family 24
[   14.586672] ieee80211 phy0: Atheros AR9340 Rev:1 mem=0xb8100000, irq=11
[   14.669780] ath9k 0000:00:00.0: Direct firmware load for ath9k-eeprom-pci-0000:00:00.0.bin failed with error -2
[   14.790514] ath9k 0000:00:00.0: Falling back to user helper
[   15.283757] ieee80211 phy1: Atheros AR9300 Rev:3 mem=0xb0000000, irq=13
[   15.468860] kmodloader: done loading kernel modules from /etc/modules.d/*
[   27.496202] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   27.738887] br-lan: port 1(eth0.1) entered blocking state
[   27.803513] br-lan: port 1(eth0.1) entered disabled state
[   27.868396] device eth0.1 entered promiscuous mode
[   27.925703] device eth0 entered promiscuous mode
[   28.309978] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   28.490322] IPv6: ADDRCONF(NETDEV_UP): eth0.2: link is not ready
[   28.609772] eth0: link up (1000Mbps/Full duplex)
[   28.858530] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   29.364321] br-lan: port 1(eth0.1) entered blocking state
[   29.428925] br-lan: port 1(eth0.1) entered forwarding state
[   29.496037] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.2: link becomes ready
[   30.938550] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[  125.446530] random: crng init done

広告

WR8750Nメモ U-Boot & OpenWrt

Aterm WR8750NのNECオリジナル (?) なBootloaderを、musashino-build/u-boot_modからビルドしたU-Bootに置き換えてブートしたログのメモ。
上記リポジトリからのビルドはWSLで問題無く行えた。
全体的な流れとしては以下の通り。

  • NECのBootloader上でOpenWrtのNEC用initramfsイメージ (initramfs-necimg) をPCから転送し、boot コマンドを実行してOpenWrtをブート
  • initramfs上でU-Bootパーティション内を mtd erase u-boot で消去し、scp等で転送しておいたU-Bootを mtd write ファイル名 u-boot で書き込み
  • wget等でダウンロードしたOpenWrt sysupgradeイメージを sysupgrade ファイル名 でFlashへ書き込み
  • reboot で再起動し、U-BootによりOpenWrtが起動される

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

welcome to boot console
Password:
boot> tftpd
tftpd start 192.168.0.1
boot> start tftp load openwrt-ath79-tiny-nec_wr8750n-i
end tftp load length = 3224648
start memory load ... 
memory load complete
  begin  : 0x80060000
  length : 3224624
  startup: 0x80060000
boot
begin  : 0x80060000
length : 3224624
startup: 0x80060000
option: 0x0


OpenWrt kernel loader for AR7XXX/AR9XXX
Copyright (C) 2011 Gabor Juhos 
Decompressing kernel... done!
Starting kernel at 80060000...

[    0.000000] Linux version 4.14.95 (musashino205@Taiha.Net) (gcc version 7.4.0 (OpenWrt GCC 7.4.0 r0+9120-bad68ff519)) #0 Fri Jan 25 10:38:20 2019
[    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 0x8045972c 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: 118520K/131072K available (3450K kernel code, 138K rwdata, 472K rodata, 6684K init, 195K bss, 12552K 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.000010] sched_clock: 32 bits at 280MHz, resolution 3ns, wraps every 7669584382ns
[    0.092710] Calibrating delay loop... 278.93 BogoMIPS (lpj=1394688)
[    0.237627] pid_max: default: 32768 minimum: 301
[    0.293070] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.372220] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.461164] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.578797] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.651743] pinctrl core: initialized pinctrl subsystem
[    0.715209] NET: Registered protocol family 16
[    0.769108] Can't analyze schedule() prologue at 803ba57c
[    0.836108] PCI host bridge /ahb/apb/pcie-controller@180c0000 ranges:
[    0.913158]  MEM 0x0000000010000000..0x0000000013ffffff
[    0.975619]   IO 0x0000000000000000..0x0000000000000000
[    1.055718] PCI host bridge to bus 0000:00
[    1.104729] pci_bus 0000:00: root bus resource [mem 0x10000000-0x13ffffff]
[    1.186947] pci_bus 0000:00: root bus resource [io  0x0000]
[    1.253610] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    1.334834] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    1.430150] pci 0000:00:00.0: BAR 0: assigned [mem 0x10000000-0x1001ffff 64bit]
[    1.517607] pci 0000:00:00.0: BAR 6: assigned [mem 0x10020000-0x1002ffff pref]
[    1.604603] clocksource: Switched to clocksource MIPS
[    1.666172] NET: Registered protocol family 2
[    1.719143] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    1.802472] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    1.878458] TCP: Hash tables configured (established 1024 bind 1024)
[    1.954632] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    2.024379] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    2.099600] NET: Registered protocol family 1
[    2.287387] Crashlog allocated RAM at address 0x3f00000
[    2.351273] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    2.433343] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    2.503096] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    2.694948] io scheduler noop registered
[    2.741872] io scheduler deadline registered (default)
[    2.803622] ar7200-usb-phy usb-phy: phy reset is missing
[    2.869384] pinctrl-single 1804002c.pinmux: 544 pins at pa b804002c size 68
[    2.953240] gpio-export gpio-export: 1 gpio(s) exported
[    3.016545] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    3.093326] console [ttyS0] disabled
[    3.136081] 18020000.uart: ttyS0 at MMIO 0x18020000 (irq = 8, base_baud = 2500000) is a 16550A
[    3.239096] console [ttyS0] enabled
[    3.239096] console [ttyS0] enabled
[    3.322380] bootconsole [early0] disabled
[    3.322380] bootconsole [early0] disabled
[    3.424777] m25p80 spi0.0: mx25l6405d (8192 Kbytes)
[    3.483123] 4 fixed-partitions partitions found on MTD device spi0.0
[    3.559091] Creating 4 MTD partitions on "spi0.0":
[    3.616401] 0x000000000000-0x000000020000 : "u-boot"
[    3.676618] 0x000000020000-0x000000030000 : "config"
[    3.736846] 0x000000030000-0x000000040000 : "art"
[    3.793959] 0x000000040000-0x000000800000 : "firmware"
[    3.865576] libphy: Fixed MDIO Bus: probed
[    4.255004] libphy: ag71xx_mdio: probed
[    4.325525] switch0: Atheros AR8327 rev. 2 switch registered on mdio-bus.0
[    5.395782] ag71xx 19000000.eth: connected to PHY at mdio-bus.0:00 [uid=004dd033, driver=Atheros AR8216/AR8236/AR8316]
[    5.524437] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:RGMII
[    5.599250] NET: Registered protocol family 10
[    5.656142] Segment Routing with IPv6
[    5.700080] NET: Registered protocol family 17
[    5.753601] 8021q: 802.1Q VLAN Support v1.8
[    5.838232] Freeing unused kernel memory: 6684K
[    5.892449] This architecture does not have kernel memory protection.
[    5.983133] init: Console is alive
[    6.024138] init: - watchdog -
[    6.083426] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    6.176339] usbcore: registered new interface driver usbfs
[    6.242093] usbcore: registered new interface driver hub
[    6.305741] usbcore: registered new device driver usb
[    6.372177] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    6.452109] ehci-platform: EHCI generic platform driver
[    6.514893] ehci-platform 1b000000.usb: EHCI Host Controller
[    6.582642] ehci-platform 1b000000.usb: new USB bus registered, assigned bus number 1
[    6.676386] ehci-platform 1b000000.usb: irq 3, io mem 0x1b000000
[    6.754626] random: fast init done
[    6.795359] ehci-platform 1b000000.usb: USB 2.0 started, EHCI 1.00
[    6.870269] hub 1-0:1.0: USB hub found
[    6.915582] hub 1-0:1.0: 1 port detected
[    6.964055] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    7.060951] init: - preinit -
[    7.317977] random: jshn: uninitialized urandom read (4 bytes read)
[    7.393053] usb 1-1: new full-speed USB device number 2 using ehci-platform
[    7.567222] random: jshn: uninitialized urandom read (4 bytes read)
[    7.757421] usb 1-1: not running at top speed; connect to a high speed hub
[    7.927281] random: procd: uninitialized urandom read (4 bytes read)
[    8.003845] hub 1-1:1.0: USB hub found
[    8.079136] hub 1-1:1.0: 4 ports detected
[    8.356563] urandom_read: 3 callbacks suppressed
[    8.356572] random: jshn: uninitialized urandom read (4 bytes read)
[    8.580817] random: jshn: uninitialized urandom read (4 bytes read)
[    9.420930] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    9.490871] IPv6: ADDRCONF(NETDEV_UP): eth0.1: link is not ready
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[   10.615880] eth0: link up (1000Mbps/Full duplex)
[   10.673431] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   10.758074] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.1: link becomes ready
[   12.847691] procd: - early -
[   12.882294] procd: - watchdog -
[   13.466291] procd: - watchdog -
[   13.504146] procd: - ubus -
[   13.545399] random: ubusd: uninitialized urandom read (4 bytes read)
[   13.622629] random: ubusd: uninitialized urandom read (4 bytes read)
[   13.700245] procd: - init -
Please press Enter to activate this console.
[   13.814685] eth0: link down
[   13.957775] kmodloader: loading kernel modules from /etc/modules.d/*
[   14.038310] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   14.113503] Loading modules backported from Linux version v4.19.7-0-g61c68f2a2af0
[   14.203132] Backport generated by backports.git v4.19.7-1-0-g148b072d
[   14.283182] ip_tables: (C) 2000-2006 Netfilter Core Team
[   14.355187] nf_conntrack version 0.5.0 (2048 buckets, 8192 max)
[   14.482215] xt_time: kernel timezone is -0000
[   14.591245] PPP generic driver version 2.4.2
[   14.644938] NET: Registered protocol family 24
[   14.756524] ieee80211 phy0: Atheros AR9340 Rev:1 mem=0xb8100000, irq=11
[   14.839676] ath9k 0000:00:00.0: Direct firmware load for ath9k-eeprom-pci-0000:00:00.0.bin failed with error -2
[   14.960456] ath9k 0000:00:00.0: Falling back to user helper
[   15.451439] ieee80211 phy1: Atheros AR9300 Rev:3 mem=0xb0000000, irq=14
[   15.635030] kmodloader: done loading kernel modules from /etc/modules.d/*
[   27.252549] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   27.323758] eth0: link up (1000Mbps/Full duplex)
[   27.514688] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   27.616125] br-lan: port 1(eth0.1) entered blocking state
[   27.680694] br-lan: port 1(eth0.1) entered disabled state
[   27.745685] device eth0.1 entered promiscuous mode
[   27.802981] device eth0 entered promiscuous mode
[   28.186022] br-lan: port 1(eth0.1) entered blocking state
[   28.250603] br-lan: port 1(eth0.1) entered forwarding state
[   28.317426] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   28.389650] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready



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

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt SNAPSHOT, r0+9135-d6efa74437
 -----------------------------------------------------
=== 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:/# vi /etc/config/network 
root@OpenWrt:/# vi /etc/config/firewall 
root@OpenWrt:/# (実際には network と firewall の restart をしているが省略)
root@OpenWrt:/tmp# cd /tmp
root@OpenWrt:/tmp# wget http://taiha.net/jenkins/job/OpenWrt-master-NEC-WR8750N/
lastSuccessfulBuild/artifact/bin/targets/ath79/tiny/openwrt-ath79-tiny-nec_wr875
0n-squashfs-sysupgrade.bin
Downloading 'http://taiha.net/jenkins/job/OpenWrt-master-NEC-WR8750N/lastSuccessfulBuild/artifact/bin/targets/ath79/tiny/openwrt-ath79-tiny-nec_wr8750n-squashfs-sysupgrade.bin'
Connecting to 240b:12:500:65f0:c822:64a3:7e11:4961:80
Writing to 'openwrt-ath79-tiny-nec_wr8750n-squashfs-sysupgrade.bin'
openwrt-ath79-tiny-n 100% |*******************************|  3328k  0:00:00 ETA
Download completed (3408582 bytes)
root@OpenWrt:/tmp# ls -alh
drwxrwxrwt   15 root     root         460 Jan 26 16:46 .
drwxr-xr-x   16 root     root           0 Jan  1  1970 ..
-rwx------    1 root     root           5 Jan 25 10:44 .switch2jffs
drwx------    2 root     root         120 Jan 25 10:44 .uci
-rw-r--r--    1 root     root           4 Jan 25 10:44 TZ
-rw-r--r--    1 root     root         857 Jan  1  1970 board.json
-rw-r--r--    1 root     root           0 Jan 25 10:44 dhcp.leases
drwxr-xr-x    2 root     root          40 Jan 25 10:44 dnsmasq.d
drwxr-xr-x    2 root     root          40 Jan 25 10:44 dropbear
drwxr-xr-x    2 root     root          60 Jan 26 16:45 etc
drwxr-xr-x    2 root     root          80 Jan 26 16:45 hosts
drwxr-xr-x    3 root     root          60 Jan 25 10:44 lib
drwxr-xr-x    2 root     root         280 Jan 25 10:44 lock
drwxr-xr-x    2 root     root          80 Jan 25 10:44 log
-rw-r--r--    1 root     root        3.3M Jan 26 16:46 openwrt-ath79-tiny-nec_wr8750n-squashfs-sysupgrade.bin
-rw-r--r--    1 root     root          32 Jan 26 16:45 resolv.conf
-rw-r--r--    1 root     root         140 Jan 26 16:45 resolv.conf.auto
drwxr-xr-x    3 root     root         200 Jan 26 16:45 run
drwxrwxrwt    2 root     root          40 Jan  1  1970 shm
drwxr-xr-x    2 root     root          80 Jan 26 16:44 state
drwxr-xr-x    2 root     root          80 Jan  1  1970 sysinfo
drwxr-xr-x    2 root     root          40 Jan 25 10:44 tmp
-rw-r--r--    1 root     root      128.0K Jan 26 16:45 u-boot_mod__nec_wr8750n__20190127__git_nec-devs-398303cd.bin
root@OpenWrt:/tmp# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00020000 00010000 "u-boot"
mtd1: 00010000 00010000 "config"
mtd2: 00010000 00010000 "art"
mtd3: 007c0000 00010000 "firmware"
root@OpenWrt:/tmp# mtd erase u-boot&&mtd write u-boot_mod__nec_wr8750n__20190127
__git_nec-devs-398303cd.bin u-boot
Unlocking u-boot ...
Erasing u-boot ...
Unlocking u-boot ...

Writing from u-boot_mod__nec_wr8750n__20190127__git_nec-devs-398303cd.bin to u-boot ...     
root@OpenWrt:/tmp# mtd erase firmware&&sysupgrade openwrt-ath79-tiny-nec_wr8750n
-squashfs-sysupgrade.bin 
Unlocking firmware ...
Erasing firmware ...
Cannot save config while running from ramdisk.
Commencing upgrade. Closing all shell sessions.
Watchdog handover: fd=3
- watchdog -
killall: telnetd: no process kilSending TERM to remaining processes ... ntpd netifd dnsmasq ubusd logd odhcpd 
Sending KILL to remaining processes ... 
Performing system upgrade...
Unlocking firmware ...

Writing from  to firmware ...     
Upgrade completed
Rebooting system...
umount: can[  329.834295] reboot: Restarting system


***************************************
*     U-Boot 1.1.4-398303cd-clean     *
*          Build: 2019-01-26          *
***************************************

  BOARD: NEC Aterm WR8750N
    SOC: AR9344 rev. 1
    CPU: MIPS 74Kc
    RAM: 128 MB DDR2 32-bit CL3-4-4-10
  FLASH: 8 MB Macronix MX25L64
   PCIe: 168C:0030
    MAC: 1C:B1:7F:00:A5:00
 CLOCKS: CPU/RAM/AHB/SPI/REF
         550/400/200/ 25/ 40 MHz

Hit any key to stop booting:  0

Booting image from 0x9F040000...

   Image name:    MIPS OpenWrt Linux-4.14.95
   Build date:    2019-01-25 10:38:20 UTC
   Architecture:  MIPS
   OS/image type: Linux Kernel
   Compression:   LZMA
   Data size:     1.3 MB (1377507 bytes)
   Load address:  0x80060000
   Entry point:   0x80060000

   Header CRC...  OK!
   Data CRC...    skipped

Uncompressing Kernel... OK!
Starting kernel...

[    0.000000] Linux version 4.14.95 (musashino205@Taiha.Net) (gcc version 7.4.0 (OpenWrt GCC 7.4.0 r0+9120-bad68ff519)) #0 Fri Jan 25 10:38:20 2019
[    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 0x8045972c 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: 124024K/131072K available (3450K kernel code, 138K rwdata, 472K rodata, 1180K init, 195K bss, 7048K 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: 550.000 MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6950037990 ns
[    0.000010] sched_clock: 32 bits at 275MHz, resolution 3ns, wraps every 7809031678ns
[    0.092710] Calibrating delay loop... 274.02 BogoMIPS (lpj=1370112)
[    0.237624] pid_max: default: 32768 minimum: 301
[    0.293075] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.372219] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.461334] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.579005] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.651955] pinctrl core: initialized pinctrl subsystem
[    0.715480] NET: Registered protocol family 16
[    0.769365] Can't analyze schedule() prologue at 803ba57c
[    0.836528] PCI host bridge /ahb/apb/pcie-controller@180c0000 ranges:
[    0.913575]  MEM 0x0000000010000000..0x0000000013ffffff
[    0.976032]   IO 0x0000000000000000..0x0000000000000000
[    1.057392] PCI host bridge to bus 0000:00
[    1.106394] pci_bus 0000:00: root bus resource [mem 0x10000000-0x13ffffff]
[    1.188608] pci_bus 0000:00: root bus resource [io  0x0000]
[    1.255271] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    1.336495] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    1.431798] pci 0000:00:00.0: BAR 0: assigned [mem 0x10000000-0x1001ffff 64bit]
[    1.519271] pci 0000:00:00.0: BAR 6: assigned [mem 0x10020000-0x1002ffff pref]
[    1.606296] clocksource: Switched to clocksource MIPS
[    1.667912] NET: Registered protocol family 2
[    1.720850] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    1.804244] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    1.880225] TCP: Hash tables configured (established 1024 bind 1024)
[    1.956394] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    2.026165] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    2.101392] NET: Registered protocol family 1
[    2.158566] Crashlog allocated RAM at address 0x3f00000
[    2.222441] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    2.304735] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    2.374555] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    2.500796] io scheduler noop registered
[    2.547715] io scheduler deadline registered (default)
[    2.609478] ar7200-usb-phy usb-phy: phy reset is missing
[    2.675292] pinctrl-single 1804002c.pinmux: 544 pins at pa b804002c size 68
[    2.759184] gpio-export gpio-export: 1 gpio(s) exported
[    2.822531] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    2.899409] console [ttyS0] disabled
[    2.942227] 18020000.uart: ttyS0 at MMIO 0x18020000 (irq = 8, base_baud = 2500000) is a 16550A
[    3.045239] console [ttyS0] enabled
[    3.045239] console [ttyS0] enabled
[    3.128517] bootconsole [early0] disabled
[    3.128517] bootconsole [early0] disabled
[    3.231279] m25p80 spi0.0: mx25l6405d (8192 Kbytes)
[    3.289704] 4 fixed-partitions partitions found on MTD device spi0.0
[    3.365749] Creating 4 MTD partitions on "spi0.0":
[    3.423059] 0x000000000000-0x000000020000 : "u-boot"
[    3.483355] 0x000000020000-0x000000030000 : "config"
[    3.543649] 0x000000030000-0x000000040000 : "art"
[    3.600733] 0x000000040000-0x000000800000 : "firmware"
[    3.666465] 2 uimage-fw partitions found on MTD device firmware
[    3.737249] Creating 2 MTD partitions on "firmware":
[    3.796624] 0x000000000000-0x000000160000 : "kernel"
[    3.856899] 0x000000160000-0x0000007c0000 : "rootfs"
[    3.917058] mtd: device 5 (rootfs) set to be root filesystem
[    3.984821] 1 squashfs-split partitions found on MTD device rootfs
[    4.058716] 0x000000340000-0x0000007c0000 : "rootfs_data"
[    4.124812] libphy: Fixed MDIO Bus: probed
[    4.506712] libphy: ag71xx_mdio: probed
[    4.555438] switch0: Atheros AR8327 rev. 2 switch registered on mdio-bus.0
[    5.627485] ag71xx 19000000.eth: connected to PHY at mdio-bus.0:00 [uid=004dd033, driver=Atheros AR8216/AR8236/AR8316]
[    5.756199] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:RGMII
[    5.831182] NET: Registered protocol family 10
[    5.888262] Segment Routing with IPv6
[    5.932207] NET: Registered protocol family 17
[    5.985755] 8021q: 802.1Q VLAN Support v1.8
[    6.043808] VFS: Mounted root (squashfs filesystem) readonly on device 31:5.
[    6.134309] Freeing unused kernel memory: 1180K
[    6.188536] This architecture does not have kernel memory protection.
[    6.616309] random: fast init done
[    7.558574] init: Console is alive
[    7.599449] init: - watchdog -
[    9.015969] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    9.346480] usbcore: registered new interface driver usbfs
[    9.412201] usbcore: registered new interface driver hub
[    9.475868] usbcore: registered new device driver usb
[    9.542808] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    9.628845] ehci-platform: EHCI generic platform driver
[    9.691687] ehci-platform 1b000000.usb: EHCI Host Controller
[    9.759417] ehci-platform 1b000000.usb: new USB bus registered, assigned bus number 1
[    9.853165] ehci-platform 1b000000.usb: irq 3, io mem 0x1b000000
[    9.946342] ehci-platform 1b000000.usb: USB 2.0 started, EHCI 1.00
[   10.021296] hub 1-0:1.0: USB hub found
[   10.066595] hub 1-0:1.0: 1 port detected
[   10.115141] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[   10.212057] init: - preinit -
[   10.778066] random: jshn: uninitialized urandom read (4 bytes read)
[   11.190636] random: jshn: uninitialized urandom read (4 bytes read)
[   11.522880] random: jshn: uninitialized urandom read (4 bytes read)
[   11.810029] urandom_read: 2 callbacks suppressed
[   11.810039] random: jshn: uninitialized urandom read (4 bytes read)
[   12.034683] random: jshn: uninitialized urandom read (4 bytes read)
[   13.691134] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   13.761000] IPv6: ADDRCONF(NETDEV_UP): eth0.1: link is not ready
Press the [f] ke[   13.909259] random: procd: uninitialized urandom read (4 bytes read)
y and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[   14.857581] eth0: link up (1000Mbps/Full duplex)
[   14.915225] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   15.000181] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.1: link becomes ready
[   17.647193] mount_root: jffs2 not ready yet, using temporary tmpfs overlay
[   17.756597] urandom-seed: Seed file not found (/etc/urandom.seed)
[   17.875873] procd: - early -
[   17.911400] procd: - watchdog -
[   18.199682] eth0: link down
[   18.778769] procd: - watchdog -
[   18.816676] procd: - ubus -
[   19.144234] random: ubusd: uninitialized urandom read (4 bytes read)
[   19.457893] random: ubusd: uninitialized urandom read (4 bytes read)
[   19.535490] procd: - init -
[   20.046501] kmodloader: loading kernel modules from /etc/modules.d/*
Please press Ent[   20.130027] ip6_tables: (C) 2000-2006 Netfilter Core Team
er to activate this console.
[   20.224348] Loading modules backported from Linux version v4.19.7-0-g61c68f2a2af0
[   20.326844] Backport generated by backports.git v4.19.7-1-0-g148b072d
[   20.406992] ip_tables: (C) 2000-2006 Netfilter Core Team
[   20.479545] nf_conntrack version 0.5.0 (2048 buckets, 8192 max)
[   20.613705] xt_time: kernel timezone is -0000
[   20.728057] PPP generic driver version 2.4.2
[   20.781904] NET: Registered protocol family 24
[   20.897124] ieee80211 phy0: Atheros AR9340 Rev:1 mem=0xb8100000, irq=11
[   20.976739] PCI: Enabling device 0000:00:00.0 (0000 -> 0002)
[   21.047575] ath9k 0000:00:00.0: Direct firmware load for ath9k-eeprom-pci-0000:00:00.0.bin failed with error -2
[   21.168303] ath9k 0000:00:00.0: Falling back to user helper
[   22.540103] ieee80211 phy1: Atheros AR9300 Rev:3 mem=0xb0000000, irq=14
[   22.726761] kmodloader: done loading kernel modules from /etc/modules.d/*
[   35.363450] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
[   35.676398] jffs2_build_filesystem(): unlocking the mtd device... 
[   35.676408] done.
[   35.773289] jffs2_build_filesystem(): erasing all blocks after the end marker... 
[   42.288637] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   42.449264] eth0: link up (1000Mbps/Full duplex)
[   42.704270] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   43.051540] br-lan: port 1(eth0.1) entered blocking state
[   43.116163] br-lan: port 1(eth0.1) entered disabled state
[   43.181054] device eth0.1 entered promiscuous mode
[   43.238342] device eth0 entered promiscuous mode
[   43.967602] br-lan: port 1(eth0.1) entered blocking state
[   44.032161] br-lan: port 1(eth0.1) entered forwarding state
[   44.099022] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   44.306378] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   70.976475] done.
[   70.999489] jffs2: notice: (1031) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[   71.716188] overlayfs: upper fs does not support tmpfile.
[  136.435551] random: crng init done


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

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

WR8750N switch&GPIO

どうもSwitch (AR8327)の有効化にGPIO13が絡んでいる様なので、GPIO_OE (Output Enable)をBootloader上でGPIO13のビットを無効化した際の比較。

gpio-export無し

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
TP module load fail
post load fail [-2]

rebooting 3
key abort

welcome to boot console
Password:
boot> tftpd
tftpd start 192.168.0.1
boot> start tftp load openwrt-ath79-tiny-nec_wr8750n-i
end tftp load length = 3225264
start memory load ... 
memory load complete
  begin  : 0x80060000
  length : 3225240
  startup: 0x80060000

boot> debug memory write ?
write [byte|short|word] ADDRESS DATA
default access mode is word(32bit)
# ex) write byte 0x2000 0x10
boot> debug memory read 0xb8040000 1
b8040000:0003db1f                            ....
boot> debug memory write 0xb8040000 0x3fb1f
0xb8040000 <- 0x3fb1f
boot> debug memory read 0xb8040000 1       
b8040000:0003fb1f                            ....
boot> boot
begin  : 0x80060000
length : 3225572
startup: 0x80060000
option: 0x0


OpenWrt kernel loader for AR7XXX/AR9XXX
Copyright (C) 2011 Gabor Juhos 
Decompressing kernel... done!
Starting kernel at 80060000...

[    0.000000] Linux version 4.14.94 (jenkins@tofu-z77hvub18_openwrt) (gcc version 7.4.0 (OpenWrt GCC 7.4.0 r0+9105-9d407488e5)) #0 Wed Jan 23 08:37:31 2019
[    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 0x8045972c 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: 118520K/131072K available (3450K kernel code, 138K rwdata, 472K rodata, 6684K init, 195K bss, 12552K 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.000010] sched_clock: 32 bits at 280MHz, resolution 3ns, wraps every 7669584382ns
[    0.092708] Calibrating delay loop... 278.93 BogoMIPS (lpj=1394688)
[    0.237624] pid_max: default: 32768 minimum: 301
[    0.293065] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.372219] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.461148] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.578794] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.651744] pinctrl core: initialized pinctrl subsystem
[    0.715206] NET: Registered protocol family 16
[    0.769106] Can't analyze schedule() prologue at 803ba51c
[    0.836083] PCI host bridge /ahb/apb/pcie-controller@180c0000 ranges:
[    0.913158]  MEM 0x0000000010000000..0x0000000013ffffff
[    0.975617]   IO 0x0000000000000000..0x0000000000000000
[    1.055138] PCI host bridge to bus 0000:00
[    1.104102] pci_bus 0000:00: root bus resource [mem 0x10000000-0x13ffffff]
[    1.186320] pci_bus 0000:00: root bus resource [io  0x0000]
[    1.252983] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    1.334207] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    1.429520] pci 0000:00:00.0: BAR 0: assigned [mem 0x10000000-0x1001ffff 64bit]
[    1.516979] pci 0000:00:00.0: BAR 6: assigned [mem 0x10020000-0x1002ffff pref]
[    1.603966] clocksource: Switched to clocksource MIPS
[    1.665570] NET: Registered protocol family 2
[    1.718515] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    1.801848] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    1.877834] TCP: Hash tables configured (established 1024 bind 1024)
[    1.954005] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    2.023755] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    2.098972] NET: Registered protocol family 1
[    2.286701] Crashlog allocated RAM at address 0x3f00000
[    2.350522] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    2.432600] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    2.502364] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    2.693839] io scheduler noop registered
[    2.740737] io scheduler deadline registered (default)
[    2.802483] ar7200-usb-phy usb-phy: phy reset is missing
[    2.868303] pinctrl-single 1804002c.pinmux: 544 pins at pa b804002c size 68
[    2.952737] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    3.029571] console [ttyS0] disabled
[    3.072328] 18020000.uart: ttyS0 at MMIO 0x18020000 (irq = 8, base_baud = 2500000) is a 16550A
[    3.175343] console [ttyS0] enabled
[    3.175343] console [ttyS0] enabled
[    3.258626] bootconsole [early0] disabled
[    3.258626] bootconsole [early0] disabled
[    3.360576] m25p80 spi0.0: mx25l6405d (8192 Kbytes)
[    3.418981] 5 fixed-partitions partitions found on MTD device spi0.0
[    3.495024] Creating 5 MTD partitions on "spi0.0":
[    3.552336] 0x000000000000-0x000000020000 : "u-boot"
[    3.612562] 0x000000020000-0x000000022000 : "config"
[    3.672799] 0x000000022000-0x000000030000 : "reserved"
[    3.735050] 0x000000030000-0x000000040000 : "art"
[    3.792126] 0x000000040000-0x000000800000 : "firmware"
[    3.864353] libphy: Fixed MDIO Bus: probed
[    4.244363] libphy: ag71xx_mdio: probed
[    4.290345] mdio_bus mdio-bus.0: MDIO device at address 0 is missing.
[    4.705072] ag71xx 19000000.eth: Could not connect to PHY device
[    4.778846] NET: Registered protocol family 10
[    4.835002] Segment Routing with IPv6
[    4.878892] NET: Registered protocol family 17
[    4.932402] 8021q: 802.1Q VLAN Support v1.8
[    5.017188] Freeing unused kernel memory: 6684K
[    5.071366] This architecture does not have kernel memory protection.
[    5.162176] init: Console is alive
[    5.203161] init: - watchdog -
[    5.262291] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    5.355309] usbcore: registered new interface driver usbfs
[    5.421018] usbcore: registered new interface driver hub
[    5.484657] usbcore: registered new device driver usb
[    5.551117] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    5.631012] ehci-platform: EHCI generic platform driver
[    5.693819] ehci-platform 1b000000.usb: EHCI Host Controller
[    5.761556] ehci-platform 1b000000.usb: new USB bus registered, assigned bus number 1
[    5.855294] ehci-platform 1b000000.usb: irq 3, io mem 0x1b000000
[    5.954013] ehci-platform 1b000000.usb: USB 2.0 started, EHCI 1.00
[    6.028916] hub 1-0:1.0: USB hub found
[    6.074241] hub 1-0:1.0: 1 port detected
[    6.122693] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    6.219592] init: - preinit -
[    6.472881] random: jshn: uninitialized urandom read (4 bytes read)
[    6.547943] usb 1-1: new full-speed USB device number 2 using ehci-platform
[    6.722825] random: jshn: uninitialized urandom read (4 bytes read)
[    6.916328] usb 1-1: not running at top speed; connect to a high speed hub
[    7.086201] random: procd: uninitialized urandom read (4 bytes read)
[    7.162679] hub 1-1:1.0: USB hub found
[    7.235111] hub 1-1:1.0: 4 ports detected
[    7.507891] urandom_read: 3 callbacks suppressed
[    7.507900] random: jshn: uninitialized urandom read (4 bytes read)
[    7.731573] random: jshn: uninitialized urandom read (4 bytes read)
Failed to connect to the switch. Use the "list" command to see which switches are available.
Failed to connect to the switch. Use the "list" command to see which switches are available.
Failed to connect to the switch. Use the "list" command to see which switches are available.
Failed to connect to the switch. Use the "list" command to see which switches are available.
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.203965] random: fast init done
[   11.066076] procd: - early -
[   11.100650] procd: - watchdog -
[   11.688297] procd: - watchdog -
[   11.726150] procd: - ubus -
[   11.767355] random: ubusd: uninitialized urandom read (4 bytes read)
[   11.844579] random: ubusd: uninitialized urandom read (4 bytes read)
[   11.922037] procd: - init -
Please press Enter to activate this console.
[   12.145500] kmodloader: loading kernel modules from /etc/modules.d/*
[   12.226031] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   12.301139] Loading modules backported from Linux version v4.19.7-0-g61c68f2a2af0
[   12.390721] Backport generated by backports.git v4.19.7-1-0-g148b072d
[   12.470763] ip_tables: (C) 2000-2006 Netfilter Core Team
[   12.542643] nf_conntrack version 0.5.0 (2048 buckets, 8192 max)
[   12.672963] xt_time: kernel timezone is -0000
[   12.780921] PPP generic driver version 2.4.2
[   12.834609] NET: Registered protocol family 24
[   12.947620] ieee80211 phy0: Atheros AR9340 Rev:1 mem=0xb8100000, irq=11
[   13.030790] ath9k 0000:00:00.0: Direct firmware load for ath9k-eeprom-pci-0000:00:00.0.bin failed with error -2
[   13.151582] ath9k 0000:00:00.0: Falling back to user helper
[   13.637519] ieee80211 phy1: Atheros AR9300 Rev:3 mem=0xb0000000, irq=13
[   13.814381] kmodloader: done loading kernel modules from /etc/modules.d/*



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

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

gpio-export追加後

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
TP module load fail
post load fail [-2]

rebooting 3
key abort

welcome to boot console
Password:
boot> tftpd
tftpd start 192.168.0.1
boot> start tftp load openwrt-ath79-tiny-nec_wr8750n-i
end tftp load length = 3225264
start memory load ... 
memory load complete
  begin  : 0x80060000
  length : 3225240
  startup: 0x80060000

boot> debug memory write ?
write [byte|short|word] ADDRESS DATA
default access mode is word(32bit)
# ex) write byte 0x2000 0x10
boot> debug memory read 0xb8040000 1
b8040000:0003db1f                            ....
boot> debug memory write 0xb8040000 0x3fb1f
0xb8040000 <- 0x3fb1f
boot> debug memory read 0xb8040000 1       
b8040000:0003fb1f                            ....
boot> boot
begin  : 0x80060000
length : 3225240
startup: 0x80060000
option: 0x0


OpenWrt kernel loader for AR7XXX/AR9XXX
Copyright (C) 2011 Gabor Juhos 
Decompressing kernel... done!
Starting kernel at 80060000...

[    0.000000] Linux version 4.14.94 (jenkins@tofu-z77hvub18_openwrt) (gcc version 7.4.0 (OpenWrt GCC 7.4.0 r0+9105-9d407488e5)) #0 Wed Jan 23 16:51:28 2019
[    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 0x8045972c 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: 118520K/131072K available (3450K kernel code, 138K rwdata, 472K rodata, 6684K init, 195K bss, 12552K 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.092709] Calibrating delay loop... 278.93 BogoMIPS (lpj=1394688)
[    0.237625] pid_max: default: 32768 minimum: 301
[    0.293066] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.372219] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.461166] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.578794] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.651744] pinctrl core: initialized pinctrl subsystem
[    0.715211] NET: Registered protocol family 16
[    0.769103] Can't analyze schedule() prologue at 803ba51c
[    0.836079] PCI host bridge /ahb/apb/pcie-controller@180c0000 ranges:
[    0.913158]  MEM 0x0000000010000000..0x0000000013ffffff
[    0.975617]   IO 0x0000000000000000..0x0000000000000000
[    1.055448] PCI host bridge to bus 0000:00
[    1.104416] pci_bus 0000:00: root bus resource [mem 0x10000000-0x13ffffff]
[    1.186635] pci_bus 0000:00: root bus resource [io  0x0000]
[    1.253295] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    1.334519] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    1.429831] pci 0000:00:00.0: BAR 0: assigned [mem 0x10000000-0x1001ffff 64bit]
[    1.517292] pci 0000:00:00.0: BAR 6: assigned [mem 0x10020000-0x1002ffff pref]
[    1.604285] clocksource: Switched to clocksource MIPS
[    1.665872] NET: Registered protocol family 2
[    1.718830] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    1.802158] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    1.878145] TCP: Hash tables configured (established 1024 bind 1024)
[    1.954317] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    2.024067] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    2.099293] NET: Registered protocol family 1
[    2.286897] Crashlog allocated RAM at address 0x3f00000
[    2.350730] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    2.432797] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    2.502572] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    2.693963] io scheduler noop registered
[    2.740842] io scheduler deadline registered (default)
[    2.802581] ar7200-usb-phy usb-phy: phy reset is missing
[    2.868418] pinctrl-single 1804002c.pinmux: 544 pins at pa b804002c size 68
[    2.952302] gpio-export gpio-export: 1 gpio(s) exported
[    3.015603] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    3.092383] console [ttyS0] disabled
[    3.135144] 18020000.uart: ttyS0 at MMIO 0x18020000 (irq = 8, base_baud = 2500000) is a 16550A
[    3.238160] console [ttyS0] enabled
[    3.238160] console [ttyS0] enabled
[    3.321437] bootconsole [early0] disabled
[    3.321437] bootconsole [early0] disabled
[    3.423644] m25p80 spi0.0: mx25l6405d (8192 Kbytes)
[    3.482102] 5 fixed-partitions partitions found on MTD device spi0.0
[    3.558146] Creating 5 MTD partitions on "spi0.0":
[    3.615458] 0x000000000000-0x000000020000 : "u-boot"
[    3.675689] 0x000000020000-0x000000022000 : "config"
[    3.735920] 0x000000022000-0x000000030000 : "reserved"
[    3.798168] 0x000000030000-0x000000040000 : "art"
[    3.855263] 0x000000040000-0x000000800000 : "firmware"
[    3.927358] libphy: Fixed MDIO Bus: probed
[    4.314677] libphy: ag71xx_mdio: probed
[    4.385208] switch0: Atheros AR8327 rev. 2 switch registered on mdio-bus.0
[    5.455463] ag71xx 19000000.eth: connected to PHY at mdio-bus.0:00 [uid=004dd033, driver=Atheros AR8216/AR8236/AR8316]
[    5.584146] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:RGMII
[    5.659064] NET: Registered protocol family 10
[    5.715873] Segment Routing with IPv6
[    5.759778] NET: Registered protocol family 17
[    5.813285] 8021q: 802.1Q VLAN Support v1.8
[    5.898005] Freeing unused kernel memory: 6684K
[    5.952134] This architecture does not have kernel memory protection.
[    6.042871] init: Console is alive
[    6.083814] init: - watchdog -
[    6.143011] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    6.235254] usbcore: registered new interface driver usbfs
[    6.300947] usbcore: registered new interface driver hub
[    6.364600] usbcore: registered new device driver usb
[    6.431060] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    6.510955] ehci-platform: EHCI generic platform driver
[    6.573756] ehci-platform 1b000000.usb: EHCI Host Controller
[    6.641508] ehci-platform 1b000000.usb: new USB bus registered, assigned bus number 1
[    6.735238] ehci-platform 1b000000.usb: irq 3, io mem 0x1b000000
[    6.817349] random: fast init done
[    6.858045] ehci-platform 1b000000.usb: USB 2.0 started, EHCI 1.00
[    6.932953] hub 1-0:1.0: USB hub found
[    6.978274] hub 1-0:1.0: 1 port detected
[    7.026764] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    7.123648] init: - preinit -
[    7.383363] random: jshn: uninitialized urandom read (4 bytes read)
[    7.458456] usb 1-1: new full-speed USB device number 2 using ehci-platform
[    7.631781] random: jshn: uninitialized urandom read (4 bytes read)
[    7.827269] usb 1-1: not running at top speed; connect to a high speed hub
[    7.997287] random: procd: uninitialized urandom read (4 bytes read)
[    8.073767] hub 1-1:1.0: USB hub found
[    8.142337] hub 1-1:1.0: 4 ports detected
[    8.415341] urandom_read: 3 callbacks suppressed
[    8.415350] random: jshn: uninitialized urandom read (4 bytes read)
[    8.638829] random: jshn: uninitialized urandom read (4 bytes read)
[    9.470813] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    9.540678] IPv6: ADDRCONF(NETDEV_UP): eth0.1: link is not ready
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[   10.615562] eth0: link up (1000Mbps/Full duplex)
[   10.670896] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   10.748560] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.1: link becomes ready
[   12.923211] procd: - early -
[   12.958728] procd: - watchdog -
[   13.546909] procd: - watchdog -
[   13.584843] procd: - ubus -
[   13.626022] random: ubusd: uninitialized urandom read (4 bytes read)
[   13.703217] random: ubusd: uninitialized urandom read (4 bytes read)
[   13.780750] procd: - init -
[   13.814352] eth0: link down
Please press Enter to activate this console.
[   14.040001] kmodloader: loading kernel modules from /etc/modules.d/*
[   14.120538] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   14.195648] Loading modules backported from Linux version v4.19.7-0-g61c68f2a2af0
[   14.285177] Backport generated by backports.git v4.19.7-1-0-g148b072d
[   14.365276] ip_tables: (C) 2000-2006 Netfilter Core Team
[   14.437318] nf_conntrack version 0.5.0 (2048 buckets, 8192 max)
[   14.565708] xt_time: kernel timezone is -0000
[   14.674548] PPP generic driver version 2.4.2
[   14.728163] NET: Registered protocol family 24
[   14.839568] ieee80211 phy0: Atheros AR9340 Rev:1 mem=0xb8100000, irq=11
[   14.922743] ath9k 0000:00:00.0: Direct firmware load for ath9k-eeprom-pci-0000:00:00.0.bin failed with error -2
[   15.043543] ath9k 0000:00:00.0: Falling back to user helper
[   15.532696] ieee80211 phy1: Atheros AR9300 Rev:3 mem=0xb0000000, irq=14
[   15.714701] kmodloader: done loading kernel modules from /etc/modules.d/*
[   27.302322] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   27.373470] eth0: link up (1000Mbps/Full duplex)
[   27.560442] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   27.665778] br-lan: port 1(eth0.1) entered blocking state
[   27.730394] br-lan: port 1(eth0.1) entered disabled state
[   27.795282] device eth0.1 entered promiscuous mode
[   27.852575] device eth0 entered promiscuous mode
[   28.235690] br-lan: port 1(eth0.1) entered blocking state
[   28.300310] br-lan: port 1(eth0.1) entered forwarding state
[   28.367361] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   28.439614] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready



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

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

WR8750N Bootloader書き戻しメモ

U-BootからNECのBootloaderへ書き直したメモ。昨日はSOP16のクリップでSPI-NOR Flash読めたのに今日は全くダメだったので、諦めて他の方法を探って辿り着いた。
書き戻しに失敗したらどうにかFlashを直接書き換えなければならなくなるので、非常に怖い。
参考: ath79: add support for EnGenius EWS511AP · openwrt/openwrt@9ebb44a

Kermit転送にはRLoginを使用した。

u-boot> loadb
Ready for binary (Kermit) download to 0x80800000 at 9600 bps...

Kermit download complete!
Total downloaded size: 0x00020000 (131072 bytes)
   Data start address: 0x80800000

u-boot> echo $filesize
0x20000
u-boot> erase 0x9f000000 +20000 
Erase FLASH from 0x9F000000 to 0x9F01FFFF in bank #1
Erasing: ##

Erased sectors: 2

u-boot> printenv      
bootcmd=bootm 0x9F040000
bootdelay=1
baudrate=9600
ipaddr=192.168.0.1
serverip=192.168.0.2
autoload=no
hostname=u-boot_wr8750n
bootfile=firmware.bin
loadaddr=0x80800000
lsdk_kernel=1
stdin=serial
stdout=serial
stderr=serial
ethaddr=1C:B1:7F:00:A5:00
ethact=eth0
filesize=0x20000
fileaddr=0x80800000

Environment size: 299/4092 bytes

u-boot> cp.b $fileaddr 0x9f000000 $filesize
Copying to FLASH...
Writing at address: 0x9F000000

Done!

u-boot> md.l 0x9f000000 4 
9F000000: 10000103 241A0000 100002B2 241A0001    ....$.......$...
u-boot> reset
Resetting the board...
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
filesystem check fail
recover filesystem ...done.

welcome to boot console
Password:
boot>

LAN-W451NGR & OpenWrt

MACアドレスが独自フォーマットで格納されているなど、色々と厳しいのでupstream (openwrt/openwrt) へ投げるのはやめました。そのため、musashino-build/openwrtで持つだけになります。
以下OpenWrtインストール手順。

UARTを接続
LAN-W451NGRの筐体を開けてUART(シリアル)を接続。ピンは最初から立っていた。
並びは RJ-45ポート側から Vcc, TX, RX, GND。
U-Bootの環境変数を変更
ブートを中断してU-Bootのコンソールに入り、bootcmd の変更とMACアドレス設定の追加を行う。
bootcmdは以下の通り変更する。

set bootcmd "bootm 0x9f0a0010 || bootm 0x9f0a0000"


MACアドレスは筐体のラベルを参照し、以下の通りに変更する。

set wanaddr "MAC address"


例(MACアドレスが 00:aa:bb:cc:dd:ee の場合)

set wanaddr "00:aa:bb:cc:dd:ee"


最後に saveenv を実行して変更を保存。

initramfsファームでブート
192.168.1.50でTFTPサーバを実行して 0201A8C0.img にリネームしたinitramfsファームを用意し、コンソールで tftppboottftpでも可)を実行してinitramfsファームをTFTPサーバからダウンロード、bootm を実行してinitramfsファームによるブートを行う。
ブート後、mtdパーティションのバックアップを取っておくと良い。
sysupgrade
initramfsファーム上でsysupgradeファームを用いてsysupgrade、完了して再起動され、Flash内のOpenWrtファームウェアで起動する。

以上。

WR8750Nメモ(5) OpenWrtとWDT

前回の記事の続きの様なもの。

WR8750NではBootloaderがWDTに設定する制限時間が短いためにOpenWrtのLinux Kernelを起動する際にWDTドライバをロードするタイミングが間に合わない。
なのでOpenWrtのLZMA-LoaderをBootloaderから最初に開始させ、board_init() でAR9344のWDTレジスタのカウントを最大値に設定したうえでLZMA圧縮のKernelを展開、実行を渡して開始するようにした。
なお、LZMA-Loaderのコンパイル時に CONFIG_BOARD_ボード名 を構成するために必要なコードが ath79/image/Makefile に1行不足していたため、付け足した。

ath79/image/lzma-loader/src/board.c

tlwr1043nd_init()と同様に、最後にREADREGした方が良いのだろうか。

#ifdef CONFIG_BOARD_WR8750N
static void wr8750n_init(void)
{
	unsigned int reg = KSEG1ADDR(AR71XX_RESET_BASE);
	unsigned int t;

	t = 0xfffffffful;
	WRITEREG(reg + AR71XX_RESET_REG_WDOG, t);
}
#else
static inline void wr8750n_init(void) {}
#endif

void board_init(void)
{
	tlwr1043nd_init();  // 別途あるTL-WR1043ND用コード
	wr8750n_init();
}

ath79/image/Makefileの追加部分

	$(MAKE) -C lzma-loader \
		PKG_BUILD_DIR="$@.src" \
		TARGET_DIR="$(dir $@)" LOADER_NAME="$(notdir $@)" \
+		BOARD="$(BOARDNAME)" \
		LZMA_TEXT_START=0x80a00000 LOADADDR=0x80060000 \
		$(1) compile loader.$(LOADER_TYPE)
	mv "$@.$(LOADER_TYPE)" "$@"

Bootlog

BootloaderでWDT関連のレジスタを設定する必要は無し

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

welcome to boot console
Password:
boot> tftpd
tftpd start 192.168.0.1
boot> start tftp load kern.bin
end tftp load length = 3217712
start memory load ... 
memory load complete
  begin  : 0x80060000
  length : 3217687
  startup: 0x80060000
boot
begin  : 0x80060000
length : 3217687
startup: 0x80060000
option: 0x0


OpenWrt kernel loader for AR7XXX/AR9XXX
Copyright (C) 2011 Gabor Juhos 
Decompressing kernel... done!
Starting kernel at 80060000...

[    0.000000] Linux version 4.14.88 (jenkins@tofu-z77hvub18_openwrt) (gcc version 7.4.0 (OpenWrt GCC 7.4.0 r0+8777-fcf066db8c)) #0 Mon Dec 17 11:20: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 0x8045572c 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: 118584K/131072K available (3444K kernel code, 132K rwdata, 468K rodata, 6636K init, 195K bss, 12488K 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.092710] Calibrating delay loop... 278.93 BogoMIPS (lpj=1394688)
[    0.237626] pid_max: default: 32768 minimum: 301
[    0.293071] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.372219] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.461138] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.578798] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.651747] pinctrl core: initialized pinctrl subsystem
[    0.715215] NET: Registered protocol family 16
[    0.769091] Can't analyze schedule() prologue at 803b8de4
[    0.836058] PCI host bridge /ahb/apb/pcie-controller@180c0000 ranges:
[    0.913162]  MEM 0x0000000010000000..0x0000000013ffffff
[    0.975618]   IO 0x0000000000000000..0x0000000000000000
[    1.055170] PCI host bridge to bus 0000:00
[    1.104208] pci_bus 0000:00: root bus resource [mem 0x10000000-0x13ffffff]
[    1.186426] pci_bus 0000:00: root bus resource [io  0x0000]
[    1.253088] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    1.334313] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    1.429637] pci 0000:00:00.0: BAR 0: assigned [mem 0x10000000-0x1001ffff 64bit]
[    1.517089] pci 0000:00:00.0: BAR 6: assigned [mem 0x10020000-0x1002ffff pref]
[    1.604083] clocksource: Switched to clocksource MIPS
[    1.665603] NET: Registered protocol family 2
[    1.718521] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    1.801848] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    1.877835] TCP: Hash tables configured (established 1024 bind 1024)
[    1.953975] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    2.023781] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    2.098978] NET: Registered protocol family 1
[    2.288373] Crashlog allocated RAM at address 0x3f00000
[    2.352186] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    2.434245] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    2.504014] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    2.695925] io scheduler noop registered
[    2.742819] io scheduler deadline registered (default)
[    2.804559] ar7200-usb-phy usb-phy: phy reset is missing
[    2.870405] pinctrl-single 1804002c.pinmux: 544 pins at pa b804002c size 68
[    2.954930] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    3.031753] console [ttyS0] disabled
[    3.074516] 18020000.uart: ttyS0 at MMIO 0x18020000 (irq = 8, base_baud = 2500000) is a 16550A
[    3.177529] console [ttyS0] enabled
[    3.177529] console [ttyS0] enabled
[    3.260806] bootconsole [early0] disabled
[    3.260806] bootconsole [early0] disabled
[    3.362788] m25p80 spi0.0: mx25l6405d (8192 Kbytes)
[    3.421166] 6 fixed-partitions partitions found on MTD device spi0.0
[    3.497204] Creating 6 MTD partitions on "spi0.0":
[    3.554516] 0x000000000000-0x000000020000 : "Bootloader"
[    3.618904] 0x000000020000-0x000000022000 : "config"
[    3.679109] 0x000000022000-0x000000030000 : "reserved"
[    3.741418] 0x000000030000-0x000000040000 : "art"
[    3.798475] 0x000000040000-0x000000040040 : "fw_info"
[    3.859724] 0x000000040040-0x000000800000 : "os-image"
[    3.922674] libphy: Fixed MDIO Bus: probed
[    4.304478] libphy: ag71xx_mdio: probed
[    4.375105] switch0: Atheros AR8327 rev. 2 switch registered on mdio-bus.0
[    5.445260] ag71xx 19000000.eth: connected to PHY at mdio-bus.0:00 [uid=004dd033, driver=Atheros AR8216/AR8236/AR8316]
[    5.573941] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:RGMII
[    5.648738] NET: Registered protocol family 10
[    5.705612] Segment Routing with IPv6
[    5.749581] NET: Registered protocol family 17
[    5.803101] 8021q: 802.1Q VLAN Support v1.8
[    5.887862] Freeing unused kernel memory: 6636K
[    5.942052] This architecture does not have kernel memory protection.
[    6.033021] init: Console is alive
[    6.074051] init: - watchdog -
[    6.133277] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    6.226155] usbcore: registered new interface driver usbfs
[    6.291914] usbcore: registered new interface driver hub
[    6.355576] usbcore: registered new device driver usb
[    6.421983] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    6.501921] ehci-platform: EHCI generic platform driver
[    6.564700] ehci-platform 1b000000.usb: EHCI Host Controller
[    6.632465] ehci-platform 1b000000.usb: new USB bus registered, assigned bus number 1
[    6.726196] ehci-platform 1b000000.usb: irq 3, io mem 0x1b000000
[    6.808294] random: fast init done
[    6.849004] ehci-platform 1b000000.usb: USB 2.0 started, EHCI 1.00
[    6.923905] hub 1-0:1.0: USB hub found
[    6.969235] hub 1-0:1.0: 1 port detected
[    7.017730] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    7.114610] init: - preinit -
[    7.377286] random: jshn: uninitialized urandom read (4 bytes read)
[    7.452330] usb 1-1: new full-speed USB device number 2 using ehci-platform
[    7.625942] random: jshn: uninitialized urandom read (4 bytes read)
[    7.817234] usb 1-1: not running at top speed; connect to a high speed hub
[    7.986097] random: procd: uninitialized urandom read (4 bytes read)
[    8.062591] hub 1-1:1.0: USB hub found
[    8.139744] hub 1-1:1.0: 4 ports detected
[    8.414445] urandom_read: 3 callbacks suppressed
[    8.414454] random: jshn: uninitialized urandom read (4 bytes read)
[    8.640209] random: jshn: uninitialized urandom read (4 bytes read)
[    9.470671] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    9.540580] IPv6: ADDRCONF(NETDEV_UP): eth0.1: link is not ready
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[   10.615361] eth0: link up (1000Mbps/Full duplex)
[   10.670697] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   10.748330] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.1: link becomes ready
[   12.923277] procd: - early -
[   12.958749] procd: - watchdog -
[   13.550005] procd: - watchdog -
[   13.587873] procd: - ubus -
[   13.629078] random: ubusd: uninitialized urandom read (4 bytes read)
[   13.706349] random: ubusd: uninitialized urandom read (4 bytes read)
[   13.783980] procd: - init -
[   13.817433] eth0: link down
Please press Enter to activate this console.
[   14.041652] kmodloader: loading kernel modules from /etc/modules.d/*
[   14.122269] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   14.197561] Loading modules backported from Linux version v4.19.7-0-g61c68f2a2af0
[   14.287162] Backport generated by backports.git v4.19.7-1-0-g148b072d
[   14.367119] ip_tables: (C) 2000-2006 Netfilter Core Team
[   14.439140] nf_conntrack version 0.5.0 (2048 buckets, 8192 max)
[   14.568639] xt_time: kernel timezone is -0000
[   14.676786] PPP generic driver version 2.4.2
[   14.730501] NET: Registered protocol family 24
[   14.843628] ieee80211 phy0: Atheros AR9340 Rev:1 mem=0xb8100000, irq=11
[   14.926810] ath9k 0000:00:00.0: Direct firmware load for ath9k-eeprom-pci-0000:00:00.0.bin failed with error -2
[   15.047604] ath9k 0000:00:00.0: Falling back to user helper
[   15.539837] ieee80211 phy1: Atheros AR9300 Rev:3 mem=0xb0000000, irq=13
[   15.724512] kmodloader: done loading kernel modules from /etc/modules.d/*
[   26.224778] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   26.295920] eth0: link up (1000Mbps/Full duplex)
[   26.494156] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   26.595542] br-lan: port 1(eth0.1) entered blocking state
[   26.660149] br-lan: port 1(eth0.1) entered disabled state
[   26.725018] device eth0.1 entered promiscuous mode
[   26.782318] device eth0 entered promiscuous mode
[   27.164199] br-lan: port 1(eth0.1) entered blocking state
[   27.228780] br-lan: port 1(eth0.1) entered forwarding state
[   27.295623] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   27.368038] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[  121.754589] random: crng init done



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+8793-f2032c0977
 -----------------------------------------------------
=== 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:/# 

WR8750Nメモ (4) ブート関係

ツイートに複数の方から「Watchdog Timerではないか」という指摘を頂き、DTSでwdtノードを無効化するもダメ。レジスタを確認し、試しに制限時間経過時のアクションを “No action” に設定したところ、すんなりと起動できた。
恐らく、Bootloaderが設定するWatchdog Timerの制限時間に、OpenWrtのLinux KernelがWDTドライバを初期化し応答できる状態になるタイミングが間に合っていない。対処法はぼんやりと考えているので後で試す。

サポート作業状況(2018/12/17時点)

動作OK

  • initramfsファーム
    • kernelとrootfs等の構成等については考え中のため、sysupgradeファームはまだ
  • Ethernet
  • WLAN 2/5 GHz
    • Kernelからの認識のみ確認
  • LED
    • 10個全てAR9382 (ath9k)が持つ
  • ボタン, スライドスイッチ

作業中

  • sysupgradeファーム
  • Factoryファーム
  • USBポート
    • NECの4ポートハブチップが接続されているものの、何故かFull-SpeedでSoCと接続されてしまう。原因不明。

メモ

  • NECのハブチップの電源(あるいは有効化?)にはath9kのGPIO10、USBの物理ポートの電源にはSoCのGPIO19か20辺りが絡んでいる模様。

Watchdog Timer レジスタ設定(Bootloader)

debug memory write 0xb8060008 0x0

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

welcome to boot console
Password:
boot> tftpd
tftpd start 192.168.0.1
boot> start tftp load kern.bin
end tftp load length = 5140888
start memory load ... 
memory load complete
  begin  : 0x80060000
  length : 5140862
  startup: 0x80060000
debug memory write 0xb8060008 0x0
0xb8060008 <- 0x00000000
boot> boot
begin  : 0x80060000
length : 5140862
startup: 0x80060000
option: 0x0
[    0.000000] Linux version 4.14.88 (jenkins@tofu-z77hvub18_openwrt) (gcc version 7.4.0 (OpenWrt GCC 7.4.0 r0+8777-fcf066db8c)) #0 Sun Dec 16 13:15:06 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 start_kernel+0x8c/0x474 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: 116908K/131072K available (3746K kernel code, 149K rwdata, 904K rodata, 7544K init, 204K bss, 14164K 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.000010] sched_clock: 32 bits at 280MHz, resolution 3ns, wraps every 7669584382ns
[    0.092713] Calibrating delay loop... 278.93 BogoMIPS (lpj=1394688)
[    0.237626] pid_max: default: 32768 minimum: 301
[    0.293063] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.372221] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.461040] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.578693] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.651640] pinctrl core: initialized pinctrl subsystem
[    0.715102] NET: Registered protocol family 16
[    0.775399] PCI host bridge /ahb/apb/pcie-controller@180c0000 ranges:
[    0.852531]  MEM 0x0000000010000000..0x0000000013ffffff
[    0.914987]   IO 0x0000000000000000..0x0000000000000000
[    0.995120] PCI host bridge to bus 0000:00
[    1.044097] pci_bus 0000:00: root bus resource [mem 0x10000000-0x13ffffff]
[    1.126318] pci_bus 0000:00: root bus resource [io  0x0000]
[    1.192980] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    1.274203] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    1.369512] pci 0000:00:00.0: BAR 0: assigned [mem 0x10000000-0x1001ffff 64bit]
[    1.456977] pci 0000:00:00.0: BAR 6: assigned [mem 0x10020000-0x1002ffff pref]
[    1.543972] clocksource: Switched to clocksource MIPS
[    1.605534] NET: Registered protocol family 2
[    1.658465] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    1.741838] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    1.817827] TCP: Hash tables configured (established 1024 bind 1024)
[    1.894009] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    1.963749] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    2.038978] NET: Registered protocol family 1
[    2.231417] Crashlog allocated RAM at address 0x3f00000
[    2.295376] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    2.377478] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    2.447249] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    2.640236] io scheduler noop registered
[    2.687181] io scheduler deadline registered (default)
[    2.748915] ar7200-usb-phy usb-phy: phy reset is missing
[    2.814642] pinctrl-single 1804002c.pinmux: 544 pins at pa b804002c size 68
[    2.899075] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    2.975878] console [ttyS0] disabled
[    3.018669] 18020000.uart: ttyS0 at MMIO 0x18020000 (irq = 8, base_baud = 2500000) is a 16550A
[    3.121682] console [ttyS0] enabled
[    3.121682] console [ttyS0] enabled
[    3.204962] bootconsole [early0] disabled
[    3.204962] bootconsole [early0] disabled
[    3.307128] m25p80 spi0.0: mx25l6405d (8192 Kbytes)
[    3.365521] 5 fixed-partitions partitions found on MTD device spi0.0
[    3.441566] Creating 5 MTD partitions on "spi0.0":
[    3.498878] 0x000000000000-0x000000020000 : "Bootloader"
[    3.563234] 0x000000020000-0x000000022000 : "config"
[    3.623460] 0x000000022000-0x000000030000 : "reserved"
[    3.685726] 0x000000030000-0x000000040000 : "art"
[    3.742820] 0x000000040000-0x000000800000 : "os-image"
[    3.806244] libphy: Fixed MDIO Bus: probed
[    4.194360] libphy: ag71xx_mdio: probed
[    4.265159] switch0: Atheros AR8327 rev. 2 switch registered on mdio-bus.0
[    5.325149] ag71xx 19000000.eth: connected to PHY at mdio-bus.0:00 [uid=004dd033, driver=Atheros AR8216/AR8236/AR8316]
[    5.453816] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:RGMII
[    5.528520] NET: Registered protocol family 10
[    5.585361] Segment Routing with IPv6
[    5.629254] NET: Registered protocol family 17
[    5.682414] 8021q: 802.1Q VLAN Support v1.8
[    5.771226] Freeing unused kernel memory: 7544K
[    5.825362] This architecture does not have kernel memory protection.
[    5.916604] init: Console is alive
[    5.957496] init: - watchdog -
[    6.016978] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    6.110555] usbcore: registered new interface driver usbfs
[    6.176256] usbcore: registered new interface driver hub
[    6.239913] usbcore: registered new device driver usb
[    6.306519] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    6.386474] ehci-platform: EHCI generic platform driver
[    6.449252] ehci-platform 1b000000.usb: EHCI Host Controller
[    6.517011] ehci-platform 1b000000.usb: new USB bus registered, assigned bus number 1
[    6.610657] random: fast init done
[    6.651414] ehci-platform 1b000000.usb: irq 3, io mem 0x1b000000
[    6.744020] ehci-platform 1b000000.usb: USB 2.0 started, EHCI 1.00
[    6.818850] hub 1-0:1.0: USB hub found
[    6.864254] hub 1-0:1.0: 1 port detected
[    6.912652] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    7.009575] init: - preinit -
[    7.269061] random: jshn: uninitialized urandom read (4 bytes read)
[    7.344169] usb 1-1: new full-speed USB device number 2 using ehci-platform
[    7.519092] random: jshn: uninitialized urandom read (4 bytes read)
[    7.716451] usb 1-1: not running at top speed; connect to a high speed hub
[    7.886351] random: procd: uninitialized urandom read (4 bytes read)
[    7.962847] hub 1-1:1.0: USB hub found
[    8.037439] hub 1-1:1.0: 4 ports detected
[    8.314062] urandom_read: 3 callbacks suppressed
[    8.314071] random: jshn: uninitialized urandom read (4 bytes read)
[    8.541368] random: jshn: uninitialized urandom read (4 bytes read)
[    9.390880] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    9.460811] IPv6: ADDRCONF(NETDEV_UP): eth0.1: link is not ready
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[   10.565247] eth0: link up (1000Mbps/Full duplex)
[   10.622817] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   10.707532] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.1: link becomes ready
[   12.797708] procd: - early -
[   12.832368] procd: - watchdog -
[   13.420437] procd: - watchdog -
[   13.458384] procd: - ubus -
[   13.499626] random: ubusd: uninitialized urandom read (4 bytes read)
[   13.576873] random: ubusd: uninitialized urandom read (4 bytes read)
[   13.654550] procd: - init -
Please press Enter to activate this console.
[   13.764051] eth0: link down
[   13.914267] kmodloader: loading kernel modules from /etc/modules.d/*
[   13.995140] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   14.071073] Loading modules backported from Linux version v4.19.7-0-g61c68f2a2af0
[   14.160697] Backport generated by backports.git v4.19.7-1-0-g148b072d
[   14.240859] ip_tables: (C) 2000-2006 Netfilter Core Team
[   14.313504] nf_conntrack version 0.5.0 (2048 buckets, 8192 max)
[   14.443692] xt_time: kernel timezone is -0000
[   14.557264] PPP generic driver version 2.4.2
[   14.611108] NET: Registered protocol family 24
[   14.726334] ieee80211 phy0: Atheros AR9340 Rev:1 mem=0xb8100000, irq=11
[   14.809414] ath9k 0000:00:00.0: Direct firmware load for ath9k-eeprom-pci-0000:00:00.0.bin failed with error -2
[   14.930188] ath9k 0000:00:00.0: Falling back to user helper
[   15.427859] ieee80211 phy1: Atheros AR9300 Rev:3 mem=0xb0000000, irq=13
[   15.614406] kmodloader: done loading kernel modules from /etc/modules.d/*
[   26.242267] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   26.313388] eth0: link up (1000Mbps/Full duplex)
[   26.504059] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   26.615326] br-lan: port 1(eth0.1) entered blocking state
[   26.679898] br-lan: port 1(eth0.1) entered disabled state
[   26.744772] device eth0.1 entered promiscuous mode
[   26.802086] device eth0 entered promiscuous mode
[   27.175541] br-lan: port 1(eth0.1) entered blocking state
[   27.240149] br-lan: port 1(eth0.1) entered forwarding state
[   27.307008] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   27.379681] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[  120.093741] random: crng init done



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+8790-4f235335f1
 -----------------------------------------------------
=== 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:/#

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 実行