realtek target needs help

Bas Mevissen abuse at basmevissen.nl
Mon Aug 12 03:21:24 PDT 2024



On 08/08/2024 06:39, Luiz Angelo Daros de Luca wrote:
>> The realtek target supporting the Realtek switches is the only target in
>> OpenWrt main still on Linux kernel 5.15, all other targets are at least
>> on kernel 6.1, most of them are on Linux kernel 6.6.
>>
>> The next OpenWrt major release will use kernel 6.6 only, all targets not
>> migrated to kernel 6.6 will get removed from OpenWrt before branching.
>> Looking at the status of OpenWrt main branch we will probably branch in
>> the next 2 months.
>>
>> Here is the overview of the Linux kernel 6.6 migration status:
>> https://github.com/openwrt/openwrt/issues/15192
>>
>> There is a pull request to drop the realtek target from OpenWrt main:
>> https://github.com/openwrt/openwrt/pull/16052
>>
>> A migration of the realtek target to Linux kernel 6.1 was started here:
>> https://github.com/openwrt/openwrt/pull/12726
> 
> I noticed that #15192 metions
> https://github.com/howels/openwrt/commits/realtek-6.6-test/ as the
> development branch. Is anyone coordinating that front? Is there a TODO
> list? I have some devices to play with (dgs-1210-28p and dgs-1210-52p)
> and I can give a hand on specific topics but I do not have too much
> time to lead it. There are some commits in that dev branch that are
> actually disabling things. I might be able to work on fixing those
> things or check what is useful from the 6.1 PR. However, I don't want
> to step over someone's WIP and waste time in useless rework.
> 

I acquired an HP 1920-24G and gave this branch a spin. Unfortunately, it 
does not boot with this branch. Booting 23.05.4 and current main branch 
are fine.

