Repository navigation
hi3516ev300, gk7205v300: back under the squashfs cap - #2440
Conversation
hi3516ev300_lite finished the 2026-09-17 master build at 5124KB of a 5120KB cap, and #2420 records it as the hardest board to fix: it has only 43KB of kernel headroom, so it cannot pay for the build-in trade that #2397, #2433 and #2437 used elsewhere. It does not have to. The board still ships scsi_mod, scsi_transport_fc and sd_mod -- 276KB of modules -- while CONFIG_USB_STORAGE, CONFIG_ATA, CONFIG_ISCSI_TCP and CONFIG_LIBFC are all unset. There is no transport of any kind, so sd_mod can never bind a device, and scsi_transport_fc is Fibre Channel on an IP camera. Nothing in general/overlay/ or any package's files names them. This is the same dead stack #2376 removed from the four Goke boards. Measured, gk7205v300-style full rebuild plus mksquashfs -b 128K -comp xz on the real target: rootfs.squashfs 5124KB -> 5044KB (76KB free, was 4KB over) uImage 2005KB -> 2005KB (43KB free, unchanged) 80KB of flash for zero kernel bytes, which is why this is the right lever here rather than building the crypto helpers in: that shape was also measured on this board and came out at 5104KB rootfs but 2018KB uImage, tripping the headroom warning on both axes. hi3516ev300_ultimate shares the config and gains the same 80KB.
gk7205v300_lite is out of free levers. #2421 stripped the modules it cannot load, #2376 dropped its SCSI stack and built FAT in, and #2433 built its crypto helpers in two days ago; its kernel config is down to 13 modules and every one of them is live. It still came back over the cap, because majestic and majestic-webui are unpinned by design and the board grew ~64KB in a day (#2420). So this reaches for the only measured lever left, and takes the cheaper half of it. #2420's table shows cfg80211 + mac80211 + mt7601u built in saves 272KB of rootfs but costs 198KB of uImage, which it calls a trap -- it would leave the board one commit from red on the kernel instead. Only cfg80211 moves here; mac80211 and mt7601u stay modules. rootfs.squashfs 5124KB -> 5036KB (84KB free, was 4KB over) uImage 1823KB -> 1885KB (163KB free) The cost is honest and worth stating: cfg80211 is now permanently resident, so every camera pays ~278KB of RAM for the wireless core whether a dongle is ever plugged in or not. The load path survives. busybox modprobe reads modules.builtin, which now lists cfg80211, and mac80211.ko's modules.dep line no longer names it -- both verified in the built target tree. gk7205v300_ultimate shares the config.
PR Summary by QodoRestore squashfs headroom for hi3516ev300 and gk7205v300
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Code Review by Qodo
1. Camera behavior remains unverified
|
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.
Both boards were over the 5120KB squashfs cap on master at 839b990, and each needed a different lever. hi3516ev300 still shipped scsi_mod, scsi_transport_fc and sd_mod -- 276KB of modules -- while CONFIG_USB_STORAGE, CONFIG_ATA, CONFIG_ISCSI_TCP and CONFIG_LIBFC were all unset. With no transport of any kind sd_mod can never bind a device, and scsi_transport_fc is Fibre Channel on an IP camera; storage on these boards is MMC, which is untouched. Nothing in general/overlay/ or any package's files/ names them. Same dead stack OpenIPC#2376 removed from the four Goke boards. This matters because OpenIPC#2420 recorded hi3516ev300_lite as the hardest board to fix -- only 43KB of kernel headroom, so it cannot pay for the build-in trade used elsewhere. It did not have to: the crypto shape was measured on it too and came out at 5104KB rootfs but 2018KB uImage, tripping the headroom warning on both axes, where dropping SCSI costs no kernel bytes at all. gk7205v300 is genuinely out of free levers -- OpenIPC#2376 took its SCSI stack and built FAT in, OpenIPC#2421 stripped the modules it cannot load, OpenIPC#2433 built its crypto helpers in, and the config is down to 13 modules with every one live. So it takes the cheaper half of the only lever left. OpenIPC#2420's table shows cfg80211 + mac80211 + mt7601u built in saves 272KB of rootfs but costs 198KB of uImage, and calls that a trap: it trades "one commit from red on rootfs" for "one commit from red on uImage". Only cfg80211 moves; mac80211 and mt7601u stay modules. The cost is worth stating -- cfg80211 is now permanently resident, so every camera pays ~278KB of RAM for the wireless core whether a dongle is ever plugged in or not. The load path survives being built in: modules.builtin now lists cfg80211, which busybox modprobe consults, and mac80211.ko's modules.dep line no longer names it. Measured in CI: hi3516ev300_lite rootfs 5124 -> 5044KB uImage 2005 -> 2005KB gk7205v300_lite rootfs 5124 -> 5036KB uImage 1823 -> 1885KB hi3516ev300_ultimate rootfs 8124 -> 8044KB gk7205v300_ultimate rootfs 6688 -> 6600KB Neither board prints a headroom warning any more. Not run on a camera: the one hi3516ev300 in the lab is unclaimed and its login shell is openipc-claim, the other is down with no bootlimit/altbootcmd or serial, and there is no gk7205v300. Stated plainly in the PR with the Scope box unticked. (cherry picked from commit 947a366)
Problem
Two boards are over the 5120 KB squashfs cap on master right now, independently of any open PR:
hi3516ev300_lite— 5124 KB, 4 KB over. It has been red since the 2026-09-17 master build (run 35253636374).gk7205v300_lite— passed that run at 5119.54 KB of 5120 KB, with the "0KB left" headroom warning firing, and a local build of master today comes out at 5124 KB, 4 KB over. goke + cv500 neo: drop the kernel modules these boards cannot load #2421 wrote the lesson down: a board at zero headroom will go red on the next unrelated PR, not on the one that pushed it there. That is exactly what happened — it went red on tunnel: improve startup resilience and diagnostics #2438, which only adds ~620 bytes of compressed overlay.This is the fourth size-cap red in four days (#2397, #2404, #2410, #2421, #2433, #2437 precede it). The root cause is unpinned majestic/majestic-webui, which is deliberate and untouched here — #2420 has the analysis.
The two boards are in different states and need different levers.
hi3516ev300_liteneeded no kernel bytes at all. It still shipsscsi_mod,scsi_transport_fcandsd_mod— 276 KB of modules — whileCONFIG_USB_STORAGE,CONFIG_ATA,CONFIG_ISCSI_TCPandCONFIG_LIBFCare all unset. There is no SCSI transport of any kind on the board, sosd_modcan never bind a device, andscsi_transport_fcis Fibre Channel on an IP camera. Nothing ingeneral/overlay/or any package'sfiles/names them. Same dead stack #2376 removed from the four Goke boards.This matters because #2420 records
hi3516ev300_liteas the hardest board to fix — only 43 KB of kernel headroom, so it cannot pay for the build-in trade used elsewhere. It turns out it does not have to. For completeness I did measure the crypto build-in on it first: 5104 KB rootfs but 2018 KB uImage, tripping the headroom warning on both axes. Dropping SCSI is strictly better.gk7205v300_liteis out of free levers. #2421 stripped the modules it cannot load, #2376 dropped its SCSI stack and built FAT in, and #2433 built its crypto helpers in two days ago. Its kernel config is down to 13 modules and every one is live. So this takes the cheaper half of the only measured lever left. #2420's table showscfg80211+mac80211+mt7601ubuilt in saves 272 KB of rootfs but costs 198 KB of uImage, and calls that a trap — it trades "one commit from red on rootfs" for "one commit from red on uImage". Onlycfg80211moves here;mac80211andmt7601ustay modules.The cost is worth stating plainly:
cfg80211is now permanently resident, so everygk7205v300camera pays ~278 KB of RAM for the wireless core whether a dongle is ever plugged in or not.Hardware tested on
None. This has not run on a camera, and the box below is deliberately unticked.
The only
hi3516ev300in our lab (10.216.128.34) is an unclaimed camera whose login shell isopenipc-claim, and claiming it would mean accepting the Majestic EULA on someone else's behalf, which CLAUDE.md forbids. The plainhi3516ev300_liteboard (10.216.128.68) is down, and it has neitherbootlimit/altbootcmdnor a serial path, so it is not a board to flash an unverified kernel onto. We have nogk7205v300at all.What can be shown without a camera is below: full rebuilds of both boards, the generated
.config, and the resulting module tree.Evidence
Full
make BOARD=<board>rebuilds aftermake clean, realmksquashfs -b 128K -comp xzon the real target tree.Before (master,
839b9906):After:
Neither board prints a headroom warning any more.
The generated kernel
.configagrees with the checked-in file, and the module trees follow:The
cfg80211load path survives being built in, which is the thing worth checking on this kind of change. busybox modprobe consultsmodules.builtin, andmac80211.kono longer declares a dependency that would need resolving:Selector and shell gates on the branch:
hi3516ev300_ultimateandgk7205v300_ultimateshare the two configs and gain the same gains; both are on the 8192 KB layout with room to spare.Scope
general/package/all-patches/linux/(those go to OpenIPC/linux)general/overlay/or in a sharedload_<vendor>script hardcodes a value specific to my boardLD_PRELOAD, and no binaries that cannot be rebuilt from sourceBoard configs only; no package source or version changes.
#2438 is blocked behind this — it adds a shared overlay file and tipped
gk7205v300_liteover. It will be rebased once this lands.