Greg Patrick 00f4fb79e1 realtek: fix NicGiga S100-0800S-M flash size
The firmware partition and IMAGE_SIZE were inherited from
rtl9303_tplink_tl-st1008f-v2.dts and describe a 32 MiB SPI-NOR. This
board has a 16 MiB chip, so the kernel truncates the partition on every
boot:

  [    0.679519] 6 fixed-partitions partitions found on MTD device spi0.0
  [    0.687292] Creating 6 MTD partitions on "spi0.0":
  [    0.740421] mtd: partition "firmware" extends beyond the end of device "spi0.0" -- size truncated to 0xd00000

The chip identifies itself as a Winbond W25Q128 (128 Mbit / 16 MiB):

  # cd /sys/bus/spi/devices/spi0.0/spi-nor
  # cat jedec_id manufacturer partname
  ef4018
  winbond
  w25q128

and the resulting partitions end exactly at the top of a 16 MiB chip:

  dev:    size   erasesize  name
  mtd0: 000e0000 00010000 "u-boot"
  mtd1: 00010000 00010000 "u-boot-env"
  mtd2: 00010000 00010000 "u-boot-env2"
  mtd3: 00100000 00010000 "jffs2-cfg"
  mtd4: 00100000 00010000 "jffs2-log"
  mtd5: 00d00000 00010000 "firmware"

The vendor firmware uses the same layout and also ends at 0x1000000, so
16 MiB is what the product ships with rather than a smaller variant.

Correct both values to describe the hardware. The result matches the
other RTL9303 boards that use this Realtek reference layout on 16 MiB
flash, notably the Vimin VM-S100-0800MS and the Sirivision SR-ST3408F,
which both use <0x300000 0xd00000> and IMAGE_SIZE := 13312k.

No released image has ever exceeded the truncated size (the current
snapshot sysupgrade image is 5.6 MiB) and mtdsplit already derives
rootfs_data from the truncated partition, so existing installations are
unaffected and no compat version bump is needed. The bug is latent:
check-size currently accepts images up to 29696k, more than twice what
the flash can hold.

Fixes: fbbc36c136 ("realtek: add support for NicGiga S100-0800S-M")
Signed-off-by: Greg Patrick <gregspatrick@hotmail.com>
Link: https://github.com/openwrt/openwrt/pull/24982
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-09-01 21:10:37 +02:00
…
…
…

OpenWrt logo

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

  1. Run ./scripts/feeds update -a to obtain all the latest package definitions defined in feeds.conf / feeds.conf.default

  2. Run ./scripts/feeds install -a to install symlinks for all obtained packages into package/feeds/

  3. Run make menuconfig to select your preferred configuration for the toolchain, target system & firmware packages.

  4. Run make to 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.

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 #openwrt on oftc.net.

Developer Community

License

OpenWrt is licensed under GPL-2.0

S
Description
This repository is a mirror of https://git.openwrt.org/openwrt/openwrt.git It is for reference only and is not active for check-ins. We will continue to accept Pull Requests here. They will be merged via staging trees then into openwrt.git.
Readme BSD-2-Clause BSD-3-Clause GPL-1 GPL-2 ISC Linux-syscall-note MIT
1.2 GiB
0 Stars 1 Watchers 0 Forks
Languages
C 60.6%
Makefile 23.1%
Shell 8.1%
Perl 2.6%
UnrealScript 2.4%
Other 3%