OpenWrt/LEDE Project

  • Status Unconfirmed
  • Percent Complete
    0%
  • Task Type Bug Report
  • Category Kernel
  • Assigned To No-one
  • Operating System All
  • Severity Low
  • Priority Very Low
  • Reported Version Trunk
  • Due in Version Undecided
  • Due Date Undecided
  • Private
Attached to Project: OpenWrt/LEDE Project
Opened by Stefan Lippers-Hollmann - 30.09.2019

FS#2524 - ath79-tiny: TP-Link TL-WR941ND v2.4: Marvel MV88E6060 regression between kernel v4.14 and v4.19

Device problem occurs on: TP-Link TL-WR941ND v2.4
Software versions of OpenWrt/LEDE release: master reboot-11146-gfca9b5e4fb

Upgrading OpenWrt from a kernel v4.14 based master snapshot to a v4.19 based one breaks support for the Marvell MV88E6060 switch of the TP-Link TL-WR941ND v2.4. I can reproduce this with both with a modified master snapshot based on r11146-gfca9b5e4fb (see attached patch, "ath79-generic-add_tl-wr941ndv2.patch") and an official ath79-tiny master snapshot based on r11143-881ed09ee6, with slightly different behaviour but the same result (either crashing in a tight loop or the switch remaining unconfigured and the router, albeit working, being inaccessible over the network).

Using the afforementioned ath79-generic-add_tl-wr941ndv2.patch and reverting back to kernel v4.14, I can build a working firmware based on r11146-gfca9b5e4fb.

Working (patched r11146-gfca9b5e4fb, v4.14):

U-Boot 1.1.4 (Jun 18 2009 - 15:08:27)
AP81 (ar7100) U-boot
DRAM:  
32 MB
id read 0x100000ff
flash size 8MB, sector count = 128
Flash:  8 MB
Using default environment
In:    serial
Out:   serial
Err:   serial
Net:   ag7100_enet_initialize...
No valid address in Flash. Using fixed address
eth0: 00:03:7f:09:0b:ad
eth0 up
eth0
Autobooting in 1 secondsar7100> 
ar7100> tftp 0x80800000 0A01A8C0.img
set link to 100M full by lqm.
dup 1 speed 100
Using eth0 device
TFTP from server 192.168.1.169; our IP address is 192.168.1.10
Filename '0A01A8C0.img'.
Load address: 0x80800000
Loading: *
checksum bad
checksum bad
#################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 ##########################################
done
Bytes transferred = 3539195 (3600fb hex)
ar7100> erase.b 0xbf020000 +0x3c0000
First 0x2 last 0x3d sector size 0x10000
[...]
Erased 60 sectors
ar7100> cp.b 0x80800000 0xbf020000 0x3c0000
Copy to Flash... write addr: bf020000
done
ar7100> reset
Resetting...
U-Boot 1.1.4 (Jun 18 2009 - 15:08:27)
AP81 (ar7100) U-boot
DRAM:  
32 MB
id read 0x100000ff
flash size 8MB, sector count = 128
Flash:  8 MB
Using default environment
In:    serial
Out:   serial
Err:   serial
Net:   ag7100_enet_initialize...
No valid address in Flash. Using fixed address
eth0: 00:03:7f:09:0b:ad
eth0 up
eth0
Autobooting in 1 seconds## Booting image at bf020000 ...
   Uncompressing Kernel Image ... OK
