Repository navigation
rootfs: drop the kmod-only module indexes when there is no kmod - #2488
Conversation
PR Summary by Qodohi3516cv6xx_lite: trim rootfs back under the squashfs size cap
AI Description
Diagram
High-Level Assessment
Files changed (3)
|
Code Review by Qodo
1.
|
|
I ran the fleet-wide lever on hardware, a lab hi3516dv100 (busybox 1.36.1
Unmounting restored the board. |
master's hi3516cv6xx_lite rootfs is 5124KB of a 5120KB cap (nightly run 36259587684, and every PR since). depmod writes a binary index beside every text one (modules.*.bin) plus modules.builtin.modinfo, all for kmod. Every board here runs busybox modprobe, which reads modules.dep, modules.alias, modules.symbols and modules.builtin as text and never opens the rest, and no defconfig selects kmod. rootfs_script.sh now removes them when the image has no kmod binary. On the published 2026-09-25 hi3516cv6xx lite image (libatomic already removed, as #2480 does; rebuilt xz/1M/bcj as the build does) that is 52KB uncompressed and 12,228 bytes of squashfs against a 4KB overrun. Every other board that ships modules shrinks too. On a lab hi3516dv100, with a copy of /lib/modules/$(uname -r) minus these files bind-mounted over the real one: `rmmod vfat fat; modprobe vfat` loads both, so dependencies resolve from the text modules.dep; and a full load_hisilicon -r / -i cycle loads all 30 modules and the streamer starts.
fecc2c3 to
c101b68
Compare
|
Re Qodo rule-3 finding ("Camera boot behavior is unverified"): both halves are handled.
The PR is now that one change. |
Brings
hi3516cv6xx_liteback under its rootfs cap. It isrootfs.squashfs: [5124KB/5120KB]on master: the 2026-09-26 nightly (run 36259587684) and every PR that builds the board since, #2487 included.Change
depmodwrites a binary index beside every text one (modules.*.bin), plusmodules.builtin.modinfo, all of them for kmod. Every board here runs busyboxmodprobe(full, with alias and symbol support). It readsmodules.dep,modules.alias,modules.symbolsandmodules.builtinas text and never opens the rest, and no defconfig selects kmod.rootfs_script.shnow removes them when the image has nokmodbinary, the same shape as #2480'slibgcc_srule.Measured
On the published 2026-09-25 hi3516cv6xx lite image, with
libatomicalready removed as #2480 does and rebuilt with the build's squashfs options (xz, 1M blocks, BCJ arm+armthumb): 52 KB uncompressed, 12,228 bytes of squashfs, against a 4 KB overrun. Every other board that ships modules shrinks as well.Hardware
On a lab hi3516dv100 (busybox 1.36.1), a copy of
/lib/modules/$(uname -r)without these files was bind-mounted over the real one:rmmod vfat fat; modprobe vfat→ rc 0 and both modules loaded, so dependencies resolve from the textmodules.dep.load_hisilicon -r/-icycle loaded all 30 modules, and the streamer started.An earlier revision also built
CONFIG_FW_LOADERinto the cv6xx kernel and prunedopen_sensor_spion cv6xx lite. Both are dropped. The review asked for cv6xx boot evidence I can't produce right now (the lab's cv6xx board is offline), and this lever alone clears the cap with room to spare.