Banana Pi R1, unable to create a working Image

Ahoy ahoy.
I got a Banana Pi R1 and i'd like to try it out again.
I have used it in the past already, and always experienced the same issue.
When i create a image for the Lamobo R1, only selecting LuCi as an additional component, i am later on not able to access the device without heavily modifying and generating some kind of /etc/config/network config before.
Unfortunately, after the image is written, there is no /etc/config/network on the partition. Is that a bug? Because without a generic or default /etc/config/network there is no way to access the device, especially for people with less knowledge. For all other targets such a file is being created. Only for this target somehow it's not.

I have cloned from master branch.
When i use some of these pre-built 19.07 images for this device it works without issues.

chairman@debian:/media/chairman/disk/etc/config$ ls -l
total 22
-rw------- 1 root root 1042 Sep  9 23:40 dhcp
-rw------- 1 root root 1416 Sep  9 23:40 dnscrypt-proxy
-rw------- 1 root root  134 Sep  9 23:40 dropbear
-rw------- 1 root root 4632 Sep  9 23:40 firewall
-rw-r--r-- 1 root root  687 Sep  9 23:40 luci
-rw------- 1 root root 2724 Sep  9 23:40 mwan3
-rw-r--r-- 1 root root 2578 Sep  9 23:40 openvpn_recipes
-rw------- 1 root root  167 Sep  9 23:40 rpcd
-rw-r--r-- 1 root root  788 Sep  9 23:40 ucitrack
-rw------- 1 root root 4154 Sep  9 23:40 uhttpd

Yes, this is a bug and not your fault.
It's been a long time someone had their hands on that board and as it comes with a b53 Broadcom switch we may have to re-write things so they work well with DSA (previously, due to lack of DSA in OpenWrt, we were using swconfig-based driver and userland to configure the switch chip despite there being upstream support for DSA with that chip).

Please share the output of the following commands:

dmesg
ip link show

I suspect we need to change the way the default configuration is generated now that we are using DSA:

diff --git a/target/linux/sunxi/base-files/etc/board.d/02_network b/target/linux/sunxi/base-files/etc/board.d/02_network
index 5b59333b1f..d5c615e7f2 100644
--- a/target/linux/sunxi/base-files/etc/board.d/02_network
+++ b/target/linux/sunxi/base-files/etc/board.d/02_network
@@ -11,8 +11,7 @@ friendlyarm,nanopi-r1)
 	ucidef_set_interfaces_lan_wan "eth1" "eth0"
 	;;
 lamobo,lamobo-r1)
-	ucidef_add_switch "switch0" \
-		"4:lan:1" "0:lan:2" "1:lan:3" "2:lan:4" "3:wan" "8@eth0"
+	ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" wan
 	;;
 olimex,a20-olinuxino-micro)
 	ucidef_set_interface_lan "wlan0"

Thanks :slight_smile: I have connected through UART using default settings, so i'll provide you dmesg and ip link show

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default 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 mode DEFAULT group default qlen 1000
    link/ether 02:90:0b:81:b4:da brd ff:ff:ff:ff:ff:ff
4: bond0: <BROADCAST,MULTICAST,MASTER> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 32:e8:a9:a4:a7:bc brd ff:ff:ff:ff:ff:ff
5: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 3c:33:00:bd:a9:ae brd ff:ff:ff:ff:ff:ff
6: br-lan: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default qlen 1000
    link/ether 02:90:0b:81:b4:da brd ff:ff:ff:ff:ff:ff
7: eth0.1@eth0: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc noop master br-lan state DOWN mode DEFAULT group default qlen 1000
    link/ether 02:90:0b:81:b4:da brd ff:ff:ff:ff:ff:ff
8: eth0.2@eth0: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 02:90:0b:81:b4:da brd ff:ff:ff:ff:ff:ff