Starting kernel ...
OpenWrt kernel loader for AR7XXX/AR9XXX
Copyright (C) 2011 Gabor Juhos <juhosg@openwrt.org>
Looking for OpenWrt image... found at 0xbf022000
Decompressing kernel... done!
Starting kernel at 80060000...
[    0.000000] Linux version 4.14.146 (slh@trident) (gcc version 7.4.0 (OpenWrt GCC 7.4.0 r11146-fca9b5e4fb)) #0 Sun Sep 29 20:16:27 2019
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019374 (MIPS 24Kc)
[    0.000000] MIPS: machine is TP-Link TL-WR941N/ND v2/v3
[    0.000000] SoC: Atheros AR9132 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] random: get_random_bytes called from 0x80520748 with crng_init=0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 8120
[    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: 25692K/32768K available (4150K kernel code, 174K rwdata, 532K rodata, 1216K init, 211K bss, 7076K 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.007898] Calibrating delay loop... 264.70 BogoMIPS (lpj=132352)
[    0.024078] pid_max: default: 32768 minimum: 301
[    0.029055] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.035682] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.048836] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275000 ns
[    0.058611] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.064866] pinctrl core: initialized pinctrl subsystem
[    0.071395] NET: Registered protocol family 16
[    0.104862] clocksource: Switched to clocksource MIPS
[    0.111485] NET: Registered protocol family 2
[    0.117160] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.124188] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.130560] TCP: Hash tables configured (established 1024 bind 1024)
[    0.137123] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.143022] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.149651] NET: Registered protocol family 1
[    0.158577] Crashlog allocated RAM at address 0x1f00000
[    0.165657] workingset: timestamp_bits=14 max_order=13 bucket_order=0
[    0.181072] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.186924] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.211659] io scheduler noop registered
[    0.215645] io scheduler deadline registered (default)
[    0.222228] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    0.229557] console [ttyS0] disabled
[    0.233245] 18020000.uart: ttyS0 at MMIO 0x18020000 (irq = 9, base_baud = 6250000) is a 8250
[    0.241699] console [ttyS0] enabled
[    0.241699] console [ttyS0] enabled
[    0.248658] bootconsole [early0] disabled
[    0.248658] bootconsole [early0] disabled
[    0.265955] m25p80 spi0.0: 320s33b (4096 Kbytes)
[    0.270641] 3 fixed-partitions partitions found on MTD device spi0.0
[    0.276990] Creating 3 MTD partitions on "spi0.0":
[    0.281801] 0x000000000000-0x000000020000 : "u-boot"
[    0.287986] 0x000000020000-0x0000003f0000 : "firmware"
[    0.294642] 2 tplink-fw partitions found on MTD device firmware
[    0.300598] Creating 2 MTD partitions on "firmware":
[    0.305573] 0x000000000000-0x000000190567 : "kernel"
[    0.311599] 0x000000190568-0x0000003d0000 : "rootfs"
[    0.317600] mtd: device 3 (rootfs) set to be root filesystem
[    0.323353] 1 squashfs-split partitions found on MTD device rootfs
[    0.329548] 0x000000360000-0x0000003d0000 : "rootfs_data"
[    0.336018] 0x0000003f0000-0x000000400000 : "art"
[    0.343204] libphy: Fixed MDIO Bus: probed
[    0.463861] random: fast init done
[    0.669819] libphy: ag71xx_mdio: probed
[    0.675287] ag71xx 19000000.eth: connected to PHY at fixed-0:00 [uid=00000000, driver=Generic PHY]
[    0.685149] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode: rmii
[    0.694113] NET: Registered protocol family 10
[    0.704824] Segment Routing with IPv6
[    0.708679] NET: Registered protocol family 17
[    0.714108] ag71xx 19000000.eth eth0: [0]: detected a Marvell 88E6060 (B0) switch
[    0.733031] libphy: dsa slave smi: probed
[    0.737322] Generic PHY dsa-0.0:00: attached PHY driver [Generic PHY] (mii_bus:phy_addr=dsa-0.0:00, irq=POLL)
[    0.748598] Generic PHY dsa-0.0:01: attached PHY driver [Generic PHY] (mii_bus:phy_addr=dsa-0.0:01, irq=POLL)
[    0.759930] Generic PHY dsa-0.0:02: attached PHY driver [Generic PHY] (mii_bus:phy_addr=dsa-0.0:02, irq=POLL)
[    0.771212] Generic PHY dsa-0.0:03: attached PHY driver [Generic PHY] (mii_bus:phy_addr=dsa-0.0:03, irq=POLL)
[    0.782498] Generic PHY dsa-0.0:04: attached PHY driver [Generic PHY] (mii_bus:phy_addr=dsa-0.0:04, irq=POLL)
[    0.793731] 8021q: 802.1Q VLAN Support v1.8
[    0.809833] VFS: Mounted root (squashfs filesystem) readonly on device 31:3.
[    0.824408] Freeing unused kernel memory: 1216K
[    0.828960] This architecture does not have kernel memory protection.
[    2.029576] init: Console is alive
[    2.033350] init: - watchdog -
[    3.597568] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    3.683187] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    3.701041] init: - preinit -
[    4.650157] random: jshn: uninitialized urandom read (4 bytes read)
[    4.788505] random: jshn: uninitialized urandom read (4 bytes read)
[    4.931645] random: jshn: uninitialized urandom read (4 bytes read)
ip: SIOCSIFFLAGS: Network is down
sendto(): Network unreachable
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
[   11.681712] mount_root: jffs2 not ready yet, using temporary tmpfs overlay
[   11.722141] urandom-seed: Seed file not found (/etc/urandom.seed)
[   11.868432] procd: - early -
[   11.871537] procd: - watchdog -
[   12.516939] procd: - watchdog -
[   12.520536] procd: - ubus -
[   12.607943] urandom_read: 5 callbacks suppressed
[   12.607954] random: ubusd: uninitialized urandom read (4 bytes read)
[   12.619812] random: ubusd: uninitialized urandom read (4 bytes read)
[   12.628287] procd: - init -
Please press Enter to activate this console.
[   13.473003] random: crng init done
[   13.634647] kmodloader: loading kernel modules from /etc/modules.d/*
[   13.664580] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   13.694811] Loading modules backported from Linux version v5.3-rc4-0-gd45331b00ddb
[   13.702416] Backport generated by backports.git v5.3-rc4-1-0-g4ec72687
[   13.730710] ip_tables: (C) 2000-2006 Netfilter Core Team
[   13.758430] nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
[   13.790535] urngd: v1.0.0 started.
[   13.912127] xt_time: kernel timezone is -0000
[   14.060108] PPP generic driver version 2.4.2
[   14.073102] NET: Registered protocol family 24
[   14.274849] ieee80211 phy0: Atheros AR9100 MAC/BB Rev:7 AR2133 RF Rev:a1 mem=0xb80c0000, irq=2
[   14.543381] kmodloader: done loading kernel modules from /etc/modules.d/*
[   63.006971] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
[   63.030905] jffs2_build_filesystem(): unlocking the mtd device... 
[   63.030919] done.
[   63.039032] jffs2_build_filesystem(): erasing all blocks after the end marker... 
[   65.726255] done.
[   65.735721] jffs2: notice: (1120) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[   66.205953] overlayfs: upper fs does not support tmpfile.
[   67.406456] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   67.424265] br-lan: port 1(lan1) entered blocking state
[   67.429552] br-lan: port 1(lan1) entered disabled state
[   67.435230] device lan1 entered promiscuous mode
[   67.439884] device eth0 entered promiscuous mode
[   67.467326] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   67.528271] br-lan: port 2(lan2) entered blocking state
[   67.533553] br-lan: port 2(lan2) entered disabled state
[   67.539205] device lan2 entered promiscuous mode
[   67.609368] br-lan: port 3(lan3) entered blocking state
[   67.614664] br-lan: port 3(lan3) entered disabled state
[   67.620321] device lan3 entered promiscuous mode
[   67.654292] br-lan: port 4(lan4) entered blocking state
[   67.659595] br-lan: port 4(lan4) entered disabled state
[   67.665255] device lan4 entered promiscuous mode
[   67.707181] IPv6: ADDRCONF(NETDEV_UP): wan: link is not ready
[   68.436039] dsa dsa lan1: Link is Down
[   68.446465] eth0: link up (100Mbps/Full duplex)
[   68.478911] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   68.564037] dsa dsa lan2: Link is Down
[   68.628031] dsa dsa lan3: Link is Down
[   68.692059] dsa dsa lan4: Link is Down
[   68.756033] dsa dsa wan: Link is Down
[   69.588151] dsa dsa lan2: Link is Up - 100Mbps/Full - flow control rx/tx
[   69.605734] br-lan: port 2(lan2) entered blocking state
[   69.611020] br-lan: port 2(lan2) entered forwarding state
[   69.653146] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
BusyBox v1.31.0 () built-in shell (ash)
  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt SNAPSHOT, r11146-fca9b5e4fb
 -----------------------------------------------------
=== 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:/# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP qlen 1000
    link/ether 00:21:27:ff:51:a6 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::221:27ff:feff:51a6/64 scope link 
       valid_lft forever preferred_lft forever
3: wan@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state LOWERLAYERDOWN qlen 1000
    link/ether 00:21:27:ff:51:a7 brd ff:ff:ff:ff:ff:ff
4: lan1@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master br-lan state LOWERLAYERDOWN qlen 1000
    link/ether 00:21:27:ff:51:a6 brd ff:ff:ff:ff:ff:ff
5: lan2@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP qlen 1000
    link/ether 00:21:27:ff:51:a6 brd ff:ff:ff:ff:ff:ff
6: lan3@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master br-lan state LOWERLAYERDOWN qlen 1000
    link/ether 00:21:27:ff:51:a6 brd ff:ff:ff:ff:ff:ff
7: lan4@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master br-lan state LOWERLAYERDOWN qlen 1000
    link/ether 00:21:27:ff:51:a6 brd ff:ff:ff:ff:ff:ff
8: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether 00:21:27:ff:51:a6 brd ff:ff:ff:ff:ff:ff
9: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
    link/ether 00:21:27:ff:51:a6 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.1/24 brd 192.168.1.255 scope global br-lan
       valid_lft forever preferred_lft forever
    inet6 fdfe:42a9:e7f9::1/60 scope global 
       valid_lft forever preferred_lft forever
    inet6 fe80::221:27ff:feff:51a6/64 scope link 
       valid_lft forever preferred_lft forever

root@OpenWrt:/# ls -1 /sys/module/
8250
ath
ath9k
ath9k_common
ath9k_hw
block
cfg80211
compat
crc_ccitt
firmware_class
gpio_button_hotplug
ip6_tables
ip6t_REJECT
ip6table_filter
ip6table_mangle
ip_tables
ipt_MASQUERADE
ipt_REJECT
iptable_filter
iptable_mangle
iptable_nat
ipv6
kernel
mac80211
module
nf_conntrack
nf_conntrack_ipv4
nf_conntrack_ipv6
nf_conntrack_rtcache
nf_defrag_ipv4
nf_defrag_ipv6
nf_flow_table
nf_flow_table_hw
nf_log_common
nf_log_ipv4
nf_log_ipv6
nf_nat
nf_nat_ipv4
nf_nat_masquerade_ipv4
nf_nat_redirect
nf_reject_ipv4
nf_reject_ipv6
overlay
ppp_async
ppp_generic
pppoe
pppox
printk
random
slhc
spurious
tcp_cubic
watchdog
workqueue
x_tables
xt_CT
xt_FLOWOFFLOAD
xt_LOG
xt_REDIRECT
xt_TCPMSS
xt_comment
xt_conntrack
xt_limit
xt_mac
xt_mark
xt_multiport
xt_nat
xt_state
xt_tcpudp
xt_time
root@OpenWrt:/# 

Broken (official ath79-tiny snapshot, v4.19, r11143-881ed09ee6):

U-Boot 1.1.4 (Jun 18 2009 - 15:08:27)
AP81 (ar7100) U-boot
DRAM:  
32 MB
id read 0x100000ff
flash size 8MB, sector count = 128
Flash:  8 MB
Using default environment
In:    serial
Out:   serial
Err:   serial
Net:   ag7100_enet_initialize...
No valid address in Flash. Using fixed address
eth0: 00:03:7f:09:0b:ad
eth0 up
eth0
Autobooting in 1 secondsar7100> o
ar7100> tftp 0x80800000 snapshot.bin
set link to 100M full by lqm.
dup 1 speed 100
Using eth0 device
TFTP from server 192.168.1.169; our IP address is 192.168.1.10
Filename 'snapshot.bin'.
Load address: 0x80800000
Loading: *
checksum bad
checksum bad
#################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 ######################################################
done
Bytes transferred = 3932160 (3c0000 hex)
ar7100> erase.b 0xbf020000 +0x3c0000
First 0x2 last 0x3d sector size 0x10000
[...]
Erased 60 sectors
ar7100> cp.b 0x80800000 0xbf020000 0x3c0000
Copy to Flash... write addr: bf020000
done
ar7100> reset
Resetting...
U-Boot 1.1.4 (Jun 18 2009 - 15:08:27)
AP81 (ar7100) U-boot
DRAM:  
32 MB
id read 0x100000ff
flash size 8MB, sector count = 128
Flash:  8 MB
Using default environment
In:    serial
Out:   serial
Err:   serial
Net:   ag7100_enet_initialize...
No valid address in Flash. Using fixed address
eth0: 00:03:7f:09:0b:ad
eth0 up
eth0
Autobooting in 1 seconds## Booting image at bf020000 ...
   Uncompressing Kernel Image ... OK
Starting kernel ...
OpenWrt kernel loader for AR7XXX/AR9XXX
Copyright (C) 2011 Gabor Juhos <juhosg@openwrt.org>
Looking for OpenWrt image... found at 0xbf022000
Decompressing kernel... done!
Starting kernel at 80060000...
[    0.000000] Linux version 4.19.75 (builder@buildhost) (gcc version 7.4.0 (OpenWrt GCC 7.4.0 r11143-881ed09ee6)) #0 Sun Sep 29 11:51:28 2019
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019374 (MIPS 24Kc)
[    0.000000] MIPS: machine is TP-Link TL-WR941N/ND v2/v3
[    0.000000] SoC: Atheros AR9132 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] random: get_random_bytes called from start_kernel+0x8c/0x464 with crng_init=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] 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: 25612K/32768K available (3770K kernel code, 150K rwdata, 1032K rodata, 1248K init, 203K bss, 7156K 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.008147] Calibrating delay loop... 265.42 BogoMIPS (lpj=1327104)
[    0.094582] pid_max: default: 32768 minimum: 301
[    0.099701] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.106504] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.119452] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.129621] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.136021] pinctrl core: initialized pinctrl subsystem
[    0.144655] NET: Registered protocol family 16
[    0.185730] clocksource: Switched to clocksource MIPS
[    0.192536] NET: Registered protocol family 2
[    0.198299] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes)
[    0.206246] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.213443] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.220026] TCP: Hash tables configured (established 1024 bind 1024)
[    0.226791] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.232809] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.239650] NET: Registered protocol family 1
[    0.248236] Crashlog allocated RAM at address 0x1f00000
[    0.255617] workingset: timestamp_bits=30 max_order=13 bucket_order=0
[    0.271147] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.277200] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.300487] io scheduler noop registered
[    0.304501] io scheduler deadline registered (default)
[    0.311900] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.322107] console [ttyS0] disabled
[    0.325882] 18020000.uart: ttyS0 at MMIO 0x18020000 (irq = 9, base_baud = 6250000) is a 8250
[    0.334577] console [ttyS0] enabled
[    0.334577] console [ttyS0] enabled
[    0.341661] bootconsole [early0] disabled
[    0.341661] bootconsole [early0] disabled
[    0.362345] m25p80 spi0.0: 320s33b (4096 Kbytes)
[    0.367085] 3 fixed-partitions partitions found on MTD device spi0.0
[    0.373413] Creating 3 MTD partitions on "spi0.0":
[    0.378229] 0x000000000000-0x000000020000 : "u-boot"
[    0.384397] 0x000000020000-0x0000003f0000 : "firmware"
[    0.394671] 2 tplink-fw partitions found on MTD device firmware
[    0.400652] Creating 2 MTD partitions on "firmware":
[    0.405612] 0x000000000000-0x0000001926e9 : "kernel"
[    0.411757] 0x0000001926ec-0x0000003d0000 : "rootfs"
[    0.417845] mtd: device 3 (rootfs) set to be root filesystem
[    0.425426] 1 squashfs-split partitions found on MTD device rootfs
[    0.431683] 0x000000370000-0x0000003d0000 : "rootfs_data"
[    0.438273] 0x0000003f0000-0x000000400000 : "art"
[    0.444893] libphy: Fixed MDIO Bus: probed
[    0.787854] libphy: ag71xx_mdio: probed
[    0.793000] ag71xx 19000000.eth: connected to PHY at fixed-0:00 [uid=00000000, driver=Generic PHY]
[    0.802962] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode: rmii
[    0.812369] NET: Registered protocol family 10
[    0.823630] Segment Routing with IPv6
[    0.827541] NET: Registered protocol family 17
[    0.832034] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    0.845355] 8021q: 802.1Q VLAN Support v1.8
[    0.865388] VFS: Mounted root (squashfs filesystem) readonly on device 31:3.
[    0.880166] Freeing unused kernel memory: 1248K
[    0.884683] This architecture does not have kernel memory protection.
[    0.891127] Run /sbin/init as init process
[    2.565740] random: fast init done
[    4.493157] init: Console is alive
[    4.497058] init: - watchdog -
[    7.223576] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    7.549683] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    7.567501] init: - preinit -
[   11.018969] random: jshn: uninitialized urandom read (4 bytes read)
[   11.468248] random: jshn: uninitialized urandom read (4 bytes read)
[   11.613584] random: jshn: uninitialized urandom read (4 bytes read)
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[   15.505095] mount_root: jffs2 not ready yet, using temporary tmpfs overlay
[   15.542236] urandom-seed: Seed file not found (/etc/urandom.seed)
[   16.004733] procd: - early -
[   16.007842] procd: - watchdog -
[   16.914582] procd: - watchdog -
[   16.918181] procd: - ubus -
[   17.441752] urandom_read: 5 callbacks suppressed
[   17.441764] random: ubusd: uninitialized urandom read (4 bytes read)
[   17.453720] random: ubusd: uninitialized urandom read (4 bytes read)
[   17.462034] procd: - init -
Please press Enter to activate this console.
[   19.193990] kmodloader: loading kernel modules from /etc/modules.d/*
[   19.243095] Loading modules backported from Linux version v5.3-rc4-0-gd45331b00ddb
[   19.250725] Backport generated by backports.git v5.3-rc4-1-0-g4ec72687
[   19.291803] xt_time: kernel timezone is -0000
[   19.390709] PPP generic driver version 2.4.2
[   19.398800] NET: Registered protocol family 24
[   19.587348] ieee80211 phy0: Atheros AR9100 MAC/BB Rev:7 AR2133 RF Rev:a1 mem=0xb80c0000, irq=2
[   19.736251] kmodloader: done loading kernel modules from /etc/modules.d/*
[   20.327774] urngd: v1.0.0 started.
[   20.613458] random: crng init done
BusyBox v1.31.0 () built-in shell (ash)
  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt SNAPSHOT, r11143-881ed09ee6
 -----------------------------------------------------
=== 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:/# ip a
1: lo: <LOOPBACK> mtu 65536 qdisc noop state DOWN qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether 00:21:27:ff:51:a6 brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether 00:21:27:ff:51:a6 brd ff:ff:ff:ff:ff:ff

root@OpenWrt:/# ls -1 /sys/module/
8250
ath
ath9k
ath9k_common
ath9k_hw
block
cfg80211
compat
crc_ccitt
firmware_class
gpio_button_hotplug
ip6_tables
ip6t_REJECT
ip6table_filter
ip6table_mangle
ip_tables
ipt_MASQUERADE
ipt_REJECT
iptable_filter
iptable_mangle
iptable_nat
ipv6
kernel
mac80211
module
nf_conntrack
nf_conntrack_rtcache
nf_defrag_ipv4
nf_defrag_ipv6
nf_flow_table
nf_flow_table_hw
nf_log_common
nf_log_ipv4
nf_log_ipv6
nf_nat
nf_nat_ipv4
nf_reject_ipv4
nf_reject_ipv6
overlay
ppp_async
ppp_generic
pppoe
pppox
printk
random
rng_core
slab_common
slhc
spurious
tcp_cubic
watchdog
workqueue
x_tables
xt_CT
xt_FLOWOFFLOAD
xt_LOG
xt_REDIRECT
xt_TCPMSS
xt_comment
xt_conntrack
xt_limit
xt_mac
xt_mark
xt_multiport
xt_nat
xt_state
xt_tcpudp
xt_time
root@OpenWrt:/# 

Working (patched r11146-gfca9b5e4fb, v4.19):

U-Boot 1.1.4 (Jun 18 2009 - 15:08:27)
AP81 (ar7100) U-boot
DRAM:  
32 MB
id read 0x100000ff
flash size 8MB, sector count = 128
Flash:  8 MB
Using default environment
In:    serial
Out:   serial
Err:   serial
Net:   ag7100_enet_initialize...
No valid address in Flash. Using fixed address
eth0: 00:03:7f:09:0b:ad
eth0 up
eth0
Autobooting in 1 seconds## Booting image at bf020000 ...
   Uncompressing Kernel Image ... OK
Starting kernel ...
OpenWrt kernel loader for AR7XXX/AR9XXX
Copyright (C) 2011 Gabor Juhos <juhosg@openwrt.org>
Looking for OpenWrt image... found at 0xbf022000
Decompressing kernel... done!
Starting kernel at 80060000...
[    0.000000] Linux version 4.19.75 (slh@trident) (gcc version 7.4.0 (OpenWrt GCC 7.4.0 r11146-fca9b5e4fb)) #0 Sun Sep 29 20:16:27 2019
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019374 (MIPS 24Kc)
[    0.000000] MIPS: machine is TP-Link TL-WR941N/ND v2/v3
[    0.000000] SoC: Atheros AR9132 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] random: get_random_bytes called from 0x80570748 with crng_init=0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 8120
[    0.000000] Kernel command line: console=ttyS0,115200 rootfstype=squashfs,jffs2
[    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: 25380K/32768K available (4425K kernel code, 182K rwdata, 568K rodata, 1216K init, 209K bss, 7388K 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.007898] Calibrating delay loop... 264.70 BogoMIPS (lpj=132352)
[    0.024097] pid_max: default: 32768 minimum: 301
[    0.029074] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.035700] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.049143] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275000 ns
[    0.058898] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.065171] pinctrl core: initialized pinctrl subsystem
[    0.071688] NET: Registered protocol family 16
[    0.110102] clocksource: Switched to clocksource MIPS
[    0.116829] NET: Registered protocol family 2
[    0.122638] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes)
[    0.130384] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.137377] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.143752] TCP: Hash tables configured (established 1024 bind 1024)
[    0.150315] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.156219] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.162908] NET: Registered protocol family 1
[    0.171998] Crashlog allocated RAM at address 0x1f00000
[    0.179507] workingset: timestamp_bits=14 max_order=13 bucket_order=0
[    0.196504] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.202374] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.230472] io scheduler noop registered
[    0.234457] io scheduler deadline registered (default)
[    0.241771] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    0.249082] console [ttyS0] disabled
[    0.252776] 18020000.uart: ttyS0 at MMIO 0x18020000 (irq = 9, base_baud = 6250000) is a 8250
[    0.261231] console [ttyS0] enabled
[    0.261231] console [ttyS0] enabled
[    0.268196] bootconsole [early0] disabled
[    0.268196] bootconsole [early0] disabled
[    0.285976] m25p80 spi0.0: 320s33b (4096 Kbytes)
[    0.290694] 3 fixed-partitions partitions found on MTD device spi0.0
[    0.297046] Creating 3 MTD partitions on "spi0.0":
[    0.301851] 0x000000000000-0x000000020000 : "u-boot"
[    0.308007] 0x000000020000-0x0000003f0000 : "firmware"
[    0.318582] 2 tplink-fw partitions found on MTD device firmware
[    0.324558] Creating 2 MTD partitions on "firmware":
[    0.329538] 0x000000000000-0x0000001a9b50 : "kernel"
[    0.335714] 0x0000001a9b50-0x0000003d0000 : "rootfs"
[    0.341843] mtd: device 3 (rootfs) set to be root filesystem
[    0.349640] 1 squashfs-split partitions found on MTD device rootfs
[    0.355894] 0x000000380000-0x0000003d0000 : "rootfs_data"
[    0.362485] 0x0000003f0000-0x000000400000 : "art"
[    0.369820] libphy: Fixed MDIO Bus: probed
[    0.474099] random: fast init done
[    0.710244] libphy: ag71xx_mdio: probed
[    0.715821] ag71xx 19000000.eth: connected to PHY at fixed-0:00 [uid=00000000, driver=Generic PHY]
[    0.725815] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode: rmii
[    0.735447] NET: Registered protocol family 10
[    0.747373] Segment Routing with IPv6
[    0.751250] NET: Registered protocol family 17
[    0.756441] ag71xx 19000000.eth eth0: [0]: detected a Marvell 88E6060 (B0) switch
[    0.770258] CPU 0 Unable to handle kernel paging request at virtual address 00000018, epc == 803202ec, ra == 8048dbd0
[    0.780849] Oops[#1]:
[    0.783128] CPU: 0 PID: 1 Comm: swapper Not tainted 4.19.75 #0
[    0.788932] $ 0   : 00000000 00000001 00000000 819cc8dc
[    0.794149] $ 4   : 81a27058 81828000 81823c34 00000003
[    0.799367] $ 8   : 00000000 804ac4d0 00000010 806cf230
[    0.804586] $12   : 00000000 430ea1a1 1932aebc b08a311f
[    0.809805] $16   : 819cc880 00000000 00000000 819cc8dc
[    0.815024] $20   : 00000008 00000003 00000001 00004103
[    0.820242] $24   : 00000010 802e50f0                  
[    0.825460] $28   : 81822000 81823c90 819cc8dc 8048dbd0
[    0.830679] Hi    : 00000001
[    0.833548] Lo    : c3d99800
[    0.836422] epc   : 803202ec 0x803202ec
[    0.840248] ra    : 8048dbd0 0x8048dbd0
[    0.844063] Status: 1000d003	KERNEL EXL IE 
[    0.848238] Cause : 00800008 (ExcCode 02)
[    0.852227] BadVA : 00000018
[    0.855098] PrId  : 00019374 (MIPS 24Kc)
[    0.859000] Modules linked in:
[    0.862050] Process swapper (pid: 1, threadinfo=(ptrval), task=(ptrval), tls=00000000)
[    0.869930] Stack : 00000000 81817800 80565a60 0000000c 1297efe6 53418a5c 819cc880 804d6ff0
[    0.878275]         819cc8cc 81817800 81884e10 81a31700 819c9a80 819c9940 81884e00 8048dbd0
[    0.886621]         806a0000 8027266c 00000000 805105f8 00000000 81886840 00000000 8056d510
[    0.894968]         00000000 804ead14 00000000 00000000 80570000 80519b3c 819c9900 80570000
[    0.903314]         806a0000 819c9b80 81884e10 8056d4c4 806d0000 00000000 806d0000 8056d4c4
[    0.911661]         ...
[    0.914097] Call Trace:
[    0.914115] [<8048dbd0>] 0x8048dbd0
[    0.920021] [<8027266c>] 0x8027266c
[    0.923497] [<80570000>] 0x80570000
[    0.926976] [<80570000>] 0x80570000
[    0.930452] [<802d69fc>] 0x802d69fc
[    0.933933] [<802d4d8c>] 0x802d4d8c
[    0.937414] [<802d6d70>] 0x802d6d70
[    0.940897] [<80570248>] 0x80570248
[    0.944377] [<802d52d8>] 0x802d52d8
[    0.947852] [<802d5224>] 0x802d5224
[    0.951332] [<802d2d70>] 0x802d2d70
[    0.954806] [<80499a04>] 0x80499a04
[    0.958278] [<80353a90>] 0x80353a90
[    0.961753] [<802d4118>] 0x802d4118
[    0.965237] [<8058b6f4>] 0x8058b6f4
[    0.968716] [<802d5b14>] 0x802d5b14
[    0.972189] [<80570000>] 0x80570000
[    0.975664] [<8058b6f4>] 0x8058b6f4
[    0.979145] [<8058b748>] 0x8058b748
[    0.982618] [<8058b518>] 0x8058b518
[    0.986091] [<8058a17c>] 0x8058a17c
[    0.989565] [<8058b554>] 0x8058b554
[    0.993047] [<80060930>] 0x80060930
[    0.996520] [<8009fe10>] 0x8009fe10
[    1.000009] [<80570ca4>] 0x80570ca4
[    1.003485] [<80570248>] 0x80570248
[    1.006965] [<804ac7a8>] 0x804ac7a8
[    1.010440] [<804ac7b8>] 0x804ac7b8
[    1.013921] [<804ac7a8>] 0x804ac7a8
[    1.017402] [<80065858>] 0x80065858
[    1.020886] 
[    1.022374] Code: 10000005  8e020018  8e620010 <8c470018> 00f63804  8e020018  30e7ffff  02273825  8c450004 
[    1.032119] 
[    1.033667] ---[ end trace 2875a85eb4fa7876 ]---
[    1.039996] Kernel panic - not syncing: Fatal exception
[    1.046758] Rebooting in 1 seconds..
Stefan Lippers-Hollmann commented on 30.09.2019 04:08

hmm, the original submission seems to fall over attaching the patch (ath79-generic-add_tl-wr941ndv2.patch) as a file, so pasting it inline:

--- a/target/linux/ath79/config-4.14
+++ b/target/linux/ath79/config-4.14
@@ -175,6 +175,10 @@ CONFIG_MTD_TPLINK_PARTS=y
 CONFIG_MTD_VIRT_CONCAT=y
 CONFIG_NEED_DMA_MAP_STATE=y
 CONFIG_NEED_PER_CPU_KM=y
+CONFIG_NET_DSA=y
+CONFIG_NET_DSA_MV88E6060=y
+CONFIG_NET_DSA_TAG_TRAILER=y
+CONFIG_NET_SWITCHDEV=y
 CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
 # CONFIG_NO_IOPORT_MAP is not set
 CONFIG_OF=y
--- a/target/linux/ath79/image/generic-tp-link.mk
+++ b/target/linux/ath79/image/generic-tp-link.mk
@@ -383,6 +383,15 @@ define Device/tplink_tl-wdr4900-v2
 endef
 TARGET_DEVICES += tplink_tl-wdr4900-v2
 
+define Device/tplink_tl-wr941-v2
+  $(Device/tplink-4m)
+  ATH_SOC := ar9132
+  DEVICE_TITLE := TP-Link TL-WR941N/ND v2/v3
+  TPLINK_HWID := 0x09410002
+  TPLINK_HWREV := 2
+endef
+TARGET_DEVICES += tplink_tl-wr941-v2
+
 define Device/tplink_tl-wr1043nd-v1
   $(Device/tplink-8m)
   ATH_SOC := ar9132
--- a/target/linux/ath79/config-4.19
+++ b/target/linux/ath79/config-4.19
@@ -174,6 +174,11 @@ CONFIG_MTD_TPLINK_PARTS=y
 CONFIG_MTD_VIRT_CONCAT=y
 CONFIG_NEED_DMA_MAP_STATE=y
 CONFIG_NEED_PER_CPU_KM=y
+CONFIG_NET_DSA=y
+CONFIG_NET_DSA_LEGACY=y
+CONFIG_NET_DSA_MV88E6060=y
+CONFIG_NET_DSA_TAG_TRAILER=y
+CONFIG_NET_SWITCHDEV=y
 CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
 CONFIG_NVMEM=y
 CONFIG_OF=y

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing