feat: add hi3516av100 SoC family support#40
Merged
Merged
Conversation
V2A generation (Cortex-A7 / ARMv7), kernel 4.9.37. Standalone MMZ + himedia architecture (no OSAL). Chip variants: hi3516av100, hi3516dv100. SDK source modules: mmz, himedia, mipi, watchdog, IR, hiuser, RTC, cipher (not wired), sensor_i2c, sensor_spi, pwm, piris. Blob modules from OpenIPC .ko files: base, sys, vi, vpss, venc, h264e, h265e, jpege, rc, chnl, region, vgs, ive, vda, pm, isp, tde, aio, ai, ao, aenc, adec, acodec, vou, hifb. ISP userspace library source (libisp): main + algorithms + vreg. 14 sensor drivers with Makefiles. Cross-compiled against kernel 4.9.37 (33 modules). QEMU boot verified (hi3516av100 machine, "Starting crond: OK"). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Copy full ISP firmware source (33 .c files, was only 4) - Add ISP vreg include paths to kbuild - Copy missing strfunc.c/h for pwm and piris modules - Add hi_rtc blob + init wrapper (was source-only, but RTC source needs porting) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
widgetii
pushed a commit
that referenced
this pull request
May 5, 2026
The directory was imported as part of the original av100 SoC support in #40 but never built — the source uses V4-era ABI that doesn't match V2A SDK headers: - registration callback signature GK_S32 sensor_register_callback(VI_PIPE, ALG_LIB_S*, ALG_LIB_S*) is V3+/V4 (V2A uses int sensor_register_callback(void)) - ISP_SNS_OBJ_S struct initialiser uses .pfnSetBusInfo and .pfnSetInit fields that exist in V4 (ev200) but not in the V2A struct definition The right home for sc4236 is hi3516ev200/smart_sc4236/ — which already exists and works (1115 lines, current). The av100 copy (1006 lines, older revision) is a stale partial duplicate; nothing references it outside its own dir. Removing the dir lets us drop the libraries/Makefile "|| true" workaround eventually — silent build failures are exactly what that workaround masked here.
widgetii
pushed a commit
that referenced
this pull request
May 7, 2026
The directory was imported as part of the original av100 SoC support in #40 but never built — the source uses V4-era ABI that doesn't match V2A SDK headers: - registration callback signature GK_S32 sensor_register_callback(VI_PIPE, ALG_LIB_S*, ALG_LIB_S*) is V3+/V4 (V2A uses int sensor_register_callback(void)) - ISP_SNS_OBJ_S struct initialiser uses .pfnSetBusInfo and .pfnSetInit fields that exist in V4 (ev200) but not in the V2A struct definition The right home for sc4236 is hi3516ev200/smart_sc4236/ — which already exists and works (1115 lines, current). The av100 copy (1006 lines, older revision) is a stale partial duplicate; nothing references it outside its own dir. Removing the dir lets us drop the libraries/Makefile "|| true" workaround eventually — silent build failures are exactly what that workaround masked here.
widgetii
added a commit
that referenced
this pull request
May 7, 2026
* sensor/av100: drop vendor prefix from libsns_* LIB_NAME The hi3516av100 sensor source dirs were the only platform whose Makefile LIB_NAME carried a vendor prefix (libsns_aptina_ar0230, libsns_sony_imx123, etc.). Every other platform — cv200, cv300, v101, cv500, ev200/gk7205v200, cv100 — uses the unprefixed libsns_<model> form, and the av100 firmware sensor .ini files (general/package/hisilicon-osdrv-hi3516av100/files/sensor/config/*.ini in OpenIPC/firmware) already reference the unprefixed names via their DllFile= entries. Renaming aligns av100 with the rest of the platforms and lets the source-built sensors replace the matching binary blobs shipped by hisilicon-osdrv-hi3516av100. Without this rename, source-built and binary lib files would land side-by-side under different names. The vendor prefix only appeared in the LIB_NAME declaration; no C symbols, headers, or callers reference it. aptina_ar0230 -> libsns_ar0230 aptina_ar0237 -> libsns_ar0237 aptina_ar0237_dc -> libsns_ar0237_dc aptina_ar0330 -> libsns_ar0330 omnivision_ov4689 -> libsns_ov4689 omnivision_ov5658 -> libsns_ov5658 panasonic_mn34220 -> libsns_mn34220 panasonic_mn34220_mipi -> libsns_mn34220_mipi smart_sc4236 -> libsns_sc4236 sony_imx117 -> libsns_imx117 sony_imx123 -> libsns_imx123 sony_imx178 -> libsns_imx178 sony_imx178_37M -> libsns_imx178_37M sony_imx185 -> libsns_imx185 Tracks #82. Required before the firmware-side hisilicon-av100 sensor wiring PR. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * sensor/av100: fix build errors surfaced by firmware-side wiring Two pre-existing latent bugs that the libraries/Makefile's "|| true" suppressed are now blocking the firmware-side install phase. Both were waiting for a real consumer. 1. sony_imx117: imx117_sensor_ctl.c includes "pwm.h" which lives at kernel/pwm/hi3516av100/pwm.h. The Makefile only added kernel/include/hi3516av100 and kernel/isp/arch/hi3516av100/ to the include path. Add kernel/pwm/hi3516av100 alongside. 2. kernel/include/hi3516av100/hi_spi.h uses _IOC_SIZEBITS in its SPI_MSGSIZE macro without including <sys/ioctl.h>. glibc's <sys/ioctl.h> is implicitly transitively pulled in by the sensor_ctl includes, but musl is stricter and the symbol is undeclared, breaking sony_imx123 and sony_imx185 (and any future SPI-using sensor) under arm-openipc-linux-musleabi-gcc. Include <sys/ioctl.h> directly in the header. Both fixes are no-ops under glibc (Header guards / pre-existing declarations) and resolve the musl errors. Verified: arm-openipc-linux-gnueabi-gcc 13.3.0 still produces identical .so output for the affected sensors. The smart_sc4236 source is broken in a deeper way (stSnsSc4236Obj struct uses ISP_SNS_OBJ_S fields that don't exist in V2A; the sensor_register_callback signature is V3-style not V2A-style). That's a real port issue, not a header / Makefile fix — left for a follow-up. The firmware-side PR (#2056) drops smart_sc4236 from HISILICON_OPENSDK_SENSORS_hi3516av100 in the meantime. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * sensor/av100: drop orphaned smart_sc4236 (V4-era source in V2A dir) The directory was imported as part of the original av100 SoC support in #40 but never built — the source uses V4-era ABI that doesn't match V2A SDK headers: - registration callback signature GK_S32 sensor_register_callback(VI_PIPE, ALG_LIB_S*, ALG_LIB_S*) is V3+/V4 (V2A uses int sensor_register_callback(void)) - ISP_SNS_OBJ_S struct initialiser uses .pfnSetBusInfo and .pfnSetInit fields that exist in V4 (ev200) but not in the V2A struct definition The right home for sc4236 is hi3516ev200/smart_sc4236/ — which already exists and works (1115 lines, current). The av100 copy (1006 lines, older revision) is a stale partial duplicate; nothing references it outside its own dir. Removing the dir lets us drop the libraries/Makefile "|| true" workaround eventually — silent build failures are exactly what that workaround masked here. --------- Co-authored-by: Vasiliy Yakovlev <vixand@openipc.org> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test plan
CHIPARCH=hi3516av100 DISABLE_TDE=1 DISABLE_VO=1)-M hi3516av100 -m 256M, reached userspace)hi3516av100_litebuild matrix entryqemu-av100-bootjob🤖 Generated with Claude Code