Skip to content

hisilicon: five boards back under the squashfs cap - #2459

Merged
openipc-ai merged 1 commit into
masterfrom
boards-back-under-cap-2026-09-20
Sep 20, 2026
Merged

openipc-ai merged 1 commit into
masterfrom
boards-back-under-cap-2026-09-20

Conversation

@openipc-ai

@openipc-ai openipc-ai commented Sep 20, 2026

Copy link
Copy Markdown
Collaborator

Problem

hi3516ev200_lite went 4KB over its 5120KB squashfs cap on master
(run 35458506325), failing the build and taking the CI Gate with it. No commit
in this tree is responsible.

majestic is fetched as majestic.<family>.<variant>.master.tar.bz2 and
majestic-webui as its dist release asset, so both move without a commit
here. The majestic binary was rebuilt at 17:33 GMT, a minute before that build
started (1288676 -> 1297076 bytes), and the webui dist grew 125267 bytes
across that day's SD-card work (cgi-bin/j/sdcard.cgi +47128, a new
cgi-bin/wfb.cgi +17709, a/sdcard.js +9587, cgi-bin/j/ptz.cgi +7069,
a/sdcard-health.js +5049).

Four more boards were a couple of ordinary commits behind it, and CI said so in
the same run:

hi3519v101_lite    rootfs.squashfs has  0KB left of 5120KB
hi3516ev100_lite   rootfs.squashfs has  8KB left of 5120KB
hi3516dv200_lite   rootfs.squashfs has 20KB left of 5120KB
hi3518ev100_lite   rootfs.squashfs has 24KB left of 5120KB

The webui already carries about 22KB more than the build that failed, so this
is not a one-board problem.

Each board here drops kernel modules that its image can never load — the test
#2442 used, one board at a time:

board dropped why it can never bind
hi3516ev200 SCSI (scsi_mod, sd_mod, scsi_transport_fc) USB_STORAGE is off and no HBA is enabled, so nothing can register a SCSI device. SCSI_LOWLEVEL=y is only the menu gate. The usb_f_mass_storage gadget answers SCSI itself and does not use this subsystem.
hi3516dv200 the same SCSI, plus mt7601u/mac80211/cfg80211 this board ships no firmware at all, so mt7601u could never get mediatek/mt7601u.bin; nothing else here is built on the stack
hi3519v101 mac80211, cfg80211 nothing in modules.dep depends on either; the only Wi-Fi driver is the staging r8188eu, which carries its own stack and firmware
hi3516ev100 mac80211 no mac80211 driver on the image. cfg80211 and ZD1201 stay — ZD1201 is what selects WIRELESS_EXT here
hi3518ev100 mac80211, rtlwifi family rtl8192cu waits on rtlwifi/rtl8192cufw*.bin and rtl8192se on rtl8192sefw.bin; the only blobs on the image are rtl8188eufw.bin and mt7601u.bin. cfg80211 stays for the out-of-tree mt7601sta

hi3516ev200.generic.config is shared with the ultimate variant, so only the
SCSI change is made there: ultimate ships mediatek/mt7601u.bin and its
mt7601u works, and it has no USB_STORAGE either.

Hardware tested on

hi3516ev300_lite — SoC family hi3516ev200, kernel 4.9.37, the same board
directory and the same kernel tree these five configs build from.
Lab camera
at 10.216.128.76, IMX335, running nightly-20260917-1ebaef8.

None of the five boards this PR changes could be run, and I will not claim
otherwise: the only lab board for any of them is the hi3516ev200 at
10.216.128.45, which is off the network entirely (no ARP entry, 22/80/554 all
closed). What that camera can show is the premise — that the modules this PR
removes are carried and can never bind — because it ships the identical dead
SCSI set from the same kernel, and the identical firmware-less mt7601u.ko.

