Porting guide ar71xx to ath79?

Using

&eth0 {
	status = "okay";

	phy-mode = "rmii";
	mtd-mac-address = <&uboot 0xe0000>;
	phy-handle = <&phy0>;

	fixed-link {
		speed = <100>;
		full-duplex;
	};
};

&eth1 {
	status = "okay";

	phy-mode = "rmii";
	mtd-mac-address = <&uboot 0xe0000>;
	mtd-mac-address-increment = <1>;
	phy-handle = <&phy4>;

/*	fixed-link {
		speed = <1000>;
		full-duplex;
	};*/
};

The part in the dmesg that change is

[    0.726599] libphy: Fixed MDIO Bus: probed
[    1.361687] libphy: mdio: probed
[    1.434136] ag71xx 19000000.eth: connected to PHY at fixed-0:00 [uid=00000000, driver=Generic PHY]
[    1.444052] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:RMII

Using

&eth0 {
	status = "okay";

	phy-mode = "rmii";
	mtd-mac-address = <&uboot 0xe0000>;
	phy-handle = <&phy0>;

/*	fixed-link {
		speed = <100>;
		full-duplex;
	};*/
};

&eth1 {
	status = "okay";

	phy-mode = "rmii";
	mtd-mac-address = <&uboot 0xe0000>;
	mtd-mac-address-increment = <1>;
	phy-handle = <&phy4>;

/*	fixed-link {
		speed = <1000>;
		full-duplex;
	};*/
};

The dmesg part thath change

[    0.726250] libphy: Fixed MDIO Bus: probed
[    1.361634] libphy: mdio: probed
[    1.502004] Registering RTL8306SD switch with Chip ID: 0x5988, version: 0x0000
[    1.509322] ag71xx 19000000.eth: connected to PHY at mdio-bus.0:00 [uid=00008306, driver=Realtek RTL8306S]
[    1.519898] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:RMII

In both cases, seems that eth1 it's not detected :thinking:

but with this, the lan is still not working ?
ah I didn't saw it, maybe is the same mdio0

[    1.373586] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.0:00 [uid=00008306, driver=Realtek RTL8306S]
[    1.785821] ag71xx ag71xx.1: connected to PHY at ag71xx-mdio.0:04 [uid=00008306, driver=Realtek RTL8306S]
&mdio0 {
	status = "okay";

	phy0: ethernet-phy@0 {
		reg = <0>;
		phy-mode = "rmii";
	};
	phy4: ethernet-phy@4 {
		reg = <4>;
		phy-mode = "rmii";
	};
};

and comment all mdio1

if the kernel is uncompressed I can run it from memory with exec, I'll see about the whole initramfs image

successfully booted an initramfs image and I have this

[    0.426412] PCI host bridge /ahb/apb/pcie-controller@180c0000 ranges:
[    0.432850]  MEM 0x0000000010000000..0x0000000016ffffff
[    0.438050]   IO 0x0000000000000000..0x0000000000000000
[    0.453778] PCI host bridge to bus 0000:00
[    0.457878] pci_bus 0000:00: root bus resource [mem 0x10000000-0x16ffffff]
[    0.464754] pci_bus 0000:00: root bus resource [io  0x0000]
[    0.470305] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    0.477076] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.485306] pci 0000:00:11.0: BAR 0: assigned [mem 0x10000000-0x1000ffff]
[...]
[    4.383445] irq: no irq domain found for /ahb/apb/pcie-controller@180c0000 !
[    4.390479] PCI: Enabling device 0000:00:11.0 (0000 -> 0002)
[    5.966288] ieee80211 phy0: Atheros AR9160 MAC/BB Rev:1 AR2133 RF Rev:b0 mem=0xb0000000, irq=0

the same is with

&pcie0 {
        status = "okay";

        ath9k: wifi@0 {
                reg = <0x0000 0 0 0 0>;
                #gpio-cells = <2>;
                gpio-controller;
                qca,no-eeprom;
        };

};

or just

&pcie0 {
        status = "okay";
};

but no signal after powerup

root@OpenWrt:/# cat /etc/config/wireless

config wifi-device 'radio0'
        option type 'mac80211'
        option channel '11'
        option hwmode '11g'
        option path 'pci0000:00/0000:00:11.0'
        option htmode 'HT20'
        option disabled '0'

