55# ###############################################################################
66
77HISILICON_OPENSDK_SITE = $(call github,openipc,openhisilicon,$(HISILICON_OPENSDK_VERSION ) )
8- HISILICON_OPENSDK_VERSION = 31a5e9f0
8+ HISILICON_OPENSDK_VERSION = b1c4dae5
99
1010HISILICON_OPENSDK_LICENSE = GPL-3.0
1111HISILICON_OPENSDK_LICENSE_FILES = LICENSE
3232ifeq ($(BR2_PACKAGE_HISILICON_OSDRV_HI3520DV200 ) ,y)
3333HISILICON_OPENSDK_DEPENDENCIES += hisilicon-osdrv-hi3520dv200
3434endif
35+ ifeq ($(BR2_PACKAGE_HISILICON_OSDRV_HI3516CV6XX ) ,y)
36+ HISILICON_OPENSDK_DEPENDENCIES += hisilicon-osdrv-hi3516cv6xx
37+ endif
3538
3639HISILICON_OPENSDK_MODULE_SUBDIRS = kernel
3740HISILICON_OPENSDK_MODULE_MAKE_OPTS = \
@@ -51,12 +54,25 @@ endif
5154HISILICON_OPENSDK_MODULE_MAKE_OPTS += DISABLE_VO=1
5255endif
5356
57+ # V5 (hi3516cv6xx) is encode-only — no VO, no HDMI, no TDE, no NNIE, no
58+ # VDEC, no VEDU, no JPEGD, no GDC, no DIS, no MIPI_TX, no HIFB. These
59+ # blobs simply don't exist in the CV610 SDK. The per-SoC .kbuild already
60+ # omits the obj-m lines, but the shared Kbuild fallback path
61+ # (kernel/Kbuild's `else` branch) gates on DISABLE_* macros — match those
62+ # guards so any shared per-block Kbuild fragments that get pulled in via
63+ # include() stay disabled.
64+ ifeq ($(OPENIPC_SOC_FAMILY ) ,hi3516cv6xx)
65+ HISILICON_OPENSDK_MODULE_MAKE_OPTS += DISABLE_VO=1 DISABLE_TDE=1
66+ endif
67+
5468ifeq ($(OPENIPC_SOC_FAMILY ) ,hi3516ev200)
5569 HISILICON_OPENSDK_SDK_CODE = 0x3516E200
5670else ifeq ($(OPENIPC_SOC_FAMILY),gk7205v200)
5771 HISILICON_OPENSDK_SDK_CODE = 0x7205200
5872else ifeq ($(OPENIPC_SOC_FAMILY),hi3516cv500)
5973 HISILICON_OPENSDK_SDK_CODE = 0x3516C500
74+ else ifeq ($(OPENIPC_SOC_FAMILY),hi3516cv6xx)
75+ HISILICON_OPENSDK_SDK_CODE = 0x3516C610
6076endif
6177
6278# for userspace libraries
@@ -74,6 +90,13 @@ define HISILICON_OPENSDK_BUILD_CMDS
7490endef
7591endif
7692
93+ # hi3516cv6xx (V5) builds the 6 sensor drivers from source. The MPP
94+ # userspace libraries (libss_mpi_*.so, libvqe_*.so, libsvp_*.so etc.)
95+ # don't have a source mirror yet and continue to ship prebuilt from
96+ # hisilicon-osdrv-hi3516cv6xx. The default BUILD_CMDS runs
97+ # `make -C libraries all` which the libraries/Makefile filters down
98+ # to ./sensor/hi3516cv6xx/% for this CHIPARCH.
99+
77100# Sensor install list per SoC family
78101HISILICON_OPENSDK_SENSORS_hi3516ev200 = \
79102 aptina_ar0237/libsns_ar0237 \
@@ -199,6 +222,13 @@ HISILICON_OPENSDK_SENSORS_hi3516cv200 = \
199222 soi_jxf23/libsns_jxf23 \
200223 soi_jxh42/libsns_jxh42 \
201224 sony_imx222/libsns_imx222
225+ HISILICON_OPENSDK_SENSORS_hi3516cv6xx = \
226+ galaxycore_gc4023/libsns_gc4023 \
227+ omnivision_os04d10/libsns_os04d10 \
228+ smart_sc431hai/libsns_sc431hai \
229+ smart_sc4336p/libsns_sc4336p \
230+ smart_sc450ai/libsns_sc450ai \
231+ smart_sc500ai/libsns_sc500ai
202232
203233HISILICON_OPENSDK_SENSORS = $(HISILICON_OPENSDK_SENSORS_$(OPENIPC_SOC_FAMILY ) )
204234
@@ -470,6 +500,24 @@ define HISILICON_OPENSDK_INSTALL_TARGET_CMDS
470500 done
471501endef
472502
503+ # For hi3516cv6xx: V5 — install opensdk .ko directly to hisilicon/ keeping
504+ # the open_* names. load_hisilicon (rewritten) drives `modprobe open_*`.
505+ # Sensor .so files built from source under libraries/sensor/hi3516cv6xx/
506+ # get installed to /usr/lib/sensors/, overwriting any prebuilt vendor
507+ # copies that hisilicon-osdrv-hi3516cv6xx may also have installed.
508+ else ifeq ($(OPENIPC_SOC_FAMILY),hi3516cv6xx)
509+ HISILICON_OPENSDK_KMOD_DST = $(HISILICON_OPENSDK_KMOD_BASE )
510+ define HISILICON_OPENSDK_INSTALL_TARGET_CMDS
511+ $(INSTALL ) -m 755 -d $(HISILICON_OPENSDK_KMOD_DST )
512+ for ko in $(@D ) /kernel/open_*.ko; do \
513+ [ -f $${ko} ] && $(INSTALL ) -m 644 -t $(HISILICON_OPENSDK_KMOD_DST ) $${ko} || true; \
514+ done
515+ $(INSTALL ) -m 755 -d $(TARGET_DIR ) /usr/lib/sensors
516+ $(foreach s,$(HISILICON_OPENSDK_SENSORS ) , \
517+ $(INSTALL ) -D -m 0644 $(@D ) /libraries/sensor/$(OPENIPC_SOC_FAMILY ) /$(s ) .so $(TARGET_DIR ) /usr/lib/sensors ; \
518+ )
519+ endef
520+
473521else ifeq ($(OPENIPC_SOC_FAMILY),hi3520dv200)
474522# hi3520dv200: V2-era 4-channel analog DVR SoC. Kernel 3.0.8. No
475523# sensor blobs (NVP6114 analog video decoder kernel module is built
@@ -519,7 +567,7 @@ $(eval $(kernel-module))
519567# TARGET_FINALIZE_HOOKS (linux package is processed before this one), so
520568# it has already executed by the time we get here — we need a second pass
521569# so modules.dep reflects the post-cleanup state.
522- ifneq ($(filter hi3516cv500 hi3516cv200 hi3516cv100 hi3516av100 hi3519v101 hi3516cv300 hi3520dv200,$(OPENIPC_SOC_FAMILY ) ) ,)
570+ ifneq ($(filter hi3516cv500 hi3516cv200 hi3516cv100 hi3516av100 hi3519v101 hi3516cv300 hi3520dv200 hi3516cv6xx ,$(OPENIPC_SOC_FAMILY ) ) ,)
523571define HISILICON_OPENSDK_FINALIZE_MODULES
524572 $(if $(BR2_PER_PACKAGE_DIRECTORIES ) ,rsync -a $(PER_PACKAGE_DIR ) /hisilicon-opensdk/target/lib/modules/ $(TARGET_DIR ) /lib/modules/)
525573 rm -rf $(TARGET_DIR ) /lib/modules/*/extra/open_*.ko
0 commit comments