It is also the board that already had this exact change made to it. #2440
("hi3516ev300, gk7205v300: back under the squashfs cap", merged 2026-09-18)
turned CONFIG_SCSI_MOD=m into =y and deleted the same SCSI block from
hi3516ev200/hi3516ev300.generic.config, which is the byte-for-byte shape of
the hi3516ev200 hunk here. fe99bb87 ("goke, hi3516ev300, cv500 neo: drop the
kernel modules these boards cannot load") is the same class of change again.
The lab camera runs a build from 2026-09-17, one day before #2440, so it is
the before state of a change that has since been in every nightly.

What a maintainer with the actual boards should still confirm: Wi-Fi still
associates on hi3516ev200_ultimate (shared config, wireless deliberately
untouched), and that nobody was relying on USB mass storage on
hi3516ev200/hi3516dv200 or an RTL8192CU/RTL8192SE dongle on hi3518ev100 — the
argument here is that those could not have worked, not that nobody wants them.
No OpenIPC/builder device targets any of the five boards, so no retail image
is affected.

Evidence

On the camera — the three modules this PR drops from hi3516ev200 are shipped
and have never been loaded, and the SCSI bus was never registered at all:

# grep -E "BUILD_PLATFORM|BUILD_ID" /usr/lib/os-release
BUILD_ID=nightly-20260917-1ebaef8
BUILD_PLATFORM=hi3516ev300_lite
# uname -a
Linux hi3516ev300-imx335 4.9.37 #1 Thu Sep 17 04:31:40 UTC 2026 armv7l GNU/Linux

# ls /lib/modules/*/kernel/drivers/scsi/
scsi_mod.ko  scsi_transport_fc.ko  sd_mod.ko

# lsmod | tail -n +2 | awk '{print $1}'
open_cipher open_wdt open_mipi_rx open_acodec open_adec open_aenc open_ao
open_ai open_aio open_sensor_spi open_sensor_i2c open_pwm open_ive open_jpege
open_h265e open_h264e open_venc open_rc open_vedu open_chnl open_vpss open_isp
open_openipc_frame_ts open_vi open_vgs open_rgn open_sys open_base open_osal
open_sys_config open_hwrng vfat fat

# ls /sys/bus/scsi/devices/
ls: /sys/bus/scsi/devices/: No such file or directory
# ls /lib/modules/*/kernel/drivers/usb/storage/
ls: No such file or directory
# ls /lib/firmware
ls: /lib/firmware: No such file or directory

# uptime
 05:33:54 up 48 min,  load average: 0.56, 0.59, 0.63
# curl -o /dev/null -w '%{http_code}' http://127.0.0.1/
200
# ps -o pid,etime,comm | grep majestic
  888 48:30 majestic

Not one of the three is loaded, /sys/bus/scsi/devices does not exist so the
bus was never registered, there is no usb-storage module to register one, and
there is no /lib/firmware for mt7601u.ko to ask. That is the whole argument
of this PR, on a running camera that streams.

And the same change on that board is already in production — the current
hi3516ev300_lite nightly, built after #2440, has no drivers/scsi directory
at all:

$ unsquashfs openipc.hi3516ev300-nor-lite.tgz; ls lib/modules/*/kernel/drivers/scsi/
ls: No such file or directory

Sizes measured by re-squashing each board's published nightly rootfs with the
modules removed, -noappend -b 128K -comp xz — the same options the build
uses, which reproduces each published figure to within 4KB:

Before:

hi3516ev200_lite   5124 / 5120 KB   -- size exceeded by: 4KB
hi3516dv200_lite   5100 / 5120 KB
hi3519v101_lite    5120 / 5120 KB
hi3516ev100_lite   5112 / 5120 KB
hi3518ev100_lite   5096 / 5120 KB

After (re-squash of the same rootfs minus the dropped modules):

hi3516ev200_lite   5144.35 -> 5074.44   saves  69.91 KB   (*)
hi3516dv200_lite   5097.20 -> 4789.68   saves 307.52 KB
hi3519v101_lite    5118.92 -> 4935.11   saves 183.81 KB
hi3516ev100_lite   5108.20 -> 4989.82   saves 118.38 KB
hi3518ev100_lite   5092.21 -> 4911.85   saves 180.36 KB

(*) ev200's base is the last good nightly rootfs with the current majestic
binary and webui dist swapped in — that is, what the next build produces if
nothing changes: 5144.35 KB against a 5120 KB cap, 24 KB over rather than the
4 KB CI caught. It lands at 5074.44, 45 KB under. The other four are their own
published rootfs re-squashed, which reproduces the published figure to within
4 KB, so their saving is measured against what CI reported.

That attribution, same method:

last good nightly rootfs (49908b5)      5100.42 KB
  + the majestic binary of 17:33         5105.94 KB   (+5.52)
  + the current majestic-webui dist      5144.35 KB  (+38.41)

Every edit was run through its own kernel's olddefconfig (oldnoconfig on the
3.0.8 hi3516cv100 tree) to confirm the module set changes as intended and that
nothing is silently turned back on:

ev200    47 -> 43 modules   removed SCSI, SCSI_MOD, BLK_DEV_SD, SCSI_FC_ATTRS
dv200    46 -> 39 modules   + CFG80211, MAC80211, MT7601U
v101      5 ->  3 modules   removed CFG80211, MAC80211
ev100    49 -> 47 modules   removed MAC80211, RTL_CARDS
18ev100  15 -> 10 modules   removed MAC80211, RTLWIFI, RTL8192CU, RTL8192SE, RTL8192C_COMMON

Nothing was added in any of the five. RTL_CARDS on hi3516ev100 is a cascade:
it depends on mac80211, but it was a menu with no driver under it, so no
module is lost — that rootfs never had rtlwifi.ko.

And the property #2442 called out — that dropping the last driver which
selects WIRELESS_EXT takes the wext API away from out-of-tree drivers —
holds on all three boards where it applies:

hi3519v101   before WIRELESS_EXT=y WEXT_CORE=y WEXT_PRIV=y   after  y  y  y
hi3516ev100  before WIRELESS_EXT=y WEXT_CORE=y WEXT_PRIV=y   after  y  y  y
hi3518ev100  before WEXT_CORE=y (from CFG80211_WEXT)         after  y
$ python3 .github/scripts/ci-matrix.py --self-test
ci-matrix: self-test ok (100 boards, 137 packages, 60 cases)

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

hi3516ev200_lite went 4KB over its 5120KB cap on 2026-09-19 with no commit
in this tree responsible. majestic is fetched as .master.tar.bz2 and
majestic-webui as its "dist" release asset, so both move on their own: the
majestic binary was rebuilt a minute before that build (1288676 -> 1297076
bytes) and the webui dist grew 125267 bytes across the day's SD-card work.
Re-squashing the last good nightly's rootfs puts those at +5.52KB and
+38.41KB compressed.

Four more boards were a couple of ordinary commits behind it -- hi3519v101_lite
at 0KB left of 5120KB, hi3516ev100_lite at 8KB, hi3516dv200_lite at 20KB,
hi3518ev100_lite at 24KB -- and the webui already carries ~22KB more than the
build that failed.

Each board drops kernel modules that image can never load, the test #2442
used:

  hi3516ev200  SCSI: USB_STORAGE is off and no HBA is enabled, so scsi_mod,
               sd_mod and a Fibre Channel transport had nothing to bind to.
               Shared with the ultimate variant, which has no USB_STORAGE
               either, so the wireless stack stays -- ultimate ships
               mediatek/mt7601u.bin and its mt7601u works.
  hi3516dv200  the same dead SCSI, plus mt7601u/mac80211/cfg80211: this
               board ships no firmware at all, so mt7601u could never probe,
               and nothing else here is built on the stack.
  hi3519v101   mac80211 and cfg80211 have no user in modules.dep; the only
               Wi-Fi driver is the staging r8188eu, which carries its own
               stack and its own firmware.
  hi3516ev100  mac80211 has no user; cfg80211 and ZD1201 stay because ZD1201
               is what selects WIRELESS_EXT here.
  hi3518ev100  rtl8192cu and rtl8192se wait on rtlwifi/rtl8192cufw*.bin and
               rtl8192sefw.bin, and the only blobs on the image are
               rtl8188eufw.bin and mt7601u.bin; mac80211 served only them.
               cfg80211 stays for the out-of-tree mt7601sta.

Measured by re-squashing each board's published rootfs with the modules
removed (-b 128K -comp xz, which reproduces the published figure to within
4KB): ev200 5124 -> ~5054, dv200 5100 -> ~4792, hi3519v101 5120 -> ~4936,
ev100 5112 -> ~4994, hi3518ev100 5096 -> ~4916.

Every edit was run through its own kernel's olddefconfig (oldnoconfig on the
3.0.8 hi3516cv100 tree) to confirm the module set changes as intended and
nothing is silently turned back on, and that WIRELESS_EXT, WEXT_CORE and
WEXT_PRIV survive on hi3519v101 and hi3516ev100 and WEXT_CORE on
hi3518ev100 -- the trap #2442 called out for out-of-tree drivers.
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Prune unusable HiSilicon modules to restore squashfs headroom

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

Grey Divider

AI Description

• Removes unusable kernel modules from five space-constrained HiSilicon board images.
• Recovers 70–308 KB compressed space, returning all images below the 5120 KB cap.
• Preserves required wireless-extension APIs and supported firmware-backed drivers.
Diagram

graph TD
  E18["hi3518ev100 config"] & E16["hi3516ev100 config"] & DV["hi3516dv200 config"] & EV["hi3516ev200 config"] & V101["hi3519v101 config"] --> P["Prune unusable modules"] --> R["Smaller squashfs"] --> C{"Under 5120 KB"}
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Pin moving application artifacts
  • ➕ Makes image sizes reproducible across builds.
  • ➕ Prevents unreviewed upstream asset growth from unexpectedly breaking CI.
  • ➖ Requires explicit updates for every majestic and WebUI release.
  • ➖ Does not remove kernel modules that are already unusable on these boards.
2. Increase the squashfs allocation
  • ➕ Provides broader headroom for future application growth.
  • ➕ Avoids changing supported kernel feature selections.
  • ➖ May require incompatible flash-partition layout changes.
  • ➖ Consumes constrained flash capacity while retaining dead modules.

Recommendation: Keep the PR's module-pruning approach: it restores meaningful headroom without removing functionality that can currently probe or bind. Separately consider pinning moving majestic artifacts to make future size changes reviewable; increasing the partition cap is less desirable because it affects device layouts and preserves unusable code.

Files changed (5) +66 / -77

Other (5) +66 / -77
hi3518ev100.generic.configRemove firmware-less rtlwifi and mac80211 modules +14/-15

Remove firmware-less rtlwifi and mac80211 modules

• Disables RTL8192SE, RTL8192CU, RTLWIFI, RTL8192C_COMMON, and the now-unused mac80211 stack because their required firmware is absent. Retains cfg80211 for the out-of-tree mt7601sta driver and its WEXT compatibility path.

br-ext-chip-hisilicon/board/hi3516cv100/hi3518ev100.generic.config

hi3516ev100.generic.configDisable the unused mac80211 wireless stack +10/-10

Disable the unused mac80211 wireless stack

• Removes mac80211 because no included driver depends on it, allowing the empty RTL_CARDS menu to disappear as well. Keeps cfg80211 and ZD1201 so WIRELESS_EXT remains available to supported and out-of-tree drivers.

br-ext-chip-hisilicon/board/hi3516cv300/hi3516ev100.generic.config

hi3516dv200.generic.configRemove unusable SCSI and mt7601u stacks +19/-28

Remove unusable SCSI and mt7601u stacks

• Disables SCSI disk and Fibre Channel transport support because neither USB storage nor an HBA can register a SCSI device. Also removes mt7601u, cfg80211, and mac80211 because the board image provides no required mt7601u firmware.

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

hi3516ev200.generic.configDisable the unbindable SCSI subsystem +13/-8

Disable the unbindable SCSI subsystem

• Removes SCSI, disk, and Fibre Channel transport modules because the configuration enables neither USB storage nor a low-level HBA. Leaves the hidden SCSI_MOD symbol at its non-module default and preserves the shared ultimate variant's working wireless stack.

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

hi3519v101.generic.configRemove wireless stacks unused by r8188eu +10/-16

Remove wireless stacks unused by r8188eu

• Disables cfg80211 and mac80211 because no packaged module depends on them and the staging r8188eu driver carries its own stack. Retains WIRELESS_EXT, selected by r8188eu, for compatibility with potential out-of-tree drivers.

br-ext-chip-hisilicon/board/hi3519v101/hi3519v101.generic.config

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

qodo-free-for-open-source-projects Bot commented Sep 20, 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 behavior changes go untested 📘 Rule violation ☼ Reliability
Description
The kernel configuration changes disable storage and wireless modules on five board images, but the
PR description explicitly states that none of them ran on a camera. Any camera relying on the
removed module paths reaches the changed behavior at boot or device attachment without real-hardware
output confirming that boot, streaming, and retained wireless support still work.
Code

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

+# CONFIG_SCSI is not set
Evidence
PR Compliance ID 3 requires real-camera evidence when a change can alter firmware behavior and
expressly fails changes described as not tested on hardware. The cited configuration disables SCSI
support in an affected image, while the PR description states, `None — this has not run on a camera,
so it is a draft.`

Rule 3: Hardware evidence is present and honest
br-ext-chip-hisilicon/board/hi3516ev200/hi3516ev200.generic.config[1113-1113]

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 kernel module availability for five camera images but states that no affected image was tested on hardware. Hardware evidence is required before these behavior-changing configurations can be merged.
## Fix Focus Areas
- br-ext-chip-hisilicon/board/hi3516cv100/hi3518ev100.generic.config[550-553]
- br-ext-chip-hisilicon/board/hi3516cv300/hi3516ev100.generic.config[654-663]
- br-ext-chip-hisilicon/board/hi3516ev200/hi3516dv200.generic.config[705-714]
- br-ext-chip-hisilicon/board/hi3516ev200/hi3516ev200.generic.config[1102-1113]
- br-ext-chip-hisilicon/board/hi3519v101/hi3519v101.generic.config[754-764]
## Recommended Fix
Build and flash the affected images on representative real cameras, then update the PR evidence with before-and-after boot, streaming, and relevant storage or Wi-Fi results. At minimum, verify the shared hi3516ev200 configuration on both affected variants and exercise each retained networking path before marking the PR ready for merge.

ⓘ 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 turn on the rule miner and Qodo learns your standards from review history

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@openipc-ai
openipc-ai merged commit be1f790 into master Sep 20, 2026
44 of 48 checks passed
@openipc-ai
openipc-ai deleted the boards-back-under-cap-2026-09-20 branch September 20, 2026 06:07
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