First thank you everybody for building and supporting OpenWrt. OpenWrt is the best!
Recently I found that Zyxel GS1900 switches are supported and I purchased a few of them on eBay. I chose to flash them using TFTP method from U-Boot since if I know that I can boot from an image loaded from TFTP server and then run sysupgrade to flash an image permanently it's a guarantee that I can re-flash it anytime again even when the OS is broken for any reason.
I successfully flashed Zyxel GS1900-24 and GS1900-48. I didn't have time to verify that OpenWrt runs well on those switch but OpenWrt does boot and network works so I'm happy.
But I have problem to load an image from TFTP on GS1900-24HP (PoE version of the switch). If I had this problem with only a single switch I would conclude that the switch is defective but I have more than one from different sellers and they all have the same problem...
When I run tftpboot 0x84f00000 192.168.1.10:openwrt-...-kernel.bin from U-Boot on GS1900-24 or 48 it looks like this:
TFTP from server 192.168.1.10; our IP address is 192.168.1.1
Filename 'openwrt-22.03.1-realtek-rtl838x-zyxel_gs1900-24-v1-initramfs-kernel.bin'.
Load address: 0x84f00000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
##############
done
Bytes transferred = 6870927 (68d78f hex)
But when I try to run it on 24HP I get:
...
Loading: #
and the shell stops responding.
I know that the network works since I can type ping 192.168.1.10 in U-Boot and I get message that host is alive but it looks like tftpboot halts after a few bytes and I have to power cycle the switch.
Yes, I tried both zyxel_gs1900-24hp-v1-initramfs-kernel.bin and zyxel_gs1900-24hp-v2-initramfs-kernel.bin. I haven't tried it but based on my understanding the tftpboot should load any image - even an image that won't boot.
The good thing about the GS1900 (and most other realtek-based switches) is the dual firmware design: You just need to tell U-Boot to load the backup image and you are back to stock.
U-Boot TFTP method:
* Configure your client with a static 192.168.1.x IP (e.g. 192.168.1.10).
* Set up a TFTP server on your client and make it serve the initramfs
image.
* Connect serial, power up the switch, interrupt U-boot by hitting the
space bar, and enable the network:
> rtk network on
* Since the GS1900-24HP v1 is a dual-partition device, you want to keep the
OEM firmware on the backup partition for the time being. OpenWrt can
only be installed in the first partition anyway (hardcoded in the
DTS). To ensure we are set to boot from the first partition, issue the
following commands:
> setsys bootpartition 0
> savesys
* Download the image onto the device and boot from it:
> tftpboot 0x81f00000 192.168.1.10:openwrt-realtek-rtl838x-zyxel_gs1900-24hp-v1-initramfs-kernel.bin
> bootm
* Once OpenWrt has booted, scp the sysupgrade image to /tmp and flash it:
> sysupgrade /tmp/openwrt-realtek-rtl838x-zyxel_gs1900-24hp-v1-squashfs-sysupgrade.bin
Well it's relatively simple: The 64MB devices will need the lower load address, and only the 24-v1 and 24HP-v1 have 64MB of RAM. The GS1900-8 has 128MB and so does the GS1900-24HP-v2 and the GS1900-48.
I don't really see a reason to replace it by v2. I'm not going to run any apps on the switch - just L2 switching and VLANs so 64M RAM is more than enough...