Wdr4900v2, snapshot ath79 no wireless

I have a modified 16MB flash wdr4900v2, I installed 18.06.4 and it works well.
I want to test the snapshot ath79 branch to have offload feature but have no wireless.
It seems that the current snapshot ath79 does not take into account the flash size.
the ART partition is located at 0x7f0000 instead of 0xff0000 as the 18.06.4 does.

here is is kernel log

[    0.000000] Linux version 4.19.79 (builder@buildhost) (gcc version 8.3.0 (OpenWrt GCC 8.3.0 r11320-2bc7c519dc)) #0 Wed Oct 23 10:31:48 2019
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019750 (MIPS 74Kc)
[    0.000000] MIPS: machine is TP-Link TL-WDR4900 v2
[    0.000000] SoC: Qualcomm Atheros QCA9558 ver 1 rev 0
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 08000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] On node 0 totalpages: 32768
[    0.000000]   Normal zone: 288 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 32768 pages, LIFO batch:7
[    0.000000] random: get_random_bytes called from start_kernel+0x98/0x4b0 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: 32480
[    0.000000] Kernel command line: console=ttyS0,115200n8 rootfstype=squashfs,jffs2
[    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: 122160K/131072K available (4507K kernel code, 185K rwdata, 1056K rodata, 1220K init, 213K bss, 8912K 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: 720.000 MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 5309056796 ns
[    0.000007] sched_clock: 32 bits at 360MHz, resolution 2ns, wraps every 5965232126ns
[    0.008687] Calibrating delay loop... 358.80 BogoMIPS (lpj=1794048)
[    0.075695] pid_max: default: 32768 minimum: 301
[    0.081057] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.088426] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.100510] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.111504] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.118418] pinctrl core: initialized pinctrl subsystem
[    0.126338] NET: Registered protocol family 16
[    0.138356] PCI host bridge /ahb/pcie-controller@18250000 ranges:
[    0.145204]  MEM 0x0000000012000000..0x0000000013ffffff
[    0.151017]   IO 0x0000000000000001..0x0000000000000001
[    0.173740] PCI host bridge to bus 0000:00
[    0.178364] pci_bus 0000:00: root bus resource [mem 0x12000000-0x13ffffff]
[    0.186025] pci_bus 0000:00: root bus resource [io  0x0001]
[    0.192243] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    0.199806] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.208670] pci 0000:00:00.0: [168c:0033] type 00 class 0x028000
[    0.208725] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x0001ffff 64bit]
[    0.208778] pci 0000:00:00.0: reg 0x30: [mem 0x00000000-0x0000ffff pref]
[    0.208850] pci 0000:00:00.0: supports D1
[    0.208859] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[    0.209947] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00
[    0.209972] pci 0000:00:00.0: BAR 0: assigned [mem 0x12000000-0x1201ffff 64bit]
[    0.218137] pci 0000:00:00.0: BAR 6: assigned [mem 0x12020000-0x1202ffff pref]
[    0.229111] clocksource: Switched to clocksource MIPS
[    0.235694] NET: Registered protocol family 2
[    0.241394] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes)
[    0.250018] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.257785] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.264892] TCP: Hash tables configured (established 1024 bind 1024)
[    0.272089] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.278602] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.285908] NET: Registered protocol family 1
[    0.290839] PCI: CLS 0 bytes, default 32
[    0.293357] Crashlog allocated RAM at address 0x3f00000
[    0.300370] workingset: timestamp_bits=14 max_order=15 bucket_order=1
[    0.313226] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.319762] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.341360] io scheduler noop registered
[    0.345733] io scheduler deadline registered (default)
[    0.352206] ar7200-usb-phy 18030000.usb-phy0: phy reset is missing
[    0.359189] ar7200-usb-phy 18030010.usb-phy1: phy reset is missing
[    0.367671] pinctrl-single 1804002c.pinmux: 544 pins, size 68
[    0.374675] gpio-export gpio-export: 2 gpio(s) exported
[    0.381279] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.390423] console [ttyS0] disabled
[    0.394430] 18020000.uart: ttyS0 at MMIO 0x18020000 (irq = 9, base_baud = 2500000) is a 16550A
[    0.404078] console [ttyS0] enabled
[    0.411502] bootconsole [early0] disabled
[    0.439514] m25p80 spi0.0: w25q128 (16384 Kbytes)
[    0.444324] 3 fixed-partitions partitions found on MTD device spi0.0
[    0.450788] Creating 3 MTD partitions on "spi0.0":
[    0.455662] 0x000000000000-0x000000020000 : "u-boot"
[    0.461427] 0x000000020000-0x0000007f0000 : "firmware"
[    0.469088] 2 tplink-fw partitions found on MTD device firmware
[    0.475134] Creating 2 MTD partitions on "firmware":
[    0.480192] 0x000000000000-0x0000001ce917 : "kernel"
[    0.485905] 0x0000001ce918-0x0000007d0000 : "rootfs"
[    0.491606] mtd: device 3 (rootfs) set to be root filesystem
[    0.498627] 1 squashfs-split partitions found on MTD device rootfs
[    0.504958] 0x0000003e0000-0x0000007d0000 : "rootfs_data"
[    0.511172] 0x0000007f0000-0x000000800000 : "art"
[    0.517556] libphy: Fixed MDIO Bus: probed
[    0.870890] libphy: ag71xx_mdio: probed
[    0.877434] switch0: Atheros AR8327 rev. 4 switch registered on mdio-bus.0
[    1.528271] ag71xx 19000000.eth: connected to PHY at mdio-bus.0:00 [uid=004dd034, driver=Atheros AR8216/AR8236/AR8316]
[    1.539701] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode: rgmii
[    1.880781] ag71xx 1a000000.eth: connected to PHY at fixed-0:00 [uid=00000000, driver=Generic PHY]
[    1.890453] eth1: Atheros AG71xx at 0xba000000, irq 5, mode: sgmii
[    1.899341] NET: Registered protocol family 10
[    1.908912] Segment Routing with IPv6
[    1.912784] NET: Registered protocol family 17
[    1.917364] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    1.930525] 8021q: 802.1Q VLAN Support v1.8
[    1.937607] hctosys: unable to open rtc device (rtc0)
[    1.951525] VFS: Mounted root (squashfs filesystem) readonly on device 31:3.
[    1.963070] Freeing unused kernel memory: 1220K
[    1.967661] This architecture does not have kernel memory protection.
[    1.974215] Run /sbin/init as init process
[    2.579122] random: fast init done
[    3.102502] init: Console is alive
[    3.106150] init: - watchdog -
[    4.440688] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    4.620417] usbcore: registered new interface driver usbfs
[    4.626063] usbcore: registered new interface driver hub
[    4.631571] usbcore: registered new device driver usb
[    4.642370] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    4.650541] ehci-platform: EHCI generic platform driver
[    4.656049] ehci-platform 1b000000.usb: EHCI Host Controller
[    4.661882] ehci-platform 1b000000.usb: new USB bus registered, assigned bus number 1
[    4.669921] ehci-platform 1b000000.usb: irq 14, io mem 0x1b000000
[    4.699133] ehci-platform 1b000000.usb: USB 2.0 started, EHCI 1.00
[    4.706104] hub 1-0:1.0: USB hub found
[    4.710314] hub 1-0:1.0: 1 port detected
[    4.714837] ehci-platform 1b400000.usb: EHCI Host Controller
[    4.720662] ehci-platform 1b400000.usb: new USB bus registered, assigned bus number 2
[    4.728692] ehci-platform 1b400000.usb: irq 15, io mem 0x1b400000
[    4.759135] ehci-platform 1b400000.usb: USB 2.0 started, EHCI 1.00
[    4.766154] hub 2-0:1.0: USB hub found
[    4.770300] hub 2-0:1.0: 1 port detected
[    4.775511] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    4.793267] init: - preinit -
[    5.857419] random: jshn: uninitialized urandom read (4 bytes read)
[    5.986917] random: jshn: uninitialized urandom read (4 bytes read)
[    6.155997] random: jshn: uninitialized urandom read (4 bytes read)
[    7.433043] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[    7.439034] IPv6: ADDRCONF(NETDEV_UP): eth1.1: link is not ready
[    7.479563] urandom_read: 4 callbacks suppressed
[    7.479569] random: procd: uninitialized urandom read (4 bytes read)
[    8.520300] eth1: link up (1000Mbps/Full duplex)
[    8.525009] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[    8.535938] IPv6: ADDRCONF(NETDEV_CHANGE): eth1.1: link becomes ready
[   10.791915] jffs2: notice: (529) jffs2_build_xattr_subsystem: complete building xattr subsystem, 3 of xdatum (0 unchecked, 1 orphan) and 12 of xref (1 dead, 0 orphan) found.
[   10.810760] mount_root: switching to jffs2 overlay
[   10.836023] overlayfs: upper fs does not support tmpfile.
[   10.850276] urandom-seed: Seeding with /etc/urandom.seed
[   10.887548] eth1: link down
[   10.906326] procd: - early -
[   10.910143] procd: - watchdog -
[   11.478824] procd: - watchdog -
[   11.482317] procd: - ubus -
[   11.508273] random: ubusd: uninitialized urandom read (4 bytes read)
[   11.537052] random: ubusd: uninitialized urandom read (4 bytes read)
[   11.544704] procd: - init -
[   12.242702] kmodloader: loading kernel modules from /etc/modules.d/*
[   12.393902] Loading modules backported from Linux version v5.4-rc2-0-gda0c9ea146cb
[   12.401632] Backport generated by backports.git v5.4-rc2-1-0-g5a0c323a
[   12.463305] xt_time: kernel timezone is -0000
[   12.643175] PPP generic driver version 2.4.2
[   12.660606] NET: Registered protocol family 24
[   12.747921] urngd: v1.0.1 started.
[   12.765209] ath: phy0: Unable to initialize hardware; initialization status: -5
[   12.772680] ath9k 18100000.wmac: failed to initialize device
[   12.778458] ath9k: probe of 18100000.wmac failed with error -5
[   12.784652] ath9k 0000:00:00.0: enabling device (0000 -> 0002)
[   12.833464] ath: phy1: Unable to initialize hardware; initialization status: -5
[   12.840972] ath9k 0000:00:00.0: Failed to initialize device
[   12.846669] ath9k: probe of 0000:00:00.0 failed with error -5
[   12.869474] kmodloader: done loading kernel modules from /etc/modules.d/*
[   12.941020] random: crng init done
[   21.520191] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[   21.527279] eth1: link up (1000Mbps/Full duplex)
[   21.539188] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[   21.558251] br-lan: port 1(eth1.1) entered blocking state
[   21.563776] br-lan: port 1(eth1.1) entered disabled state
[   21.569643] device eth1.1 entered promiscuous mode
[   21.574510] device eth1 entered promiscuous mode
[   21.607459] br-lan: port 1(eth1.1) entered blocking state
[   21.612980] br-lan: port 1(eth1.1) entered forwarding state
[   21.618861] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   21.683887] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   21.707063] IPv6: ADDRCONF(NETDEV_UP): eth0.2: link is not ready
[   22.519436] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   22.760437] eth0: link up (1000Mbps/Full duplex)
[   22.776664] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   22.799215] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.2: link becomes ready

I am hoping that someone can fix this problem.

You have to modify the device tree of your wdr4900 as ath79 doesn't support the dynamic flash layout like in ar71xx...

Clone the openwrt source, modify target/linux/ath79/dts/xxxx_tp-link-wdr4900.dts to your needs and compile it yourself.

You have to expand the firmware partition and move the art partition to the end of 16M:

Thanks for your answer.
I have just not (yet) setup the build environment. Just wondering why the new driver can not handle the dynamic flash size while the old one does.

I think there should be more modified routers and hope not having to build oneself the firmware.

Regards

There is no code that detects such cases and a device tree should describe a device as exactly as it can... (also the partition layout)
If you want to have something similar in ath79 you need write a hack for the mainline code to support such not common cases in the mtd driver framework.
As ar71xx was based on mach-files it was easier to write code that can handle such stuff.
Device tree based device initialization tries to use as much as possible from the mainline functionality.

Thank again for taking time to explain. I was naively thinking that a newer driver framework would be more flexible.

Fortunately one can always build oneself the image for a non common layout.

Anyway, I appreciated your help.

For your info, writing the art file to the art partition (located at 0x7f0000)
solved the problem.

Seems to be the easiest solution if you want to use the official builds...
As long as you don't need the additional 8 mb flash. :wink:

I admit this is not the ideal solution, but a lazy workaround.

I know the drawback of losing 8MB of flash but my original intent was to test the throughput with NAT offload.

I tested the 19.07-snapshot ar71xx branch which supports also offload (kernel 4.14).
No significant throughput difference between 4.14 (ar71xx) and 4.19 (ath79).

like this version as it allows me to turn off LEDs while ath79 branch does not for the moment.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.