Support for RTL838x based managed switches

@svanheule I'm seeing error messages about the initramfs being too big for my GS1900 builds now, is the 6976k cap still there out of caution or are some ZyXEL u-boot versions known to break with bigger ramdisks?

WARNING: Image file openwrt-realtek-rtl838x-zyxel_gs1900-10hp-initramfs-kernel.bin is too big: 7971711 > 7143424
WARNING: Image file openwrt-realtek-rtl838x-zyxel_gs1900-8hp-v1-initramfs-kernel.bin is too big: 7825735 > 7143424
WARNING: Image file openwrt-realtek-rtl838x-zyxel_gs1900-8hp-v2-initramfs-kernel.bin is too big: 7825736 > 7143424

The cap is there because the initramfs is also the factory install image.

If we could make a size-limited initramfs-based factory image, that would also work. Then the normal (without the Zyxel device info) initramfs maybe wouldn't have to be size limited anymore.

1 Like

Okay. Further inspection shows the 24.10 pre-release snapshots are lacking the same initramfs images (8HP v1 / 8HP v2 / 10HP). The non PoE GS1900-8 and -16 e.g. do have them, weirdly enough.

https://downloads.openwrt.org/releases/24.10-SNAPSHOT/targets/realtek/rtl838x/

Thank you for the work.

Successfully upgrade from 24.10.0-rc2 to -rc4 with the merged partition.
Went through the factory firmware route.

Looking at the wiki, should a common GS1900 page be created?

Nothing weird about it, the size is right on the cusp - and since intramfs images are fixed to evaluate DEVICE_PACKAGES, including PoE support can push them over the limit.

Maybe we could cull the default packages to only those that are really necessary? I think we can drop tc-bpf (+ libbpf) and ip-full and still cover the basic needs in a fresh install. See target/linux/realtek/Makefile.

2 Likes

Does a L2-switch need the firewall4 package in the default install?

1 Like

Not really. I know I'm not using it, at least.

This discussion has happened before, but with the current space restrictions we could reconsider what it means to be an "OpenWrt mananged switch".

2 Likes

I thought fw4 had been pulled already before, but maybe I'm just stripping it myself already...

1 Like

I have managed to add support for Sodola SL-SWTGW2C8F (8x10gbe SFP+) which is based on RTL9303. I have also added support for jumbo frames (max mtu 10000) for this chipset.
I have only been able to test it with Sfp+ 10G optics (no DAC cables) and able to achieve near wire speed. We still need u-boot to initialize the network (rtk network on), however there is no access to serial console on this switch. However, there is an unpopulated max23x header that I was able to tap into to get serial console working


This is my working repo (sodola branch) and you can find an initial build here

10 Likes

Hi all,
I've recently purchased a Netgear GS310TP switch and flashed it with Openwrt (both 23.05.5 and snapshot build); everything is working as on stock firmware minus a couple details:

  • I was able to make the port LEDs work but for some reason the Power status LED stays off.
  • POE seems to be working fine, but when I try to query POE status with ubus call poe info all ports are showing status 'unknown'.
  • I've got a few SFP modules laying around so I wanted to test them with both OpenWrt and stock firmware. I was able to make it work on both with some SFP fiber modules, but for some reason I am unable to make it work with my 2 SFP copper modules on Openwrt. Those same 2 modules are working properly when I switch to stock firmware.

Any idea on the above ? I'm willing to help in fixing this but not too sure where to start.
Thanks !

Hi !
Great work. Could this be a base for SL-SWTGW218AS ?
Kind regards!

If it is RTL930x based then most likely, I do see unpopulated UART header on the left in this image so that will make it easier to try

1 Like

Unlikely that the pictured device will run Linux as there is no RAM chip visible.

1 Like

Are there any Realtek based switches known, that have components on the underside?
What would you expect to be "available" on the UART header in the suspected "no-memory-onboard" case? A really bare-bones cli configuration tool, or "just' some telemetry/stats? A no-function vestigial remnant from a more advanced product series?

The PCB looks similar to a Horaco PCB where the chips are marked and there are pictures of the underside:

2 Likes

That switch seems to have no RAM either? The chips STH mentions certainly aren't supported by OpenWrt ATM and I'm not sure they're supportable at all.

Yeah, my assumption has been that these super-cheap, unmanaged devices are built with an ASIC instead of a CPU/SOC, with just enough KBs of on-chip RAM to hold a FIB.

1 Like

Barring any negative feedback, I plan to merge this by Sunday, so it can still go along with 24.10-rc5.

2 Likes

Hi!
I've just bought a similiar device with 4x2.5GBE and 2x10GBE SFP+. It attached a serial console and got this:

==========Loader start V0.2===========
Press any key to start the normal procedure.
To run SPI flash viewer, press [v]
To enforce the download of the runtime kernel, press [ESC] .....
  cmd -1
    Check Runtime Image.....
    Chksum Correct!
    RunTime Kernel Starting....  
Ver8372N=2
Ver8373N=2
LINE 1462, RL6818C_pwr_on_patch_phy_v007 , patch 0xf0 finished!

So looks like RTL8372, which is not supported by openwrt ATM. :frowning: