Skip to content

hi3518ev300: one USB Wi-Fi stack, and drop the SCSI stack nothing can reach - #2410

Merged
widgetii merged 2 commits into
masterfrom
hi3518ev300-one-wifi
Sep 13, 2026
Merged

widgetii merged 2 commits into
masterfrom
hi3518ev300-one-wifi

Conversation

@widgetii

Copy link
Copy Markdown
Member

Problem

hi3518ev300_lite is 4KB over its 5120KB squashfs cap on master
(de5352647), so the board fails its own build and every open pull request in
the repository carries a red matrix.

The overflow is upstream drift, not a regression here. majestic
(majestic.$(FAMILY).$(VARIANT).master.tar.bz2) and majestic-webui
(MAJESTIC_WEBUI_VERSION = dist) are unpinned moving refs, and CI's own headroom
annotations show the 16KB that #2397 bought being eaten in 48 hours:

run annotation
nightly 34628359701, 09-11, right after #2397 merged rootfs.squashfs has 12KB left of 5120KB
nightly 34708633281, 09-12 rootfs.squashfs has 4KB left of 5120KB
master today 4KB over

Diffed against the exact tarballs a 09-11 local build used:

input then now Δ
majestic.hi3516ev200.lite.master.tar.bz2 722,505 732,721 (published 09-12 17:30Z) +10,216
majestic-webui-dist.tar.gz 299,596 311,543 (published 09-13 08:05Z) +11,947

Unpacked, the majestic binary went 1,131,888 → 1,148,216 B and the webui tree
943,426 → 978,938 B. The only commits since #2397 that reach this board are
#2401 (overlay shell, sub-KB once comment-stripped and xz'd) and #2400 (the
opensdk bump restructured kernel/wdt for cv300/cv500/cv6xx/dv500; this
family's entire open_wdt.ko is 9,476 B).

So this removes what the board ships but cannot use, rather than chasing the
next publish.

The in-tree 8188EU driver was never reachable

/etc/wireless/usb's rtl8188eu-generic profile runs modprobe 8188eu. That
module name belongs to the out-of-tree rtl8188eus-openipc package
(MODULE_NAME = 8188eu), which this board does not select. The in-tree staging
module is r8188eu, no profile modprobes it, mdev.conf has no hotplug
modprobe rule, and S40network only ever dispatches on the wlandev U-Boot
variable. So 431,588 B of .ko plus the 15,262 B rtlwifi/rtl8188eufw.bin it
requests shipped on every hi3518ev300 image with nothing able to load either.

OpenIPC/builder had already reached this conclusion camera by camera — seven
device profiles list r8188eu.ko in their per-device excludes (5× hi3518ev200,
2× hi3518ev300). This just generalises it.

Of the two adapters the board carried, MT7601U is the one the tree standardises
on: its firmware blob is enabled on four times as many defconfigs, and every
board carrying the 8188EU blob carries the MT7601U one too. 8188EU keeps a home
in OpenIPC/builder, where a profile can select rtl8188eus-openipc and get the
module the dispatch script has been naming all along. That follow-up is ready
and will go up once this lands.

Wireless extensions go with it, deliberately

R8188EU was the only enabled symbol here selecting WIRELESS_EXT, and
CFG80211_WEXT cannot stand in — it selects WEXT_CORE, while
net_device.wireless_handlers is #ifdef CONFIG_WIRELESS_EXT. Checked every
consumer on these two images before removing it:

  • mt7601u is a mac80211 driver, and interfaces.d/wlan0 runs
    wpa_supplicant -B -i wlan0 -D nl80211,wext — nl80211 is tried first.
  • The WebUI's Wi-Fi scan (cgi-bin/j/network.cgi) uses wpa_cli scan /
    scan_results, with iwlist only as a fallback behind command -v iwlist.
  • rtl8188fu-openipc and rtl8189fs-openipc, which hi3518ev300_ultimate
    selects, are both compiled with -DCONFIG_IOCTL_CFG80211 in their active
    platform block (CONFIG_PLATFORM_ARM_GENERIC and CONFIG_PLATFORM_ARM_RK3188
    respectively), so they register a wiphy and keep working over nl80211. Both
    also guard .private on CONFIG_WEXT_PRIV and wireless_handlers on
    CONFIG_WIRELESS_EXT, so neither build breaks.

What is lost is iwconfig/iwlist/iwpriv, which already did nothing for
mt7601u because CFG80211_WEXT is off. This is #2404 in reverse: there
R8188EU had to stay on hi3519v101 for exactly this reason.

