]> git.ipfire.org Git - thirdparty/openwrt.git/commit
realtek: add support for XikeStor SKS8300-12X V1 main master 21922/head
authorJonas Jelonek <jelonek.jonas@gmail.com>
Wed, 3 Sep 2025 21:55:29 +0000 (21:55 +0000)
committerHauke Mehrtens <hauke@hauke-m.de>
Fri, 20 Feb 2026 23:49:51 +0000 (00:49 +0100)
commit81b148fd380b0a3fa1b6da8cb0da9d79eabce352
tree3ffca4ad8fcd1ce48d75c1b3fd02ca68eae852ab
parent659719d8cae54ee90fd85a99a2f0972de75a4628
realtek: add support for XikeStor SKS8300-12X V1

Hardware:
  - SoC: RTL9313
  - Memory: 512MB
  - Flash: SPI-NOR 32MB (GigaDevice GD25Q256EFIR)
  - Ethernet: 12x 1/2.5/10 Gbps (SFP+)
  - LED/Keys (GPIO): 1x/1x
  - UART: "Console" port on the front panel
    - type: RS-232C
    - connector: RJ-45
    - settings: 9600n8 / 115200n8
  - Watchdog: Diodes PT7A7514WE
  - Monitoring: LM75A
  - Power: 100-240 VAC 50/60 Hz C13/C14

Important notes:
---------------

* the device uses 9600 Baud by default but this extremely slows down the
  device when using the serial console. OpenWrt is configured to use
  115200 Baud. If you need to enter the bootloader, you need to use 9600
  Baud.

* PT7A7514WE watchdog is fed through hardware-assisted SYS_LED. However,
  the bootloader seems to deactivate that again during autoboot. There's
  a quirk in early arch setup for this.

* a kernel binary "nos.img" needs to be stored into JFFS2 filesystem
  using 4KiB erase block instead of 64KiB.

* V1 is the version with the 19"-sized case. As of 2026, there's a newer
  version with a narrow case.

Flash instructions using initramfs image:
-----------------------------------------

(mostly taken from 0dc0b98295)

 1. Prepare TFTP server with an IP address in 192.168.2.0/24.
 2. Connect your PC to Port 1 on SKS8300-12X.
 3. Power on SKS8300-12X and interrupt autoboot by Ctrl + B.
 4. Login to the vendor CLI by Ctrl + F and "diagshell_unipoe_env" as password.
 5. Switch baudrate to 115200 by running a command and then reconnect
    with different settings:

    baudrate 115200

 6. Switch to U-Boot CLI by "debug_unish_env".
 7. Enable Port 1 with the following commands:

    rtk 10g 0 fiber1g # (or fiber10g if 10GBase-*R)
    rtk ext-devInit 0 # init RTL8231 that holds SFP GPIOs
    rtk ext-pinSet 2 0 # set tx-disable of port 1 to LOW

 8. Transfer initramfs image via TFTP and boot it:

    tftpboot 0x82000000 <serverip>:<image name>
    bootm 0x82000000

 9. On the initramfs image, backup the stock firmware if needed.
10. Upload (or download) sysupgrade image to the device.
11. Erase "firmware" partition to cleanup JFFS2 of stock FW:

    mtd erase firmware

12. Perform sysupgrade with the sysupgrade image.
13. Wait until the flash completes and the system reboots into OpenWrt.

Reverting to stock firmware:
----------------------------

(taken from 0dc0b98295)

1. Prepare OpenWrt SDK to use the mkfs.jffs2 tool contained in it

   Note: the official mkfs.jffs2 tool in mtd-utils doesn't support 4KiB
         erase size and not usable for SKS8300-8X

2. Create a directory for working
3. Download official firmware for SKS8300-8X from XikeStor's official
   website
4. Rename the downloaded firmware to "nos.img" and place it to the
   working directory
5. Create a JFFS2 filesystem binary with the working directory

   /path/to/mkfs.jffs2 -p -b -U -v -e 4KiB -x lzma \
       -o nos.img.jffs2 -d /path/to/working/dir/

6. Upload the created JFFS2 filesystem binary to the device
7. Erase the "firmware" partition

   mtd erase firmware

8. Write the JFFS2 filesystem binary to the "firmware" partition

   mtd write /path/to/nos.img.jffs2 firmware

9. After writing, reboot the device by power cycle

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21922
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
target/linux/realtek/base-files/etc/board.d/02_network
target/linux/realtek/dts/rtl9313_xikestor_sks8300-12x-v1.dts [new file with mode: 0644]
target/linux/realtek/image/rtl931x.mk