so we miss the irq

You only need to define the wifi node inside the pci node if you want use the integradted gpio controller of the pcie device... But i´m a fan of defining it anyways if the pcie device isn´t plugable because this will exactly describe the hw.

this is missing from ath79, maybe this is not correct in dts ?

	gpio-i2c {
		compatible = "i2c-gpio";
		sda-gpios = <&gpio 1 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
		scl-gpios = <&gpio 0 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
		#address-cells = <1>;
		#size-cells = <0>;

	};

incorrect kernel on ar71xx is missing this too, earlier on ar71xx I tested by mistake a generic board kernel instead of pb44 personalized one. maybe @hnyman board needs i2c-gpio activated too
and it uses pci not pcie

@lucize, This is the dts file with the changes

&mdio0 {
   status = "okay";

   phy0: ethernet-phy@0 {
   	reg = <0>;
   	phy-mode = "rmii";
   };

   phy4: ethernet-phy@4 {
   	reg = <4>;
   	phy-mode = "rmii";
   };
};


&eth0 {
   status = "okay";

   phy-mode = "rmii";
   mtd-mac-address = <&uboot 0xe0000>;
   phy-handle = <&phy0>;

/*	fixed-link {
   	speed = <100>;
   	full-duplex;
   };*/
};

&eth1 {
   status = "okay";

   phy-mode = "rmii";
   mtd-mac-address = <&uboot 0xe0000>;
   phy-handle = <&phy4>;
   mtd-mac-address-increment = <1>;

/*	fixed-link {
   	speed = <100>;
   	full-duplex;
   };*/
};

Here is the dmesg with these changes, lan ports still not working for now