SCSI

USB_STORAGE and USB_EHCI_HCD are both off, there is no ATA and no MMC block,
and no module in the image depends on scsi_mod or sd_mod — 184,916 B of
.ko with no transport behind it. Same removal #2399 made for hi3518ev200.

Hardware tested on

Not tested on a camera — I do not have a hi3518ev300. Opened ready rather
than as a draft because a draft builds nothing and CI proving the image fits
under the cap is the whole point while master is red for this board; same
reasoning as #2397. Someone with the board please confirm an MT7601U dongle
still associates, and that an 8188FU or 8189FS dongle on the ultimate still
comes up now that it goes through nl80211 rather than wext.

What I can evidence is a full local make clean + rebuild, plus the settled
kernel symbol set.

Evidence

Full clean rebuild of hi3518ev300_lite (make clean first — per-package
directories make an incremental rootfs measurement meaningless).

Before:

$ ls -l output/images/rootfs.squashfs.hi3518ev300     # master de5352647
-rw-r--r-- 1 dima dima 5246976 rootfs.squashfs.hi3518ev300

- uImage: [1876KB/2048KB]
- rootfs.squashfs: [5124KB/5120KB] -- size exceeded by: 4KB

After:

$ ls -l output/images/rootfs.squashfs.hi3518ev300
-rw-r--r-- 1 dima dima 5025792 rootfs.squashfs.hi3518ev300

- uImage: [1873KB/2048KB]
- rootfs.squashfs: [4908KB/5120KB]

221,184 B (216KB) off the rootfs, and no kernel cost — the uImage came down
3KB rather than growing, unlike #2397's build-crypto-in trade which paid +12KB.
212KB of headroom back.

Contents of the rebuilt rootfs:

removed  /lib/modules/4.9.37/kernel/drivers/staging/rtl8188eu/r8188eu.ko
removed  /lib/modules/4.9.37/kernel/drivers/scsi/scsi_mod.ko
removed  /lib/modules/4.9.37/kernel/drivers/scsi/sd_mod.ko
removed  /lib/firmware/rtlwifi/rtl8188eufw.bin

kept     mt7601u.ko (60464 B)
kept     mac80211.ko (390900 B)
kept     wireguard.ko (124860 B)
kept     camhi-motor.ko (7672 B)
kept     /lib/firmware/mediatek/mt7601u.bin (45412 B)
kept     /usr/sbin/wpa_supplicant, /usr/sbin/wpa_cli

$ grep mt7601u lib/modules/4.9.37/modules.dep
kernel/drivers/net/wireless/mediatek/mt7601u/mt7601u.ko: kernel/net/mac80211/mac80211.ko

The board config is hand-maintained, so I checked the edit settles the way it
reads by running the kernel's own kconfig out-of-tree over the before and after
files (make -C <linux> O=<scratch> ARCH=arm olddefconfig). The settled symbol
delta is exactly R8188EU, 88EU_AP_MODE, the four WEXT_*/WIRELESS_EXT
symbols and the SCSI block — nothing else moved.

hi3518ev300.generic.config is used by hi3518ev300_lite and
hi3518ev300_ultimate and by no other defconfig, so this reaches those two
boards. The other six the selector picks are directory-level path matches and
build unchanged:

$ git diff --name-only origin/master | python3 .github/scripts/ci-matrix.py --stdin
ci-matrix: 8/99 boards (needs_build=True) --- narrowed to the affected boards
  hi3516dv200_lite hi3516ev200_lite hi3516ev200_ultimate hi3516ev300_lite
  hi3516ev300_neo hi3516ev300_ultimate hi3518ev300_lite hi3518ev300_ultimate

Checks that need neither a build nor a camera, all passing:

test_load_hisilicon          PASS
test_sysupgrade              PASS
test_excludes_report         PASS
test_shell_parse (STRICT=1)  PASS
test_strip_shell_comments    PASS
ci-matrix.py --self-test     PASS
lint-workflow-shell.py       PASS
test_kconfig_graph.py        PASS

Scope

  • No kernel patches under general/package/all-patches/linux/ (those go to OpenIPC/linux)
  • No files specific to a single retail camera model (those go to OpenIPC/builder)
  • No probing or bring-up tooling (that goes to OpenIPC/ipctool)
  • Nothing under general/overlay/ or in a shared load_<vendor> script hardcodes a value specific to my board
  • Package sources come from an OpenIPC repository, and any version bump keeps at least the specificity of the pin it replaces (a new package should pin a full 40-character SHA)
  • No LD_PRELOAD, and no binaries that cannot be rebuilt from source
  • New code is selected by a defconfig, so CI actually builds it

… reach

hi3518ev300_lite is 4KB over its 5120KB squashfs cap on master, so every pull
request in the repository has a red build. The overflow itself is upstream drift
-- majestic and majestic-webui are unpinned moving refs, and the two of them
grew ~20KB between the 2026-09-11 and 2026-09-13 publishes, which is exactly the
16KB of headroom #2397 had bought. This buys headroom back by removing things
the board ships but cannot use.

THE IN-TREE 8188EU DRIVER WAS NEVER REACHABLE. /etc/wireless/usb's
rtl8188eu-generic profile runs `modprobe 8188eu`; that module name belongs to
the out-of-tree rtl8188eus-openipc package, which this board does not select.
The in-tree staging module is called r8188eu and no profile modprobes it, there
is no USB hotplug modprobe rule in mdev.conf, and S40network only ever dispatches
on the `wlandev` U-Boot variable. So 431,588 B of .ko and the 15,262 B
rtlwifi/rtl8188eufw.bin blob it requests shipped on every hi3518ev300 image with
nothing able to load them. OpenIPC/builder had already worked this out
camera-by-camera: both hi3518ev300 device profiles list r8188eu.ko in their
per-device excludes, as do five hi3518ev200 ones.

Of the two adapters the board carried, MT7601U is the one the tree standardises
on -- its firmware is enabled on four times as many defconfigs, and every board
carrying the 8188EU blob carries the MT7601U one too. 8188EU keeps a home in
OpenIPC/builder, where a profile can select rtl8188eus-openipc and get the
module the dispatch script has been naming all along.

WIRELESS EXTENSIONS GO WITH IT, deliberately. R8188EU was the only enabled symbol
selecting WIRELESS_EXT here, and CFG80211_WEXT cannot stand in -- it selects
WEXT_CORE, while net_device.wireless_handlers is #ifdef CONFIG_WIRELESS_EXT.
Nothing on these images needs it:
  - mt7601u is a mac80211 driver, and interfaces.d/wlan0 runs
    `wpa_supplicant -D nl80211,wext`, which tries nl80211 first;
  - the WebUI's Wi-Fi scan (cgi-bin/j/network.cgi) uses wpa_cli, with iwlist only
    as a fallback behind `command -v`;
  - rtl8188fu-openipc and rtl8189fs-openipc, which hi3518ev300_ultimate selects,
    are both compiled with -DCONFIG_IOCTL_CFG80211 in their active platform
    block, so they register a wiphy and keep working over nl80211. Both also
    guard .private on CONFIG_WEXT_PRIV and wireless_handlers on
    CONFIG_WIRELESS_EXT, so neither build breaks.
What is lost is iwconfig/iwlist/iwpriv, which already did nothing for mt7601u
because CFG80211_WEXT is off. This is #2404 in reverse: there R8188EU had to stay
on hi3519v101 because out-of-tree drivers needed the wext ABI.

SCSI. USB_STORAGE and USB_EHCI_HCD are both off, there is no ATA and no MMC
block, and no module in the image depends on scsi_mod or sd_mod -- 184,916 B of
.ko with no transport behind it. Same removal as #2399 for hi3518ev200.

MEASURED, full clean rebuild of hi3518ev300_lite:
  before (master de53526)  rootfs.squashfs 5,246,976 B  [5124KB/5120KB]  4KB OVER
  after                      rootfs.squashfs 5,025,792 B  [4908KB/5120KB]  212KB free
  uImage                     1,918,672 B     [1873KB/2048KB]  175KB free, no kernel cost
Verified in the built rootfs: r8188eu.ko, scsi_mod.ko, sd_mod.ko and
rtlwifi/rtl8188eufw.bin are gone; mt7601u.ko, mac80211.ko (still its dep),
mediatek/mt7601u.bin, wireguard.ko and camhi-motor.ko all still ship.

The kernel config is shared by hi3518ev300_lite and _ultimate and by no other
board, so this reaches those two and nothing else.

NOT TESTED ON A CAMERA -- I have no hi3518ev300. Someone with the board should
confirm an MT7601U dongle still associates, and that an 8188FU or 8189FS dongle
on the ultimate still comes up now that it goes through nl80211 rather than wext.
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Trim unreachable Wi-Fi and SCSI stacks from hi3518ev300 images

🐞 Bug fix ⚙️ Configuration changes 🕐 20-40 Minutes

