Porting guide ar71xx to ath79?

Did you tried to make some traffic on ath10k? Mine always resets after few minutes without any warning, but I always tested from initrd

@lucize As i see now, append-metadata is missing for wr1043v4... Probably you should add it at least for this device or what would be better to create or use a more generic image target in common-tp-link.mk for wr1043v4.

Is the tplink-sveloader needed or could we use also another image target for wr1043v4?

V4 is strange, it will only boot from flash like I edited, but didn't tried de v5 way

What is the serial output if you boot an initram image?

You could also try the archer generic image build target and port it to ath79 (swap patch-cmdline with append-dtb):

target/linux/ar71xx/image/common-tp-link.mk

define Device/archer-cxx
  KERNEL := kernel-bin | patch-cmdline | lzma | uImageArcher lzma
  IMAGES := sysupgrade.bin factory.bin
  IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade | \
	append-metadata | check-size $$$$(IMAGE_SIZE)
  IMAGE/factory.bin := append-rootfs | tplink-safeloader factory
endef
define Build/uImageArcher
	mkimage -A $(LINUX_KARCH) \
		-O linux -T kernel \
		-C $(1) -a $(KERNEL_LOADADDR) -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \
		-n '$(call toupper,$(LINUX_KARCH)) OpenWrt Linux-$(LINUX_VERSION)' -d $@ $@.new
	@mv $@.new $@
endef

Looks very similar, but KERNEL is different.

I will flash my main accesspoint that gets regular traffic and observe whats happening.

If is happening, it should be quickly

Does not happen for me but im using the -ct version of the drivers / firmware.
Anyway im out for tonight thanks again, looking forward to see that in openwrt!

Mr @lucize, sorry for the long delay, I could not find a way to tftboot the initramfs file from breed bootloader, so i decided to sysupgrade without keeping the configuration from luci interface, the device doesn't complain anything about firmware checks.

The device boot, power led, lan ports leds, usb led and usb port works but ethernet and wifi are not working. I have an rt2800 usb wireless card and attach it to my device, and i could access to the router via ssh and luci interface. here is the new dmesg.