[    0.000000] Linux version 4.14.51 (valkyria@Valkyria-Z) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r7348-2ad216964b)) #0 Thu Jun 28 17:58:55 2018
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019374 (MIPS 24Kc)
[    0.000000] MIPS: machine is Linksys E2100L
[    0.000000] SoC: Atheros AR9130 rev 2
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 04000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] On node 0 totalpages: 16384
[    0.000000] free_area_init_node: node 0, pgdat 804df490, node_mem_map 81005b20
[    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,115200 rootfstype=squashfs,jffs2
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 50660K/65536K available (3665K kernel code, 150K rwdata, 792K rodata, 9016K init, 212K bss, 14876K 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.007896] Calibrating delay loop... 265.42 BogoMIPS (lpj=1327104)
[    0.094148] pid_max: default: 32768 minimum: 301
[    0.099058] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.105662] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.117513] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.127376] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.133551] pinctrl core: initialized pinctrl subsystem
[    0.139937] NET: Registered protocol family 16
[    0.170090] clocksource: Switched to clocksource MIPS
[    0.176382] NET: Registered protocol family 2
[    0.181831] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.188806] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.195219] TCP: Hash tables configured (established 1024 bind 1024)
[    0.201761] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.207607] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.214235] NET: Registered protocol family 1
[    0.218618] PCI: CLS 0 bytes, default 32
[    0.465153] Crashlog allocated RAM at address 0x3f00000
[    0.471718] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[    0.484827] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.490704] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.611276] io scheduler noop registered
[    0.615193] io scheduler deadline registered (default)
[    0.620691] ar7200-usb-phy usb-phy: phy reset is missing
[    0.627106] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    0.634373] console [ttyS0] disabled
[    0.637991] 18020000.uart: ttyS0 at MMIO 0x18020000 (irq = 8, base_baud = 12500000) is a 8250
[    0.646564] console [ttyS0] enabled
[    0.653591] bootconsole [early0] disabled
[    0.668150] m25p80 spi0.0: mx25l6405d (8192 Kbytes)
[    0.673181] 4 fixed-partitions partitions found on MTD device spi0.0
[    0.679568] Creating 4 MTD partitions on "spi0.0":
[    0.684416] 0x000000000000-0x000000040000 : "u-boot"
[    0.690511] 0x000000040000-0x0000007e0000 : "firmware"
[    0.713444] 0x0000007e0000-0x0000007f0000 : "nvram"
[    0.719329] 0x0000007f0000-0x000000800000 : "art"
[    0.726358] libphy: Fixed MDIO Bus: probed
[    1.361635] libphy: mdio: probed
[    1.542005] Registering RTL8306SD switch with Chip ID: 0x5988, version: 0x0000
[    1.549321] ag71xx 19000000.eth: connected to PHY at mdio-bus.0:00 [uid=00008306, driver=Realtek RTL8306S]
[    1.559903] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:RMII
[    1.568745] NET: Registered protocol family 10
[    1.577994] Segment Routing with IPv6
[    1.581894] NET: Registered protocol family 17
[    1.586426] 8021q: 802.1Q VLAN Support v1.8
[    1.648399] Freeing unused kernel memory: 9016K
[    1.652993] This architecture does not have kernel memory protection.
[    1.676193] init: Console is alive
[    1.679888] init: - watchdog -
[    1.717479] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    1.737897] usbcore: registered new interface driver usbfs
[    1.743606] usbcore: registered new interface driver hub
[    1.749058] usbcore: registered new device driver usb
[    1.761276] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.769846] ehci-platform: EHCI generic platform driver
[    1.775447] ehci-platform 1b000100.usb: EHCI Host Controller
[    1.781229] ehci-platform 1b000100.usb: new USB bus registered, assigned bus number 1
[    1.789228] ehci-platform 1b000100.usb: irq 3, io mem 0x1b000100
[    1.820107] ehci-platform 1b000100.usb: USB 2.0 started, EHCI 1.00
[    1.827393] hub 1-0:1.0: USB hub found
[    1.831670] hub 1-0:1.0: 1 port detected
[    1.839309] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    1.847600] ohci-platform: OHCI generic platform driver
[    1.855714] uhci_hcd: USB Universal Host Controller Interface driver
[    1.863101] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    1.873022] init: - preinit -
[    2.085169] random: jshn: uninitialized urandom read (4 bytes read)
[    2.192730] random: jshn: uninitialized urandom read (4 bytes read)
[    2.262298] random: jshn: uninitialized urandom read (4 bytes read)
[    2.429086] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    3.450138] eth0: link up (100Mbps/Full duplex)
[    3.454774] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[    3.610084] random: fast init done
[    5.624700] procd: - early -
[    5.627719] procd: - watchdog -
[    6.183834] procd: - watchdog -
[    6.187336] procd: - ubus -
[    6.199528] urandom_read: 3 callbacks suppressed
[    6.199539] random: ubusd: uninitialized urandom read (4 bytes read)
[    6.241126] random: ubusd: uninitialized urandom read (4 bytes read)
[    6.248030] random: ubusd: uninitialized urandom read (4 bytes read)
[    6.255652] procd: - init -
[    6.502059] kmodloader: loading kernel modules from /etc/modules.d/*
[    6.516325] ip6_tables: (C) 2000-2006 Netfilter Core Team
[    6.537366] Loading modules backported from Linux version wt-2017-11-01-0-gfe248fc2c180
[    6.545483] Backport generated by backports.git v4.14-rc2-1-31-g86cf0e5d
[    6.557052] ip_tables: (C) 2000-2006 Netfilter Core Team
[    6.573686] nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
[    6.579867] eth0: link down
[    6.661363] xt_time: kernel timezone is -0000
[    6.734479] PPP generic driver version 2.4.2
[    6.741805] NET: Registered protocol family 24
[    6.759347] usbcore: registered new interface driver rt73usb
[    6.769926] usbcore: registered new interface driver rtl8187
[    6.791473] usbcore: registered new interface driver zd1211rw
[    6.832395] usbcore: registered new interface driver rt2500usb
[    6.852281] usbcore: registered new interface driver rt2800usb
[    6.874105] usbcore: registered new interface driver rtl8192cu
[    6.960789] ath: EEPROM regdomain: 0x0
[    6.960800] ath: EEPROM indicates default country code should be used
[    6.960805] ath: doing EEPROM country->regdmn map search
[    6.960820] ath: country maps to regdmn code: 0x3a
[    6.960828] ath: Country alpha2 being used: US
[    6.960833] ath: Regpair used: 0x3a
[    7.000816] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[    7.005468] ieee80211 phy0: Atheros AR9100 MAC/BB Rev:7 AR2122 RF Rev:a2 mem=0xb80c0000, irq=2
[    7.159564] kmodloader: done loading kernel modules from /etc/modules.d/*
[   21.071515] br-lan: port 1(eth0) entered blocking state
[   21.076788] br-lan: port 1(eth0) entered disabled state
[   21.082503] device eth0 entered promiscuous mode
[   21.128082] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   22.090194] eth0: link up (100Mbps/Full duplex)
[   22.094841] br-lan: port 1(eth0) entered blocking state
[   22.100134] br-lan: port 1(eth0) entered forwarding state
[   22.172328] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   24.389668] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   24.649697] br-lan: port 2(wlan0) entered blocking state
[   24.655126] br-lan: port 2(wlan0) entered disabled state
[   24.660897] device wlan0 entered promiscuous mode
[   24.787888] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[   24.794566] br-lan: port 2(wlan0) entered blocking state
[   24.799914] br-lan: port 2(wlan0) entered forwarding state
[   32.090114] ------------[ cut here ]------------
[   32.094816] WARNING: CPU: 0 PID: 954 at net/sched/sch_generic.c:320 dev_watchdog+0x164/0x274
[   32.103325] NETDEV WATCHDOG: eth0 (ag71xx): transmit queue 0 timed out
[   32.109888] Modules linked in: ath9k ath9k_common rtl8192cu rtl8192c_common rtl_usb rt2800usb rt2800lib rt2500usb pppoe ppp_async ath9k_hw ath zd1211rw rtlwifi rtl8187 rt73usb rt2x00usb rt2x00lib pppox ppp_generic nf_conntrack_ipv6 mac80211 iptable_nat ipt_REJECT ipt_MASQUERADE cfg80211 xt_time xt_tcpudp xt_state xt_nat xt_multiport xt_mark xt_mac xt_limit xt_conntrack xt_comment xt_TCPMSS xt_REDIRECT xt_LOG xt_FLOWOFFLOAD slhc nf_reject_ipv4 nf_nat_redirect nf_nat_masquerade_ipv4 nf_conntrack_ipv4 nf_nat_ipv4 nf_nat nf_log_ipv4 nf_flow_table_hw nf_flow_table nf_defrag_ipv6 nf_defrag_ipv4 nf_conntrack_rtcache nf_conntrack iptable_mangle iptable_filter ip_tables crc_itu_t crc_ccitt compat ledtrig_usbport ip6t_REJECT nf_reject_ipv6 nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables
[   32.181127]  x_tables eeprom_93cx6 uhci_hcd ohci_platform ohci_hcd ehci_platform ehci_hcd gpio_button_hotplug usbcore nls_base usb_common
[   32.193598] CPU: 0 PID: 954 Comm: dropbearkey Not tainted 4.14.51 #0
[   32.199991] Stack : 00000000 00000000 80db7502 00000038 83964854 804c38a7 80485b18 000003ba
[   32.208436]         80db3660 00000140 804cec94 804cec54 804cec40 00000001 83809db8 127ab3ba
[   32.216875]         00000000 00000000 80db0000 00002f68 00000000 00000000 00000007 00000000
[   32.225326]         000000a5 df800000 000000a4 00000000 80000000 00000000 804ac8fc 8030531c
[   32.233758]         00000009 00000140 804cec94 804cec54 00000003 80254c94 00000000 80db0000
[   32.242195]         ...
[   32.244659] Call Trace:
[   32.247144] [<8006a8ac>] show_stack+0x58/0x100
[   32.251652] [<800807f0>] __warn+0xe4/0x118
[   32.255779] [<80080854>] warn_slowpath_fmt+0x30/0x3c
[   32.260791] [<8030531c>] dev_watchdog+0x164/0x274
[   32.265546] [<800b9880>] call_timer_fn.isra.4+0x24/0x84
[   32.270821] [<800b9a50>] run_timer_softirq+0x170/0x1e8
[   32.275994] [<803f3568>] __do_softirq+0xe8/0x2bc
[   32.280675] [<80207510>] plat_irq_dispatch+0xc0/0x120
[   32.285757] [<800658f8>] handle_int+0x138/0x144
[   32.290329] ---[ end trace f14a3c3bbf800ad7 ]---
[   32.294966] eth0: tx timeout
[   81.250174] random: crng init done
[   81.253620] random: 1 urandom warning(s) missed due to ratelimiting
[  117.130098] eth0: tx timeout
[  127.130101] eth0: tx timeout
[  137.130118] eth0: tx timeout

I have dir505l and able to help test if someone makes a build.

The dir505 is not getting the ath79 dts love yet anyone?

sorry I'm on holidays.. maybe later

2 Likes

can you try this patch(don't think will help but who knows)?

wget https://github.com/openwrt/openwrt/pull/1146.patch
patch -p1 < 1146.patch

maybe I'll try to ad some OF info to the switch driver, who knows..

Thx! I'm ready to test.

I've tried this patch and ported Netgear WNR2000v3. All seems work OK except restarting network take a long time to reconnect. When I change Lan IP and apply the settings, Luci can't get response and I have to reboot the router. So the change recovered.
This is my commit.

Here is dmesg log:

root@OpenWrt:~# dmesg 
[    0.000000] Linux version 4.14.54 (qianzheng@K650D) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r7561+22-7316515891)) #0 Fri Jul 27 03:14:17 2018
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019374 (MIPS 24Kc)
[    0.000000] MIPS: machine is Netgear WNR2000 v3
[    0.000000] SoC: Atheros AR7241 rev 1
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 02000000 @ 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-0x0000000001ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000001ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000001ffffff]
[    0.000000] On node 0 totalpages: 8192
[    0.000000] free_area_init_node: node 0, pgdat 80419e10, node_mem_map 810077a0
[    0.000000]   Normal zone: 64 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 8192 pages, LIFO batch:0
[    0.000000] random: get_random_bytes called from 0x8041d72c 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: 8128
[    0.000000] Kernel command line: console=ttyS0,115200 rootfstype=squashfs,jffs2
[    0.000000] PID hash table entries: 128 (order: -3, 512 bytes)
[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 26752K/32768K available (3332K kernel code, 135K rwdata, 352K rodata, 1228K init, 203K bss, 6016K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 51
[    0.000000] CPU clock: 400.000 MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[    0.000013] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    0.007904] Calibrating delay loop... 265.42 BogoMIPS (lpj=1327104)
[    0.094159] pid_max: default: 32768 minimum: 301
[    0.099082] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.105683] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.118559] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.128427] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.134621] pinctrl core: initialized pinctrl subsystem
[    0.141193] NET: Registered protocol family 16
[    0.146646] Can't analyze schedule() prologue at 8039cef4
[    0.154741] PCI host bridge /ahb/apb/pcie-controller@180c0000 ranges:
[    0.161186]  MEM 0x0000000010000000..0x0000000013ffffff
[    0.166454]   IO 0x0000000000000000..0x0000000000000000
[    0.192098] PCI host bridge to bus 0000:00
[    0.196209] pci_bus 0000:00: root bus resource [mem 0x10000000-0x13ffffff]
[    0.203131] pci_bus 0000:00: root bus resource [io  0x0000]
[    0.208691] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    0.215467] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.223416] pci 0000:00:00.0: [168c:002e] type 00 class 0x028000
[    0.223497] pci 0000:00:00.0: reg 0x10: [mem 0x10000000-0x1000ffff 64bit]
[    0.223672] pci 0000:00:00.0: supports D1
[    0.223687] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[    0.224020] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00
[    0.224059] pci 0000:00:00.0: BAR 0: assigned [mem 0x10000000-0x1000ffff 64bit]
[    0.232256] clocksource: Switched to clocksource MIPS
[    0.238756] NET: Registered protocol family 2
[    0.244323] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.251295] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.257711] TCP: Hash tables configured (established 1024 bind 1024)
[    0.264273] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.270123] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.276813] NET: Registered protocol family 1
[    0.281218] PCI: CLS 0 bytes, default 32
[    0.286711] Crashlog allocated RAM at address 0x1f00000
[    0.293452] workingset: timestamp_bits=30 max_order=13 bucket_order=0
[    0.307320] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.313197] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.333480] io scheduler noop registered
[    0.337402] io scheduler deadline registered (default)
[    0.343482] pinctrl-single 18040028.pinmux: 64 pins at pa b8040028 size 8
[    0.351629] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    0.359027] console [ttyS0] disabled
[    0.362719] 18020000.uart: ttyS0 at MMIO 0x18020000 (irq = 8, base_baud = 12500000) is a 16550A
[    0.371411] console [ttyS0] enabled
[    0.378443] bootconsole [early0] disabled
[    0.394159] m25p80 spi0.0: mx25l3205d (4096 Kbytes)
[    0.399124] 4 fixed-partitions partitions found on MTD device spi0.0
[    0.405580] Creating 4 MTD partitions on "spi0.0":
[    0.410421] 0x000000000000-0x000000040000 : "u-boot"
[    0.416560] 0x000000040000-0x000000050000 : "u-boot-env"
[    0.423065] 0x000000050000-0x0000003f0000 : "firmware"
[    0.434765] 2 netgear-fw partitions found on MTD device firmware
[    0.440837] 0x000000050000-0x000000192440 : "kernel"
[    0.446906] 0x000000192440-0x0000003f0000 : "rootfs"
[    0.452973] mtd: device 4 (rootfs) set to be root filesystem
[    0.458705] 1 squashfs-split partitions found on MTD device rootfs
[    0.464996] 0x0000003a0000-0x0000003f0000 : "rootfs_data"
[    0.471490] 0x0000003f0000-0x000000400000 : "art"
[    0.478060] libphy: Fixed MDIO Bus: probed
[    0.822710] libphy: ag71xx_mdio: probed
[    1.112324] mdio-bus.0:1f: Found an AR7240/AR9330 built-in switch
[    1.118678] libphy: ar7240sw_mdio: probed
[    1.503895] ag71xx 19000000.eth: connected to PHY at mdio-bus.0:1f:04 [uid=004dd041, driver=Generic PHY]
[    1.514367] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:MII
[    1.854069] ag71xx 1a000000.eth: connected to PHY at fixed-0:00 [uid=00000000, driver=Generic PHY]
[    1.864070] eth1: Atheros AG71xx at 0xba000000, irq 5, mode:GMII
[    1.872628] NET: Registered protocol family 10
[    1.882314] Segment Routing with IPv6
[    1.886156] NET: Registered protocol family 17
[    1.890694] 8021q: 802.1Q VLAN Support v1.8
[    1.904037] VFS: Mounted root (squashfs filesystem) readonly on device 31:4.
[    1.920986] Freeing unused kernel memory: 1228K
[    1.925579] This architecture does not have kernel memory protection.
[    2.552268] random: fast init done
[    4.471772] init: Console is alive
[    4.475581] init: - watchdog -
[    5.698615] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    5.965499] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    5.983673] init: - preinit -
[    8.586725] random: jshn: uninitialized urandom read (4 bytes read)
[    8.971978] random: jshn: uninitialized urandom read (4 bytes read)
[    9.301221] random: jshn: uninitialized urandom read (4 bytes read)
[   10.290855] urandom_read: 2 callbacks suppressed
[   10.290866] random: procd: uninitialized urandom read (4 bytes read)
[   10.310319] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[   10.316376] IPv6: ADDRCONF(NETDEV_UP): eth1.1: link is not ready
[   11.393423] eth1: link up (1000Mbps/Full duplex)
[   11.398109] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[   11.405114] IPv6: ADDRCONF(NETDEV_CHANGE): eth1.1: link becomes ready
[   13.946147] jffs2: notice: (352) jffs2_build_xattr_subsystem: complete building xattr subsystem, 3 of xdatum (0 unchecked, 1 orphan) and 5 of xref (1 dead, 0 orphan) found.
[   13.963968] mount_root: switching to jffs2 overlay
[   14.000501] overlayfs: upper fs does not support tmpfile.
[   14.014015] urandom-seed: Seeding with /etc/urandom.seed
[   14.089789] procd: - early -
[   14.092918] procd: - watchdog -
[   14.512279] eth1: link down
[   14.913358] procd: - watchdog -
[   14.916869] procd: - ubus -
[   15.455323] random: ubusd: uninitialized urandom read (4 bytes read)
[   15.464330] random: ubusd: uninitialized urandom read (4 bytes read)
[   15.471308] random: ubusd: uninitialized urandom read (4 bytes read)
[   15.478986] procd: - init -
[   16.436743] kmodloader: loading kernel modules from /etc/modules.d/*
[   16.449023] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   16.468134] Loading modules backported from Linux version wt-2017-11-01-0-gfe248fc2c180
[   16.476263] Backport generated by backports.git v4.14-rc2-1-31-g86cf0e5d
[   16.486681] ip_tables: (C) 2000-2006 Netfilter Core Team
[   16.502026] nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
[   16.583024] xt_time: kernel timezone is -0000
[   16.656351] PPP generic driver version 2.4.2
[   16.663824] NET: Registered protocol family 24
[   16.723152] ath: phy0: Ignoring endianness difference in EEPROM magic bytes.
[   16.731759] ath: EEPROM regdomain: 0x0
[   16.731766] ath: EEPROM indicates default country code should be used
[   16.731771] ath: doing EEPROM country->regdmn map search
[   16.731787] ath: country maps to regdmn code: 0x3a
[   16.731794] ath: Country alpha2 being used: US
[   16.731800] ath: Regpair used: 0x3a
[   16.746169] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[   16.752051] ieee80211 phy0: Atheros AR9287 Rev:2 mem=0xb0000000, irq=11
[   17.228379] kmodloader: done loading kernel modules from /etc/modules.d/*
[   40.282500] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[   40.291732] eth1: link up (1000Mbps/Full duplex)
[   40.302545] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[   40.323708] br-lan: port 1(eth1.1) entered blocking state
[   40.329158] br-lan: port 1(eth1.1) entered disabled state
[   40.335298] device eth1.1 entered promiscuous mode
[   40.340131] device eth1 entered promiscuous mode
[   40.368349] br-lan: port 1(eth1.1) entered blocking state
[   40.373862] br-lan: port 1(eth1.1) entered forwarding state
[   40.379886] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   40.495315] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   41.312777] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   43.369924] eth0: link up (100Mbps/Full duplex)
[   43.402385] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   46.612042] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   46.730722] br-lan: port 2(wlan0) entered blocking state
[   46.736172] br-lan: port 2(wlan0) entered disabled state
[   46.741961] device wlan0 entered promiscuous mode
[   47.241933] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[   47.248661] br-lan: port 2(wlan0) entered blocking state
[   47.254055] br-lan: port 2(wlan0) entered forwarding state

But I have another problem with the file "tiny-netgear.mk"
First time I put the section "define Device/netgear_wnr2000-v3" before "define Device/netgear_wnr612-v2" and rum make. The generated factory image file contains the wrong NETGEAR_BOARD_ID. It is "device:N150R" but not "device:WNR2000V3".
It seems that the varaible NETGEAR_BOARD_ID is repalced by N150R. So I have to place the section "define Device/netgear_wnr2000-v3" to the last of the file. Is it a bug in Makefile or something else? Anybody can help?

This is a know issue on ath79 at the moment...
Restart does work, but a reload will not work.

This does work:
/etc/init.d/network restart

This does not work (luci does only reload):
/etc/init.d/network reload

But only if you change the ip of a interface!

Hi !
Does anyone work on the port for wndr3700v2 ?

If so, I will gladly test it, or maybe someone has a dts file for wndr3700v2.
In the openwt git tree it is only for wndr3800 and unfortunately I do not know what to change in it to be correct for the 3700v2 model.

and @hnyman please test on Your ar7161 devices this dirty patch : https://ptpb.pw/QHmf.patch
With that wifi should work. Proper fix will be submitted in few days.

I have also a ar7161 device that is DIR825b1. The dts file is easy to make. It is similar.
If wifi starts working, I will test and send a PR.

I made an ath79 build with that change, but I still see no interrupt assigned for the wifi devices.

Do you have idea how the working wifi definition should look like?

There are some gpios involved in enabling wifi, see:
https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=target/linux/ar71xx/files/arch/mips/ath79/mach-wndr3700.c;h=b9132fc363d71027c47e1728215cc0bb571ef560;hb=HEAD#l158
Also some calibration data seems to be necessary, maybe it needs to be added to this file:
https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom;h=a687239d44b61bca680d74732f52b94dd8ed8405;hb=HEAD
I'm not experienced in this, maybe @juppin and @lucize can add more input.

BTW proper PCI fix is already in master (that was blazing fast).

Didn't reply directly, look at previous post.
Another thing, probably You'll need this symbol enabled in kernel config CONFIG_ATH79_PCI_ATH9K_FIXUP=y.