Skip to content

hi3516ev300_neo: drop two modules its 7.0 kernel never loads, back under the rootfs cap - #2866

Merged
openipc-ai merged 2 commits into
masterfrom
ev300-neo-dead-modules
Nov 15, 2026
Merged

openipc-ai merged 2 commits into
masterfrom
ev300-neo-dead-modules

Conversation

@openipc-ai

@openipc-ai openipc-ai commented Nov 15, 2026 •

Copy link
Copy Markdown
Collaborator

`hi3516ev300_neo` has failed on master since 4cc6476 with `rootfs.squashfs: [5124KB/5120KB]`, 4 KB over the cap (run 43742671078, job 132900010437). The last passing master build (c7ee38b, run 43622440726) was 5112 KB. In between, the image grew by about 12 KB, mostly from changes to its packages (majestic-af bump, S95majestic, failsafe) and to majestic itself.

This PR does not trim anything a neo camera uses. It removes two files from the published `openipc.hi3516ev300-nor-neo` image (2026-11-14) that a Linux 7.0 board can never load:

File Size Why it is dead
`/lib/modules/7.0.0/updates/open_ive_neo.ko` 26 KB (~9 KB xz) Nothing loads it: `load_hisilicon` loads `open_ive`. `HISILICON_OPENSDK_SKIP_UNUSED_EV200` exists to strip it, but it only clears `/extra/`, and on 7.0 Kbuild installs out-of-tree modules into `/updates/`. The hook now clears both paths.
`/lib/modules/4.9.37/hisilicon/camhi-motor.ko` 7.7 KB (~3 KB xz) A prebuilt for the vendor 4.9.37 kernel, so a 7.0 kernel cannot load it. No longer installed when `OPENIPC_VARIANT=neo`.

Together that is about 12 KB compressed, which brings the image back to roughly where it last passed. Other boards in the family are unaffected: on 4.9 the module was already stripped from `extra/`, and non-neo builds still install camhi-motor.

Testing. This has not run on a camera; I have no neo board. What I checked: both files are in the published openipc.hi3516ev300-nor-neo image (2026-11-14). The image's own load_hisilicon loads open_ive, not open_ive_neo. No script on the image or in this tree names camhi-motor.ko or /lib/modules/4.9.37. The image's kernel is 7.0.0, so a 4.9.37 module cannot load there. The CI hi3516ev300_neo job is the size check.

…der the rootfs cap

hi3516ev300_neo has failed on master since 4cc6476: rootfs.squashfs 5124/5120 KB, 4 KB over (run 43742671078). Its last passing build was 5112 KB. Two files it ships are dead weight on a Linux 7.0 board:

- open_ive_neo.ko (26 KB). Nothing loads it. HISILICON_OPENSDK_SKIP_UNUSED_EV200 strips it from */extra/, but the 7.0 kernel's Kbuild installs out-of-tree modules into */updates/, so on neo it slipped through. The hook now clears both paths.
- /lib/modules/4.9.37/hisilicon/camhi-motor.ko (7.7 KB). This is a prebuilt for the vendor 4.9.37 kernel, which a 7.0 kernel cannot load. It is no longer installed when OPENIPC_VARIANT=neo.

Together that is about 12 KB compressed, out of the cap's 5120 KB. Nothing a neo camera loads is removed.
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Keep hi3516ev300_neo under its rootfs cap by omitting unused modules

🐞 Bug fix ⚙️ Configuration changes 🕐 10-20 Minutes

Grey Divider

AI Description

• Remove an unused OpenSDK module from the Linux 7.0 installation path as well as 4.9’s.
• Omit the incompatible 4.9 motor module from neo images, preserving it for other variants.
Diagram

graph TD
  Build["EV200 image build"] --> Variant{"Neo variant?"} -->|yes| SkipMotor["Omit motor module"] --> Rootfs["Target rootfs"]
  Variant -->|no| InstallMotor["Install motor module"] --> Rootfs
  Build --> Finalize["EV200 finalize"] --> Strip["Remove IVE copies"] --> Rootfs
