hi3518ev300_lite: build vfat/fat into kernel to free 4 KB of rootfs#2163
Merged
Conversation
Nightly CI run 26667982165 (job 78605352324) tipped the lite variant over the 5120 KB NOR rootfs cap by 4 KB (5124/5120). The HISILICON_OPENSDK_TRIM_SP2308 finalize hook already trims three sensor .so files on this variant and the cap has been creeping for two weeks. vfat is the only kernel module on this board that auto-loads at boot (/etc/modules → S35modules), so flipping CONFIG_VFAT_FS and its FAT_FS dependency from =m to =y removes vfat.ko + fat.ko from rootfs at zero runtime cost — the module was going to be loaded anyway. All required NLS helpers (NLS_CODEPAGE_437, NLS_ISO8859_1, NLS_ASCII) are already =y. Local build hi3518ev300_lite: - uImage: 1873 → 1893 KB / 2048 KB (155 KB headroom) - rootfs.squashfs: 5124 → 5096 KB / 5120 KB (24 KB headroom, was 4 KB over) The same hi3518ev300.generic.config is shared with hi3518ev300_ultimate; last passing CI had it at uImage 1873/2048 and rootfs.squashfs 7664/8192 so the +20 KB kernel growth fits comfortably in both caps. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Nightly CI run 26667982165 failed for
hi3518ev300_litewith rootfs.squashfs 5124 KB > 5120 KB cap (4 KB over). The lite variant has been parked at the cap for two weeks — theHISILICON_OPENSDK_TRIM_SP2308finalize hook already drops three sensor.sofiles to keep this board buildable, and ~12 KB of accumulated drift since 2026-05-17 (a5614d9c) has now tipped it over.This change flips two kernel symbols in
hi3518ev300.generic.configfrom=mto=y:Why these symbols specifically
general/overlay/etc/moduleslistsvfatas a boot-time autoload (loaded bygeneral/overlay/etc/init.d/S35modules).vfatis the only.koon this board that loads on every boot — so making it built-in is a pure layout shift, zero runtime cost. The other entryexfatbelongs to the out-of-treeexfat-openipcpackage which is not enabled in this defconfig.Every other
=msymbol in this config (MAC80211,MT7601U,R8188EU,TUN,F2FS_FS,SCSI*, theCRYPTO_*family, etc.) is on-demand — USB-dongle insertion, WireGuard interface bring-up, USB-storage mount. Making any of those=ywould burn unconditional kernel bytes for code that may never run on a given camera.All NLS helpers vfat needs (
NLS_CODEPAGE_437,NLS_ISO8859_1,NLS_ASCII) are already=y— no follow-up symbols needed.Local build results
hi3518ev300_lite:vfat.ko+fat.koconfirmed absent fromoutput/target/lib/modules/;CONFIG_VFAT_FS=y/CONFIG_FAT_FS=yconfirmed in built kernel.config;vfat_rename/namei_vfat.cstrings present invmlinux.Cross-variant note
The same
hi3518ev300.generic.configis referenced byhi3518ev300_ultimate_defconfig. Last passing CI had ultimate at uImage 1873/2048 (175 KB headroom) and rootfs.squashfs 7664/8192 (528 KB headroom); the same +20 KB kernel growth fits comfortably in both caps.Test plan
hi3518ev300_litehi3518ev300_ultimate(shared kernel config)hi3518ev300_litecamera mounts a FAT-formatted SD card / USB stick without manualmodprobe vfatFollow-up (separate PR)
The lite variant remains within ~25 KB of the cap with the temporary
TRIM_SP2308block still removing SP2308 + SC500AI + GC5603. The underlying drift (most likelyhisilicon-opensdkbump #2156 or unpinned majestic master) warrants a bisect + compaction pass so those sensors can be restored.🤖 Generated with Claude Code