Add Sony IMX662 sensor to build system - #2241
Conversation
diegok3
commented
Aug 5, 2026
- Point opensdk to diegok3/openhisilicon@6c46247 (IMX662 driver)
- Add sony_imx662/libsns_imx662 to HISILICON_OPENSDK_SENSORS_hi3516cv6xx
- Sensor will compile from source and install to /usr/lib/sensors/
- Point opensdk to diegok3/openhisilicon@6c46247 (IMX662 driver) - Add sony_imx662/libsns_imx662 to HISILICON_OPENSDK_SENSORS_hi3516cv6xx - Sensor will compile from source and install to /usr/lib/sensors/
PR Summary by QodoAdd Sony IMX662 sensor build support for hi3516cv6xx
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
Code Review by Qodo
1. Fork affects all configs
|
| HISILICON_OPENSDK_SITE = $(call github,diegok3,openhisilicon,$(HISILICON_OPENSDK_VERSION)) | ||
| HISILICON_OPENSDK_VERSION = 6c46247 |
There was a problem hiding this comment.
1. Fork affects all configs 🐞 Bug ☼ Reliability
The PR switches HISILICON_OPENSDK_SITE/HISILICON_OPENSDK_VERSION globally, so every build that selects hisilicon-opensdk (across multiple HiSilicon SoC families) will now consume diegok3/openhisilicon@6c46247, not just hi3516cv6xx. This broadens the compatibility/provenance risk well beyond the stated IMX662 addition.
Agent Prompt
### Issue description
`hisilicon-opensdk` is used for multiple SoC families, but the PR changes the package download source globally to a third-party fork/commit to add IMX662 support.
### Issue Context
The makefile contains dependency wiring and install logic for many `OPENIPC_SOC_FAMILY` values, meaning the package is not specific to hi3516cv6xx.
### Fix Focus Areas
- general/package/hisilicon-opensdk/hisilicon-opensdk.mk[7-40]
### Suggested fix
- If only hi3516cv6xx needs the fork, make the site/version conditional on `OPENIPC_SOC_FAMILY` (use the fork for `hi3516cv6xx`, keep `openipc/openhisilicon` for others).
- Alternatively, mirror/cherry-pick the IMX662 change into the canonical upstream used by the project and keep the package pointing at that upstream.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| HISILICON_OPENSDK_SITE = $(call github,openipc,openhisilicon,$(HISILICON_OPENSDK_VERSION)) | ||
| HISILICON_OPENSDK_VERSION = ff20187b | ||
| HISILICON_OPENSDK_SITE = $(call github,diegok3,openhisilicon,$(HISILICON_OPENSDK_VERSION)) | ||
| HISILICON_OPENSDK_VERSION = 6c46247 |
There was a problem hiding this comment.
2. Abbreviated commit pin 🐞 Bug ⚙ Maintainability
HISILICON_OPENSDK_VERSION is shortened to a 7-character SHA (6c46247), which is less robust for long-term reproducibility than a full commit hash and is weaker than the prior 8-character pin. If the abbreviation ever becomes ambiguous/unresolvable, the GitHub archive download will fail.
Agent Prompt
### Issue description
The package version is pinned to a 7-character abbreviated commit hash.
### Issue Context
The download URL is derived from `$(call github,...)` using `HISILICON_OPENSDK_VERSION` as the archive ref.
### Fix Focus Areas
- general/package/hisilicon-opensdk/hisilicon-opensdk.mk[7-8]
### Suggested fix
Replace `HISILICON_OPENSDK_VERSION = 6c46247` with the full 40-character commit SHA (or a stable tag) to ensure unambiguous, reproducible fetches.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
|
|
||
| HISILICON_OPENSDK_SITE = $(call github,openipc,openhisilicon,$(HISILICON_OPENSDK_VERSION)) | ||
| HISILICON_OPENSDK_VERSION = ff20187b | ||
| HISILICON_OPENSDK_SITE = $(call github,diegok3,openhisilicon,$(HISILICON_OPENSDK_VERSION)) |
There was a problem hiding this comment.
3. Source url inconsistency 🐞 Bug ⚙ Maintainability
The Kconfig help text still points to https://github.com/OpenIPC/openhisilicon while the package now downloads from diegok3/openhisilicon, creating a provenance/documentation mismatch. This makes it harder to determine the actual audited source for builds from the menuconfig help alone.
Agent Prompt
### Issue description
The package download source repo changed to `diegok3/openhisilicon`, but the help text still references `OpenIPC/openhisilicon`.
### Issue Context
In Buildroot-style packages, `Config.in` help often serves as the human-facing pointer for where the source comes from.
### Fix Focus Areas
- general/package/hisilicon-opensdk/Config.in[6-9]
- general/package/hisilicon-opensdk/hisilicon-opensdk.mk[7-8]
### Suggested fix
Either:
- Update the help URL to the fork while this fork is authoritative for builds, or
- Keep the OpenIPC URL but add a note in the help text stating that builds currently fetch from `diegok3/openhisilicon@<sha>` (and why).
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
- S70vendor: pass '-s imx662' to load_hisilicon - load_hisilicon: default SNS_TYPE0=imx662, add imx662 to available list - tools/imx662: vi_raw_capture.c, recv_raw.py, i2c_recovery.c, i2c_test.c