openwrt/target/linux/realtek/image/rtl930x.mk
Jonas Jelonek 48b242733a realtek: add support for Zyxel XGS1930-28HP
Add support for the RTL9301-based Zyxel XGS1930-28HP, a 28-port Gigabit
PoE+ switch. The XGS1930 is an EOL Zyxel series of RTL9301-based
switches available with 28 or 52 ports, with and without PoE.

Hardware
========

  - RTL9301 SoC
  - 512 MiB DDR3 RAM
  - 32 MiB SPI-NOR flash
  - 24x 10/100/1000M RJ45 ports
  - 4x 1G/10G SFP+ cages
  - PoE:
    - 802.3af/at on all 24 RJ45 ports
    - 375 W total power budget
  - RTL8231 for port LEDs
  - Front LEDs: PWR, SYS, CLOUD, LOCATOR, PoE usage bar (5 steps)
  - Buttons: 1x "Restore"
  - Console: TTL 3.3V, 115200 8N1, 4-pin header
    - pinout (front to back): GND RX TX -
  - Software chain:
    - Bootbase/stripped-down U-Boot
    - RAS/ZyNOS

MAC address
===========

Single MAC address derived from the board partition. Applied to all
switch ports.

Disclaimer
==========

PoE is not yet supported.

Flashing OpenWrt overwrites ZyNOS. The Bootbase/U-Boot remains intact
and can be used for recovery.

Installation
============

Simple web upgrade:

1. Take the OpenWrt factory.bin image generated by the build.

2. In the ZyNOS web UI, login and go to Maintenance -> Firmware Upgrade.

3. If the device runs ZyNOS 5.00, untick "Enhanced firmware integrity
   check sha256sum". Otherwise the upload check will reject the image.

4. Select and upload the factory.bin image and click upgrade.

5. After flashing has finished, reboot the switch. It will now boot
   into OpenWrt.

Initramfs boot
==============

Luckily the switch uses a standard design, thus networking works with
a default hardware profile of RTK U-boot.

1. Connect to the serial console and interrupt the boot process by
   spamming '$' during the DRAM test to drop into Bootbase/U-Boot.

2. Bring up the network:

   > rtk network on

   Use a copper port; the SFP+ cages are likely not usable from the
   bootloader.

3. Load the initramfs image via TFTP:

   > tftpboot 0x82000000 <server>:<image>

4. Run the image (not bootm, the image has no uImage header):

   > go 0x82000000

Return to stock firmware
========================

1. Download the stock firmware for the switch from the Zyxel website
   and unzip it; there should be a .bin file with an alphanumeric name.

2. Upload that file to the running OpenWrt instance.

3. Flash it (use -F since the image has no OpenWrt metadata):

   > sysupgrade -F <stock-firmware>.bin

4. Wait for sysupgrade to finish and the switch to reboot. ZyNOS should
  come up again.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23389
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-05-17 13:12:18 +02:00

287 lines
6.7 KiB
Makefile

