Skip to content

hi3518ev300_lite: drop dead kernel modules + build TUN in#2164

Merged
widgetii merged 1 commit into
masterfrom
fix/hi3518ev300-lite-drop-dead-modules
May 30, 2026
Merged

hi3518ev300_lite: drop dead kernel modules + build TUN in#2164
widgetii merged 1 commit into
masterfrom
fix/hi3518ev300-lite-drop-dead-modules

Conversation

@widgetii
Copy link
Copy Markdown
Member

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 TUN into the kernel so OpenVPN works without a separate .ko.

Changes (hi3518ev300.generic.config)

Dropped (=n):

symbol size rationale
SCSI_FC_ATTRS 55 KB (scsi_transport_fc.ko) Fibre Channel HBA transport — no FC hardware on an ARM camera. scsi_mod.ko also shrinks ~1.6 KB by losing the hooks.
USB_LIBCOMPOSITE + USB_CONFIGFS + CONFIGFS_FS 82 KB (libcomposite.ko + configfs.ko) 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 (br_netfilter.ko) Bridge firewalling — no br0 setup, no bridge interface brought up by any init script.

Built-in (=y):

symbol size rationale
TUN 27 KB (tun.ko) Needed by OpenVPN. WireGuard creates 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:

- 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.

Cross-variant note

Same hi3518ev300.generic.config is shared with hi3518ev300_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

  • CI passes for hi3518ev300_lite
  • CI passes for hi3518ev300_ultimate
  • After merge, sysupgrade-flashed hi3518ev300_lite camera with OpenVPN config works without manual modprobe tun
  • No user reports of broken USB-storage / bridge / USB-gadget workflows on this variant (none of the dropped modules are referenced by any init script today)

🤖 Generated with Claude Code

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>
@widgetii widgetii merged commit 4824d6f into master May 30, 2026
98 checks passed
@widgetii widgetii deleted the fix/hi3518ev300-lite-drop-dead-modules branch May 30, 2026 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant