Skip to content

ak3918ev300_lite_heimvision-pe3020w: drop v4l-utils and two Wi-Fi modules nothing loads - #298

Merged
openipc-ai merged 1 commit into
masterfrom
ak3918ev300-pe3020w-trim
Dec 5, 2026
Merged

openipc-ai merged 1 commit into
masterfrom
ak3918ev300-pe3020w-trim

Conversation

@openipc-ai

Copy link
Copy Markdown
Contributor

The PE3020-W image (#234) had 20 KB to spare in its 5 MiB root. The next majestic for the EV200/EV300 (audio, HLG, battery, day/night from the ISP: OpenIPC/majestic#417–#423) needs 24 KB more, so it no longer fits. This frees about 1.4 MB that nothing on the camera uses.

Removed squashfs (xz) Why nothing needs it
BR2_PACKAGE_LIBV4L, BR2_PACKAGE_LIBV4L_UTILS: v4l2-compliance, v4l2-ctl, v4l2-dbg, cec-*, ir-*, rds-ctl, media-ctl, cx18-ctl, ivtv-ctl, the libv4l libraries, and libstdc++ with them −1140 KB Majestic does not link libv4l, and no script runs the tools. No other device here selects them; this defconfig inherited them from the generic EV300 one. The firmware's rootfs_script.sh keeps libstdc++ on a musl image only while LIBV4L=y, and only the v4l-utils tools link it.
r8188eu.ko (excludes list) −148 KB The staging driver has no alias for this board's RTL8188FU (0bda:f179). 8188fu drives it.
mac80211.ko (excludes list) −124 KB 8188fu depends on cfg80211 alone, and the rtl8188fu-generic wlandev entry this board uses loads only 8188fu.

Root, measured on the current nightly: 4.98 MiB → 3.58 MiB.

Testing

  • On the qemu-bench EV300 twin, which boots this board's image:
    • The nightly root repacked without exactly these files, with the coming majestic, passes test-anyka-majestic.sh 28/28: both streams, snapshot, codec list, day/night, battery API, HLG, grey night.
    • The same majestic on the current root is 4 KB over the slot and does not boot.
  • Needs the camera: Wi-Fi without mac80211. The twin has no USB Wi-Fi, so that rests on the module's own dependency list (depends: cfg80211) and on the wlandev script. The HeimVision PE3020-W: AK3918 V300/F37 board findings, 1.5 MiB kernel-slot mismatch and bring-up questions #234 owner is asked to confirm wlan0 still associates on this build.

…ules nothing loads

The image had 20 KB to spare in its 5 MiB root. The next majestic for the
EV200/EV300 (audio, HLG, battery, day/night from the ISP: OpenIPC/majestic
#417-#423) needs 24 KB more, so it no longer fits.

- BR2_PACKAGE_LIBV4L and BR2_PACKAGE_LIBV4L_UTILS: v4l2-compliance,
  v4l2-ctl, v4l2-dbg, the cec-*, ir-*, rds-ctl, media-ctl, cx18-ctl and
  ivtv-ctl tools, and the libv4l libraries. Nothing else on the image uses
  them: majestic does not link libv4l, and no script runs the tools. No other
  device here selects them. They were also the only reason libstdc++ was kept:
  the firmware's rootfs script removes it from a musl image unless LIBV4L is
  set, and only the v4l-utils tools link it.
- r8188eu.ko: the staging driver has no alias for this board's RTL8188FU
  (0bda:f179), which 8188fu drives.
- mac80211.ko: 8188fu depends on cfg80211 alone, and the rtl8188fu-generic
  wlandev entry this board uses loads only 8188fu.

| | squashfs (xz) |
|---|---|
| v4l-utils, libv4l, libstdc++ | -1140 KB |
| r8188eu.ko | -148 KB |
| mac80211.ko | -124 KB |
| root, the current nightly | 4.98 MiB -> 3.58 MiB |

Tested on the qemu-bench EV300 twin. It boots this board's nightly with the
root repacked without these files, and that majestic. Its test script passed
28 of 28 checks: both streams decode, snapshot, codec list, day/night, the
battery API, HLG, and grey night. The same majestic on the untrimmed root is
4 KB over the slot. The twin has no USB Wi-Fi, so 8188fu without mac80211
rests on its modinfo (depends: cfg80211) and on the wlandev script.
@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Dec 5, 2026 •

Copy link
Copy Markdown

PR Summary by Qodo

PE3020-W: drop v4l-utils, r8188eu and mac80211 to fit root

⚙️ Configuration changes 🕐 10-20 Minutes

Grey Divider

AI Description

• Removes v4l-utils, libv4l and libstdc++ from the PE3020-W defconfig.
• Excludes unused r8188eu.ko and mac80211.ko from the root image; 8188fu drives the RTL8188FU.
• Frees about 1.4 MB, shrinking the root from 4.98 MiB to 3.58 MiB so the next majestic fits.
Merge Risk 🟢 Low

Blast radius 🔴 High 💥 2 capabilities

  • 2 affected capabilities span independent functional scopes: PE3020-W local video tooling, PE3020-W wireless integration.
  • The dedicated RTL8188FU package, board wlandev setting, and excluded generic modules jointly determine one end-to-end USB Wi-Fi behavior for this board.
  • This is a distinct local userspace availability behavior: the defconfig controls whether V4L compatibility libraries and utilities are shipped, without evidence that it is part of the wireless integration.
Sources

devices/ak3918ev300_lite_heimvision-pe3020w/general/scripts/excludes/ak3918ev300_lite.list[3-8]

# The staging RTL8188EU driver: it has no alias for this board's RTL8188FU
# (0bda:f179), which 8188fu drives.
/lib/modules/4.4.302/kernel/drivers/staging/rtl8188eu/r8188eu.ko
# mac80211: 8188fu needs cfg80211 alone, and the wlandev entry this board uses
# (rtl8188fu-generic) never loads it.
/lib/modules/4.4.302/kernel/net/mac80211/mac80211.ko
Behavioral complexity 🟢 Low 🧩 Straightforward

  • Before, the image retained generic r8188eu and mac80211 modules alongside the dedicated RTL8188FU package.
  • After, the exclude list removes those generic modules.
  • The changed correctness condition is that RTL8188FU must operate with the remaining cfg80211 support; this is a direct packaging rule with no new runtime state, ordering protocol, or algorithm.
Sources

devices/ak3918ev300_lite_heimvision-pe3020w/general/scripts/excludes/ak3918ev300_lite.list[3-8]

# The staging RTL8188EU driver: it has no alias for this board's RTL8188FU
# (0bda:f179), which 8188fu drives.
/lib/modules/4.4.302/kernel/drivers/staging/rtl8188eu/r8188eu.ko
# mac80211: 8188fu needs cfg80211 alone, and the wlandev entry this board uses
# (rtl8188fu-generic) never loads it.
/lib/modules/4.4.302/kernel/net/mac80211/mac80211.ko

devices/ak3918ev300_lite_heimvision-pe3020w/br-ext-chip-anyka/configs/ak3918ev300_lite_heimvision-pe3020w_defconfig[71-72]

# USB RTL8188FU (0bda:f179), which r8188eu binds but cannot tune.
BR2_PACKAGE_RTL8188FU_OPENIPC=y
Potential damage 🟡 Medium 🩹 Temporary loss

  • If the exclusions remove a module required by the actual RTL8188FU startup path, the board could lose wireless connectivity; the source comments state this driver needs cfg80211 alone, but the external driver implementation is not present here.
  • Rebuilding or reverting the image restores the removed modules; no persistent network state or external side effect requires repair.
Sources

devices/ak3918ev300_lite_heimvision-pe3020w/general/scripts/excludes/ak3918ev300_lite.list[3-8]

# The staging RTL8188EU driver: it has no alias for this board's RTL8188FU
# (0bda:f179), which 8188fu drives.
/lib/modules/4.4.302/kernel/drivers/staging/rtl8188eu/r8188eu.ko
# mac80211: 8188fu needs cfg80211 alone, and the wlandev entry this board uses
# (rtl8188fu-generic) never loads it.
/lib/modules/4.4.302/kernel/net/mac80211/mac80211.ko

devices/ak3918ev300_lite_heimvision-pe3020w/br-ext-chip-anyka/configs/ak3918ev300_lite_heimvision-pe3020w_defconfig[71-72]

# USB RTL8188FU (0bda:f179), which r8188eu binds but cannot tune.
BR2_PACKAGE_RTL8188FU_OPENIPC=y

devices/ak3918ev300_lite_heimvision-pe3020w/general/overlay/usr/share/openipc/customizer.sh[11-13]

# Set wlan device: RTL8188FU on USB
#
fw_setenv wlandev rtl8188fu-generic
Assessed commit 9836a08
Diagram

graph TD
  DEF["defconfig"] --> ROOT["Root squashfs image"] --> SAVE["Frees about 1.4 MB"]
  EXC["excludes list"] --> ROOT
Loading
High-Level Assessment

Removing the packages and modules that nothing loads is the simplest way to reclaim space. The main saving is the unused libv4l/v4l-utils set (about 1.1 MB), which has no consumer on this image. Keeping the tools and trimming something else would free less space with more risk. The Wi-Fi exclusions rely on 8188fu depending only on cfg80211, which is the one assumption that needs on-device confirmation.

Files changed (2) +6 / -2

Other (2) +6 / -2
ak3918ev300_lite_heimvision-pe3020w_defconfigRemove libv4l and libv4l-utils package selections +0/-2

Remove libv4l and libv4l-utils package selections

• Deletes the BR2_PACKAGE_LIBV4L and BR2_PACKAGE_LIBV4L_UTILS selections inherited from the generic EV300 config. This drops the v4l2/cec/ir tools and libv4l libraries, and with them libstdc++, from the root image.

devices/ak3918ev300_lite_heimvision-pe3020w/br-ext-chip-anyka/configs/ak3918ev300_lite_heimvision-pe3020w_defconfig

ak3918ev300_lite.listExclude r8188eu.ko and mac80211.ko from the root image +6/-0

Exclude r8188eu.ko and mac80211.ko from the root image

• Adds excludes for the staging r8188eu driver and mac80211 module, with comments explaining that 8188fu drives this board's RTL8188FU and depends only on cfg80211. The existing mt7601u exclusion is kept.

devices/ak3918ev300_lite_heimvision-pe3020w/general/scripts/excludes/ak3918ev300_lite.list

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can open the rule or relationship behind a finding in one click

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@openipc-ai
openipc-ai merged commit 05c40ad into master Dec 5, 2026
7 checks passed
@openipc-ai
openipc-ai deleted the ak3918ev300-pe3020w-trim branch December 5, 2026 09:41
igorssv pushed a commit to igorssv/builder that referenced this pull request Dec 5, 2026
…ules nothing loads (OpenIPC#298)

Frees about 1.4 MB of the 5 MiB root (4.98 -> 3.58 MiB on the current nightly), so the next majestic for the EV200/EV300 fits: v4l-utils, libv4l and the libstdc++ they kept (-1140 KB), r8188eu.ko (-148 KB; no alias for this board's RTL8188FU) and mac80211.ko (-124 KB; 8188fu needs cfg80211 alone). Checked on the qemu-bench EV300 twin; Wi-Fi without mac80211 still wants the camera.
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