# SPDX-License-Identifier: GPL-2.0-only
include ./common.mk
define Device/d-link_dgs-1250-28x
SOC := rtl9301
DEVICE_VENDOR := D-Link
DEVICE_MODEL := DGS-1250-28X
DEVICE_PACKAGES += kmod-hwmon-lm75
IMAGE_SIZE := 24576k
$(Device/kernel-lzma)
endef
TARGET_DEVICES += d-link_dgs-1250-28x
define Device/hasivo_s1100w-8xgt-se
SOC := rtl9303
DEVICE_VENDOR := Hasivo
DEVICE_MODEL := S1100W-8XGT-SE
IMAGE_SIZE := 12288k
$(Device/kernel-lzma)
endef
TARGET_DEVICES += hasivo_s1100w-8xgt-se
define Device/hasivo_s1100wp-8gt-se
SOC := rtl9303
DEVICE_VENDOR := Hasivo
DEVICE_MODEL := S1100WP-8GT-SE
IMAGE_SIZE := 12288k
$(Device/kernel-lzma)
endef
TARGET_DEVICES += hasivo_s1100wp-8gt-se
define Device/hasivo_s600wp-5gt-2sx-se
SOC := rtl9303
DEVICE_VENDOR := Hasivo
DEVICE_MODEL := S600WP-5GT-2SX-SE
IMAGE_SIZE := 12288k
$(Device/kernel-lzma)
endef
TARGET_DEVICES += hasivo_s600wp-5gt-2sx-se
define Device/plasmacloud-common
SOC := rtl9302
UIMAGE_MAGIC := 0x93000000
DEVICE_VENDOR := Plasma Cloud
DEVICE_PACKAGES := poemgr
IMAGE_SIZE := 15872k
BLOCKSIZE := 64k
KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | uImage lzma
KERNEL := kernel-bin | append-dtb | lzma | uImage lzma | pad-to $$(BLOCKSIZE)
IMAGES += factory.bin
IMAGE/factory.bin := append-kernel | append-rootfs | pad-rootfs | check-size
IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | sysupgrade-tar rootfs=$$$$@ | append-metadata
endef
define Device/plasmacloud_mcx3
$(Device/plasmacloud-common)
DEVICE_MODEL := MCX3
endef
TARGET_DEVICES += plasmacloud_mcx3
define Device/plasmacloud_psx8
$(Device/plasmacloud-common)
DEVICE_MODEL := PSX8
endef
TARGET_DEVICES += plasmacloud_psx8
define Device/plasmacloud_psx10
$(Device/plasmacloud-common)
DEVICE_MODEL := PSX10
endef
TARGET_DEVICES += plasmacloud_psx10
define Device/tplink_tl-st1008f-v2
SOC := rtl9303
UIMAGE_MAGIC := 0x93030000
DEVICE_VENDOR := TP-Link
DEVICE_MODEL := TL-ST1008F
DEVICE_VARIANT := v2.0
DEVICE_PACKAGES := kmod-gpio-pca953x
SUPPORTED_DEVICES += tplink,tl-st1008f,v2
IMAGE_SIZE := 31808k
$(Device/kernel-lzma)
endef
TARGET_DEVICES += tplink_tl-st1008f-v2
define Device/vimin_vm-s100-0800ms
SOC := rtl9303
UIMAGE_MAGIC := 0x93000000
DEVICE_VENDOR := Vimin
DEVICE_MODEL := VM-S100-0800MS
IMAGE_SIZE := 13312k
$(Device/kernel-lzma)
endef
TARGET_DEVICES += vimin_vm-s100-0800ms
define Device/xikestor_sks7300-4x4t
SOC := rtl9303
DEVICE_VENDOR := XikeStor
DEVICE_MODEL := SKS7300-4X4T
DEVICE_PACKAGES := kmod-hwmon-lm75
KERNEL_SIZE:= 8192k
IMAGE_SIZE := 28160k
KERNEL := \
kernel-bin | \
append-dtb | \
lzma | \
xikestor-sks7300-img
KERNEL_INITRAMFS := \
kernel-bin | \
append-dtb | \
lzma | \
xikestor-sks7300-img
IMAGE/sysupgrade.bin := \
append-kernel | \
pad-to 8192k | \
append-rootfs | \
pad-rootfs | \
check-size | \
append-metadata
endef
TARGET_DEVICES += xikestor_sks7300-4x4t
define Device/xikestor_sks8300-8t
SOC := rtl9303
UIMAGE_MAGIC := 0x93000000
DEVICE_VENDOR := XikeStor
DEVICE_MODEL := SKS8300-8T
DEVICE_PACKAGES := kmod-hwmon-lm75
IMAGE_SIZE := 20480k
$(Device/kernel-lzma)
IMAGE/sysupgrade.bin := \
pad-extra 16 | \
append-kernel | \
pad-to 64k | \
append-rootfs | \
pad-rootfs | \
check-size | \
append-metadata
endef
TARGET_DEVICES += xikestor_sks8300-8t
define Device/xikestor_sks8300-8x
SOC := rtl9303
DEVICE_VENDOR := XikeStor
DEVICE_MODEL := SKS8300-8X
DEVICE_ALT0_VENDOR := ONTi
DEVICE_ALT0_MODEL := ONT-S508CL-8S
BLOCKSIZE := 64k
KERNEL_SIZE := 8192k
IMAGE_SIZE := 30720k
IMAGE/sysupgrade.bin := pad-extra 256 | append-kernel | xikestor-nosimg | \
jffs2 nos.img -e 4KiB -x lzma | pad-to $$$$(KERNEL_SIZE) | \
append-rootfs | pad-rootfs | append-metadata | check-size
endef
TARGET_DEVICES += xikestor_sks8300-8x
define Device/xikestor_sks8300-12e2t2x
SOC := rtl9302
UIMAGE_MAGIC := 0x93000000
DEVICE_VENDOR := XikeStor
DEVICE_MODEL := SKS8300-12E2T2X
IMAGE_SIZE := 20480k
$(Device/kernel-lzma)
IMAGE/sysupgrade.bin := \
pad-extra 16 | \
append-kernel | \
pad-to 64k | \
append-rootfs | \
pad-rootfs | \
check-size | \
append-metadata
endef
TARGET_DEVICES += xikestor_sks8300-12e2t2x
define Device/xikestor_sks8310-8x
SOC := rtl9303
UIMAGE_MAGIC := 0x93000000
DEVICE_VENDOR := XikeStor
DEVICE_MODEL := SKS8310-8X
DEVICE_PACKAGES := kmod-hwmon-lm75
IMAGE_SIZE := 20480k
$(Device/kernel-lzma)
IMAGE/sysupgrade.bin := \
pad-extra 16 | \
append-kernel | \
pad-to 64k | \
append-rootfs | \
pad-rootfs | \
check-size | \
append-metadata
endef
TARGET_DEVICES += xikestor_sks8310-8x
define Device/zyxel_xgs1010-12-a1
SOC := rtl9302
UIMAGE_MAGIC := 0x93001010
DEVICE_VENDOR := Zyxel
DEVICE_MODEL := XGS1010-12
DEVICE_VARIANT := A1
KERNEL_SIZE := 7168k
IMAGE_SIZE := 13184k
$(Device/kernel-lzma)
endef
TARGET_DEVICES += zyxel_xgs1010-12-a1
define Device/zyxel_xgs1210-12-a1
$(Device/zyxel_xgs1210-12)
SUPPORTED_DEVICES += zyxel,xgs1210-12
DEVICE_VARIANT := A1
endef
TARGET_DEVICES += zyxel_xgs1210-12-a1
define Device/zyxel_xgs1210-12-b1
$(Device/zyxel_xgs1210-12)
DEVICE_VARIANT := B1
endef
TARGET_DEVICES += zyxel_xgs1210-12-b1
define Device/zyxel_xgs1250-12-common
SOC := rtl9302
UIMAGE_MAGIC := 0x93001250
ZYXEL_VERS := ABWE
DEVICE_VENDOR := Zyxel
DEVICE_MODEL := XGS1250-12
DEVICE_PACKAGES := kmod-hwmon-gpiofan kmod-thermal
IMAGE_SIZE := 13312k
KERNEL := \
kernel-bin | \
append-dtb | \
rt-compress | \
rt-loader | \
uImage none
KERNEL_INITRAMFS := \
kernel-bin | \
append-dtb | \
rt-compress | \
zyxel-vers | \
rt-loader | \
uImage none
endef
define Device/zyxel_xgs1250-12-a1
$(Device/zyxel_xgs1250-12-common)
SUPPORTED_DEVICES += zyxel,xgs1250-12
DEVICE_VARIANT := A1
endef
TARGET_DEVICES += zyxel_xgs1250-12-a1
define Device/zyxel_xgs1250-12-b1
$(Device/zyxel_xgs1250-12-common)
DEVICE_VARIANT := B1
endef
TARGET_DEVICES += zyxel_xgs1250-12-b1
define Device/zyxel_xgs1930-28hp
SOC := rtl9301
DEVICE_MODEL := XGS1930-28HP
DEVICE_PACKAGES := kmod-hwmon-gpiofan
FLASH_ADDR := 0xb4260000
IMAGE_SIZE := 30336k
ZYNFW_ALIGN := 0x10000
$(Device/zyxel_zynos)
endef
TARGET_DEVICES += zyxel_xgs1930-28hp
define Device/zyxel_xmg1915
SOC := rtl9302
FLASH_ADDR := 0xb4270000
IMAGE_SIZE := 30336k
ZYNFW_ALIGN := 0x10000
$(Device/zyxel_zynos)
endef
define Device/zyxel_xmg1915-10e
DEVICE_MODEL := XMG1915-10E
$(Device/zyxel_xmg1915)
endef
TARGET_DEVICES += zyxel_xmg1915-10e
define Device/zyxel_xmg1915-10ep
DEVICE_MODEL := XMG1915-10EP
$(Device/zyxel_xmg1915)
DEVICE_PACKAGES := realtek-poe
endef
TARGET_DEVICES += zyxel_xmg1915-10ep