> System application is starting...[    0.000000] Linux version 6.6.41 (bas at lenovo) (mips-openwrt-linux-musl-gcc (OpenWrt GCC 13.3.0 4
> [    0.000000] RTL838X model is 83826800
> [    0.000000] SoC Type: RTL8382
> [    0.000000] printk: bootconsole [early0] enabled
> [    0.000000] CPU0 revision is: 00019070 (MIPS 4KEc)
> [    0.000000] MIPS: machine is HPE 1920-24G (JG924A)
> [    0.000000] earlycon: ns16550a0 at MMIO 0x18002000 (options '38400n8')
> [    0.000000] printk: bootconsole [ns16550a0] enabled
> [    0.000000] Initrd not found or empty - disabling initrd
> [    0.000000] Using appended Device Tree.
> [    0.000000] Primary instruction cache 16kB, VIPT, 4-way, linesize 16 bytes.
> [    0.000000] Primary data cache 16kB, 2-way, VIPT, cache aliases, linesize 16 bytes
> [    0.000000] Zone ranges:
> [    0.000000]   Normal   [mem 0x0000000000000000-0x0000000007ffffff]
> [    0.000000] Movable zone start for each node
> [    0.000000] Early memory node ranges
> [    0.000000]   node   0: [mem 0x0000000000000000-0x0000000007ffffff]
> [    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]

So there is work to do. Not sure where to start as this is very early in 
the kernel boot...

For reference, this is part of the boot from 
https://firmware-selector.openwrt.org/?version=SNAPSHOT&target=realtek%2Frtl838x&id=hpe_1920-24g

> System application is starting...[    0.000000] Linux version 5.15.161 (builder at buildhost) (mips-openwrt-linux-musl-gcc (OpenWrt GCC 13.3.4
> [    0.000000] RTL838X model is 83826800
> [    0.000000] SoC Type: RTL8382
> [    0.000000] printk: bootconsole [early0] enabled
> [    0.000000] CPU0 revision is: 00019070 (MIPS 4KEc)
> [    0.000000] MIPS: machine is HPE 1920-24G (JG924A)
> [    0.000000] earlycon: ns16550a0 at MMIO 0x18002000 (options '38400n8')
> [    0.000000] printk: bootconsole [ns16550a0] enabled
> [    0.000000] Initrd not found or empty - disabling initrd
> [    0.000000] Using appended Device Tree.
> [    0.000000] Primary instruction cache 16kB, VIPT, 4-way, linesize 16 bytes.
> [    0.000000] Primary data cache 16kB, 2-way, VIPT, cache aliases, linesize 16 bytes
> [    0.000000] Zone ranges:
> [    0.000000]   Normal   [mem 0x0000000000000000-0x0000000007ffffff]
> [    0.000000] Movable zone start for each node
> [    0.000000] Early memory node ranges
> [    0.000000]   node   0: [mem 0x0000000000000000-0x0000000007ffffff]
> [    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
> [    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
> [    0.000000] pcpu-alloc: [0] 0 
> [    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32480
> [    0.000000] Kernel command line: earlycon
> [    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
> [    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
> [    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
> [    0.000000] Memory: 110240K/131072K available (6243K kernel code, 615K rwdata, 1380K rodata, 11016K init, 219K bss, 20832K reserved, 0K)
> [    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
> [    0.000000] NR_IRQS: 256
> [    0.000000] rtl83xx-clk: initialized, CPU 500 MHz, MEM 300 MHz (8 Bit DDR3), LXB 200 MHz
> [    0.000000] clocksource: realtek_otto_timer: mask: 0xfffffff max_cycles: 0xfffffff, max_idle_ns: 38225208801 ns
> [    0.000005] sched_clock: 28 bits at 3125kHz, resolution 320ns, wraps every 42949672800ns
> [    0.027242] Calibrating delay loop... 498.89 BogoMIPS (lpj=2494464)
> [    0.167689] pid_max: default: 32768 minimum: 301
> [    0.185406] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
> [    0.209782] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
> [    0.261395] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
> [    0.294122] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
> [    0.317208] pinctrl core: initialized pinctrl subsystem
> [    0.338365] NET: Registered PF_NETLINK/PF_ROUTE protocol family
> [    0.400984] rtl83xx-clk clock-controller: rate setting enabled, CPU 300-625 MHz, MEM 300-300 MHz, LXB 200-200 MHz, OVERCLOCK AT OWN RISK
> [    0.447603] clocksource: Switched to clocksource realtek_otto_timer
> [    0.472639] NET: Registered PF_INET protocol family
> [    0.489515] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
> [    0.515879] tcp_listen_portaddr_hash hash table entries: 1024 (order: 0, 4096 bytes, linear)
> [    0.544082] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
> [    0.569908] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
> [    0.595459] TCP bind hash table entries: 1024 (order: 0, 4096 bytes, linear)
> [    0.618994] TCP: Hash tables configured (established 1024 bind 1024)
> [    0.640779] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
> [    0.662640] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
> [    0.686786] NET: Registered PF_UNIX/PF_LOCAL protocol family
> [    0.918317] workingset: timestamp_bits=14 max_order=15 bucket_order=1
> [    0.955984] squashfs: version 4.0 (2009/01/31) Phillip Lougher
> [    0.975500] jffs2: version 2.2 (NAND) (SUMMARY) (ZLIB) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
> [    1.101729] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
> [    1.161168] pinctrl-single 1b001000.pinmux: 32 pins, size 4
> [    1.180836] pinctrl-single 1b00a000.pinmux: 32 pins, size 4
> [    1.202170] Probing RTL8231 GPIOs
> [    1.213291] rtl8231_init called, MDIO bus ID: 0
> [    1.231051] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
> [    1.260429] printk: console [ttyS0] disabled
> [    1.274857] 18002000.uart: ttyS0 at MMIO 0x18002000 (irq = 31, base_baud = 12500000) is a 16550A
> [    1.304170] printk: console [ttyS0] enabled
> [    1.304170] printk: console [ttyS0] enabled
> [    1.331969] printk: bootconsole [early0] disabled
> [    1.331969] printk: bootconsole [early0] disabled
> [    1.363204] printk: bootconsole [ns16550a0] disabled
> [    1.363204] printk: bootconsole [ns16550a0] disabled
> [    1.714325] brd: module loaded
> [    1.736624] spi-nor spi0.0: mx25l25635e (32768 Kbytes)
> [    1.753946] 8 fixed-partitions partitions found on MTD device spi0.0
> [    1.775182] OF: Bad cell count for /soc/spi at 1200/flash at 0/partitions
> [    1.796134] OF: Bad cell count for /soc/spi at 1200/flash at 0/partitions
> [    1.817737] Creating 8 MTD partitions on "spi0.0":
> [    1.833758] 0x000000000000-0x000000050000 : "bootware_basic"
> [    1.860824] 0x000000060000-0x000000090000 : "bootware_data"
> [    1.882762] 0x000000090000-0x0000000d0000 : "bootware_extend"
> [    1.910596] 0x000000100000-0x000000150000 : "bootware_basic_backup"
> [    1.934768] 0x000000160000-0x000000190000 : "bootware_data_backup"
> [    1.963901] 0x000000190000-0x0000001d0000 : "bootware_extend_backup"
> [    1.988884] 0x000000300000-0x000001ff0000 : "firmware"
> [    2.015301] 0x000001ff0000-0x000002000000 : "factory"
> [    2.058314] Probing RTL838X eth device pdev: 820ad200, dev: 820ad210
> [    2.130005] Found SoC ID: 8382: RTL8382, family 8380
> [    2.146826] rtl8380_init_mac
> [    2.156517] Using MAC 0000820ad2100000
> [    2.319389] Realtek RTL8218B (internal) mdio-bus:08: Detected internal RTL8218B
> [    2.343778] Firmware loaded. Size 1184, magic: 83808380
> [    5.556027] Realtek RTL8214FC mdio-bus:18: Detected external RTL8214FC
> [    5.577828] Firmware loaded. Size 1676, magic: 83808380
> [    7.045826] Phy on MAC 0: 1cc981
> [    7.067674] Realtek RTL8218B (external) mdio-bus:00: Detected external RTL8218B
> [    7.092048] Firmware loaded. Size 1168, magic: 83808380
> [    7.257965] Realtek RTL8218B (external) mdio-bus:00: Detected chip revision 0002
> [    8.780420] i2c_dev: i2c /dev entries driver
> [    8.804131] NET: Registered PF_INET6 protocol family
> [    8.852177] Segment Routing with IPv6
> [    8.864681] In-situ OAM (IOAM) with IPv6
> [    8.878051] NET: Registered PF_PACKET protocol family
> [    8.895072] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you n.
> [    8.939512] 8021q: 802.1Q VLAN Support v1.8
> [    8.956605] i2c-gpio i2c-gpio-0: Slow GPIO pins might wreak havoc into I2C/SMBus bus timing
> [    8.985190] i2c-gpio i2c-gpio-0: using lines 464 (SDA) and 465 (SCL)
> [    9.007100] i2c-gpio i2c-gpio-1: Slow GPIO pins might wreak havoc into I2C/SMBus bus timing
> [    9.035416] i2c-gpio i2c-gpio-1: using lines 474 (SDA) and 475 (SCL)
> [    9.057303] i2c-gpio i2c-gpio-2: Slow GPIO pins might wreak havoc into I2C/SMBus bus timing
> [    9.085743] i2c-gpio i2c-gpio-2: using lines 478 (SDA) and 479 (SCL)
> [    9.107741] i2c-gpio i2c-gpio-3: Slow GPIO pins might wreak havoc into I2C/SMBus bus timing
> [    9.136025] i2c-gpio i2c-gpio-3: using lines 482 (SDA) and 483 (SCL)
> [    9.159567] sfp sfp-0: Host maximum power 1.0W
> [    9.174502] sfp sfp-0: No tx_disable pin: SFP modules will always be emitting.
> [    9.200696] sfp sfp-1: Host maximum power 1.0W
> [    9.215628] sfp sfp-1: No tx_disable pin: SFP modules will always be emitting.
> [    9.241916] sfp sfp-2: Host maximum power 1.0W
> [    9.256829] sfp sfp-2: No tx_disable pin: SFP modules will always be emitting.
> [    9.283033] sfp sfp-3: Host maximum power 1.0W
> [    9.297955] sfp sfp-3: No tx_disable pin: SFP modules will always be emitting.
> [    9.405206] Phy on MAC 0: 1cc981
> [    9.427029] Realtek RTL8218B (external) rtl838x slave mii-0:00: Detected external RTL8218B
> [    9.454597] Firmware loaded. Size 1168, magic: 83808380
> [    9.617961] Realtek RTL8218B (external) rtl838x slave mii-0:00: Detected chip revision 0002
> [   11.193167] Realtek RTL8218B (internal) rtl838x slave mii-0:08: Detected internal RTL8218B
> [   11.220738] Firmware loaded. Size 1184, magic: 83808380
> [   14.434437] Realtek RTL8214FC rtl838x slave mii-0:18: Detected external RTL8214FC
> [   14.459393] Firmware loaded. Size 1676, magic: 83808380
> [   16.083383] In rtl83xx_vlan_setup
> [   16.094501] UNKNOWN_MC_PMASK: 000000001fffffff
> [   16.109320] VLAN profile 0: L2 learning: 1, UNKN L2MC FLD PMSK 511,          UNKN IPMC FLD PMSK 511, UNKN IPv6MC FLD PMSK: 511
> [   17.177642] rtl83xx_enable_phy_polling:          fffffff
> [   18.298553] rtl83xx-switch switch at 1b000000: configuring for fixed/internal link mode
> [   18.325275] rtl83xx-switch switch at 1b000000: Link is Up - 1Gbps/Full - flow control off
> [   18.352544] rtl83xx-switch switch at 1b000000 lan1 (uninitialized): PHY [mdio-bus:00] driver [Realtek RTL8218B (external)] (irq=POLL)
> [   18.395476] rtl83xx-switch switch at 1b000000 lan2 (uninitialized): PHY [mdio-bus:01] driver [Realtek RTL8218B (external)] (irq=POLL)
> [   18.441688] rtl83xx-switch switch at 1b000000 lan3 (uninitialized): PHY [mdio-bus:02] driver [Realtek RTL8218B (external)] (irq=POLL)
> [   18.484589] rtl83xx-switch switch at 1b000000 lan4 (uninitialized): PHY [mdio-bus:03] driver [Realtek RTL8218B (external)] (irq=POLL)
> [   18.531125] rtl83xx-switch switch at 1b000000 lan5 (uninitialized): PHY [mdio-bus:04] driver [Realtek RTL8218B (external)] (irq=POLL)
> [   18.574038] rtl83xx-switch switch at 1b000000 lan6 (uninitialized): PHY [mdio-bus:05] driver [Realtek RTL8218B (external)] (irq=POLL)
> [   18.620311] rtl83xx-switch switch at 1b000000 lan7 (uninitialized): PHY [mdio-bus:06] driver [Realtek RTL8218B (external)] (irq=POLL)
> [   18.663472] rtl83xx-switch switch at 1b000000 lan8 (uninitialized): PHY [mdio-bus:07] driver [Realtek RTL8218B (external)] (irq=POLL)
> [   18.709909] rtl83xx-switch switch at 1b000000 lan9 (uninitialized): PHY [mdio-bus:08] driver [Realtek RTL8218B (internal)] (irq=POLL)
> [   18.752672] rtl83xx-switch switch at 1b000000 lan10 (uninitialized): PHY [mdio-bus:09] driver [Realtek RTL8218B (internal)] (irq=POLL)
> [   18.799315] rtl83xx-switch switch at 1b000000 lan11 (uninitialized): PHY [mdio-bus:0a] driver [Realtek RTL8218B (internal)] (irq=POLL)
> [   18.842668] rtl83xx-switch switch at 1b000000 lan12 (uninitialized): PHY [mdio-bus:0b] driver [Realtek RTL8218B (internal)] (irq=POLL)
> [   18.889330] rtl83xx-switch switch at 1b000000 lan13 (uninitialized): PHY [mdio-bus:0c] driver [Realtek RTL8218B (internal)] (irq=POLL)
> [   18.932674] rtl83xx-switch switch at 1b000000 lan14 (uninitialized): PHY [mdio-bus:0d] driver [Realtek RTL8218B (internal)] (irq=POLL)
> [   18.979333] rtl83xx-switch switch at 1b000000 lan15 (uninitialized): PHY [mdio-bus:0e] driver [Realtek RTL8218B (internal)] (irq=POLL)
> [   19.022323] rtl83xx-switch switch at 1b000000 lan16 (uninitialized): PHY [mdio-bus:0f] driver [Realtek RTL8218B (internal)] (irq=POLL)
> [   19.069302] rtl83xx-switch switch at 1b000000 lan17 (uninitialized): PHY [mdio-bus:10] driver [REALTEK RTL8218D] (irq=POLL)
> [   19.111088] rtl83xx-switch switch at 1b000000 lan18 (uninitialized): PHY [mdio-bus:11] driver [REALTEK RTL8218D] (irq=POLL)
> [   19.151179] rtl83xx-switch switch at 1b000000 lan19 (uninitialized): PHY [mdio-bus:12] driver [REALTEK RTL8218D] (irq=POLL)
> [   19.194795] rtl83xx-switch switch at 1b000000 lan20 (uninitialized): PHY [mdio-bus:13] driver [REALTEK RTL8218D] (irq=POLL)
> [   19.234644] rtl83xx-switch switch at 1b000000 lan21 (uninitialized): PHY [mdio-bus:14] driver [REALTEK RTL8218D] (irq=POLL)
> [   19.278315] rtl83xx-switch switch at 1b000000 lan22 (uninitialized): PHY [mdio-bus:15] driver [REALTEK RTL8218D] (irq=POLL)
> [   19.318746] rtl83xx-switch switch at 1b000000 lan23 (uninitialized): PHY [mdio-bus:16] driver [REALTEK RTL8218D] (irq=POLL)
> [   19.361978] rtl83xx-switch switch at 1b000000 lan24 (uninitialized): PHY [mdio-bus:17] driver [REALTEK RTL8218D] (irq=POLL)
> [   19.424357] rtl8214fc_power_set: Powering off COPPER (port 24)
> [   19.474762] rtl8214fc_power_set: Powering on FIBRE (port 24)
> [   19.514637] rtl83xx-switch switch at 1b000000 lan25 (uninitialized): PHY [mdio-bus:18] driver [Realtek RTL8214FC] (irq=POLL)
> [   19.577277] rtl8214fc_power_set: Powering off COPPER (port 25)
> [   19.628139] rtl8214fc_power_set: Powering on FIBRE (port 25)
> [   19.668156] rtl83xx-switch switch at 1b000000 lan26 (uninitialized): PHY [mdio-bus:19] driver [Realtek RTL8214FC] (irq=POLL)
> [   19.730403] rtl8214fc_power_set: Powering off COPPER (port 26)
> [   19.781615] rtl8214fc_power_set: Powering on FIBRE (port 26)
> [   19.821819] rtl83xx-switch switch at 1b000000 lan27 (uninitialized): PHY [mdio-bus:1a] driver [Realtek RTL8214FC] (irq=POLL)
> [   19.884395] rtl8214fc_power_set: Powering off COPPER (port 27)
> [   19.936105] rtl8214fc_power_set: Powering on FIBRE (port 27)
> [   19.976501] rtl83xx-switch switch at 1b000000 lan28 (uninitialized): PHY [mdio-bus:1b] driver [Realtek RTL8214FC] (irq=POLL)
> [   20.015305] DSA: tree 0 setup
> [   20.025404] LINK state irq: 20
> [   20.035807] In rtl83xx_setup_qos
> [   20.046624] Setting up RTL838X QoS
> [   20.057987] RTL838X_PRI_SEL_TBL_CTRL(i): 00033112
> [   20.073655] Current Intprio2queue setting: 00000000
> [   20.089905] QM_PKT2CPU_INTPRI_MAP: 00fac688
> [   20.104060] rtl838x_dbgfs_init called
> [   20.117540] rtl83xx_fib_event_work_do: FIB4 default rule failed
> [   20.139416] rtl83xx_fib_event_work_do: FIB4 default rule failed
> [   20.170024] clk: Disabling unused clocks
> [   20.307306] Freeing unused kernel image (initmem) memory: 11016K
> [   20.327384] This architecture does not have kernel memory protection.
> [   20.348849] Run /init as init process
> [   20.361084]   with arguments:
> [   20.370988]     /init
> [   20.378625]   with environment:
> [   20.389125]     HOME=/

> Regards,
> 
> Luiz
> 

Regards,

Bas.

> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list