hi3518ev300_lite: drop dead kernel modules + build TUN in#2164
Merged
Conversation
Follow-up to #2163. After the vfat/fat builtin shift the variant had 24 KB of rootfs headroom against 155 KB of uImage headroom — lopsided. This rebalances by removing four kernel module families that have no plausible code path on an ARM IP camera, and folding TUN into the kernel so OpenVPN setups work without a separate .ko. Dropped (=n): - SCSI_FC_ATTRS (55 KB) — Fibre Channel HBA transport. No FC hardware on ARM camera. scsi_mod.ko also shrinks ~1.6 KB by losing the hooks. - USB_LIBCOMPOSITE + USB_CONFIGFS + CONFIGFS_FS (82 KB) — USB gadget mode. Camera is the USB host, never the device; no init script wires up gadget functions or mounts configfs. - I2C_TINY_USB (6 KB) — niche hobbyist USB→I2C bridge. - BRIDGE_NETFILTER (17 KB) — bridge firewalling. No br0 setup, no bridge interface brought up by any init script. Built-in (=y): - TUN (27 KB) — needed by OpenVPN. WireGuard creates wg* interfaces directly so doesn't need it, but the marginal kernel cost (~6 KB compressed) buys zero-config OpenVPN. Local build hi3518ev300_lite: - uImage: 1893 → 1898 KB / 2048 KB (150 KB headroom) - rootfs.squashfs: 5096 → 5036 KB / 5120 KB ( 84 KB headroom, was 24 KB) - total .ko bytes: 4860 → 4671 KB Confirmed absent from output/target/lib/modules/: tun.ko, scsi_transport_fc.ko, i2c-tiny-usb.ko, libcomposite.ko, configfs.ko, br_netfilter.ko. 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
Follow-up to #2163. After the vfat/fat builtin shift, the variant had 24 KB rootfs headroom against 155 KB uImage headroom — lopsided. This rebalances by removing four kernel module families with no plausible code path on an ARM IP camera, and folding
TUNinto the kernel so OpenVPN works without a separate.ko.Changes (
hi3518ev300.generic.config)Dropped (=n):
SCSI_FC_ATTRSscsi_transport_fc.ko)scsi_mod.koalso shrinks ~1.6 KB by losing the hooks.USB_LIBCOMPOSITE+USB_CONFIGFS+CONFIGFS_FSlibcomposite.ko+configfs.ko)configfs.I2C_TINY_USBBRIDGE_NETFILTERbr_netfilter.ko)br0setup, no bridge interface brought up by any init script.Built-in (=y):
TUNtun.ko)wg*interfaces directly so doesn't need it, but the marginal kernel cost (~6 KB compressed) gives zero-config OpenVPN.Local build results
hi3518ev300_lite:Confirmed absent from
output/target/lib/modules/:tun.ko,scsi_transport_fc.ko,i2c-tiny-usb.ko,libcomposite.ko,configfs.ko,br_netfilter.ko.Cross-variant note
Same
hi3518ev300.generic.configis shared withhi3518ev300_ultimate. Ultimate's last passing CI: uImage 1873/2048 (175 KB headroom), rootfs.squashfs 7664/8192 (528 KB headroom). The +25 KB combined uImage delta from this PR + #2163 fits well under cap, and ultimate gets ~60 KB rootfs headroom recovery too. CI will validate.Test plan
hi3518ev300_litehi3518ev300_ultimatehi3518ev300_litecamera with OpenVPN config works without manualmodprobe tun🤖 Generated with Claude Code