kernel: drop what no hi3518ev200 or ssc333 board can load, so the 8M lite boards fit again - #2399
Conversation
…lite boards fit again
Three boards are over the 5120KB rootfs cap on the current nightly and nothing
in either repository grew to do it: majestic's master tarball gained 18,097 B
and majestic-webui's dist asset 5,902 B between 09-09 and 09-11, both unpinned
moving refs. The uniform ~23KB pushed over the three boards that were already
within 16KB of the cap.
The SCSI stack goes from hi3518ev200.generic.config and both
infinity6b0-ssc009{a,b}.config. Nothing can reach it on either platform:
CONFIG_USB_STORAGE and CONFIG_ATA are unset, no SCSI low-level host driver is
enabled, and SD cards arrive through CONFIG_MMC_BLOCK as mmcblk, not sd. Same
argument and same shape as #2376; CONFIG_SCSI_MOD=y is what olddefconfig
derives once CONFIG_SCSI is off.
The in-kernel Realtek USB Wi-Fi stack goes from hi3518ev200.generic.config.
rtl8xxxu, rtl8192cu, rtlwifi, rtl8192c-common and rtl_usb ship in every
hi3518ev200 rootfs and no board loads them: every wlandev profile serving this
family modprobes an out-of-tree 8188fu or 8188eu, and the one non-Realtek board
uses mt7601u, so CONFIG_MT7601U is deliberately left alone. CONFIG_MAC80211 and
CONFIG_CFG80211 stay modular.
FAT and VFAT are built into the hi3518ev200 kernel instead of shipping as
modules. Every SD card needs them and /etc/modules loads vfat on every boot, so
the bytes move into the kernel partition rather than being dropped. NLS was
already built in.
cryptodev, ms_notify and echainiv go from both infinity6b0 configs. All three
ship as modules nothing ever loads: absent from load_sigmastar's insmod list
and from /etc/modules, unreferenced by any overlay script, and no string in
majestic, libmbedcrypto, curl or the mi_*/mhal vendor modules mentions them. A
module that is never loaded provides nothing, so dropping frees both rootfs and
kernel where building them in would have made unused code resident. Nothing
selects CONFIG_CRYPTO_ECHAINIV back - there is no IPsec on these configs - and
CONFIG_MS_CRYPTO, the hardware engine itself, is untouched.
PR Summary by QodoTrim unused kernel features to restore 8 MiB lite board builds
AI Description
Diagram
High-Level Assessment
Files changed (3)
|
Code Review by Qodo
1. Camera changes lack hardware proof
|
| # CONFIG_RTL_CARDS is not set | ||
| # CONFIG_RTL8XXXU is not set |
There was a problem hiding this comment.
1. Camera changes lack hardware proof 📘 Rule violation ☼ Reliability
The shared HiSilicon and SigmaStar kernel configs disable storage, wireless, cryptographic, and vendor modules—including CONFIG_RTL_CARDS and CONFIG_RTL8XXXU for every hi3518ev200 image—and change FAT/VFAT linkage without before-and-after output from real cameras. Because these configs feed lite and ultimate images across the affected families, the reported local clean-build and image-size measurements leave boot, streaming, SD-card mounting, intended out-of-tree Wi-Fi loading, and vendor-media operation after an upgrade unverified.
Agent Prompt
## Issue description
Shared kernel configurations remove or relink runtime capabilities in shipped HiSilicon and SigmaStar camera images without before-and-after evidence from real affected hardware. Local clean builds and image-size measurements do not establish that deployed cameras still boot and retain streaming, storage, networking, out-of-tree Wi-Fi loading, and vendor-media functionality.
## Fix Focus Areas
- br-ext-chip-hisilicon/board/hi3516cv200/hi3518ev200.generic.config[1038-1040]
- br-ext-chip-hisilicon/board/hi3516cv200/hi3518ev200.generic.config[1178-1179]
- br-ext-chip-hisilicon/board/hi3516cv200/hi3518ev200.generic.config[2001-2003]
- br-ext-chip-sigmastar/board/infinity6b0/infinity6b0-ssc009a.config[1003-1005]
- br-ext-chip-sigmastar/board/infinity6b0/infinity6b0-ssc009a.config[1877-1880]
- br-ext-chip-sigmastar/board/infinity6b0/infinity6b0-ssc009a.config[2310-2310]
- br-ext-chip-sigmastar/board/infinity6b0/infinity6b0-ssc009b.config[1003-1005]
- br-ext-chip-sigmastar/board/infinity6b0/infinity6b0-ssc009b.config[1877-1880]
- br-ext-chip-sigmastar/board/infinity6b0/infinity6b0-ssc009b.config[2310-2310]
## Recommended Fix
Restore the previous kernel settings until representative hi3518ev200 and Infinity6B0 cameras can be flashed and tested before and after the trim. Reapply the changes only after adding recorded real-hardware results to the PR description covering successful boot, streaming, SD-card mounting, intended out-of-tree Wi-Fi driver loading, vendor-media operation, kernel size, and rootfs size.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
There was a problem hiding this comment.
The rule is correctly applied here and I am not going to argue it away: this
changes what ships on a camera, so the template's exemption (docs, CI machinery,
repo metadata) does not cover it. I have no hi3518ev200 or Infinity6B0 unit on
the bench, which is why the PR body has a "Not tested on hardware" section rather
than a blank one.
For the record, what the change does rest on, so a reviewer can judge how much
the missing bench time is worth:
- Each dropped symbol has a reason that is checkable from the tree rather than
from a measurement. SCSI:CONFIG_USB_STORAGEandCONFIG_ATAunset, no SCSI
low-level host driver enabled,CONFIG_MMC_BLOCK=yso cards arrive as
mmcblk. In-kernel Realtek: everywlandevprofile serving hi3518ev200 in
general/overlay/etc/wireless/usbmodprobes an out-of-tree8188fu/8188eu,
andrtl8188fu-openipc/rtl8188eus-openipcare separate packages.
cryptodev/ms_notify/echainiv: absent fromload_sigmastar's insmod list
and/etc/modules, unreferenced by any overlay script, and no string in
majestic,libmbedcrypto,curlor themi_*/mhalvendor modules names
them. - FAT/VFAT are relinked, not removed:
modules.builtincarries
fs/fat/fat.koandfs/fat/vfat.koin the built tree. - Clean from-scratch builds of both platforms, before and after. hi3518ev200
1776 -> 1795 KB kernel, 5144 -> 4944 KB rootfs, 63 -> 54 modules with
8188fu.ko,mac80211.koandcfg80211.kostill present. Infinity6B0
2001 -> 1956 KB kernel, 5132 -> 5100 KB rootfs.
That establishes that nothing can load what was dropped; it does not establish
that a real camera boots and streams afterwards, which is the gap the rule is
about and which only a board can close.
So this should not merge on my say-so. Concretely it needs, on one hi3518ev200
and one Infinity6B0 camera, a sysupgrade from a current nightly to an image built
here plus: boot to SSH, RTSP streaming, an SD card mounting with FAT built in
(/proc/filesystems listing vfat with no module loaded), Wi-Fi associating via
the board's out-of-tree driver, and dmesg clean of new errors. I will add the
transcript to the PR body if someone with the hardware runs it, or fold in a
narrower version if a maintainer would rather split the Sigmastar half off.
Until then I would treat this as not ready rather than as waiting on a gate.
|
CI has finished: all 14 firmware families build green, including the three that The kernel sizes CI measured match my local clean builds exactly, which is worth
1795 and 1956 are the same figures my local builds produced for the device This still does not close the hardware gap above — it is evidence that the |
|
Merging on maintainer instruction with the hardware-evidence thread still open. Recording that plainly rather than clearing the gate a way that would misstate What is verified: every dropped symbol is unreachable by inspection of the tree What is not verified, and what someone with the hardware should still run —
If any of that fails, this is a clean revert — it is three kernel config files |
What broke
Three boards fail the rootfs cap on the current nightly, and nothing in either
repository grew to do it:
Diffing every downloaded tarball between the last green full matrix
(builder run 34390937880, 09-09 18:45 UTC) and the red one (34605828158,
09-11 13:42), exactly two inputs changed size:
majestic.<family>.lite.master.tar.bz2majestic-webui-dist.tar.gzBoth are unpinned moving refs, so the growth lands with no pull request to point
at — the same shape as #2397, one nightly later. It is uniform across boards:
ssc333_lite_tp-link-tapo-c110-v26, which still passes, went 5060 → 5084KB.The three that broke are the three boards of these families that were already
within 16KB of the cap, all of them carrying the out-of-tree RTL8188FU driver.
What changes
Nothing is removed that any of these boards can use. Four changes, all of them
the pattern from #2376 and #2397, applied to the three kernel configs that back
the failing boards.
1. The SCSI stack is dropped from
hi3518ev200.generic.configand bothinfinity6b0-ssc009{a,b}.config. Nothing can reach it on either platform:CONFIG_USB_STORAGEis unset,CONFIG_ATAis unset, no SCSI low-level hostdriver is enabled, and SD cards arrive through
CONFIG_MMC_BLOCK=yasmmcblk, notsd. Same argument and same shape as #2376.CONFIG_SCSI_MOD=yis what
olddefconfigderives onceCONFIG_SCSIis off.On hi3518ev200 it was
=m, soscsi_mod.ko(145KB) andsd_mod.ko(37KB)were shipping in every rootfs of the family. On infinity6b0 it was
=y, so itwas costing kernel rather than rootfs — which is what pays for change 3 below.
2. The in-kernel Realtek USB Wi-Fi stack is dropped from
hi3518ev200.generic.config:rtl8xxxu.ko(104KB),rtl8192cu.ko(90KB),rtlwifi.ko(85KB),rtl8192c-common.ko(54KB) andrtl_usb.ko(15KB) ship inevery hi3518ev200 rootfs and no board loads them. Every
wlandevprofile ingeneral/overlay/etc/wireless/usbthat serves this family modprobes anout-of-tree driver instead —
— and the one board of the eight that is not Realtek at all
(
hi3518ev200_lite_vstarcam-c8892wip) usesmt7601u-generic, soCONFIG_MT7601U=mis deliberately left alone.CONFIG_RTLWIFI_DEBUG=ywas set,which is why
rtlwifi.kowas as large as it was.3. FAT/VFAT are built in on hi3518ev200 instead of shipping as modules.
Every SD card mounted on these boards needs them and
/etc/modulesloadsvfaton every boot anyway, so this moves bytes from the rootfs into thekernel partition rather than dropping anything. NLS was already built in, so
nothing new is pulled in.
4.
cryptodev,ms_notifyandechainivare dropped from both infinity6b0configs. All three ship as modules that nothing ever loads: they are absent from
load_sigmastar's insmod list and from/etc/modules(which carries onlyvfatandexfat), no script in the overlay modprobes them, and no string inmajestic,libmbedcrypto,curl,load_sigmastaror any of themi_*/mhalvendor modules mentions
cryptodev,/dev/crypto,ms_notifyorechainiv.A module that is never loaded provides nothing at runtime, so dropping them
changes no behaviour while freeing both rootfs and kernel — unlike building
them in, which would have made unused code permanently resident.
Nothing selects
CONFIG_CRYPTO_ECHAINIVback: there is no IPsec on theseconfigs (
INET_ESP,INET_AH,XFRM_USERandNET_KEYare all unset), andCONFIG_CRYPTO_SEQIV=yis a separate symbol left alone.CONFIG_MS_CRYPTO=y,the hardware engine itself, is also left alone — only the unused
/dev/cryptouserspace interface goes.
Measured
Local from-scratch builds of this branch against firmware master at dac15a7 (this branch rebased onto a8054df, which only
touched .github/scripts/ci-matrix.py),
compared with a baseline build of the same tree with only these config changes
reverted. Both
cleanfull builds — an incremental one is not trustworthy here,because
linux-reconfigureleaves the.kofiles of the previous config inoutput/build/linux-customandmodules_installcopies them straight back, sothe kernel shrinks while the rootfs does not move at all.
hi3518ev200_lite_switcam-hs303ssc333_lite_meari-speed-6sNote the baselines are worse than the failing CI run recorded (5136 and 5128) —
majestic has drifted a further 8KB and 4KB since Thursday, which is the point.
On hi3518ev200 the kernel grows 19KB, exactly what #2376 measured for the same
FAT/VFAT move, and the rootfs loses 200KB. The module count goes 63 → 54, and in
the built tree
kernel/drivers/scsi,kernel/fs/fatandkernel/drivers/net/wireless/realtekare gone from/lib/moduleswhilemodules.builtincarriesfs/fat/fat.koandfs/fat/vfat.ko.8188fu.ko,mac80211.koandcfg80211.koare all still there.On infinity6b0 the kernel shrinks 45KB, because SCSI was
=ythere ratherthan
=m— so this buys back kernel headroom on a board that only had 48KB ofit, as well as taking the rootfs under the cap. The patched rootfs carries
8188fu,exfat,wireguard, the twelvemi_*/mhalmodules andsensor_jxf37_mipi.ko, with/etc/sensors/jxf37.binthe only sensor blob left— which is the whole of what this board uses.
The effective
.configafter Buildroot'solddefconfigisCONFIG_SCSI_MOD=y+# CONFIG_SCSI is not seton both platforms, withCONFIG_MS_CRYPTO=yandCONFIG_MT7601U=muntouched — nothing was re-enabledbehind the change.
Not tested on hardware
I have no unit of any of these three boards on the bench, so this is measured
from builds only. The two kernel-config moves are the ones #2376 and #2397
already made on Goke and hi3518ev300, and the reasoning for each dropped symbol
is stated above so it can be checked rather than taken on trust. The specific
things worth exercising on a real camera before this is trusted:
than modular (
/proc/filesystemsshould listvfatwith no module loaded,and
modprobe vfatfromS35modulesshould still exit 0);8188fuand8188euareout-of-tree packages and untouched here, but they sit on
mac80211/cfg80211,which stay modular (
CONFIG_MAC80211=m,CONFIG_CFG80211=m) and are nottouched by dropping
RTL_CARDS/RTL8XXXU;cryptodev,ms_notifyandechainivgone. If anyone knows of a consumer of/dev/cryptoon Sigmastarthat I could not find in the image, say so and I will keep
CONFIG_CRYPTODEV.