Grey Divider

AI Description

• Removes unreachable in-tree RTL8188EU, wireless extensions, and SCSI modules.
• Retains MT7601U and nl80211 as the supported USB Wi-Fi path.
• Drops unused RTL8188EU firmware to restore squashfs capacity.
Diagram

graph TD
  L["Lite image"] --> C["Kernel config"] --> M["MT7601U nl80211"] --> R["Rootfs image"]
  U["Ultimate image"] --> C
  L -. drops firmware .-> D["Removed stacks"]
  U -. drops firmware .-> D
  C -. disables drivers .-> D
  D -. shrinks .-> R
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Pin moving application artifacts
  • ➕ Makes image sizes and CI results reproducible.
  • ➕ Prevents unplanned upstream growth from repeatedly consuming headroom.
  • ➖ May delay application and WebUI fixes without an update process.
  • ➖ Does not justify retaining components that have no loading path.
2. Select the out-of-tree 8188EU stack
  • ➕ Restores functional support for cameras requiring RTL8188EU adapters.
  • ➕ Matches the existing rtl8188eu-generic module name.
  • ➖ Consumes substantial rootfs space and would preserve the current overflow.
  • ➖ Camera-specific adapter support is better selected by builder profiles.
3. Increase the filesystem partition cap
  • ➕ Retains all current packages and provides broader future headroom.
  • ➖ Requires compatible flash layouts and upgrade handling.
  • ➖ Creates significantly greater hardware and deployment risk.

Recommendation: Removing unreachable drivers and firmware is the best immediate fix because it restores capacity without sacrificing a working board-level path; MT7601U remains supported through nl80211. Pinning moving Majestic artifacts should be considered separately for reproducible sizing, while cameras needing RTL8188EU should select the correctly named out-of-tree module through device profiles.

Files changed (3) +30 / -44

Other (3) +30 / -44
hi3518ev300.generic.configDisable unreachable RTL8188EU, wireless extensions, and SCSI modules +30/-42

Disable unreachable RTL8188EU, wireless extensions, and SCSI modules

• Removes the in-tree R8188EU staging driver and its implicitly selected wireless-extension ABI while preserving cfg80211, mac80211, and nl80211 support. It also disables the unreachable SCSI disk stack so scsi_mod and sd_mod are no longer packaged, with comments documenting the dependency and reachability analysis.

br-ext-chip-hisilicon/board/hi3516ev200/hi3518ev300.generic.config

hi3518ev300_lite_defconfigRemove RTL8188EU firmware from the lite image +0/-1

Remove RTL8188EU firmware from the lite image

• Stops packaging rtl8188eufw.bin after the only consuming kernel driver was disabled. This helps restore the lite squashfs image below its 5120KB limit while retaining MT7601U firmware.

br-ext-chip-hisilicon/configs/hi3518ev300_lite_defconfig

hi3518ev300_ultimate_defconfigRemove RTL8188EU firmware from the ultimate image +0/-1

Remove RTL8188EU firmware from the ultimate image

• Drops the unused RTL8188EU firmware package from the ultimate variant. MT7601U firmware and the separately packaged RTL8188FU and RTL8189FS drivers remain available through cfg80211 and nl80211.

br-ext-chip-hisilicon/configs/hi3518ev300_ultimate_defconfig

@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Sep 13, 2026

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (1) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Action required

1. Camera Wi-Fi changes lack field proof 📘 Rule violation ☼ Reliability
Description
hi3518ev300.generic.config removes the wireless-extensions ABI and disables CONFIG_R8188EU,
while both lite and ultimate defconfigs drop the RTL8188EU firmware selection despite the PR
explicitly stating that no hi3518ev300 camera or supported dongle was tested. Both shipping images
consume this fragment, so hardware upgrades reach changed Wi-Fi paths without boot, module-loading,
interface-creation, scanning, association, reconnect, or streaming results for the retained MT7601U
support and the ultimate image's nl80211-only RTL8188FU and RTL8189FS adapters.
Code

br-ext-chip-hisilicon/board/hi3516ev200/hi3518ev300.generic.config[2040]

+# CONFIG_R8188EU is not set
Evidence
The PR description expressly reports that the behavior-changing firmware diff was not tested on a
camera and requests later confirmation of association behavior. The cited generic configuration
shows both the removed wireless-extensions ABI and disabled in-tree Wi-Fi driver, while the lite and
ultimate defconfigs show that both shipping variants consume the changed kernel configuration and
firmware selections, leaving the remaining Wi-Fi implementations without representative hardware
validation.

Rule 1: Hardware evidence is present and honest
br-ext-chip-hisilicon/board/hi3516ev200/hi3518ev300.generic.config[2028-2040]
br-ext-chip-hisilicon/board/hi3516ev200/hi3518ev300.generic.config[809-819]
br-ext-chip-hisilicon/configs/hi3518ev300_lite_defconfig[18-24]
br-ext-chip-hisilicon/configs/hi3518ev300_ultimate_defconfig[18-24]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The PR changes the Wi-Fi kernel ABI, driver availability, and firmware selections for both hi3518ev300 image variants while explicitly reporting no camera or supported-dongle validation. Real-camera results are required to demonstrate that the retained MT7601U path and the ultimate image's nl80211-only RTL8188FU and RTL8189FS adapters still work.
## Fix Focus Areas
- br-ext-chip-hisilicon/board/hi3516ev200/hi3518ev300.generic.config[809-819]
- br-ext-chip-hisilicon/board/hi3516ev200/hi3518ev300.generic.config[2028-2040]
- br-ext-chip-hisilicon/configs/hi3518ev300_lite_defconfig[60-64]
- br-ext-chip-hisilicon/configs/hi3518ev300_ultimate_defconfig[69-73]
## Recommended Fix
Build and boot a clean affected image on hi3518ev300 hardware, test MT7601U association and streaming, and test the ultimate image with RTL8188FU and RTL8189FS if that variant is retained. Record before-and-after commands and output covering module loading, interface creation, scanning, association, reconnect behavior, and streaming in the PR description; if this validation cannot be supplied, restore the removed wireless-extension settings, in-tree driver, and firmware selections until hardware evidence is available.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

2. A new comment denies MMC support ✓ Resolved 🐞 Bug ⚙ Maintainability
Description
The new SCSI rationale says there is “no MMC block,” but the same configuration enables
CONFIG_MMC_BLOCK and the HiSilicon SDHCI host controller. A later maintainer could therefore
mistake supported SD or eMMC storage for an unreachable subsystem instead of understanding that MMC
block devices simply do not depend on SCSI.
Code

br-ext-chip-hisilicon/board/hi3516ev200/hi3518ev300.generic.config[R1113-1115]

+# Nothing on this SoC can reach a SCSI disk: USB_STORAGE and USB_EHCI_HCD are
+# both off, there is no ATA and no MMC block, and no module in the image depends
+# on scsi_mod or sd_mod. They shipped as 185KB of .ko that no code path could
Evidence
The changed comment explicitly claims there is no MMC block path, whereas the same kernel
configuration enables the MMC subsystem, MMC block devices, and the HiSilicon SDHCI controller.
These settings directly contradict only that factual claim; they do not invalidate removing SCSI.

br-ext-chip-hisilicon/board/hi3516ev200/hi3518ev300.generic.config[1113-1121]
br-ext-chip-hisilicon/board/hi3516ev200/hi3518ev300.generic.config[1865-1875]
br-ext-chip-hisilicon/board/hi3516ev200/hi3518ev300.generic.config[1882-1887]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The new SCSI-removal comment incorrectly states that the board has no MMC block support. MMC block and a HiSilicon SDHCI host are enabled, although they remain independent of the SCSI stack.
## Fix Focus Areas
- br-ext-chip-hisilicon/board/hi3516ev200/hi3518ev300.generic.config[1113-1116]
## Recommended Fix
Replace the claim that there is no MMC block support with an accurate explanation that the enabled MMC block stack does not use SCSI. Keep the valid observations that USB storage, EHCI, ATA, and SCSI-dependent modules are absent.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Tip of the day
💡 Did you know, you can start a comment with 'qodo' or '@qodo' to chat about any finding

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Comment thread br-ext-chip-hisilicon/board/hi3516ev200/hi3518ev300.generic.config
Comment thread br-ext-chip-hisilicon/board/hi3516ev200/hi3518ev300.generic.config Outdated
The board has CONFIG_MMC=y, CONFIG_MMC_BLOCK=y and CONFIG_MMC_SDHCI_HISI=y, and
mmc_block is in modules.builtin, so "no MMC block" was simply wrong and would
have read as "this SoC has no SD/eMMC support" to the next person.

