0
0
mirror of https://git.openwrt.org/openwrt/openwrt.git/ synced 2025-10-06 03:32:41 +02:00
Files
openwrt/target/linux/realtek/image/rtl931x_nand.mk
Markus Stockhausen f88135b7cd realtek: add support for Linksys LGS352C
Hardware specification
----------------------

* RTL9311 SoC, 2 MIPS Interaptiv cores @ 1000MHz
* 512MB DRAM
* 2MB NOR Flash
* 128MB NAND Flash
* 48 x 10/100/1000BASE-T ports
* 4 x 10G SFP+ ports
* LM63 controlled fan
* Power LED, Fault LED
* Reset button on front panel
* UART (115200 8N1) via RJ45

Installation using serial interface
-----------------------------------

1. Press "a" "c" "p" during message "Enter correct key to stop autoboot"
2. Start network "rtk network on"
3. Load image "tftpboot <TFTP IP>:openwrt-realtek-rtl931x_nand-linksys_lgs352c-initramfs-kernel.bin"
4. Boot image "bootm"
5. Switch to first bootpartition "fw_setsys bootpartition 0"
5. Download sysupgrade "scp <IP>:openwrt-realtek-rtl931x_nand-linksys_lgs352c-squashfs-sysupgrade.bin /tmp/."
6. Install sysupgrade "sysupgrade /tmp/openwrt-realtek-rtl931x_nand-linksys_lgs352c-squashfs-sysupgrade.bin"

Installation using OEM webinterface
-----------------------------------

This is not possible because the OpenWrt NAND Flash layout is different
from the vendor layout. To be precise. Vendor uses:

- 64 MB vendor UBI root_data
- 32 MB vendor kernel+root 1 (~19 MB used)
- 32 MB vendor kernel+root 2 (~19 MB used)

OpenWrt uses:

- 64 MB vendor UBI (not touched)
- 10 MB OpenWrt kernel
- 22 MB Openwrt mtd-concat UBI
- 23 MB vendor kernel 2 (space reduced, vendor data unchanged)
- 09 MB OpenWrt mtd-concat UBI

Dual-boot with stock firmware using writable u-boot-env
-------------------------------------------------------

From stock to OpenWrt / primary image 1 (CLI as admin):
   - > boot system image1
   - > reboot

From OpenWrt to stock / boot image 2: (shell as root)
   - # fw_setsys bootpartition 1
   - # reboot

Debrick using serial interface
------------------------------

1. Press "a" "c" "p" during message "Enter correct key to stop autoboot"
2. Load vendor image with "upgrade runtime <TFTP IP>:LGS352xxxxx.imag"
3. switch to primary partition "setsys bootpartition 0"
4. safe config "savesys"

Further documentation
---------------------
See https://openwrt.org/toh/linksys/lgs352c

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/20255
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-10-05 12:14:05 +02:00

29 lines
630 B
Makefile

# SPDX-License-Identifier: GPL-2.0-only
include ./common.mk
define Device/linksys_lgs352c
$(Device/uimage-rt-loader)
SOC := rtl9311
IMAGE_SIZE := 29696k
KERNEL_SIZE := 10240k
DEVICE_VENDOR := Linksys
DEVICE_MODEL := LGS352C
DEVICE_PACKAGES += kmod-hwmon-lm63
BELKIN_MODEL := BKS-RTL93xx
BELKIN_HEADER := 0x07600001
LINKSYS_MODEL := 60422050
PAGESIZE := 2048
BLOCKSIZE := 128k
UBINIZE_OPTS := -E 5
KERNEL := \
$$(KERNEL) | \
pad-to $$(BLOCKSIZE)
IMAGE/sysupgrade.bin := \
append-rootfs | \
pad-rootfs | \
sysupgrade-tar rootfs=$$$$@ | \
append-metadata
endef
TARGET_DEVICES += linksys_lgs352c