Loading
High-Level Assessment

The targeted package-build changes are appropriate: they remove modules the neo image cannot use while retaining the motor module for non-neo variants. A broader kernel-version-based install policy was considered, but would add scope to a board-specific size regression.

Files changed (2) +17 / -3

Bug fix (2) +17 / -3
hisilicon-opensdk.mkStrip unused IVE module from both kernel install paths +6/-1

Strip unused IVE module from both kernel install paths

• Extends the EV200 target-finalize hook to remove open_ive_neo.ko from updates/ as well as extra/. This covers the Linux 7.0 Kbuild path while retaining the existing removal for 4.9.

general/package/hisilicon-opensdk/hisilicon-opensdk.mk

hisilicon-osdrv-hi3516ev200.mkSkip the vendor motor module on neo +11/-2

Skip the vendor motor module on neo

• Makes installation of the prebuilt 4.9.37 camhi-motor.ko conditional on a non-neo variant. Neo images no longer carry a module their Linux 7.0 kernel cannot load; other variants retain the install.

general/package/hisilicon-osdrv-hi3516ev200/hisilicon-osdrv-hi3516ev200.mk

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

qodo-free-for-open-source-projects Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (2) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Remediation recommended

1. Neo image change lacks camera evidence 📘 Rule violation ☼ Reliability
Description
The ifneq ($(OPENIPC_VARIANT),neo) guard in HISILICON_OSDRV_HI3516EV200_INSTALL_CAMHI_MOTOR
removes camhi-motor.ko from every neo image, and the rm -f hook now also deletes
updates/open_ive_neo.ko on every hi3516ev200-family board, so both change what a neo camera's
rootfs contains. The PR description cites only the CI size failure and asserted reasoning such as
"Nothing loads it", with no dmesg, module-load, or stream output from a real neo board, though a
repo-wide search found no load call for either module.
Code

general/package/hisilicon-osdrv-hi3516ev200/hisilicon-osdrv-hi3516ev200.mk[R65-68]

+ifneq ($(OPENIPC_VARIANT),neo)
+define HISILICON_OSDRV_HI3516EV200_INSTALL_CAMHI_MOTOR
+	$(INSTALL) -m 755 -d $(TARGET_DIR)/lib/modules/4.9.37/hisilicon
+	$(INSTALL) -m 644 -t $(TARGET_DIR)/lib/modules/4.9.37/hisilicon $(HISILICON_OSDRV_HI3516EV200_PKGDIR)/files/kmod/camhi-motor.ko
Evidence
The PR removes camhi-motor.ko from neo images and open_ive_neo.ko from the hi3516ev200 family,
which changes what the firmware does on a camera. The description offers no before/after output from
a real camera, so the hardware-evidence requirement is not met, even though the repo search shows no
load call that would break.

Rule 3: Hardware evidence is present and honest
general/package/hisilicon-osdrv-hi3516ev200/hisilicon-osdrv-hi3516ev200.mk[65-68]
general/package/hisilicon-opensdk/hisilicon-opensdk.mk[920-921]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The PR removes `camhi-motor.ko` from neo images and `open_ive_neo.ko` from hi3516ev200-family images. The PR description asserts that nothing a neo camera loads is removed, but gives no output from a real neo board.
## Fix Focus Areas
- general/package/hisilicon-osdrv-hi3516ev200/hisilicon-osdrv-hi3516ev200.mk[65-68]
- general/package/hisilicon-opensdk/hisilicon-opensdk.mk[920-921]
## Recommended Fix
Update the PR description with the affected board and before/after evidence from a real neo camera: `dmesg` and `lsmod` output showing the boot path is unchanged, and a stream check after boot. If the board cannot be tested, state that plainly and list the evidence that was checked instead, such as the grep showing no load calls.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Neo-only exclusion lands in shared package 📘 Rule violation ⚙ Maintainability
Description
The camhi-motor.ko install in the shared hi3516ev200 package is wrapped in `ifneq
($(OPENIPC_VARIANT),neo)`, so a single board's file exclusion now lives in the family-wide package
recipe. Rule 39 lists single-board excludes added to the shared tree as a failure, and the PR's own
rationale is that the file is dead only on the neo board. The blast radius is contained: non-neo
builds still install the file, no load script references camhi-motor, and variant conditionals
already appear in other package makefiles, so this is a placement concern rather than a breakage. A
neo-specific exclusion in the family package also means future readers must know neo is special
here, so it belongs in the neo defconfig or a per-device seam.
Code

general/package/hisilicon-osdrv-hi3516ev200/hisilicon-osdrv-hi3516ev200.mk[R65-67]

+ifneq ($(OPENIPC_VARIANT),neo)
+define HISILICON_OSDRV_HI3516EV200_INSTALL_CAMHI_MOTOR
+	$(INSTALL) -m 755 -d $(TARGET_DIR)/lib/modules/4.9.37/hisilicon
Evidence
The shared hi3516ev200 package now skips camhi-motor.ko only when OPENIPC_VARIANT is neo, a
single-board exclusion placed in the shared package tree. Non-neo variants still install the file,
and no load script references camhi-motor, so other boards are not changed.

general/package/hisilicon-osdrv-hi3516ev200/hisilicon-osdrv-hi3516ev200.mk[65-70]
Best Practice: Repository guidelines

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The PR wraps the camhi-motor.ko install in the shared hi3516ev200 package with `ifneq ($(OPENIPC_VARIANT),neo)`. This puts a single-board exclusion into the family-wide package recipe, which rule 39 discourages.
## Fix Focus Areas
- general/package/hisilicon-osdrv-hi3516ev200/hisilicon-osdrv-hi3516ev200.mk[62-72]
- general/package/hisilicon-osdrv-hi3516ev200/hisilicon-osdrv-hi3516ev200.mk[99-103]
## Recommended Fix
Move the neo-specific decision to the neo device seam (for example the neo defconfig or a per-device file list), or explicitly justify in the commit that the variant conditional follows the existing package-level variant convention. Verify the neo image still excludes camhi-motor.ko and non-neo images still install it.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


3. Existing builds retain the dead module ✓ Resolved
Description
The new OPENIPC_VARIANT condition stops installing camhi-motor.ko for neo but does not remove a
copy already present in the output tree. When an existing neo build is rebuilt after this change,
its previously installed 4.9.37 module can remain in the root filesystem and consume the space this
change is intended to recover.

Grey Divider

Tip of the day
💡 Did you know, you can reply 'qodo' on any finding to push back, ask questions, or dig deeper

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@openipc-ai

Copy link
Copy Markdown
Collaborator Author

On the Qodo review:

  1. Camera evidence. That is fair. I have no neo board, and the description now says so and lists what was checked instead: the published image's load script, a tree-wide search for both names, and the kernel version.
  2. Neo condition in the family package. Keeping it. This is not a single-board exclusion: `neo` is the variant that swaps the vendor 4.9.37 kernel for Linux 7.0, and the file is a module for 4.9.37. Whether it can load depends on exactly that variable, for every neo build of this family, so the decision belongs where the module is installed. A per-device list would have to repeat it for each neo board. The comment now states that reasoning.
  3. Rebuild over an existing target. Agreed. 20a80c0 makes neo `rm -rf` the `/lib/modules/4.9.37` directory instead of just skipping the install. Nothing else installs there on neo.

@openipc-ai

Copy link
Copy Markdown
Collaborator Author

CI: every firmware build passes, including hi3516ev300_neo at rootfs.squashfs: [5116KB/5120KB] (it was 5124 KB on master). The open Qodo items are the two answered above: no neo camera here, and the variant condition is a property of the kernel. Merging.

@openipc-ai
openipc-ai merged commit eecba01 into master Nov 15, 2026
82 checks passed
@openipc-ai
openipc-ai deleted the ev300-neo-dead-modules branch November 15, 2026 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant