TP-Link TL-ST5008F v2.0 is a managed switch with 8 SFP+ cages, based on
the Realtek RTL9303. This is the Chinese-market unit running firmware
1.0.2 Build 20220311. Its board differs from the TL-ST1008F v2.0.
Specification:
- SoC : Realtek RTL9303
- RAM : 512 MiB
- Flash : SPI-NOR 32 MiB (Winbond W25Q256)
- Ethernet : 8x 10G SFP+ (SoC switch)
1x RJ45 Management port, not supported yet
- LEDs/Keys (GPIO): 1x/0x (no reset button on the front or rear)
- other LEDs : PWR, 8x port LEDs left as the bootloader sets them
- UART : RJ45 console port on the front panel
(micro-USB console port also present, not used)
- settings : 38400n8
- Power : 100-240 VAC, 50/60 Hz, 0.6 A (internal PSU, IEC C14)
Flash instructions:
U-Boot and its environment stay unchanged. It boots the uImage at flash
offset 0x1300000 and ignores bootcmd, so the firmware partition starts
at the stock sys partition and spans sys and usrappfs. The stock usrimg2
and usrimg1 partitions (the stock root filesystems) are concatenated
behind it, which leaves about 23 MiB for the overlay. U-Boot only checks
the first bytes of usrimg1 for a squashfs or JFFS2 header and boots sys
either way. The serial upload below takes about 35 minutes.
1. Connect the console at 38400n8 and power on the switch
2. Press Ctrl+B at the "Hit Ctrl+B" prompt to reach "tplink>"
3. Enter 16 to leave the menu and reach the "RTL9300#" prompt
4. Send the initramfs image over YMODEM and boot it:
loady 0x84f00000
bootm 0x84f00000
5. Insert a module in any cage and connect to 192.168.1.1
6. Back up the u-boot, u-boot-env, fwconcat1, fwconcat0, tp_head and
para partitions off the device. fwconcat0 holds the stock sys and
usrappfs images and fwconcat1 the stock usrimg2 and usrimg1 images;
OpenWrt overwrites both
7. Upload the sysupgrade image and flash it:
sysupgrade -n <sysupgrade image>
Reverting to stock firmware (derived from the layout, not tested yet):
Boot the initramfs as in steps 1 to 4, so that nothing on the flash is
mounted, and write back both dumps saved in step 6:
mtd write fwconcat1.bin fwconcat1
mtd -r write fwconcat0.bin fwconcat0
Notes:
- SFP TX-disable sits on the LED shift chain, so there is no led_set
node and lasers cannot be turned off.
- GPIO3 to GPIO5 are the presence pins for cages 4 to 6. They need
pinmux_disable_spi0 when booted from the U-Boot prompt, as in the
install above, or those cages stay in error. A normal boot without
it was not tested. The flash controller is not affected.
MAC addresses:
LAN : 78:60:5B:xx:xx:xx (para partition, offset 0xfdff4)
label: 78:60:5B:xx:xx:xx (same)
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: John-Michael Mulesa <jmulesa@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/26535
Signed-off-by: Jonas Jelonek <jonas@jonasjelonek.de>
OpenWrt Project is a Linux operating system targeting embedded devices. Instead of trying to create a single, static firmware, OpenWrt provides a fully writable filesystem with package management. This frees you from the application selection and configuration provided by the vendor and allows you to customize the device through the use of packages to suit any application. For developers, OpenWrt is the framework to build an application without having to build a complete firmware around it; for users this means the ability for full customization, to use the device in ways never envisioned.
Sunshine!
Download
Built firmware images are available for many architectures and come with a package selection to be used as WiFi home router. To quickly find a factory image usable to migrate from a vendor stock firmware to OpenWrt, try the Firmware Selector.
If your device is supported, please follow the Info link to see install instructions or consult the support resources listed below.
An advanced user may require additional or specific package. (Toolchain, SDK, ...) For everything else than simple firmware download, try the wiki download page:
Development
To build your own firmware you need a GNU/Linux, BSD or macOS system (case sensitive filesystem required). Cygwin is unsupported because of the lack of a case sensitive file system.
Requirements
You need the following tools to compile OpenWrt, the package names vary between distributions. A complete list with distribution specific packages is found in the Build System Setup documentation.
binutils bzip2 diff find flex gawk gcc-6+ getopt grep install libc-dev libz-dev
make4.1+ perl python3.8+ rsync subversion unzip which
Quickstart
-
Run
./scripts/feeds update -ato obtain all the latest package definitions defined in feeds.conf / feeds.conf.default -
Run
./scripts/feeds install -ato install symlinks for all obtained packages into package/feeds/ -
Run
make menuconfigto select your preferred configuration for the toolchain, target system & firmware packages. -
Run
maketo build your firmware. This will download all sources, build the cross-compile toolchain and then cross-compile the GNU/Linux kernel & all chosen applications for your target system.
Related Repositories
The main repository uses multiple sub-repositories to manage packages of
different categories. All packages are installed via the OpenWrt package
manager called opkg. If you're looking to develop the web interface or port
packages to OpenWrt, please find the fitting repository below.
-
LuCI Web Interface: Modern and modular interface to control the device via a web browser.
-
OpenWrt Packages: Community repository of ported packages.
-
OpenWrt Routing: Packages specifically focused on (mesh) routing.
-
OpenWrt Video: Packages specifically focused on display servers and clients (Xorg and Wayland).
Support Information
For a list of supported devices see the OpenWrt Hardware Database
Documentation
Support Community
- Forum: For usage, projects, discussions and hardware advise.
- Support Chat: Channel
#openwrton oftc.net.
Developer Community
- Bug Reports: Report bugs in OpenWrt
- Dev Mailing List: Send patches
- Dev Chat: Channel
#openwrt-develon oftc.net.
License
OpenWrt is licensed under GPL-2.0