[    0.000000] Linux version 4.14.50 (valkyria@Valkyria-Z) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r7291-3651cc3a6c)) #0 Wed Jun 20 22:02:10 2018
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019374 (MIPS 24Kc)
[    0.000000] MIPS: machine is TP-LINK TL-WR2543N/ND
[    0.000000] SoC: Atheros AR7242 rev 1
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 04000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] On node 0 totalpages: 16384
[    0.000000] free_area_init_node: node 0, pgdat 804e9020, node_mem_map 81006ca0
[    0.000000]   Normal zone: 128 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 16384 pages, LIFO batch:3
[    0.000000] random: get_random_bytes called from start_kernel+0x8c/0x474 with crng_init=0
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line: console=ttyS0,115200n8 rootfstype=squashfs,jffs2
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Writing ErrCtl register=0005f860
[    0.000000] Readback ErrCtl register=0005f860
[    0.000000] Memory: 58400K/65536K available (3704K kernel code, 144K rwdata, 800K rodata, 1232K init, 212K bss, 7136K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 51
[    0.000000] CPU clock: 400.000 MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[    0.000012] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    0.007974] Calibrating delay loop... 265.42 BogoMIPS (lpj=1327104)
[    0.094279] pid_max: default: 32768 minimum: 301
[    0.099242] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.105908] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.118569] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.128529] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.134774] pinctrl core: initialized pinctrl subsystem
[    0.141348] NET: Registered protocol family 16
[    0.154357] PCI host bridge /ahb/apb/pcie-controller@180c0000 ranges:
[    0.160925]  MEM 0x0000000010000000..0x0000000013ffffff
[    0.166182]   IO 0x0000000000000000..0x0000000000000000
[    0.192379] PCI host bridge to bus 0000:00
[    0.196532] pci_bus 0000:00: root bus resource [mem 0x10000000-0x13ffffff]
[    0.203508] pci_bus 0000:00: root bus resource [io  0x0000]
[    0.209120] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    0.215960] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.223982] pci 0000:00:00.0: [168c:0030] type 00 class 0x028000
[    0.224059] pci 0000:00:00.0: reg 0x10: [mem 0x10000000-0x1001ffff 64bit]
[    0.224153] pci 0000:00:00.0: reg 0x30: [mem 0x00000000-0x0000ffff pref]
[    0.224245] pci 0000:00:00.0: supports D1
[    0.224259] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[    0.224594] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00
[    0.224631] pci 0000:00:00.0: BAR 0: assigned [mem 0x10000000-0x1001ffff 64bit]
[    0.232053] pci 0000:00:00.0: BAR 6: assigned [mem 0x10020000-0x1002ffff pref]
[    0.240164] clocksource: Switched to clocksource MIPS
[    0.246739] NET: Registered protocol family 2
[    0.252325] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.259364] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.265842] TCP: Hash tables configured (established 1024 bind 1024)
[    0.272461] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.278370] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.285083] NET: Registered protocol family 1
[    0.289518] PCI: CLS 0 bytes, default 32
[    0.294883] Crashlog allocated RAM at address 0x3f00000
[    0.301644] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[    0.315361] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.321285] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.341579] io scheduler noop registered
[    0.345538] io scheduler deadline registered (default)
[    0.351220] ar7200-usb-phy usb-phy: phy reset is missing
[    0.357153] pinctrl-single 18040028.pinmux: 64 pins at pa b8040028 size 8
[    0.365406] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    0.372827] console [ttyS0] disabled
[    0.376484] 18020000.uart: ttyS0 at MMIO 0x18020000 (irq = 8, base_baud = 12500000) is a 16550A
[    0.385314] console [ttyS0] enabled
[    0.392333] bootconsole [early0] disabled
[    0.407845] m25p80 spi0.0: s25sl064p (8192 Kbytes)
[    0.412791] 3 fixed-partitions partitions found on MTD device spi0.0
[    0.419177] Creating 3 MTD partitions on "spi0.0":
[    0.424026] 0x000000000000-0x000000020000 : "u-boot"
[    0.430141] 0x000000020000-0x0000007f0000 : "firmware"
[    0.453746] 2 tplink-fw partitions found on MTD device firmware
[    0.459724] 0x000000020000-0x00000019e07f : "kernel"
[    0.465773] 0x00000019e080-0x0000007f0000 : "rootfs"
[    0.471807] mtd: device 3 (rootfs) set to be root filesystem
[    0.477540] 1 squashfs-split partitions found on MTD device rootfs
[    0.483829] 0x000000680000-0x0000007f0000 : "rootfs_data"
[    0.490370] 0x0000007f0000-0x000000800000 : "art"
[    0.497365] libphy: Fixed MDIO Bus: probed
[    0.842044] ag71xx 19000000.eth: connected to PHY at fixed-0:00 [uid=00000000, driver=Generic PHY]
[    0.851980] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:RGMII
[    0.860998] NET: Registered protocol family 10
[    0.870801] Segment Routing with IPv6
[    0.874621] NET: Registered protocol family 17
[    0.879142] 8021q: 802.1Q VLAN Support v1.8
[    0.890682] VFS: Mounted root (squashfs filesystem) readonly on device 31:3.
[    0.907789] Freeing unused kernel memory: 1232K
[    0.912374] This architecture does not have kernel memory protection.
[    1.748753] init: Console is alive
[    1.752551] init: - watchdog -
[    2.428657] random: fast init done
[    4.191043] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    4.432906] usbcore: registered new interface driver usbfs
[    4.438519] usbcore: registered new interface driver hub
[    4.444067] usbcore: registered new device driver usb
[    4.499252] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    4.518540] SCSI subsystem initialized
[    4.528979] ehci-platform: EHCI generic platform driver
[    4.534633] ehci-platform 1b000000.usb: EHCI Host Controller
[    4.540415] ehci-platform 1b000000.usb: new USB bus registered, assigned bus number 1
[    4.548451] ehci-platform 1b000000.usb: irq 3, io mem 0x1b000000
[    4.580191] ehci-platform 1b000000.usb: USB 2.0 started, EHCI 1.00
[    4.587557] hub 1-0:1.0: USB hub found
[    4.591808] hub 1-0:1.0: 1 port detected
[    4.602589] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    4.610796] ohci-platform: OHCI generic platform driver
[    4.619366] uhci_hcd: USB Universal Host Controller Interface driver
[    4.631777] usbcore: registered new interface driver usb-storage
[    4.638664] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    4.648589] init: - preinit -
[    5.235650] usb 1-1: new high-speed USB device number 2 using ehci-platform
[    5.561945] random: procd: uninitialized urandom read (4 bytes read)
[    5.910524] random: jshn: uninitialized urandom read (4 bytes read)
[    6.117403] random: jshn: uninitialized urandom read (4 bytes read)
[    6.594607] urandom_read: 1 callbacks suppressed
[    6.594617] random: jshn: uninitialized urandom read (4 bytes read)
[    6.730059] random: jshn: uninitialized urandom read (4 bytes read)
[    7.350611] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    7.356583] IPv6: ADDRCONF(NETDEV_UP): eth0.1: link is not ready
[    8.431328] eth0: link up (1000Mbps/Full duplex)
[    8.436017] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[    8.442949] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.1: link becomes ready
[   10.639471] mount_root: loading kmods from internal overlay
[   10.711055] kmodloader: loading kernel modules from //etc/modules-boot.d/*
[   10.721243] kmodloader: done loading kernel modules from //etc/modules-boot.d/*
[   11.460913] block: attempting to load /etc/config/fstab
[   11.466447] block: unable to load configuration (fstab: Entry not found)
[   11.473374] block: no usable configuration
[   11.478555] mount_root: jffs2 not ready yet, using temporary tmpfs overlay
[   11.547829] urandom-seed: Seed file not found (/etc/urandom.seed)
[   11.726160] procd: - early -
[   11.729192] procd: - watchdog -
[   12.398998] procd: - watchdog -
[   12.402571] procd: - ubus -
[   12.491865] random: ubusd: uninitialized urandom read (4 bytes read)
[   12.507905] random: ubusd: uninitialized urandom read (4 bytes read)
[   12.514999] random: ubusd: uninitialized urandom read (4 bytes read)
[   12.522715] procd: - init -
[   12.647330] eth0: link down
[   13.074141] kmodloader: loading kernel modules from /etc/modules.d/*
[   13.103171] ntfs: driver 2.1.32 [Flags: R/O MODULE].
[   13.152220] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   13.181539] cryptodev: driver 1.9 loaded.
[   13.263901] u32 classifier
[   13.266641]     input device check on
[   13.270387]     Actions configured
[   13.301369] Mirror/redirect action on
[   13.324891] nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
[   13.369067] fuse init (API version 7.26)
[   13.388553] Loading modules backported from Linux version wt-2017-11-01-0-gfe248fc2c180
[   13.396682] Backport generated by backports.git v4.14-rc2-1-31-g86cf0e5d
[   13.471095] ip_tables: (C) 2000-2006 Netfilter Core Team
[   13.636497] xt_time: kernel timezone is -0000
[   13.734219] usbcore: registered new interface driver mt7601u
[   13.749025] PPP generic driver version 2.4.2
[   13.756999] NET: Registered protocol family 24
[   13.780990] usbcore: registered new interface driver rt73usb
[   13.809566] usbcore: registered new interface driver zd1211rw
[   13.862253] usbcore: registered new interface driver rt2500usb
[   14.030188] usb 1-1: reset high-speed USB device number 2 using ehci-platform
[   14.241122] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 3070, rev 0201 detected
[   14.277220] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 0005 detected
[   14.285327] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[   14.287951] usbcore: registered new interface driver rt2800usb
[   14.343909] usbcore: registered new interface driver rtl8192cu
[   14.494837] ath9k 0000:00:00.0: Direct firmware load for ath9k-eeprom-pci-0000:00:00.0.bin failed with error -2
[   14.505060] ath9k 0000:00:00.0: Falling back to user helper
[   15.291762] firmware ath9k-eeprom-pci-0000:00:00.0.bin: firmware_loading_store: map pages failed
[   15.301551] ath: phy1: Unable to load EEPROM file ath9k-eeprom-pci-0000:00:00.0.bin
[   15.309270] ath9k 0000:00:00.0: Failed to initialize device
[   15.315026] ath9k: probe of 0000:00:00.0 failed with error -22
[   15.340822] kmodloader: done loading kernel modules from /etc/modules.d/*
[   35.118475] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   35.125610] eth0: link up (1000Mbps/Full duplex)
[   35.150321] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   35.185038] br-lan: port 1(eth0.1) entered blocking state
[   35.190563] br-lan: port 1(eth0.1) entered disabled state
[   35.196460] device eth0.1 entered promiscuous mode
[   35.201350] device eth0 entered promiscuous mode
[   35.298770] br-lan: port 1(eth0.1) entered blocking state
[   35.304281] br-lan: port 1(eth0.1) entered forwarding state
[   35.310194] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   36.190585] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   41.972333] ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
[   42.000442] ieee80211 phy0: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.36
[   42.758213] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   42.795921] br-lan: port 2(wlan0) entered blocking state
[   42.801373] br-lan: port 2(wlan0) entered disabled state
[   42.807283] device wlan0 entered promiscuous mode
[   42.898269] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[   42.905040] br-lan: port 2(wlan0) entered blocking state
[   42.910435] br-lan: port 2(wlan0) entered forwarding state
[   59.749982] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
[   59.794821] jffs2_build_filesystem(): unlocking the mtd device... 
[   59.794836] done.
[   59.803067] jffs2_build_filesystem(): erasing all blocks after the end marker... 
[   67.200925] done.
[   67.210461] jffs2: notice: (1853) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[   67.873796] random: crng init done
[   67.877252] random: 1 urandom warning(s) missed due to ratelimiting
[   68.837989] overlayfs: upper fs does not support tmpfile.

Do you need some info from the device in the new firmware?

ok, the RTL8367 is not enabled in the config-4.14, I'll update the tree, and will see about ath9k

@Mynzer I've updated the tree, enabled the Realtek phy and added eprom extract function, try it!

I'm working on the Netgear WNDR4300, which is complicated a little by the fact it is a NAND device, and the fact I have little experience with this. I do have a device with serial access so that should help. I should be able to build ramdisk images and boot those to see if it works or not.

NAND is gonna be a little tricky to get working as it needs importing this driver from ar71xx

Although it should not be so hard, as this looks like a rather simple NAND driver and was maintained.
It should be a case of including it and enabling its building in NAND sub-target.

I can give it a go so you can test it out.

Don´t think it would be that easy...
This driver needs a initialization with properties from dt instead of platform data or what is done with the other old drivers a function that sets the platform data with data from device tree...

If you take a look at this PR of @silverchris.
He added a of probe / init function to get the needed data from dt, but this is really an simple nand driver...

Well,only NAND related stuff in the mach file is the following:
ath79_nfc_set_ecc_mode(AR934X_NFC_ECC_HW);
ath79_register_nfc();

RB91X series have their own driver.

I know this would look very simple... But if you take a deeper look into this functions, there will happen the setup of the platform data and then the driver get registered. Sure you can call simply this functions if something is defined in dt, but the files inside the arch/mips/ath79 folder will be dropped on ath79 target and all specififc hw details should be setup within the driver itself with the help o the information in dt. This means no fancy / simple function ath79_register_nfc().
This should happen in the probe or init function of the driver, eg.: drivers/mtd/nand/ar934x_nfc.c

But feel free to try, but don´t be upset if this will never be accepted

I know, and this one is much more simpler than on ar934x

Yeah, you are right.
It's simple when you have the luxury of calling low level functions like in ar71xx.
But in ath79 ar934x NAND driver needs to be updated to read properties from DT bindings, otherwise, it would not really work.

I can give it a go, but I expect to be stuck rather quickly.
Also,I dont have any AR934X devices with NAND, I can only get my hands on 8devices Rambutan but its QCA9557 based and I dont know if the same driver is used.

Hi again @lucize, here is the new dmesg from my device, the ethernet and wifi are not working again, but in dmesg seem that we can see that the ethernet switch gets somehow detected.

[    0.000000] Linux version 4.14.50 (valkyria@Valkyria-Z) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r7291+2-c4184c8f32)) #0 Fri Jun 22 14:27:45 2018
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019374 (MIPS 24Kc)
[    0.000000] MIPS: machine is TP-LINK TL-WR2543N/ND
[    0.000000] SoC: Atheros AR7242 rev 1
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 04000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] On node 0 totalpages: 16384
[    0.000000] free_area_init_node: node 0, pgdat 804ed420, node_mem_map 81006ca0
[    0.000000]   Normal zone: 128 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 16384 pages, LIFO batch:3
[    0.000000] random: get_random_bytes called from start_kernel+0x8c/0x474 with crng_init=0
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line: console=ttyS0,115200n8 rootfstype=squashfs,jffs2
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Writing ErrCtl register=0005f860
[    0.000000] Readback ErrCtl register=0005f860
[    0.000000] Memory: 58400K/65536K available (3709K kernel code, 146K rwdata, 808K rodata, 1216K init, 212K bss, 7136K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 51
[    0.000000] CPU clock: 400.000 MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[    0.000012] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    0.007974] Calibrating delay loop... 265.42 BogoMIPS (lpj=1327104)
[    0.094278] pid_max: default: 32768 minimum: 301
[    0.099239] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.105899] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.118577] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.128537] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.134781] pinctrl core: initialized pinctrl subsystem
[    0.141364] NET: Registered protocol family 16
[    0.154405] PCI host bridge /ahb/apb/pcie-controller@180c0000 ranges:
[    0.160975]  MEM 0x0000000010000000..0x0000000013ffffff
[    0.166234]   IO 0x0000000000000000..0x0000000000000000
[    0.192050] PCI host bridge to bus 0000:00
[    0.196201] pci_bus 0000:00: root bus resource [mem 0x10000000-0x13ffffff]
[    0.203162] pci_bus 0000:00: root bus resource [io  0x0000]
[    0.208771] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    0.215609] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.223623] pci 0000:00:00.0: [168c:0030] type 00 class 0x028000
[    0.223699] pci 0000:00:00.0: reg 0x10: [mem 0x10000000-0x1001ffff 64bit]
[    0.223792] pci 0000:00:00.0: reg 0x30: [mem 0x00000000-0x0000ffff pref]
[    0.223882] pci 0000:00:00.0: supports D1
[    0.223896] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[    0.224235] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00
[    0.224273] pci 0000:00:00.0: BAR 0: assigned [mem 0x10000000-0x1001ffff 64bit]
[    0.231693] pci 0000:00:00.0: BAR 6: assigned [mem 0x10020000-0x1002ffff pref]
[    0.239825] clocksource: Switched to clocksource MIPS
[    0.246430] NET: Registered protocol family 2
[    0.252024] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.259059] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.265534] TCP: Hash tables configured (established 1024 bind 1024)
[    0.272151] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.278057] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.284770] NET: Registered protocol family 1
[    0.289206] PCI: CLS 0 bytes, default 32
[    0.294442] Crashlog allocated RAM at address 0x3f00000
[    0.301161] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[    0.314970] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.320899] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.340935] io scheduler noop registered
[    0.344893] io scheduler deadline registered (default)
[    0.350572] ar7200-usb-phy usb-phy: phy reset is missing
[    0.356497] pinctrl-single 18040028.pinmux: 64 pins at pa b8040028 size 8
[    0.364761] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    0.372193] console [ttyS0] disabled
[    0.375848] 18020000.uart: ttyS0 at MMIO 0x18020000 (irq = 8, base_baud = 12500000) is a 16550A
[    0.384682] console [ttyS0] enabled
[    0.391702] bootconsole [early0] disabled
[    0.407107] m25p80 spi0.0: s25sl064p (8192 Kbytes)
[    0.412057] 3 fixed-partitions partitions found on MTD device spi0.0
[    0.418444] Creating 3 MTD partitions on "spi0.0":
[    0.423290] 0x000000000000-0x000000020000 : "u-boot"
[    0.429421] 0x000000020000-0x0000007f0000 : "firmware"
[    0.452928] 2 tplink-fw partitions found on MTD device firmware
[    0.458904] 0x000000020000-0x00000019ee7e : "kernel"
[    0.464964] 0x00000019ee80-0x0000007f0000 : "rootfs"
[    0.471012] mtd: device 3 (rootfs) set to be root filesystem
[    0.476747] 1 squashfs-split partitions found on MTD device rootfs
[    0.483034] 0x000000690000-0x0000007f0000 : "rootfs_data"
[    0.489513] 0x0000007f0000-0x000000800000 : "art"
[    0.609847] rtl8367 rtl8367: using GPIO pins 1 (SDA) and 6 (SCK)
[    0.616521] rtl8367 rtl8367: RTL8367R ver. 0 chip found
[    1.825242] libphy: rtl8367: probed
[    1.833523] libphy: Fixed MDIO Bus: probed
[    2.181716] ag71xx 19000000.eth: connected to PHY at fixed-0:00 [uid=00000000, driver=Generic PHY]
[    2.191632] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:RGMII
[    2.200645] NET: Registered protocol family 10
[    2.210333] Segment Routing with IPv6
[    2.214161] NET: Registered protocol family 17
[    2.218691] 8021q: 802.1Q VLAN Support v1.8
[    2.230359] VFS: Mounted root (squashfs filesystem) readonly on device 31:3.
[    2.247325] Freeing unused kernel memory: 1216K
[    2.251913] This architecture does not have kernel memory protection.
[    2.559885] random: fast init done
[    3.093238] init: Console is alive
[    3.096923] init: - watchdog -
[    5.564287] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    5.807200] usbcore: registered new interface driver usbfs
[    5.812900] usbcore: registered new interface driver hub
[    5.818378] usbcore: registered new device driver usb
[    5.870037] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    5.889755] SCSI subsystem initialized
[    5.900486] ehci-platform: EHCI generic platform driver
[    5.906078] ehci-platform 1b000000.usb: EHCI Host Controller
[    5.911868] ehci-platform 1b000000.usb: new USB bus registered, assigned bus number 1
[    5.919932] ehci-platform 1b000000.usb: irq 3, io mem 0x1b000000
[    5.949852] ehci-platform 1b000000.usb: USB 2.0 started, EHCI 1.00
[    5.957267] hub 1-0:1.0: USB hub found
[    5.961523] hub 1-0:1.0: 1 port detected
[    5.972519] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    5.980769] ohci-platform: OHCI generic platform driver
[    5.989473] uhci_hcd: USB Universal Host Controller Interface driver
[    6.002208] usbcore: registered new interface driver usb-storage
[    6.009102] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    6.019027] init: - preinit -
[    6.605778] usb 1-1: new high-speed USB device number 2 using ehci-platform
[    6.932582] random: procd: uninitialized urandom read (4 bytes read)
[    7.281472] random: jshn: uninitialized urandom read (4 bytes read)
[    7.487702] random: jshn: uninitialized urandom read (4 bytes read)
[    7.964078] urandom_read: 1 callbacks suppressed
[    7.964088] random: jshn: uninitialized urandom read (4 bytes read)
[    8.099028] random: jshn: uninitialized urandom read (4 bytes read)
[    9.087053] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    9.093114] IPv6: ADDRCONF(NETDEV_UP): eth0.1: link is not ready
[   10.110988] eth0: link up (1000Mbps/Full duplex)
[   10.115680] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   10.122613] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.1: link becomes ready
[   12.387210] mount_root: loading kmods from internal overlay
[   12.459436] kmodloader: loading kernel modules from //etc/modules-boot.d/*
[   12.469790] kmodloader: done loading kernel modules from //etc/modules-boot.d/*
[   13.193212] jffs2: notice: (457) jffs2_build_xattr_subsystem: complete building xattr subsystem, 3 of xdatum (0 unchecked, 1 orphan) and 3 of xref (1 dead, 0 orphan) found.
[   13.209335] block: attempting to load /tmp/jffs_cfg/upper/etc/config/fstab
[   13.219938] block: extroot: not configured
[   13.256607] jffs2: notice: (455) jffs2_build_xattr_subsystem: complete building xattr subsystem, 3 of xdatum (0 unchecked, 1 orphan) and 3 of xref (1 dead, 0 orphan) found.
[   13.273598] mount_root: loading kmods from internal overlay
[   13.342663] kmodloader: loading kernel modules from /tmp/overlay/upper/etc/modules-boot.d/*
[   13.353039] kmodloader: done loading kernel modules from /tmp/overlay/upper/etc/modules-boot.d/*
[   13.638318] block: attempting to load /tmp/jffs_cfg/upper/etc/config/fstab
[   13.647752] block: extroot: not configured
[   13.653343] mount_root: switching to jffs2 overlay
[   13.723197] overlayfs: upper fs does not support tmpfile.
[   13.736915] urandom-seed: Seed file not found (/etc/urandom.seed)
[   13.917889] procd: - early -
[   13.921030] procd: - watchdog -
[   14.269947] eth0: link down
[   14.592042] procd: - watchdog -
[   14.595566] procd: - ubus -
[   14.685589] random: ubusd: uninitialized urandom read (4 bytes read)
[   14.701746] random: ubusd: uninitialized urandom read (4 bytes read)
[   14.708770] random: ubusd: uninitialized urandom read (4 bytes read)
[   14.716524] procd: - init -
[   15.277579] kmodloader: loading kernel modules from /etc/modules.d/*
[   15.309052] ntfs: driver 2.1.32 [Flags: R/O MODULE].
[   15.351166] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   15.399986] cryptodev: driver 1.9 loaded.
[   15.491745] u32 classifier
[   15.494479]     input device check on
[   15.498155]     Actions configured
[   15.518251] Mirror/redirect action on
[   15.541541] nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
[   15.580979] fuse init (API version 7.26)
[   15.604827] Loading modules backported from Linux version wt-2017-11-01-0-gfe248fc2c180
[   15.612957] Backport generated by backports.git v4.14-rc2-1-31-g86cf0e5d
[   15.687133] ip_tables: (C) 2000-2006 Netfilter Core Team
[   15.849284] xt_time: kernel timezone is -0000
[   15.952037] usbcore: registered new interface driver mt7601u
[   15.967193] PPP generic driver version 2.4.2
[   15.975147] NET: Registered protocol family 24
[   15.999699] usbcore: registered new interface driver rt73usb
[   16.011999] usbcore: registered new interface driver rtl8187
[   16.041523] usbcore: registered new interface driver zd1211rw
[   16.097277] usbcore: registered new interface driver rt2500usb
[   16.269847] usb 1-1: reset high-speed USB device number 2 using ehci-platform
[   16.480832] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 3070, rev 0201 detected
[   16.516945] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 0005 detected
[   16.525027] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[   16.527668] usbcore: registered new interface driver rt2800usb
[   16.590444] usbcore: registered new interface driver rtl8192cu
[   16.739471] ath: phy1: Unable to initialize hardware; initialization status: -5
[   16.746977] ath9k 0000:00:00.0: Failed to initialize device
[   16.752702] ath9k: probe of 0000:00:00.0 failed with error -5
[   16.760066] kmodloader: done loading kernel modules from /etc/modules.d/*
[   33.766578] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   33.773707] eth0: link up (1000Mbps/Full duplex)
[   33.778365] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   33.810903] br-lan: port 1(eth0.1) entered blocking state
[   33.816346] br-lan: port 1(eth0.1) entered disabled state
[   33.822283] device eth0.1 entered promiscuous mode
[   33.827111] device eth0 entered promiscuous mode
[   33.900030] br-lan: port 1(eth0.1) entered blocking state
[   33.905476] br-lan: port 1(eth0.1) entered forwarding state
[   33.911353] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   34.830138] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   40.372049] ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
[   40.577619] ieee80211 phy0: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.36
[   41.533767] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   41.566668] br-lan: port 2(wlan0) entered blocking state
[   41.572113] br-lan: port 2(wlan0) entered disabled state
[   41.577970] device wlan0 entered promiscuous mode
[   41.694217] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[   41.700976] br-lan: port 2(wlan0) entered blocking state
[   41.706325] br-lan: port 2(wlan0) entered forwarding state
[   83.159916] random: crng init done
[   83.163367] random: 1 urandom warning(s) missed due to ratelimiting

can you do a tcpdump on br-lan or the wan interface to see if there is traffic ? I have similar problems with realtek switch when the image is written to flash, for ath9k, try to move the board name in the next case statement
/etc/hotplug.d/firmware/10-ath9k-eeprom
like


	"tplink,tl-wr740n-v2"|\
	"tplink,tl-wr2543-v1"|\
	"ubnt,unifi")
		ath9k_eeprom_extract "art" 4096 2048
		;;

do a restart and see if something is changed

Ok, let me do these changes, I don't know if it can help you, but i could provide you an art dump from my device.

some of the other users could confirm the code loading for art, I don't know how to read it, at the moment..