As well as dmesg

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.4.143 (chairman@debian) (gcc version 10.3.0 (OpenWrt GCC 10.3.0 r17495-66db87fc78)) #0 SMP Thu Sep 9 21:40:32 2021
[    0.000000] CPU: ARMv7 Processor [410fc074] revision 4 (ARMv7), cr=30c5387d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Lamobo R1
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] OF: reserved mem: node default-pool compatible matching fail
[    0.000000] On node 0 totalpages: 262144
[    0.000000]   Normal zone: 1728 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 196608 pages, LIFO batch:63
[    0.000000]   HighMem zone: 65536 pages, LIFO batch:15
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: Using PSCI v0.1 Function IDs from DT
[    0.000000] percpu: Embedded 15 pages/cpu s30924 r8192 d22324 u61440
[    0.000000] pcpu-alloc: s30924 r8192 d22324 u61440 alloc=15*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 260416
[    0.000000] Kernel command line: console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes, linear)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] software IO TLB: mapped [mem 0x6b608000-0x6f608000] (64MB)
[    0.000000] Memory: 959448K/1048576K available (6711K kernel code, 423K rwdata, 1784K rodata, 2048K init, 245K bss, 89128K reserved, 0K cma-reserved, 262144K highmem)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu: 	RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=2.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] GIC: Using split EOI/Deactivate mode
[    0.000000] random: get_random_bytes called from start_kernel+0x304/0x4b4 with crng_init=0
[    0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[    0.000007] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.000019] Switching to timer-based delay loop, resolution 41ns
[    0.000439] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000746] clocksource: hstimer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6370868154 ns
[    0.000958] Console: colour dummy device 80x30
[    0.001015] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[    0.001029] pid_max: default: 32768 minimum: 301
[    0.001210] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.001227] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.002193] CPU: Testing write buffer coherency: ok
[    0.002697] /cpus/cpu@0 missing clock-frequency property
[    0.002720] /cpus/cpu@1 missing clock-frequency property
[    0.002732] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.003369] Setting up static identity map for 0x40200000 - 0x40200060
[    0.003530] rcu: Hierarchical SRCU implementation.
[    0.004198] smp: Bringing up secondary CPUs ...
[    0.015009] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.015163] smp: Brought up 1 node, 2 CPUs
[    0.015179] SMP: Total of 2 processors activated (96.00 BogoMIPS).
[    0.015186] CPU: All CPU(s) started in HYP mode.
[    0.015191] CPU: Virtualization extensions available.
[    0.021578] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 4
[    0.021891] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.021919] futex hash table entries: 512 (order: 3, 32768 bytes, linear)
[    0.022172] pinctrl core: initialized pinctrl subsystem
[    0.023466] NET: Registered protocol family 16
[    0.023966] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.025491] No ATAGs?
[    0.056075] SCSI subsystem initialized
[    0.056612] libata version 3.00 loaded.
[    0.056991] usbcore: registered new interface driver usbfs
[    0.057086] usbcore: registered new interface driver hub
[    0.057177] usbcore: registered new device driver usb
[    0.057335] pps_core: LinuxPPS API ver. 1 registered
[    0.057346] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.057382] PTP clock support registered
[    0.057825] Advanced Linux Sound Architecture Driver Initialized.
[    0.057929] workqueue: max_active 576 requested for napi_workq is out of range, clamping between 1 and 512
[    0.060015] clocksource: Switched to clocksource arch_sys_counter
[    0.067065] thermal_sys: Registered thermal governor 'step_wise'
[    0.067654] NET: Registered protocol family 2
[    0.067906] IP idents hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    0.068904] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    0.068951] TCP established hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.069033] TCP bind hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.069160] TCP: Hash tables configured (established 8192 bind 8192)
[    0.069320] UDP hash table entries: 512 (order: 2, 16384 bytes, linear)
[    0.069396] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear)
[    0.069718] NET: Registered protocol family 1
[    0.073055] kvm [1]: vgic interrupt IRQ16
[    0.073154] kvm [1]: Hyp mode initialized successfully
[    0.074719] workingset: timestamp_bits=14 max_order=18 bucket_order=4
[    0.082670] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.082891] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.086720] bounce: pool size: 64 pages
[    0.087805] sun4i-usb-phy 1c13400.phy: Couldn't request ID GPIO
[    0.092151] sun4i-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.106560] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.108568] sun4i-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pb not found, using dummy regulator
[    0.109127] printk: console [ttyS0] disabled
[    0.129367] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 48, base_baud = 1500000) is a U6_16550A
[    0.700856] printk: console [ttyS0] enabled
[    0.705586] sun4i-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-ph not found, using dummy regulator
[    0.737820] 1c28c00.serial: ttyS1 at MMIO 0x1c28c00 (irq = 49, base_baud = 1500000) is a U6_16550A
[    0.747234] sun4i-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pi not found, using dummy regulator
[    0.779351] 1c29c00.serial: ttyS2 at MMIO 0x1c29c00 (irq = 50, base_baud = 1500000) is a U6_16550A
[    0.795270] loop: module loaded
[    0.801598] libphy: Fixed MDIO Bus: probed
[    0.806561] sun4i-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pa not found, using dummy regulator
[    0.816434] sun7i-dwmac 1c50000.ethernet: IRQ eth_wake_irq not found
[    0.822832] sun7i-dwmac 1c50000.ethernet: IRQ eth_lpi not found
[    0.828898] sun7i-dwmac 1c50000.ethernet: PTP uses main clock
[    0.834675] sun7i-dwmac 1c50000.ethernet: no reset control found
[    0.842029] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.848562] ehci-platform: EHCI generic platform driver
[    0.854352] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.860620] ohci-platform: OHCI generic platform driver
[    0.866378] usbcore: registered new interface driver usb-storage
[    0.872752] mousedev: PS/2 mouse device common for all mice
[    0.879358] i2c /dev entries driver
[    0.884024] axp20x-i2c 0-0034: AXP20x variant AXP209 found
[    0.896136] axp20x-gpio axp20x-gpio: DMA mask not set
[    0.902953] axp20x-gpio axp20x-gpio: AXP209 pinctrl and GPIO driver loaded
[    0.918272] input: axp20x-pek as /devices/platform/soc/1c2ac00.i2c/i2c-0/0-0034/axp20x-pek/input/input0
[    0.928882] vdd-rtc: supplied by regulator-dummy
[    0.934399] avcc: supplied by regulator-dummy
[    0.940229] ldo3: supplied by regulator-dummy
[    0.944901] ldo4: supplied by regulator-dummy
[    0.949974] ldo5: supplied by regulator-dummy
[    0.954988] vdd-cpu: supplied by regulator-dummy
[    0.960391] vdd-int-dll: supplied by regulator-dummy
[    0.966943] axp20x-i2c 0-0034: AXP20X driver loaded
[    0.973321] axp20x-usb-power-supply axp20x-usb-power-supply: DMA mask not set
[    0.981704] random: fast init done
[    1.001981] sunxi-wdt 1c20c90.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[    1.013579] sun4i-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pf not found, using dummy regulator
[    1.024044] sunxi-mmc 1c0f000.mmc: Got CD GPIO
[    1.052870] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
[    1.061193] sun4i-ss 1c15000.crypto-engine: Die ID 0
[    1.070355] NET: Registered protocol family 10
[    1.076135] Segment Routing with IPv6
[    1.079916] NET: Registered protocol family 17
[    1.084454] can: controller area network core (rev 20170425 abi 9)
[    1.090719] NET: Registered protocol family 29
[    1.095163] 8021q: 802.1Q VLAN Support v1.8
[    1.099456] Registering SWP/SWPB emulation handler
[    1.120611] sun4i-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pa not found, using dummy regulator
[    1.130462] sun7i-dwmac 1c50000.ethernet: IRQ eth_wake_irq not found
[    1.136817] sun7i-dwmac 1c50000.ethernet: IRQ eth_lpi not found
[    1.142910] sun7i-dwmac 1c50000.ethernet: PTP uses main clock
[    1.148659] sun7i-dwmac 1c50000.ethernet: no reset control found
[    1.186567] mmc0: host does not support reading read-only switch, assuming write-enable
[    1.196546] mmc0: new high speed SDHC card at address 1234
[    1.203056] mmcblk0: mmc0:1234 SA32G 28.8 GiB 
[    1.209212]  mmcblk0: p1 p2
[    1.270328] sun7i-dwmac 1c50000.ethernet: Version ID not available
[    1.276521] sun7i-dwmac 1c50000.ethernet: 	DWMAC1000
[    1.281520] sun7i-dwmac 1c50000.ethernet: DMA HW capability register supported
[    1.288738] sun7i-dwmac 1c50000.ethernet: Normal descriptors
[    1.294402] sun7i-dwmac 1c50000.ethernet: Ring mode enabled
[    1.300232] libphy: stmmac: probed
[    1.305099] ehci-platform 1c14000.usb: EHCI Host Controller
[    1.310743] ehci-platform 1c14000.usb: new USB bus registered, assigned bus number 1
[    1.318644] ehci-platform 1c14000.usb: irq 33, io mem 0x01c14000
[    1.350030] ehci-platform 1c14000.usb: USB 2.0 started, EHCI 1.00
[    1.356364] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.04
[    1.364651] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.371879] usb usb1: Product: EHCI Host Controller
[    1.376752] usb usb1: Manufacturer: Linux 5.4.143 ehci_hcd
[    1.382241] usb usb1: SerialNumber: 1c14000.usb
[    1.387325] hub 1-0:1.0: USB hub found
[    1.391164] hub 1-0:1.0: 1 port detected
[    1.396088] ehci-platform 1c1c000.usb: EHCI Host Controller
[    1.401728] ehci-platform 1c1c000.usb: new USB bus registered, assigned bus number 2
[    1.409625] ehci-platform 1c1c000.usb: irq 38, io mem 0x01c1c000
[    1.440029] ehci-platform 1c1c000.usb: USB 2.0 started, EHCI 1.00
[    1.446343] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.04
[    1.454625] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.461852] usb usb2: Product: EHCI Host Controller
[    1.466726] usb usb2: Manufacturer: Linux 5.4.143 ehci_hcd
[    1.472215] usb usb2: SerialNumber: 1c1c000.usb
[    1.477300] hub 2-0:1.0: USB hub found
[    1.481139] hub 2-0:1.0: 1 port detected
[    1.486048] ohci-platform 1c14400.usb: Generic Platform OHCI controller
[    1.492728] ohci-platform 1c14400.usb: new USB bus registered, assigned bus number 3
[    1.500683] ohci-platform 1c14400.usb: irq 34, io mem 0x01c14400
[    1.574234] usb usb3: New USB device found, idVendor=1d6b, idProduct=0001, bcdDevice= 5.04
[    1.582517] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.589731] usb usb3: Product: Generic Platform OHCI controller
[    1.595655] usb usb3: Manufacturer: Linux 5.4.143 ohci_hcd
[    1.601144] usb usb3: SerialNumber: 1c14400.usb
[    1.606220] hub 3-0:1.0: USB hub found
[    1.610077] hub 3-0:1.0: 1 port detected
[    1.615088] ALSA device list:
[    1.618065]   No soundcards found.
[    1.628572] VFS: Mounted root (squashfs filesystem) readonly on device 179:2.
[    1.638549] Freeing unused kernel memory: 2048K
[    1.660253] Run /sbin/init as init process
[    1.793914] usb 2-1: new high-speed USB device number 2 using ehci-platform
[    1.945155] init: Console is alive
[    1.948804] init: - watchdog -
[    2.083070] usb 2-1: New USB device found, idVendor=0bda, idProduct=8178, bcdDevice= 2.00
[    2.091422] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    2.098575] usb 2-1: Product: 802.11n WLAN Adapter
[    2.103419] usb 2-1: Manufacturer: Realtek
[    2.107526] usb 2-1: SerialNumber: 00e04c000001
[    2.444481] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    2.515302] ahci-sunxi 1c18000.sata: 1c18000.sata supply ahci not found, using dummy regulator
[    2.524160] ahci-sunxi 1c18000.sata: 1c18000.sata supply phy not found, using dummy regulator
[    2.630074] ahci-sunxi 1c18000.sata: controller can't do PMP, turning off CAP_PMP
[    2.637560] ahci-sunxi 1c18000.sata: forcing PORTS_IMPL to 0x1
[    2.643490] ahci-sunxi 1c18000.sata: AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl platform mode
[    2.652472] ahci-sunxi 1c18000.sata: flags: ncq sntf pm led clo only pio slum part ccc 
[    2.661555] scsi host0: ahci-sunxi
[    2.665470] ata1: SATA max UDMA/133 mmio [mem 0x01c18000-0x01c18fff] port 0x100 irq 37
[    3.001428] ata1: SATA link down (SStatus 0 SControl 300)
[    3.007275] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    3.017277] init: - preinit -
[    3.442458] sun7i-dwmac 1c50000.ethernet eth0: no phy at addr -1
[    3.448478] sun7i-dwmac 1c50000.ethernet eth0: stmmac_open: Cannot attach to PHY (error: -19)
[    4.734464] random: jshn: uninitialized urandom read (4 bytes read)
[    4.762675] random: jshn: uninitialized urandom read (4 bytes read)
[    4.836677] random: jshn: uninitialized urandom read (4 bytes read)
[    4.964561] sun7i-dwmac 1c50000.ethernet eth0: no phy at addr -1
[    4.970633] sun7i-dwmac 1c50000.ethernet eth0: stmmac_open: Cannot attach to PHY (error: -19)
[    9.489767] F2FS-fs (loop0): Mounted with checkpoint version = 6147d0c5
[    9.497723] mount_root: switching to f2fs overlay
[    9.555237] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[    9.574218] urandom-seed: Seeding with /etc/urandom.seed
[    9.636114] procd: - early -
[    9.639103] procd: - watchdog -
[   10.225757] procd: - watchdog -
[   10.280745] procd: - ubus -
[   10.360433] urandom_read: 3 callbacks suppressed
[   10.360443] random: ubusd: uninitialized urandom read (4 bytes read)
[   10.373149] random: ubusd: uninitialized urandom read (4 bytes read)
[   10.379909] random: ubusd: uninitialized urandom read (4 bytes read)
[   10.388126] procd: - init -
[   10.834750] kmodloader: loading kernel modules from /etc/modules.d/*
[   10.848769] urngd: v1.0.2 started.
[   10.919134] random: crng init done
[   10.922681] random: 1 urandom warning(s) missed due to ratelimiting
[   10.986903] Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
[   11.163614] Loading modules backported from Linux version v5.10.42-0-g65859eca4dff
[   11.171285] Backport generated by backports.git v5.10.42-1-0-gbee5c545
[   11.214728] xt_time: kernel timezone is -0000
[   11.272316] PPP generic driver version 2.4.2
[   11.278096] NET: Registered protocol family 24
[   11.293859] wireguard: WireGuard 1.0.0 loaded. See www.wireguard.com for information.
[   11.301805] wireguard: Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
[   11.334562] rtl8192cu: Chip version 0x11
[   11.416323] rtl8192cu: Board Type 0
[   11.420047] rtl_usb: rx_max_size 15360, rx_urb_num 8, in_ep 1
[   11.425888] rtl8192cu: Loading firmware rtlwifi/rtl8192cufw_TMSC.bin
[   11.432355] ieee80211 phy0: Selected rate control algorithm 'rtl_rc'
[   11.434571] usbcore: registered new interface driver rtl8192cu
[   11.481534] kmodloader: done loading kernel modules from /etc/modules.d/*
[   18.392226] sun7i-dwmac 1c50000.ethernet eth0: no phy at addr -1
[   18.398275] sun7i-dwmac 1c50000.ethernet eth0: stmmac_open: Cannot attach to PHY (error: -19)
[   18.421261] br-lan: port 1(eth0.1) entered blocking state
[   18.426719] br-lan: port 1(eth0.1) entered disabled state
[   18.432539] device eth0.1 entered promiscuous mode
[   31.850044] vcc3v0: disabling
[   31.853036] vcc5v0: disabling
[   31.856018] usb0-vbus: disabling

Please apply the attached patch to your OpenWrt tree and build again. This should result in the Broadcom BCM53xxx switch being detected during boot and lan1...4 and wan network interfaces should appear.

https://patchwork.ozlabs.org/project/openwrt/patch/YTve5pCYUcn1vT7I@makrotopia.org/

Thanks a lot! If you don't mind, could you give me a brief instruction on how to apply the patch, after having cloned the master branch from git?

I've also pushed the change into my staging tree, so you can do this in you OpenWrt tree:

git fetch https://git.openwrt.org/openwrt/staging/dangole.git
git checkout FETCH_HEAD

Thanks a lot for your reply. I've tried that out, unfortunately still experiencing the same issue.

Please confirm the top commit on your tree is

commit 9ebd323d269bbbac0fb0e39eda60b40f5d9fe5e8 (HEAD -> master, staging/main)
Author: Daniel Golle <daniel@makrotopia.org>
Date:   Fri Sep 10 23:02:15 2021 +0100

    sunxi: bring up DSA b53 switch on Lamobo R1
    
    Build cortexa7 subtarget with DSA driver for MDIO-connected Broadcom
    BCM53xxx switches. This is needed for the Lamobo R1 aka. BananaPi
    BPi-R1 board which comes with such a switch IC.
    
    Remove old swconfig driver from target kernel config as the only board
    using it is now supported by the DSA driver.
    
    No changes to device tree are needed as upstream DTS already got a
    DSA switch definition and we are just using that upstream source.
    
    Update default network config of the Lamobo R1 to create lan bridge
    with all 4 lan ports.
    
    Introduce DEVICE_COMPAT_VERSION for the board to inform users about
    having the re-create their network configuration and add device alias
    as Bananapi BPi-R1 while at it.
    
    Signed-off-by: Daniel Golle <daniel@makrotopia.org>

And please also share dmesg and ifconfig output of the newly build firmware which includes the patch.

Thank you for helping to fix this!

Alright! Thanks a lot in advance.

HEAD is now at 9ebd323d26 sunxi: bring up DSA b53 switch on Lamobo R1

dmesg

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.4.143 (chairman@debian) (gcc version 10.3.0 (OpenWrt GCC 10.3.0 r17502+3-0470159552)) #0 SMP Sun Sep 12 23:19:02 2021
[    0.000000] CPU: ARMv7 Processor [410fc074] revision 4 (ARMv7), cr=30c5387d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Lamobo R1
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] OF: reserved mem: node default-pool compatible matching fail
[    0.000000] On node 0 totalpages: 262144
[    0.000000]   Normal zone: 1728 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 196608 pages, LIFO batch:63
[    0.000000]   HighMem zone: 65536 pages, LIFO batch:15
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: Using PSCI v0.1 Function IDs from DT
[    0.000000] percpu: Embedded 15 pages/cpu s30924 r8192 d22324 u61440
[    0.000000] pcpu-alloc: s30924 r8192 d22324 u61440 alloc=15*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 260416
[    0.000000] Kernel command line: console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes, linear)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] software IO TLB: mapped [mem 0x6b607000-0x6f607000] (64MB)
[    0.000000] Memory: 959444K/1048576K available (6789K kernel code, 422K rwdata, 1808K rodata, 2048K init, 246K bss, 89132K reserved, 0K cma-reserved, 262144K highmem)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu: 	RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=2.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] GIC: Using split EOI/Deactivate mode
[    0.000000] random: get_random_bytes called from start_kernel+0x304/0x4b4 with crng_init=0
[    0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[    0.000007] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.000020] Switching to timer-based delay loop, resolution 41ns
[    0.000437] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000758] clocksource: hstimer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6370868154 ns
[    0.000967] Console: colour dummy device 80x30
[    0.001024] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[    0.001040] pid_max: default: 32768 minimum: 301
[    0.001224] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.001242] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.002199] CPU: Testing write buffer coherency: ok
[    0.002701] /cpus/cpu@0 missing clock-frequency property
[    0.002724] /cpus/cpu@1 missing clock-frequency property
[    0.002736] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.003346] Setting up static identity map for 0x40200000 - 0x40200060
[    0.003497] rcu: Hierarchical SRCU implementation.
[    0.004156] smp: Bringing up secondary CPUs ...
[    0.014939] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.015095] smp: Brought up 1 node, 2 CPUs
[    0.015112] SMP: Total of 2 processors activated (96.00 BogoMIPS).
[    0.015118] CPU: All CPU(s) started in HYP mode.
[    0.015123] CPU: Virtualization extensions available.
[    0.021807] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 4
[    0.022114] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.022141] futex hash table entries: 512 (order: 3, 32768 bytes, linear)
[    0.022385] pinctrl core: initialized pinctrl subsystem
[    0.023684] NET: Registered protocol family 16
[    0.024186] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.025717] No ATAGs?
[    0.055976] SCSI subsystem initialized
[    0.056416] libata version 3.00 loaded.
[    0.056785] usbcore: registered new interface driver usbfs
[    0.056870] usbcore: registered new interface driver hub
[    0.056961] usbcore: registered new device driver usb
[    0.057137] pps_core: LinuxPPS API ver. 1 registered
[    0.057151] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.057183] PTP clock support registered
[    0.057589] Advanced Linux Sound Architecture Driver Initialized.
[    0.057697] workqueue: max_active 576 requested for napi_workq is out of range, clamping between 1 and 512
[    0.059894] clocksource: Switched to clocksource arch_sys_counter
[    0.066899] thermal_sys: Registered thermal governor 'step_wise'
[    0.067480] NET: Registered protocol family 2
[    0.067727] IP idents hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    0.068731] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    0.068778] TCP established hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.068862] TCP bind hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.068990] TCP: Hash tables configured (established 8192 bind 8192)
[    0.069147] UDP hash table entries: 512 (order: 2, 16384 bytes, linear)
[    0.069219] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear)
[    0.069539] NET: Registered protocol family 1
[    0.072925] kvm [1]: vgic interrupt IRQ16
[    0.073036] kvm [1]: Hyp mode initialized successfully
[    0.074609] workingset: timestamp_bits=14 max_order=18 bucket_order=4
[    0.082575] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.082790] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.086598] bounce: pool size: 64 pages
[    0.087676] sun4i-usb-phy 1c13400.phy: Couldn't request ID GPIO
[    0.092015] sun4i-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.106050] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.108022] sun4i-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pb not found, using dummy regulator
[    0.108580] printk: console [ttyS0] disabled
[    0.128809] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 48, base_baud = 1500000) is a U6_16550A
[    0.700483] printk: console [ttyS0] enabled
[    0.705213] sun4i-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-ph not found, using dummy regulator
[    0.737444] 1c28c00.serial: ttyS1 at MMIO 0x1c28c00 (irq = 49, base_baud = 1500000) is a U6_16550A
[    0.746852] sun4i-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pi not found, using dummy regulator
[    0.778972] 1c29c00.serial: ttyS2 at MMIO 0x1c29c00 (irq = 50, base_baud = 1500000) is a U6_16550A
[    0.794916] loop: module loaded
[    0.801036] libphy: Fixed MDIO Bus: probed
[    0.806028] sun4i-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pa not found, using dummy regulator
[    0.815893] sun7i-dwmac 1c50000.ethernet: IRQ eth_wake_irq not found
[    0.822290] sun7i-dwmac 1c50000.ethernet: IRQ eth_lpi not found
[    0.828369] sun7i-dwmac 1c50000.ethernet: PTP uses main clock
[    0.834142] sun7i-dwmac 1c50000.ethernet: no reset control found
[    0.841450] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.847984] ehci-platform: EHCI generic platform driver
[    0.853772] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.860024] ohci-platform: OHCI generic platform driver
[    0.865748] usbcore: registered new interface driver usb-storage
[    0.872116] mousedev: PS/2 mouse device common for all mice
[    0.878693] i2c /dev entries driver
[    0.883308] axp20x-i2c 0-0034: AXP20x variant AXP209 found
[    0.895428] axp20x-gpio axp20x-gpio: DMA mask not set
[    0.902245] axp20x-gpio axp20x-gpio: AXP209 pinctrl and GPIO driver loaded
[    0.917557] input: axp20x-pek as /devices/platform/soc/1c2ac00.i2c/i2c-0/0-0034/axp20x-pek/input/input0
[    0.928124] vdd-rtc: supplied by regulator-dummy
[    0.933639] avcc: supplied by regulator-dummy
[    0.939371] ldo3: supplied by regulator-dummy
[    0.944066] ldo4: supplied by regulator-dummy
[    0.949158] ldo5: supplied by regulator-dummy
[    0.954114] vdd-cpu: supplied by regulator-dummy
[    0.959512] vdd-int-dll: supplied by regulator-dummy
[    0.966063] axp20x-i2c 0-0034: AXP20X driver loaded
[    0.972429] axp20x-usb-power-supply axp20x-usb-power-supply: DMA mask not set
[    0.980772] random: fast init done
[    1.000993] sunxi-wdt 1c20c90.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[    1.012578] sun4i-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pf not found, using dummy regulator
[    1.023014] sunxi-mmc 1c0f000.mmc: Got CD GPIO
[    1.052773] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
[    1.061040] sun4i-ss 1c15000.crypto-engine: Die ID 0
[    1.070109] NET: Registered protocol family 10
[    1.075924] Segment Routing with IPv6
[    1.079704] NET: Registered protocol family 17
[    1.084499] can: controller area network core (rev 20170425 abi 9)
[    1.090814] NET: Registered protocol family 29
[    1.095258] 8021q: 802.1Q VLAN Support v1.8
[    1.099550] Registering SWP/SWPB emulation handler
[    1.120587] sun4i-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pa not found, using dummy regulator
[    1.130395] sun7i-dwmac 1c50000.ethernet: IRQ eth_wake_irq not found
[    1.136745] sun7i-dwmac 1c50000.ethernet: IRQ eth_lpi not found
[    1.142840] sun7i-dwmac 1c50000.ethernet: PTP uses main clock
[    1.148588] sun7i-dwmac 1c50000.ethernet: no reset control found
[    1.185031] mmc0: host does not support reading read-only switch, assuming write-enable
[    1.195018] mmc0: new high speed SDHC card at address 1234
[    1.201494] mmcblk0: mmc0:1234 SA32G 28.8 GiB 
[    1.207646]  mmcblk0: p1 p2
[    1.270214] sun7i-dwmac 1c50000.ethernet: Version ID not available
[    1.276408] sun7i-dwmac 1c50000.ethernet: 	DWMAC1000
[    1.281409] sun7i-dwmac 1c50000.ethernet: DMA HW capability register supported
[    1.288627] sun7i-dwmac 1c50000.ethernet: Normal descriptors
[    1.294295] sun7i-dwmac 1c50000.ethernet: Ring mode enabled
[    1.300143] libphy: stmmac: probed
[    1.305271] b53_common: found switch: BCM53125, rev 4
[    1.310403] bcm53xx stmmac-0:1e: failed to register switch: -517
[    1.317919] ehci-platform 1c14000.usb: EHCI Host Controller
[    1.323565] ehci-platform 1c14000.usb: new USB bus registered, assigned bus number 1
[    1.331486] ehci-platform 1c14000.usb: irq 33, io mem 0x01c14000
[    1.359904] ehci-platform 1c14000.usb: USB 2.0 started, EHCI 1.00
[    1.366234] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.04
[    1.374522] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.381750] usb usb1: Product: EHCI Host Controller
[    1.386623] usb usb1: Manufacturer: Linux 5.4.143 ehci_hcd
[    1.392112] usb usb1: SerialNumber: 1c14000.usb
[    1.397178] hub 1-0:1.0: USB hub found
[    1.401020] hub 1-0:1.0: 1 port detected
[    1.405935] ehci-platform 1c1c000.usb: EHCI Host Controller
[    1.411572] ehci-platform 1c1c000.usb: new USB bus registered, assigned bus number 2
[    1.419474] ehci-platform 1c1c000.usb: irq 38, io mem 0x01c1c000
[    1.449915] ehci-platform 1c1c000.usb: USB 2.0 started, EHCI 1.00
[    1.456225] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.04
[    1.464506] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.471734] usb usb2: Product: EHCI Host Controller
[    1.476607] usb usb2: Manufacturer: Linux 5.4.143 ehci_hcd
[    1.482096] usb usb2: SerialNumber: 1c1c000.usb
[    1.487155] hub 2-0:1.0: USB hub found
[    1.490992] hub 2-0:1.0: 1 port detected
[    1.495878] ohci-platform 1c14400.usb: Generic Platform OHCI controller
[    1.502555] ohci-platform 1c14400.usb: new USB bus registered, assigned bus number 3
[    1.510507] ohci-platform 1c14400.usb: irq 34, io mem 0x01c14400
[    1.584105] usb usb3: New USB device found, idVendor=1d6b, idProduct=0001, bcdDevice= 5.04
[    1.592387] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.599602] usb usb3: Product: Generic Platform OHCI controller
[    1.605528] usb usb3: Manufacturer: Linux 5.4.143 ohci_hcd
[    1.611017] usb usb3: SerialNumber: 1c14400.usb
[    1.616130] hub 3-0:1.0: USB hub found
[    1.619966] hub 3-0:1.0: 1 port detected
[    1.625994] b53_common: found switch: BCM53125, rev 4
[    1.715041] libphy: dsa slave smi: probed
[    1.719697] bcm53xx stmmac-0:1e lan2 (uninitialized): PHY [dsa-0.0:00] driver [Generic PHY]
[    1.729525] bcm53xx stmmac-0:1e lan3 (uninitialized): PHY [dsa-0.0:01] driver [Generic PHY]
[    1.739359] bcm53xx stmmac-0:1e lan4 (uninitialized): PHY [dsa-0.0:02] driver [Generic PHY]
[    1.749159] bcm53xx stmmac-0:1e wan (uninitialized): PHY [dsa-0.0:03] driver [Generic PHY]
[    1.758896] bcm53xx stmmac-0:1e lan1 (uninitialized): PHY [dsa-0.0:04] driver [Generic PHY]
[    1.772108] bcm53xx stmmac-0:1e: Using legacy PHYLIB callbacks. Please migrate to PHYLINK!
[    1.779942] usb 2-1: new high-speed USB device number 2 using ehci-platform
[    1.790126] bcm53xx stmmac-0:1e: Configured port 8 for rgmii-txid
[    1.800788] DSA: tree 0 setup
[    1.804395] ALSA device list:
[    1.807389]   No soundcards found.
[    1.817636] VFS: Mounted root (squashfs filesystem) readonly on device 179:2.
[    1.827600] Freeing unused kernel memory: 2048K
[    1.860144] Run /sbin/init as init process
[    2.042800] usb 2-1: New USB device found, idVendor=0bda, idProduct=8178, bcdDevice= 2.00
[    2.051092] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    2.058231] usb 2-1: Product: 802.11n WLAN Adapter
[    2.063045] usb 2-1: Manufacturer: Realtek
[    2.067146] usb 2-1: SerialNumber: 00e04c000001
[    2.165132] init: Console is alive
[    2.168774] init: - watchdog -
[    2.508959] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    2.581031] ahci-sunxi 1c18000.sata: 1c18000.sata supply ahci not found, using dummy regulator
[    2.589785] ahci-sunxi 1c18000.sata: 1c18000.sata supply phy not found, using dummy regulator
[    2.689921] ahci-sunxi 1c18000.sata: controller can't do PMP, turning off CAP_PMP
[    2.697408] ahci-sunxi 1c18000.sata: forcing PORTS_IMPL to 0x1
[    2.703330] ahci-sunxi 1c18000.sata: AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl platform mode
[    2.712304] ahci-sunxi 1c18000.sata: flags: ncq sntf pm led clo only pio slum part ccc 
[    2.721450] scsi host0: ahci-sunxi
[    2.725382] ata1: SATA max UDMA/133 mmio [mem 0x01c18000-0x01c18fff] port 0x100 irq 37
[    3.061269] ata1: SATA link down (SStatus 0 SControl 300)
[    3.067047] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    3.080854] init: - preinit -
[    3.486533] sun7i-dwmac 1c50000.ethernet eth0: No Safety Features support found
[    3.494028] sun7i-dwmac 1c50000.ethernet eth0: RX IPC Checksum Offload disabled
[    3.501357] sun7i-dwmac 1c50000.ethernet eth0: No MAC Management Counters available
[    3.509008] sun7i-dwmac 1c50000.ethernet eth0: PTP not supported by HW
[    3.515548] sun7i-dwmac 1c50000.ethernet eth0: configuring for fixed/rgmii link mode
[    3.524809] sun7i-dwmac 1c50000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
[    3.536197] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[    4.621477] random: jshn: uninitialized urandom read (4 bytes read)
[    4.650042] random: jshn: uninitialized urandom read (4 bytes read)
[    4.679185] random: jshn: uninitialized urandom read (4 bytes read)
[    4.806453] bcm53xx stmmac-0:1e lan1: configuring for phy/gmii link mode
[    4.813487] 8021q: adding VLAN 0 to HW filter on device lan1
[    9.002838] urandom_read: 4 callbacks suppressed
[    9.002850] random: procd: uninitialized urandom read (4 bytes read)
[    9.031662] mount_root: overlay filesystem in /dev/loop0 has not been formatted yet
[    9.173975] random: mkfs.f2fs: uninitialized urandom read (16 bytes read)
[   10.088545] random: crng init done
[   13.452451] F2FS-fs (loop0): Found nat_bits in checkpoint
[   13.484402] F2FS-fs (loop0): Mounted with checkpoint version = 6147d0b5
[   13.491921] mount_root: overlay filesystem has not been fully initialized yet
[   13.499545] mount_root: switching to f2fs overlay
[   13.600768] urandom-seed: Seed file not found (/etc/urandom.seed)
[   13.706346] procd: - early -
[   13.709331] procd: - watchdog -
[   14.296785] procd: - watchdog -
[   14.352752] procd: - ubus -
[   14.432463] procd: - init -
[   14.883153] urngd: v1.0.2 started.
[   14.887611] kmodloader: loading kernel modules from /etc/modules.d/*
[   15.064175] Loading modules backported from Linux version v5.10.42-0-g65859eca4dff
[   15.071820] Backport generated by backports.git v5.10.42-1-0-gbee5c545
[   15.103952] xt_time: kernel timezone is -0000
[   15.154673] PPP generic driver version 2.4.2
[   15.161380] NET: Registered protocol family 24
[   15.188778] rtl8192cu: Chip version 0x11
[   15.275299] rtl8192cu: Board Type 0
[   15.279025] rtl_usb: rx_max_size 15360, rx_urb_num 8, in_ep 1
[   15.284899] rtl8192cu: Loading firmware rtlwifi/rtl8192cufw_TMSC.bin
[   15.291368] ieee80211 phy0: Selected rate control algorithm 'rtl_rc'
[   15.293508] usbcore: registered new interface driver rtl8192cu
[   15.331380] kmodloader: done loading kernel modules from /etc/modules.d/*
[   26.076379] sun7i-dwmac 1c50000.ethernet eth0: Link is Down
[   26.087998] sun7i-dwmac 1c50000.ethernet eth0: No Safety Features support found
[   26.095524] sun7i-dwmac 1c50000.ethernet eth0: RX IPC Checksum Offload disabled
[   26.102938] sun7i-dwmac 1c50000.ethernet eth0: No MAC Management Counters available
[   26.110677] sun7i-dwmac 1c50000.ethernet eth0: PTP not supported by HW
[   26.117244] sun7i-dwmac 1c50000.ethernet eth0: configuring for fixed/rgmii link mode
[   26.125168] sun7i-dwmac 1c50000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
[   26.147694] bcm53xx stmmac-0:1e lan1: configuring for phy/gmii link mode
[   26.156993] 8021q: adding VLAN 0 to HW filter on device lan1
[   26.194408] br-lan: port 1(lan1) entered blocking state
[   26.199698] br-lan: port 1(lan1) entered disabled state
[   26.210968] device lan1 entered promiscuous mode
[   26.215654] device eth0 entered promiscuous mode
[   26.245133] bcm53xx stmmac-0:1e lan2: configuring for phy/gmii link mode
[   26.252445] 8021q: adding VLAN 0 to HW filter on device lan2
[   26.256271] bcm53xx stmmac-0:1e lan2: Link is Up - 1Gbps/Full - flow control rx/tx
[   26.280146] br-lan: port 2(lan2) entered blocking state
[   26.285392] br-lan: port 2(lan2) entered disabled state
[   26.313184] device lan2 entered promiscuous mode
[   26.318988] br-lan: port 2(lan2) entered blocking state
[   26.324305] br-lan: port 2(lan2) entered forwarding state
[   26.337402] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   26.374677] bcm53xx stmmac-0:1e lan3: configuring for phy/gmii link mode
[   26.382580] 8021q: adding VLAN 0 to HW filter on device lan3
[   26.417020] br-lan: port 3(lan3) entered blocking state
[   26.422465] br-lan: port 3(lan3) entered disabled state
[   26.440284] device lan3 entered promiscuous mode
[   26.476781] bcm53xx stmmac-0:1e lan4: configuring for phy/gmii link mode
[   26.489038] 8021q: adding VLAN 0 to HW filter on device lan4
[   26.520969] br-lan: port 4(lan4) entered blocking state
[   26.526242] br-lan: port 4(lan4) entered disabled state
[   26.543898] device lan4 entered promiscuous mode
[   26.580775] bcm53xx stmmac-0:1e wan: configuring for phy/gmii link mode
[   26.588451] 8021q: adding VLAN 0 to HW filter on device wan
[   31.849908] vcc3v0: disabling
[   31.852899] vcc5v0: disabling
[   31.855883] usb0-vbus: disabling

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 mq state UP qlen 1000
    link/ether 02:90:0b:81:b4:da brd ff:ff:ff:ff:ff:ff
    inet6 fe80::90:bff:fe81:b4da/64 scope link 
       valid_lft forever preferred_lft forever
3: lan2@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP qlen 1000
    link/ether 02:90:0b:81:b4:da brd ff:ff:ff:ff:ff:ff
4: lan3@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master br-lan state LOWERLAYERDOWN qlen 1000
    link/ether 02:90:0b:81:b4:da brd ff:ff:ff:ff:ff:ff
5: lan4@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master br-lan state LOWERLAYERDOWN qlen 1000
    link/ether 02:90:0b:81:b4:da brd ff:ff:ff:ff:ff:ff
6: wan@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state LOWERLAYERDOWN qlen 1000
    link/ether 02:90:0b:81:b4:da brd ff:ff:ff:ff:ff:ff
7: lan1@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master br-lan state LOWERLAYERDOWN qlen 1000
    link/ether 02:90:0b:81:b4:da brd ff:ff:ff:ff:ff:ff
8: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether 3c:33:00:bd:a9:ae 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 02:90:0b:81:b4:da 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 fd66:8835:aa26::1/60 scope global noprefixroute 
       valid_lft forever preferred_lft forever
    inet6 fe80::90:bff:fe81:b4da/64 scope link 
       valid_lft forever preferred_lft forever

ifconfig

br-lan    Link encap:Ethernet  HWaddr 02:90:0B:81:B4:DA  
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fd66:8835:aa26::1/60 Scope:Global
          inet6 addr: fe80::90:bff:fe81:b4da/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:2180 (2.1 KiB)

eth0      Link encap:Ethernet  HWaddr 02:90:0B:81:B4:DA  
          inet6 addr: fe80::90:bff:fe81:b4da/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:139 errors:0 dropped:0 overruns:0 frame:0
          TX packets:32 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:23470 (22.9 KiB)  TX bytes:4152 (4.0 KiB)
          Interrupt:60 

lan1      Link encap:Ethernet  HWaddr 02:90:0B:81:B4:DA  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lan2      Link encap:Ethernet  HWaddr 02:90:0B:81:B4:DA  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:2180 (2.1 KiB)

lan3      Link encap:Ethernet  HWaddr 02:90:0B:81:B4:DA  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lan4      Link encap:Ethernet  HWaddr 02:90:0B:81:B4:DA  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:448 errors:0 dropped:0 overruns:0 frame:0
          TX packets:448 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:34944 (34.1 KiB)  TX bytes:34944 (34.1 KiB)

wan       Link encap:Ethernet  HWaddr 02:90:0B:81:B4:DA  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

Even with static IP addressing nor reachability.

I hope this helps :slight_smile:

The logs already look pretty good, the bcm53xx switch is being detected and 4 lan ports and wan port is added and link state seems to work.
However, there are 0 RX packets total on all switch ports while eth0 got 139 packets, so something is still wrong with DSA.

Please tcpdump -vvv -i eth0 so first of all we will see what's going on there. Also would be interesting to know if TX sent out on any of the ports is actually sent or not (so we know if only RX is broken or both ways are).

I also wonder if you could try other OS with recent kernel on this board (e.g. armbian) and see how Ethernet ports are setup -- because the DSA switch description was added a long time ago in 2016 already:

Maybe @ffainelli can help us to understand why it doesn't work with OpenWrt now that we are using the driver from vanilla Linux (and have dropped swconfig)...

5.4 does not enable Broadcom tags that was done with commit 8fab459e69abfd04a66d76423d18ba853fced4ab upstream. This means that you should be configuring a a VLAN aware (vlan_filtering=1) br-lan bridge which has all of the LAN and WAN ports included in that bridge in order to push a VLAN configuration. Then you will need to create two (or more) separate VLANs to isolate the LAN and WAN traffic. There won't be any traffic coming and/out of the br-lan interface because of the lack of Broadcom tags, all of the traffic will be on eth0.1 and/or eth0.2 which are responsible for "terminating" VLAN traffic. This is highly undesirable and it was fixed later on.

If you can move to a later kernel like 5.10, then Broadcom tags are enabled by default and you should be able to use br-lan in a "normal" way, that is, assign it an IP address and be able to get traffic. In that scenario, you only need to add the LAN ports to the bridge and leave the WAN interface alone.

I will turn on my Lamobo R1 tonight to make sure nothing is badly broken with 5.4, 5.10 and current upstream.

As it sounded like moving to Linux 5.10 can just solve all our problems, I've updated my staging tree to build Linux 5.10 for the sunxi target and briefly run-tested on another Cortex-A7-based device. Looks like it works all fine.

Please re-fetch my staging tree:

git fetch https://git.openwrt.org/openwrt/staging/dangole.git
git checkout FETCH_HEAD

and also switch on experimental kernel in menuconfig:

Hey friends! Thanks for the advice. Using the 5.10 testing kernel and using the staging tree from @daniel it's working fine now!

dmesg

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.10.64 (chairman@debian) (arm-openwrt-linux-muslgnueabi-gcc (OpenWrt GCC 10.3.0 r17520+4-5ef4608c02) 10.3.0, GNU ld (GNU Binutils) 2.36.1) #0 SMP Tue Sep 14 23:55:13 2021
[    0.000000] CPU: ARMv7 Processor [410fc074] revision 4 (ARMv7), cr=30c5387d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: Lamobo R1
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] OF: reserved mem: node default-pool compatible matching fail
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000040000000-0x000000006fffffff]
[    0.000000]   HighMem  [mem 0x0000000070000000-0x000000007fffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000040000000-0x000000007fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x000000007fffffff]
[    0.000000] On node 0 totalpages: 262144
[    0.000000]   Normal zone: 1728 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 196608 pages, LIFO batch:63
[    0.000000]   HighMem zone: 65536 pages, LIFO batch:15
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: Using PSCI v0.1 Function IDs from DT
[    0.000000] percpu: Embedded 15 pages/cpu s30604 r8192 d22644 u61440
[    0.000000] pcpu-alloc: s30604 r8192 d22644 u61440 alloc=15*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 260416
[    0.000000] Kernel command line: console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait
[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes, linear)
[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] software IO TLB: mapped [mem 0x000000006b607000-0x000000006f607000] (64MB)
[    0.000000] Memory: 959040K/1048576K available (7246K kernel code, 820K rwdata, 1916K rodata, 2048K init, 253K bss, 89536K reserved, 0K cma-reserved, 262144K highmem)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu: 	RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=2.
[    0.000000] 	Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] GIC: Using split EOI/Deactivate mode
[    0.000000] random: get_random_bytes called from start_kernel+0x368/0x514 with crng_init=0
[    0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[    0.000008] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[    0.000022] Switching to timer-based delay loop, resolution 41ns
[    0.000436] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000752] clocksource: hstimer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6370868154 ns
[    0.000970] Console: colour dummy device 80x30
[    0.001032] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[    0.001056] pid_max: default: 32768 minimum: 301
[    0.001219] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.001239] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.002275] CPU: Testing write buffer coherency: ok
[    0.002650] /cpus/cpu@0 missing clock-frequency property
[    0.002682] /cpus/cpu@1 missing clock-frequency property
[    0.002697] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.003406] Setting up static identity map for 0x40200000 - 0x40200060
[    0.003562] rcu: Hierarchical SRCU implementation.
[    0.003754] dyndbg: Ignore empty _ddebug table in a CONFIG_DYNAMIC_DEBUG_CORE build
[    0.004169] smp: Bringing up secondary CPUs ...
[    0.014959] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.015129] smp: Brought up 1 node, 2 CPUs
[    0.015153] SMP: Total of 2 processors activated (96.00 BogoMIPS).
[    0.015162] CPU: All CPU(s) started in HYP mode.
[    0.015169] CPU: Virtualization extensions available.
[    0.022086] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 4
[    0.022434] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.022466] futex hash table entries: 512 (order: 3, 32768 bytes, linear)
[    0.022724] pinctrl core: initialized pinctrl subsystem
[    0.024220] NET: Registered protocol family 16
[    0.024779] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.026406] thermal_sys: Registered thermal governor 'step_wise'
[    0.026835] No ATAGs?
[    0.082815] SCSI subsystem initialized
[    0.084186] libata version 3.00 loaded.
[    0.084574] usbcore: registered new interface driver usbfs
[    0.084661] usbcore: registered new interface driver hub
[    0.084753] usbcore: registered new device driver usb
[    0.085275] pps_core: LinuxPPS API ver. 1 registered
[    0.085296] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.085329] PTP clock support registered
[    0.085760] Advanced Linux Sound Architecture Driver Initialized.
[    0.090186] clocksource: Switched to clocksource arch_sys_counter
[    0.096600] NET: Registered protocol family 2
[    0.096934] IP idents hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    0.098362] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    0.098448] TCP established hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.098534] TCP bind hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.098666] TCP: Hash tables configured (established 8192 bind 8192)
[    0.098871] UDP hash table entries: 512 (order: 2, 16384 bytes, linear)
[    0.098969] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear)
[    0.099379] NET: Registered protocol family 1
[    0.109292] workingset: timestamp_bits=14 max_order=18 bucket_order=4
[    0.114360] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.114491] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.115613] bounce: pool size: 64 pages
[    0.116779] sun4i-usb-phy 1c13400.phy: Couldn't request ID GPIO
[    0.121043] sun4i-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[    0.136559] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[    0.138876] sun4i-pinctrl 1c20800.pinctrl: supply vcc-pb not found, using dummy regulator
[    0.139651] printk: console [ttyS0] disabled
[    0.139790] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 56, base_baud = 1500000) is a 16550A
[    0.751768] printk: console [ttyS0] enabled
[    0.756695] sun4i-pinctrl 1c20800.pinctrl: supply vcc-ph not found, using dummy regulator
[    0.765614] 1c28c00.serial: ttyS1 at MMIO 0x1c28c00 (irq = 57, base_baud = 1500000) is a 16550A
[    0.775027] sun4i-pinctrl 1c20800.pinctrl: supply vcc-pi not found, using dummy regulator
[    0.783882] 1c29c00.serial: ttyS2 at MMIO 0x1c29c00 (irq = 58, base_baud = 1500000) is a 16550A
[    0.801958] loop: module loaded
[    0.809168] libphy: Fixed MDIO Bus: probed
[    0.814609] sun4i-pinctrl 1c20800.pinctrl: supply vcc-pa not found, using dummy regulator
[    0.823110] sun7i-dwmac 1c50000.ethernet: IRQ eth_wake_irq not found
[    0.829475] sun7i-dwmac 1c50000.ethernet: IRQ eth_lpi not found
[    0.835606] sun7i-dwmac 1c50000.ethernet: PTP uses main clock
[    0.841384] sun7i-dwmac 1c50000.ethernet: no reset control found
[    0.848950] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.855564] ehci-platform: EHCI generic platform driver
[    0.861460] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.867685] ohci-platform: OHCI generic platform driver
[    0.873492] usbcore: registered new interface driver usb-storage
[    0.880396] mousedev: PS/2 mouse device common for all mice
[    0.887084] i2c /dev entries driver
[    0.892095] axp20x-i2c 0-0034: AXP20x variant AXP209 found
[    0.904332] axp20x-gpio axp20x-gpio: DMA mask not set
[    0.911328] axp20x-gpio axp20x-gpio: AXP209 pinctrl and GPIO driver loaded
[    0.918801] input: axp20x-pek as /devices/platform/soc/1c2ac00.i2c/i2c-0/0-0034/axp20x-pek/input/input0
[    0.937572] vdd-rtc: supplied by regulator-dummy
[    0.943151] avcc: supplied by regulator-dummy
[    0.949007] ldo3: supplied by regulator-dummy
[    0.953801] ldo4: supplied by regulator-dummy
[    0.958921] ldo5: supplied by regulator-dummy
[    0.963932] vdd-cpu: supplied by regulator-dummy
[    0.969403] vdd-int-dll: supplied by regulator-dummy
[    0.976766] axp20x-i2c 0-0034: AXP20X driver loaded
[    0.983492] axp20x-usb-power-supply axp20x-usb-power-supply: DMA mask not set
[    0.991908] random: fast init done
[    1.012471] sunxi-wdt 1c20c90.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[    1.026200] sun4i-pinctrl 1c20800.pinctrl: supply vcc-pf not found, using dummy regulator
[    1.026807] sun4i-ss 1c15000.crypto-engine: Die ID 0
[    1.037076] sunxi-mmc 1c0f000.mmc: Got CD GPIO
[    1.048083] NET: Registered protocol family 10
[    1.053840] Segment Routing with IPv6
[    1.057618] NET: Registered protocol family 17
[    1.062438] can: controller area network core
[    1.066876] NET: Registered protocol family 29
[    1.071387] 8021q: 802.1Q VLAN Support v1.8
[    1.075713] Registering SWP/SWPB emulation handler
[    1.080245] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
[    1.098017] sun4i-pinctrl 1c20800.pinctrl: supply vcc-pa not found, using dummy regulator
[    1.106508] sun7i-dwmac 1c50000.ethernet: IRQ eth_wake_irq not found
[    1.112905] sun7i-dwmac 1c50000.ethernet: IRQ eth_lpi not found
[    1.119006] sun7i-dwmac 1c50000.ethernet: PTP uses main clock
[    1.123837] mmc0: host does not support reading read-only switch, assuming write-enable
[    1.124775] sun7i-dwmac 1c50000.ethernet: no reset control found
[    1.134718] mmc0: new high speed SDHC card at address 1234
[    1.145849] mmcblk0: mmc0:1234 SA32G 28.8 GiB 
[    1.152198]  mmcblk0: p1 p2
[    1.250309] sun7i-dwmac 1c50000.ethernet: Version ID not available
[    1.256517] sun7i-dwmac 1c50000.ethernet: 	DWMAC1000
[    1.261531] sun7i-dwmac 1c50000.ethernet: DMA HW capability register supported
[    1.268749] sun7i-dwmac 1c50000.ethernet: Normal descriptors
[    1.274419] sun7i-dwmac 1c50000.ethernet: Ring mode enabled
[    1.280668] libphy: stmmac: probed
[    1.285928] bcm53xx stmmac-0:1e: found switch: BCM53125, rev 4
[    1.291872] bcm53xx stmmac-0:1e: failed to register switch: -517
[    1.300686] ehci-platform 1c14000.usb: EHCI Host Controller
[    1.306328] ehci-platform 1c14000.usb: new USB bus registered, assigned bus number 1
[    1.314302] ehci-platform 1c14000.usb: irq 41, io mem 0x01c14000
[    1.350005] ehci-platform 1c14000.usb: USB 2.0 started, EHCI 1.00
[    1.356340] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.10
[    1.364639] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.371866] usb usb1: Product: EHCI Host Controller
[    1.376739] usb usb1: Manufacturer: Linux 5.10.64 ehci_hcd
[    1.382235] usb usb1: SerialNumber: 1c14000.usb
[    1.387386] hub 1-0:1.0: USB hub found
[    1.391235] hub 1-0:1.0: 1 port detected
[    1.396532] ehci-platform 1c1c000.usb: EHCI Host Controller
[    1.402215] ehci-platform 1c1c000.usb: new USB bus registered, assigned bus number 2
[    1.410163] ehci-platform 1c1c000.usb: irq 46, io mem 0x01c1c000
[    1.439995] ehci-platform 1c1c000.usb: USB 2.0 started, EHCI 1.00
[    1.446334] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.10
[    1.454616] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.461841] usb usb2: Product: EHCI Host Controller
[    1.466716] usb usb2: Manufacturer: Linux 5.10.64 ehci_hcd
[    1.472205] usb usb2: SerialNumber: 1c1c000.usb
[    1.477325] hub 2-0:1.0: USB hub found
[    1.481208] hub 2-0:1.0: 1 port detected
[    1.486478] ohci-platform 1c14400.usb: Generic Platform OHCI controller
[    1.493185] ohci-platform 1c14400.usb: new USB bus registered, assigned bus number 3
[    1.501158] ohci-platform 1c14400.usb: irq 42, io mem 0x01c14400
[    1.574191] usb usb3: New USB device found, idVendor=1d6b, idProduct=0001, bcdDevice= 5.10
[    1.582489] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.589703] usb usb3: Product: Generic Platform OHCI controller
[    1.595631] usb usb3: Manufacturer: Linux 5.10.64 ohci_hcd
[    1.601122] usb usb3: SerialNumber: 1c14400.usb
[    1.606244] hub 3-0:1.0: USB hub found
[    1.610114] hub 3-0:1.0: 1 port detected
[    1.615532] usb_phy_generic usb_phy_generic.0.auto: supply vcc not found, using dummy regulator
[    1.625606] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[    1.631494] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 4
[    1.639676] usb usb4: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.10
[    1.648002] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.655247] usb usb4: Product: MUSB HDRC host driver
[    1.660224] usb usb4: Manufacturer: Linux 5.10.64 musb-hcd
[    1.665706] usb usb4: SerialNumber: musb-hdrc.1.auto
[    1.671305] hub 4-0:1.0: USB hub found
[    1.675138] hub 4-0:1.0: 1 port detected
[    1.682311] bcm53xx stmmac-0:1e: found switch: BCM53125, rev 4
[    1.777192] libphy: dsa slave smi: probed
[    1.780092] usb 2-1: new high-speed USB device number 2 using ehci-platform
[    1.783669] bcm53xx stmmac-0:1e lan2 (uninitialized): PHY [dsa-0.0:00] driver [Generic PHY] (irq=POLL)
[    1.800036] bcm53xx stmmac-0:1e lan3 (uninitialized): PHY [dsa-0.0:01] driver [Generic PHY] (irq=POLL)
[    1.811913] bcm53xx stmmac-0:1e lan4 (uninitialized): PHY [dsa-0.0:02] driver [Generic PHY] (irq=POLL)
[    1.823793] bcm53xx stmmac-0:1e wan (uninitialized): PHY [dsa-0.0:03] driver [Generic PHY] (irq=POLL)
[    1.835524] bcm53xx stmmac-0:1e lan1 (uninitialized): PHY [dsa-0.0:04] driver [Generic PHY] (irq=POLL)
[    1.849941] bcm53xx stmmac-0:1e: Using legacy PHYLIB callbacks. Please migrate to PHYLINK!
[    1.861120] bcm53xx stmmac-0:1e: Configured port 8 for rgmii-txid
[    1.868102] DSA: tree 0 setup
[    1.871819] ALSA device list:
[    1.874807]   No soundcards found.
[    1.886011] VFS: Mounted root (squashfs filesystem) readonly on device 179:2.
[    1.896017] Freeing unused kernel memory: 2048K
[    1.930278] Run /sbin/init as init process
[    1.934382]   with arguments:
[    1.934388]     /sbin/init
[    1.934392]     earlyprintk
[    1.934397]   with environment:
[    1.934401]     HOME=/
[    1.934405]     TERM=linux
[    1.981982] usb 2-1: New USB device found, idVendor=0bda, idProduct=8178, bcdDevice= 2.00
[    1.990221] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    1.997379] usb 2-1: Product: 802.11n WLAN Adapter
[    2.002220] usb 2-1: Manufacturer: Realtek
[    2.006335] usb 2-1: SerialNumber: 00e04c000001
[    2.196996] init: Console is alive
[    2.200811] init: - watchdog -
[    2.541989] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    2.613415] ahci-sunxi 1c18000.sata: supply ahci not found, using dummy regulator
[    2.621268] ahci-sunxi 1c18000.sata: supply phy not found, using dummy regulator
[    2.720029] ahci-sunxi 1c18000.sata: controller can't do PMP, turning off CAP_PMP
[    2.727529] ahci-sunxi 1c18000.sata: forcing PORTS_IMPL to 0x1
[    2.733449] ahci-sunxi 1c18000.sata: AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl platform mode
[    2.742421] ahci-sunxi 1c18000.sata: flags: ncq sntf pm led clo only pio slum part ccc 
[    2.751870] scsi host0: ahci-sunxi
[    2.755892] ata1: SATA max UDMA/133 mmio [mem 0x01c18000-0x01c18fff] port 0x100 irq 45
[    3.091396] ata1: SATA link down (SStatus 0 SControl 300)
[    3.097222] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    3.107349] init: - preinit -
[    3.520401] sun7i-dwmac 1c50000.ethernet eth0: No Safety Features support found
[    3.527734] sun7i-dwmac 1c50000.ethernet eth0: RX IPC Checksum Offload disabled
[    3.535101] sun7i-dwmac 1c50000.ethernet eth0: No MAC Management Counters available
[    3.542771] sun7i-dwmac 1c50000.ethernet eth0: PTP not supported by HW
[    3.551806] sun7i-dwmac 1c50000.ethernet eth0: configuring for fixed/rgmii link mode
[    3.560192] sun7i-dwmac 1c50000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
[    3.564957] random: procd: uninitialized urandom read (4 bytes read)
[    4.666952] random: jshn: uninitialized urandom read (4 bytes read)
[    4.695782] random: jshn: uninitialized urandom read (4 bytes read)
[    4.725359] random: jshn: uninitialized urandom read (4 bytes read)
[    4.852646] bcm53xx stmmac-0:1e lan1: configuring for phy/gmii link mode
[    4.859662] 8021q: adding VLAN 0 to HW filter on device lan1
[    9.396906] F2FS-fs (loop0): Mounted with checkpoint version = 6147d0c1
[    9.404931] mount_root: switching to f2fs overlay
[    9.605010] random: crng init done
[    9.608439] random: 4 urandom warning(s) missed due to ratelimiting
[    9.650947] urandom-seed: Seeding with /etc/urandom.seed
[    9.731410] procd: - early -
[    9.734407] procd: - watchdog -
[   10.367877] procd: - watchdog -
[   10.429874] procd: - ubus -
[   10.488014] procd: - init -
[   10.967218] kmodloader: loading kernel modules from /etc/modules.d/*
[   11.025174] urngd: v1.0.2 started.
[   11.108604] Loading modules backported from Linux version v5.10.42-0-g65859eca4dff
[   11.116344] Backport generated by backports.git v5.10.42-1-0-gbee5c545
[   11.148103] xt_time: kernel timezone is -0000
[   11.204434] PPP generic driver version 2.4.2
[   11.209963] NET: Registered protocol family 24
[   11.239725] rtl8192cu: Chip version 0x11
[   11.325975] rtl8192cu: Board Type 0
[   11.329699] rtl_usb: rx_max_size 15360, rx_urb_num 8, in_ep 1
[   11.335553] rtl8192cu: Loading firmware rtlwifi/rtl8192cufw_TMSC.bin
[   11.342000] ieee80211 phy0: Selected rate control algorithm 'rtl_rc'
[   11.344221] usbcore: registered new interface driver rtl8192cu
[   11.352635] kmodloader: done loading kernel modules from /etc/modules.d/*
[   15.877540] sun7i-dwmac 1c50000.ethernet eth0: Link is Down
[   15.896015] sun7i-dwmac 1c50000.ethernet eth0: No Safety Features support found
[   15.903480] sun7i-dwmac 1c50000.ethernet eth0: RX IPC Checksum Offload disabled
[   15.910894] sun7i-dwmac 1c50000.ethernet eth0: No MAC Management Counters available
[   15.918594] sun7i-dwmac 1c50000.ethernet eth0: PTP not supported by HW
[   15.925440] sun7i-dwmac 1c50000.ethernet eth0: configuring for fixed/rgmii link mode
[   15.933744] sun7i-dwmac 1c50000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
[   15.942263] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   15.967417] bcm53xx stmmac-0:1e lan1: configuring for phy/gmii link mode
[   15.975905] 8021q: adding VLAN 0 to HW filter on device lan1
[   16.008558] br-lan: port 1(lan1) entered blocking state
[   16.013951] br-lan: port 1(lan1) entered disabled state
[   16.025742] device lan1 entered promiscuous mode
[   16.030534] device eth0 entered promiscuous mode
[   16.082508] bcm53xx stmmac-0:1e lan2: configuring for phy/gmii link mode
[   16.090925] 8021q: adding VLAN 0 to HW filter on device lan2
[   16.100835] bcm53xx stmmac-0:1e lan2: Link is Up - 1Gbps/Full - flow control rx/tx
[   16.127389] br-lan: port 2(lan2) entered blocking state
[   16.132752] br-lan: port 2(lan2) entered disabled state
[   16.146514] device lan2 entered promiscuous mode
[   16.175394] br-lan: port 2(lan2) entered blocking state
[   16.180721] br-lan: port 2(lan2) entered forwarding state
[   16.208383] bcm53xx stmmac-0:1e lan3: configuring for phy/gmii link mode
[   16.217926] 8021q: adding VLAN 0 to HW filter on device lan3
[   16.245226] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   16.252245] br-lan: port 3(lan3) entered blocking state
[   16.257525] br-lan: port 3(lan3) entered disabled state
[   16.270457] device lan3 entered promiscuous mode
[   16.317729] bcm53xx stmmac-0:1e lan4: configuring for phy/gmii link mode
[   16.324924] 8021q: adding VLAN 0 to HW filter on device lan4
[   16.353755] br-lan: port 4(lan4) entered blocking state
[   16.359039] br-lan: port 4(lan4) entered disabled state
[   16.373958] device lan4 entered promiscuous mode
[   16.427638] bcm53xx stmmac-0:1e wan: configuring for phy/gmii link mode
[   16.437345] 8021q: adding VLAN 0 to HW filter on device wan
[   32.490017] vcc3v0: disabling
[   32.493017] vcc5v0: disabling
[   32.496001] usb0-vbus: disabling

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 1504 qdisc mq state UP qlen 1000
    link/ether 02:90:0b:81:b4:da brd ff:ff:ff:ff:ff:ff
    inet6 fe80::90:bff:fe81:b4da/64 scope link 
       valid_lft forever preferred_lft forever
3: lan2@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP qlen 1000
    link/ether 02:90:0b:81:b4:da brd ff:ff:ff:ff:ff:ff
4: lan3@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master br-lan state LOWERLAYERDOWN qlen 1000
    link/ether 02:90:0b:81:b4:da brd ff:ff:ff:ff:ff:ff
5: lan4@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master br-lan state LOWERLAYERDOWN qlen 1000
    link/ether 02:90:0b:81:b4:da brd ff:ff:ff:ff:ff:ff
6: wan@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state LOWERLAYERDOWN qlen 1000
    link/ether 02:90:0b:81:b4:da brd ff:ff:ff:ff:ff:ff
7: lan1@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master br-lan state LOWERLAYERDOWN qlen 1000
    link/ether 02:90:0b:81:b4:da brd ff:ff:ff:ff:ff:ff
8: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether 3c:33:00:bd:a9:ae 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 02:90:0b:81:b4:da 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 fd66:8835:aa26::1/60 scope global noprefixroute 
       valid_lft forever preferred_lft forever
    inet6 fe80::90:bff:fe81:b4da/64 scope link 
       valid_lft forever preferred_lft forever

ifconfig

br-lan    Link encap:Ethernet  HWaddr 02:90:0B:81:B4:DA  
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fd66:8835:aa26::1/60 Scope:Global
          inet6 addr: fe80::90:bff:fe81:b4da/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3550 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3813 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:447119 (436.6 KiB)  TX bytes:1412241 (1.3 MiB)

eth0      Link encap:Ethernet  HWaddr 02:90:0B:81:B4:DA  
          inet6 addr: fe80::90:bff:fe81:b4da/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1504  Metric:1
          RX packets:3575 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3827 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:527569 (515.2 KiB)  TX bytes:1429291 (1.3 MiB)
          Interrupt:68 

lan1      Link encap:Ethernet  HWaddr 02:90:0B:81:B4:DA  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lan2      Link encap:Ethernet  HWaddr 02:90:0B:81:B4:DA  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3575 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3813 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:448919 (438.3 KiB)  TX bytes:1412241 (1.3 MiB)

lan3      Link encap:Ethernet  HWaddr 02:90:0B:81:B4:DA  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lan4      Link encap:Ethernet  HWaddr 02:90:0B:81:B4:DA  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:618 errors:0 dropped:0 overruns:0 frame:0
          TX packets:618 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:57477 (56.1 KiB)  TX bytes:57477 (56.1 KiB)

wan       Link encap:Ethernet  HWaddr 02:90:0B:81:B4:DA  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)



1 Like

Thank you for reporting back, I will push testing support for 5.10 to the main tree now.
@ffainelli Can you name the commits we need to backport for the switch to work with Linux 5.4 (because that should then go into the 21.02 branch as well)?

Great to see that 5.10 works! For 5.4 you would want to back port the following upstream commits:

d965a5432d4c net: dsa: b53: Ensure the default VID is untagged
df373702bc0f net: dsa: b53: Always use dev->vlan_enabled in b53_configure_vlan()
8fab459e69ab net: dsa: b53: Enable Broadcom tags for 531x5/539x families
4d776482ecc6 net: dsa: Get information about stacked DSA protocol
1c5ad5a94038 net: dsa: b53: Set untag_bridge_pvid
ed409f3bbaa5 net: dsa: b53: Configure VLANs while not filtering

There may be some additional DSA dependencies for the last two commits within the DSA framework.

Thanks a lot to all of you guys.
What do i have to consider in order to build OpenWrt for my Lamobo R1 in the future? Do i have to follow the same steps, or can i simply use the master branch?

Thank you very much!!