Skip to content

hi3518ev200_ultimate: ship the MT7601U driver, not only its firmware blob - #2246

Open
phedoreanu wants to merge 2 commits into
OpenIPC:masterfrom
phedoreanu:hi3518ev200-ultimate-mt7601u
Open

hi3518ev200_ultimate: ship the MT7601U driver, not only its firmware blob#2246
phedoreanu wants to merge 2 commits into
OpenIPC:masterfrom
phedoreanu:hi3518ev200-ultimate-mt7601u

Conversation

@phedoreanu

Copy link
Copy Markdown

The defconfig enables BR2_PACKAGE_LINUX_FIRMWARE_OPENIPC_MEDIATEK_MT7601U (the mt7601u.bin blob) but not BR2_PACKAGE_MT7601U_OPENIPC (the driver), so a camera with an MT7601U dongle boots with the firmware file present and no module to load it — the blob is dead weight. This is the same failure mode as #941.

This defconfig already ships a Wi-Fi driver (BR2_PACKAGE_RTL8188FU_OPENIPC), and hi3518ev300_ultimate ships two (RTL8188FU, RTL8189FS), so this follows existing practice.

Size verified on a real build of this defconfig plus this option (2026-08-08): uImage 1832 KB, rootfs.squashfs 7284 KB — inside the 10240 KB rootfs slot of the 16 MB NOR layout. Runtime verified on a VStarcam Hi3518EV200 camera with a USB 148f:7601 dongle: the module loads, wlan0 associates and holds a DHCP lease.

…blob

The defconfig enables BR2_PACKAGE_LINUX_FIRMWARE_OPENIPC_MEDIATEK_MT7601U
(the mt7601u.bin blob) but not BR2_PACKAGE_MT7601U_OPENIPC (the kernel
driver), so a camera with an MT7601U dongle boots with the firmware file
present and no module to load it - the blob is dead weight. This is the
same failure mode as OpenIPC#941.

The defconfig already ships a Wi-Fi driver (BR2_PACKAGE_RTL8188FU_OPENIPC),
so this follows existing practice, as does hi3518ev300_ultimate which
ships RTL8188FU and RTL8189FS.

Size verified on a real build (2026-08-08, this defconfig plus this
option): uImage 1832 KB, rootfs.squashfs 7284 KB - comfortably inside
the 10240 KB rootfs slot of the 16 MB NOR layout. Runtime verified on a
VStarcam Hi3518EV200 camera with a USB 148f:7601 dongle: the module
loads, wlan0 associates and holds a lease.
@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

hi3518ev200_ultimate: enable MT7601U Wi‑Fi driver alongside its firmware

🐞 Bug fix ⚙️ Configuration changes 🕐 Less than 10 minutes

Grey Divider

AI Description

• Enable the MT7601U kernel driver in hi3518ev200_ultimate to match the already-shipped firmware
 blob.
• Prevent boot-time Wi‑Fi failures where mt7601u.bin exists but no module can load it.
• Align this defconfig’s Wi‑Fi packaging with existing “ship drivers in defconfig” practice.
Diagram

graph TD
  A["hi3518ev200_ultimate_defconfig"] --> B["Buildroot build"] --> C[("Rootfs image") ] --> D["mt7601u module loads"] --> E["wlan0 up"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Make MT7601U driver package select its firmware automatically
  • ➕ Eliminates defconfig drift (firmware enabled without driver, or vice versa)
  • ➕ Centralizes correctness in package metadata rather than per-board configs
  • ➖ Requires changing package Config.in/dependency rules and verifying no unintended selections across targets
2. Remove MT7601U firmware from this defconfig
  • ➕ Reduces image size if MT7601U support is not desired for this target
  • ➖ Does not solve the reported failure mode for users with MT7601U dongles
  • ➖ Regresses functionality compared to current intent (firmware already included)
3. Build MT7601U driver into the kernel instead of a module
  • ➕ Avoids module-loading issues during boot and simplifies runtime bring-up
  • ➖ Kernel rebuild/config changes may be more intrusive than a Buildroot package enable
  • ➖ Potentially increases kernel image size permanently

Recommendation: Proceed with this PR as the minimal, target-scoped fix: it corrects the concrete mismatch (firmware without driver) with negligible risk. Consider a follow-up to make the MT7601U driver package select its firmware to prevent similar misconfigurations across other defconfigs.

Files changed (1) +1 / -0

Other (1) +1 / -0
hi3518ev200_ultimate_defconfigEnable MT7601U driver package for hi3518ev200_ultimate +1/-0

Enable MT7601U driver package for hi3518ev200_ultimate

• Adds BR2_PACKAGE_MT7601U_OPENIPC=y so the image ships the MT7601U kernel driver module in addition to the already-enabled mt7601u firmware blob.

br-ext-chip-hisilicon/configs/hi3518ev200_ultimate_defconfig

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

qodo-free-for-open-source-projects Bot commented Aug 9, 2026

Copy link
Copy Markdown

Code Review by Qodo

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

Grey Divider


Remediation recommended

1. Moving driver version ✓ Resolved 🐞 Bug ⚙ Maintainability
Description
Enabling BR2_PACKAGE_MT7601U_OPENIPC makes this defconfig depend on the mt7601u-openipc package,
which is configured to fetch source at VERSION=HEAD. This makes future hi3518ev200_ultimate builds
non-reproducible and can break unexpectedly when upstream changes without any version bump in this
repo.
Code

br-ext-chip-hisilicon/configs/hi3518ev200_ultimate_defconfig[76]

+BR2_PACKAGE_MT7601U_OPENIPC=y
Evidence
The PR enables the MT7601U driver package in the defconfig, and that package is explicitly
configured to fetch from a moving HEAD ref, which can change independently of this repository.

br-ext-chip-hisilicon/configs/hi3518ev200_ultimate_defconfig[68-80]
general/package/mt7601u-openipc/mt7601u-openipc.mk[7-9]

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

## Issue description
`hi3518ev200_ultimate_defconfig` now enables `BR2_PACKAGE_MT7601U_OPENIPC`, but the package recipe fetches the driver source at `MT7601U_OPENIPC_VERSION = HEAD`, which is a moving target.
## Issue Context
This introduces non-reproducible builds (the same firmware target can produce different artifacts over time) and increases the chance of sudden build/runtime regressions when upstream `openipc/mt7601u` changes.
## Fix Focus Areas
- general/package/mt7601u-openipc/mt7601u-openipc.mk[7-9]
## Suggested fix
- Change `MT7601U_OPENIPC_VERSION` from `HEAD` to an immutable reference (a specific commit SHA or a release tag).
- (If your Buildroot flow supports it) add/update a corresponding `.hash` file for the tarball to enforce integrity and reproducibility.

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


Grey Divider

Tip of the day
💡 Did you know, you can ask Qodo to dismiss a finding you disagree with, with your reason on record

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Review follow-up: with this defconfig now depending on the package,
VERSION = HEAD would make hi3518ev200_ultimate builds non-reproducible
- the same tree could fetch different driver source over time. Pin the
current tip of openipc/mt7601u (0ac4655, 'Adjust configuration path'),
which is the lineage the runtime verification in this PR was done
against.
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