The removal it justifies is unaffected -- MMC_BLOCK serves cards as mmcblk and
never goes through the SCSI layer, so SCSI still has no transport behind it.
Comment only; kconfig strips comments, so the built artifacts are identical.
@widgetii
widgetii merged commit aedd8ca into master Sep 13, 2026
34 of 39 checks passed
@widgetii
widgetii deleted the hi3518ev300-one-wifi branch September 13, 2026 10:48
widgetii added a commit to OpenIPC/builder that referenced this pull request Sep 13, 2026
…and drop excludes firmware now handles (#157)

Follow-up to OpenIPC/firmware#2410, which left MT7601U as the only in-tree USB
Wi-Fi stack on hi3518ev300. RTL8188EU lands here as a camera profile, splitting
the two adapters across the two repositories.

hi3518ev300_lite_generic-rtl8188eu builds the driver INTO the kernel rather than
shipping it as a module: a profile whose only Wi-Fi is that driver has no reason
to carry it as loadable code, and the rootfs is the partition under pressure.
The out-of-tree rtl8188eus-openipc cannot make that move -- it is an external
kernel-module package, never linked into vmlinux -- so this uses the in-tree
staging driver at CONFIG_R8188EU=y through a variant kernel config, the same
shape as gk7205v200.generic-otg.config.

Built in, the driver also has no modprobe problem: as a module it was
unreachable, because /etc/wireless/usb's rtl8188eu-generic profile modprobes
'8188eu' while the in-tree module is 'r8188eu'. Linked into the kernel it binds
off its own USB device table at boot.

CONFIG_R8188EU selects WIRELESS_EXT, so the wext ABI firmware#2410 dropped comes
back on this variant only. It requests rtlwifi/rtl8188eufw.bin, so
linux-firmware-openipc comes with it. Registered in .github/firmware-drift.json
against the firmware blob it derives from.

MEASURED in CI, against the module-based version of the same profile:
  uImage           [1873KB/2048KB] -> [1991KB/2048KB]   56KB free
  rootfs.squashfs  [5084KB/5120KB] -> [4728KB/5120KB]  392KB free

Also drops excludes entries firmware now handles upstream: r8188eu.ko from
xiaomi-mjsxj02hl, and r8188eu.ko + scsi_mod.ko + sd_mod.ko from
yuancam-dgk423403. Both cameras build green; both run out-of-tree Realtek
drivers over nl80211 and are otherwise unaffected.

Not tested on a camera. This changes which 8188EU driver is used -- mainline
staging rather than the Realtek vendor fork -- so it wants confirmation that a
dongle is detected at boot without a modprobe, associates, and streams.
widgetii added a commit that referenced this pull request Sep 15, 2026
hi3516ev300_lite failed this PR's matrix at 5124KB against its 5120KB cap.
Not caused by anything here -- this branch touches four goke kernel configs,
a cv500+neo-gated hook in hisilicon-opensdk, and usb-dual-role, none of which
this board uses. It failed because it finished the 2026-09-14 nightly at
exactly 5120/5120KB, zero headroom, and the unpinned majestic/webui refs grew
another 4KB overnight. It was going to go red on the next upstream bump
whatever landed; it happened to be this run.

The board carries the identical dead set the goke boards did, and for the
identical reason: the USB gadget functions exist only for usb-dual-role, which
no defconfig selects and which ci-matrix.py lists in NOT_BUILT, and
br_netfilter and i2c-tiny-usb have no consumer anywhere in the tree. Nothing
modprobes any of these names, mdev.conf has no $MODALIAS rule, and S40network
dispatches only on the `wlandev` U-Boot variable.

USB_GADGET stays =y here too -- USB_DWC3_DUAL_ROLE=y on this board and depends
on it, so turning the subsystem off would take USB host with it. And with
usb-dual-role now carrying its own LINUX_CONFIG_FIXUPS, a board that selects
the package still gets the gadget symbols back.

MEASURED, full clean build of hi3516ev300_lite (make clean, so no stale
per-package module trees):

  before  [5124KB/5120KB]  4KB OVER   (this PR's matrix, run 34927690505)
  after   [5056KB/5120KB]  64KB free
  uImage  [2005KB/2048KB]  43KB free, unchanged -- no kernel cost, which
          matters here because this board has the second-tightest kernel
          partition in the tree and could not have paid for a build-in trade.

Verified in the built rootfs: all ten .ko gone; mac80211, cfg80211, mt7601u,
wireguard and tun all still ship. SCSI is deliberately left alone -- #2410
dropped it from hi3518ev300 after establishing that board had no transport,
and scsi_mod/sd_mod here would need that determination made separately.

The config is shared by hi3516ev300_lite, _ultimate, _glibc and _dev, and none
of the four selects usb-dual-role.

NOT TESTED ON A CAMERA.

Refs #2420
widgetii added a commit that referenced this pull request Sep 15, 2026
…nnot load

Six boards were over or at their squashfs cap. All of them ship kernel modules
that no code path on the image can load; this removes those, at no cost to the
kernel partition and with nothing dropped that anything uses.

  gk7205v300_lite   5140 -> 5080KB/5120   (was 20KB over)
  gk7205v200_lite   5132 -> 5072KB/5120   (was 12KB over)
  gk7605v100_lite   5124 -> 5068KB/5120   (was  4KB over)
  gk7202v300_lite   5120 -> 5088KB/5120   (was  0KB free)
  hi3516ev300_lite  5124 -> 5060KB/5120   (was  4KB over)
  hi3516av300_neo   8208 -> 6688KB/8192   (was 16KB over)

WHY THEY WENT OVER. Nothing in this repository grew to do it. Between the last
green nightly (34771958692) and the red one (34874636710), every board carrying
majestic-webui grew 12-44KB, and the only three at +0KB are exactly the three
that ship neither majestic nor the webui. Both are unpinned moving refs by
design. Full analysis, and the levers not spent here, in #2420.

THE USB GADGET STACK HAS NO CONSUMER (goke x4, hi3516ev300). libcomposite,
configfs, usb_f_acm/ecm/rndis/mass_storage, u_ether and u_serial exist on these
images only for usb-dual-role -- selected by zero defconfigs and listed in
ci-matrix.py's NOT_BUILT. There is no USB hotplug modprobe either: mdev.conf
carries no $MODALIAS rule and S40network dispatches only on the `wlandev`
U-Boot variable, so a module is loadable if and only if a script names it.
Nothing names these. br_netfilter and i2c-tiny-usb go too -- no consumer
anywhere in the tree.

USB_GADGET itself stays =y. USB_DWC3_DUAL_ROLE depends on it, so turning the
subsystem off would drop the controller out of dual-role and take USB host --
and the Wi-Fi dongle -- with it. Only the functions go.

Not touched, having checked: usbnet, cdc_ether, mii, usb_wwan and
usb-serial-simple are dependency-loaded by option/usbserial/rndis_host, which
/etc/wireless/modem does modprobe; every crypto .ko is loaded by the kernel
crypto API's own request_module(), which is why #2397 built those in rather
than deleting them; tun is live via vtund-openipc/files/tunnel:24.

THE cv500 NEO SHIPPED EVERY VENDOR MODULE TWICE. The neo variants build the 7.x
upstream-patches kernel, where buildroot's kernel-module install lands the .ko
in updates/ rather than the extra/ that hisilicon-opensdk's finalize hook
clears, and INSTALL_TARGET_CMDS then copies the same open_*.ko set into
hisilicon/. kmod searches "updates" first, so that is the copy modprobe
resolves and depmod indexes; hisilicon/ is unreachable. On hi3516av300_neo that
is 45 modules and 5.4MB -- 1520KB of squashfs. Verified against the nightly's
own published image: the hisilicon/ names are a pure subset of updates/,
modules.dep names updates/ 156 times and hisilicon/ never, and the two copies
of a module are the same object differing only in that updates/ is stripped.

Scoped to cv500+neo deliberately, because the same duplication has the opposite
answer next door: hi3516cv300_neo renames its modules to hi3516cv300_*/hi_* in
hisilicon/, names that exist nowhere in updates/ and that its load_hisilicon
insmods by filename. The 4.9 boards have no updates/ directory at all. The
remaining neo boards are tracked in #2420.

usb-dual-role NOW BRINGS ITS OWN KERNEL SYMBOLS, through the same
LINUX_CONFIG_FIXUPS mechanism linux-patcher uses, so disabling them per board
cannot strand it. The audit behind that is worth recording: usb-mode modprobes
exactly configfs, libcomposite and usb_f_uvc -- it never composes ACM, ECM,
RNDIS or mass_storage, which are precisely the four functions these boards were
shipping -- while USB_CONFIGFS_F_UVC, the one function it does load, was absent
from those configs entirely. The previous state could not have worked. Verified
by selecting the package on gk7205v300_lite and rebuilding: USB_GADGET,
CONFIGFS_FS, USB_CONFIGFS and USB_LIBCOMPOSITE come back. F_UVC does not,
because it also needs VIDEO_V4L2 and VIDEO_DEV; the request stays in the fixup
and the limit is written into both the .mk and the Config.in help.

MEASURED, full clean builds (make clean, so no stale per-package module trees),
before and after taken from the same build:

  gk7205v300_lite   5,263,360 -> 5,201,920 B   uImage [1810KB/2048KB] unchanged
  hi3516ev300_lite  [5124KB]  -> [5056KB]      uImage [2005KB/2048KB] unchanged

No kernel cost anywhere, which matters for hi3516ev300 -- it has the
second-tightest kernel partition in the tree and could not have paid for a
build-in trade. Verified in the built rootfs: the removed .ko are gone and
mac80211, cfg80211, mt7601u, wireguard, tun, option, usbserial, rndis_host,
usbnet and mii all still ship, with modules.dep still resolving
mt7601u -> mac80211 -> cfg80211. SCSI is deliberately left alone on
hi3516ev300; #2410 dropped it from hi3518ev300 after establishing that board
had no transport, and scsi_mod/sd_mod here need that determination separately.

NOT TESTED ON A CAMERA -- I have none of these boards. Someone with a goke
camera should confirm an MT7601U dongle still associates and USB host still
enumerates; someone with an hi3516av300 neo should confirm it still boots and
streams. hi3516av300_neo was not built locally either (it needs the 7.x kernel
tree); its evidence is the published image above, and CI builds it.

Refs #2420
openipc-ai added a commit that referenced this pull request Sep 18, 2026
The 2026-09-18 master matrix (run 35375141337, at 49908b5) failed on three
boards, each at 5124KB against the 5120KB squashfs cap -- over by exactly 4KB.
All three were reproduced locally from a clean worktree at that commit before
anything here was changed, and the cause is the same fleet-wide drift in the
unpinned majestic and majestic-webui refs that #2404, #2410, #2421, #2433,
#2437 and #2440 have each answered on other boards. #2437 landed one day ago
and left these two Goke boards 8KB of headroom while saying in as many words
that the drift would take them again; it did.

hi3516cv200 shipped two Realtek drivers waiting on firmware the image does not
carry. rtl8192cu asks for rtlwifi/rtl8192cufw*.bin, and rtl8xxxu -- with
RTL8XXXU_UNTESTED off, so RTL8723AU only -- asks for rtlwifi/rtl8723aufw*.bin.
The only Wi-Fi blobs this board installs are mediatek/mt7601u.bin and
rtlwifi/rtl8188eufw.bin, so neither could finish probing, and nothing loads
them either: /etc/wireless/usb, dispatched by S40network from the wlandev
U-Boot variable, is the one entry point and names mt7601u and 8188eu.
That was 350KB of .ko (rtl8xxxu 104KB, rtl8192cu 90KB, rtlwifi 85KB,
rtl8192c-common 54KB, rtl_usb 15KB), and RTLWIFI_DEBUG=y is why rtlwifi.ko was
as large as it was. Same argument as #2404 made for hi3519v101.

R8188EU stays, and the line is drawn where the firmware is: rtl8188eufw.bin is
what drivers/staging/rtl8188eu/hal/fw.c requests by name, and R8188EU is the
only symbol on this board selecting WIRELESS_EXT and WEXT_PRIV, which the
out-of-tree drivers a camera may add still need. This is #2410 in reverse --
there the same driver went, because that board had no wext consumer left.

gk7205v200 and gk7605v100 are out of free levers: #2376 took their SCSI stack,
#2421 stripped the modules they cannot load, #2437 built their crypto helpers
in, and every module left is named by a script or dependency-loaded by one that
is. So they take the cheaper half of the one lever #2420 found remaining, the
same half #2440 gave gk7205v300. Only cfg80211 moves; mac80211 and mt7601u stay
modules, because moving those too would trade "one commit from red on rootfs"
for the same on uImage. The cost is worth stating: cfg80211 is now permanently
resident, so every camera pays for the wireless core whether a dongle is ever
plugged in or not.

The load path survives being built in -- modules.builtin now lists
kernel/net/wireless/cfg80211.ko, which busybox modprobe consults, and
mac80211.ko's modules.dep line no longer names it.

Measured locally, clean builds of both the before and the after -- an
incremental rebuild keeps the old .ko in target/ and reports a nonsensical
saving, which is the trap #2437 documented:

  hi3516cv200_lite   rootfs 5124 -> 5012KB   uImage 1656 -> 1657KB
  gk7205v200_lite    rootfs 5124 -> 5044KB   uImage 1821 -> 1876KB
  gk7605v100_lite    rootfs 5124 -> 5044KB   uImage 1799 -> 1855KB

None of the three prints a headroom warning any more.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant