From 375fb70bf93e32244d704a4352b7d2f47393ec33 Mon Sep 17 00:00:00 2001 From: Arthur Koba Date: Sat, 19 Sep 2026 07:01:55 +0300 Subject: [PATCH 1/2] Add hi3516cv200_lite_spezvision-svi-252b-k202 device profile (SpezVision SVI-252B K202, IMX323) --- README.md | 1 + .../spezvision-svi-252b-k202.fragment | 39 ++++++++++ ...00_lite_spezvision-svi-252b-k202_defconfig | 60 ++++++++++++++++ .../general/overlay/etc/modules | 2 + .../overlay/usr/share/openipc/customizer.sh | 35 +++++++++ .../overlay/usr/share/openipc/muxes.sh | 11 +++ .../scripts/excludes/hi3516cv200_lite.list | 72 +++++++++++++++++++ 7 files changed, 220 insertions(+) create mode 100644 devices/hi3516cv200_lite_spezvision-svi-252b-k202/br-ext-chip-hisilicon/board/hi3516cv200/spezvision-svi-252b-k202.fragment create mode 100644 devices/hi3516cv200_lite_spezvision-svi-252b-k202/br-ext-chip-hisilicon/configs/hi3516cv200_lite_spezvision-svi-252b-k202_defconfig create mode 100644 devices/hi3516cv200_lite_spezvision-svi-252b-k202/general/overlay/etc/modules create mode 100644 devices/hi3516cv200_lite_spezvision-svi-252b-k202/general/overlay/usr/share/openipc/customizer.sh create mode 100644 devices/hi3516cv200_lite_spezvision-svi-252b-k202/general/overlay/usr/share/openipc/muxes.sh create mode 100644 devices/hi3516cv200_lite_spezvision-svi-252b-k202/general/scripts/excludes/hi3516cv200_lite.list diff --git a/README.md b/README.md index 482b2b617..c4fba7969 100644 --- a/README.md +++ b/README.md @@ -58,6 +58,7 @@ RunCam WiFiLink SSC338Q IMX415 NOR_16M done RVi-1NCMW2028 (2.8) HI3516EV300 SC2330 RTL8188FU_USB NAND testing Smartwares CIP-37210 HI3518EV200 OV9732 RTL8188FU_USB NOR_16M done Smartwares CIP-37210AT T21N JXF37 RTL8188FU_USB NOR_16M done +SpezVision SVI-252B K202 HI3516CV200 IMX323 - NOR_8M done Switcam HS303 v1 HI3518EV200 JXF22 RTL8188FU_USB NOR_16M done Switcam HS303 v2 HI3518EV200 OV9732 RTL8188EU_USB NOR_16M done Tiandy TC-C321N GK7205V200 OS02G10 - NOR_8M done diff --git a/devices/hi3516cv200_lite_spezvision-svi-252b-k202/br-ext-chip-hisilicon/board/hi3516cv200/spezvision-svi-252b-k202.fragment b/devices/hi3516cv200_lite_spezvision-svi-252b-k202/br-ext-chip-hisilicon/board/hi3516cv200/spezvision-svi-252b-k202.fragment new file mode 100644 index 000000000..e17a9ce45 --- /dev/null +++ b/devices/hi3516cv200_lite_spezvision-svi-252b-k202/br-ext-chip-hisilicon/board/hi3516cv200/spezvision-svi-252b-k202.fragment @@ -0,0 +1,39 @@ +# SVI-252B K202 hardware population on BLK16CV-0323-38X38-V1.01: +# no SD/MMC socket, no Wi-Fi radio, no used USB path, NOR flash only. +# Keep Ethernet, UART, GPIO/I2C and the HiSilicon media/audio path. + +# No SD/MMC controller on this camera. HIMCI otherwise stalls boot probing it. +# CONFIG_MMC is not set +# CONFIG_HIMCI is not set + +# No Wi-Fi hardware. Drop cfg80211/mac80211 and the generic USB Wi-Fi drivers. +# CONFIG_WIRELESS is not set +# CONFIG_WLAN is not set +# CONFIG_CFG80211 is not set +# CONFIG_MAC80211 is not set +# CONFIG_MT7601U is not set +# CONFIG_RTL_CARDS is not set +# CONFIG_RTL8192CU is not set +# CONFIG_RTLWIFI is not set +# CONFIG_RTLWIFI_USB is not set +# CONFIG_RTL8XXXU is not set +# CONFIG_R8188EU is not set + +# The retail camera does not use the module's optional USB expansion interface. +# CONFIG_USB_SUPPORT is not set +# CONFIG_USB is not set +# CONFIG_USB_GADGET is not set +# CONFIG_USB_HISI_UDC is not set +# CONFIG_USB_MASS_STORAGE is not set +# CONFIG_PHY_HISI_USB2 is not set + +# With no USB/SD storage there is no SCSI disk or FAT filesystem consumer. +# CONFIG_SCSI is not set +# CONFIG_BLK_DEV_SD is not set +# CONFIG_FAT_FS is not set +# CONFIG_VFAT_FS is not set + +# This board is 8 MiB SPI NOR only; do not probe the absent SPI NAND controller. +# CONFIG_MTD_NAND is not set +# CONFIG_MTD_SPI_NAND_HISI_BVT is not set +# CONFIG_MTD_SPI_NAND_HIFMC100 is not set diff --git a/devices/hi3516cv200_lite_spezvision-svi-252b-k202/br-ext-chip-hisilicon/configs/hi3516cv200_lite_spezvision-svi-252b-k202_defconfig b/devices/hi3516cv200_lite_spezvision-svi-252b-k202/br-ext-chip-hisilicon/configs/hi3516cv200_lite_spezvision-svi-252b-k202_defconfig new file mode 100644 index 000000000..b00e951e0 --- /dev/null +++ b/devices/hi3516cv200_lite_spezvision-svi-252b-k202/br-ext-chip-hisilicon/configs/hi3516cv200_lite_spezvision-svi-252b-k202_defconfig @@ -0,0 +1,60 @@ +# Architecture +BR2_arm=y + +# Toolchain +BR2_TOOLCHAIN_EXTERNAL=y +BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y +BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y +BR2_TOOLCHAIN_EXTERNAL_URL="https://github.com/openipc/firmware/releases/download/$(OPENIPC_TOOLCHAIN).tgz" +BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX="arm-openipc-linux-musleabi" +BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_9=y +BR2_TOOLCHAIN_EXTERNAL_CUSTOM_MUSL=y +BR2_TOOLCHAIN_EXTERNAL_CXX=y + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/openipc/linux/archive/$(OPENIPC_KERNEL).tar.gz" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(EXTERNAL_VENDOR)/board/$(OPENIPC_SOC_FAMILY)/hi3516cv200.generic.config" +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(EXTERNAL_VENDOR)/board/$(OPENIPC_SOC_FAMILY)/spezvision-svi-252b-k202.fragment" +BR2_LINUX_KERNEL_UIMAGE=y +BR2_LINUX_KERNEL_XZ=y + +# Filesystem +BR2_PACKAGE_BUSYBOX_CONFIG="$(BR2_EXTERNAL)/package/busybox/busybox.config" +BR2_PACKAGE_UBOOT_TOOLS=y +BR2_PACKAGE_ZLIB=y +# BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set +BR2_PACKAGE_WIREGUARD_LINUX_COMPAT=y +BR2_PACKAGE_WIREGUARD_TOOLS=y +BR2_TARGET_ROOTFS_CPIO=y +BR2_TARGET_ROOTFS_SQUASHFS=y +BR2_TARGET_ROOTFS_SQUASHFS4_XZ=y + +# OpenIPC +BR2_OPENIPC_SOC_VENDOR="hisilicon" +BR2_OPENIPC_SOC_MODEL="hi3516cv200" +BR2_OPENIPC_SOC_FAMILY="hi3516cv200" +BR2_OPENIPC_VARIANT="lite" +BR2_OPENIPC_FLASH_SIZE="8" + +# Packages +BR2_PACKAGE_DROPBEAR_OPENIPC=y +BR2_PACKAGE_HISILICON_OPENSDK=y +BR2_PACKAGE_HISILICON_OSDRV_HI3516CV200=y +BR2_PACKAGE_IPCTOOL=y +BR2_PACKAGE_LIBCURL_OPENIPC=y +BR2_PACKAGE_LIBCURL_OPENIPC_CURL=y +# BR2_PACKAGE_LIBCURL_OPENIPC_PROXY_SUPPORT is not set +# BR2_PACKAGE_LIBCURL_OPENIPC_COOKIES_SUPPORT is not set +# BR2_PACKAGE_LIBCURL_OPENIPC_EXTRA_PROTOCOLS_FEATURES is not set +BR2_PACKAGE_LIBEVENT_OPENIPC=y +BR2_PACKAGE_LIBOGG_OPENIPC=y +BR2_PACKAGE_MAJESTIC_FONTS=y +BR2_PACKAGE_MAJESTIC_WEBUI=y +BR2_PACKAGE_MAJESTIC=y +BR2_PACKAGE_MBEDTLS_OPENIPC=y +BR2_PACKAGE_OPUS_OPENIPC=y +BR2_PACKAGE_VTUND_OPENIPC=y +BR2_PACKAGE_YAML_CLI=y diff --git a/devices/hi3516cv200_lite_spezvision-svi-252b-k202/general/overlay/etc/modules b/devices/hi3516cv200_lite_spezvision-svi-252b-k202/general/overlay/etc/modules new file mode 100644 index 000000000..b1d811fce --- /dev/null +++ b/devices/hi3516cv200_lite_spezvision-svi-252b-k202/general/overlay/etc/modules @@ -0,0 +1,2 @@ +# SVI-252B K202 has no removable storage. +# Override OpenIPC's common /etc/modules (vfat, exfat), so S35modules loads nothing here. diff --git a/devices/hi3516cv200_lite_spezvision-svi-252b-k202/general/overlay/usr/share/openipc/customizer.sh b/devices/hi3516cv200_lite_spezvision-svi-252b-k202/general/overlay/usr/share/openipc/customizer.sh new file mode 100644 index 000000000..6303d2308 --- /dev/null +++ b/devices/hi3516cv200_lite_spezvision-svi-252b-k202/general/overlay/usr/share/openipc/customizer.sh @@ -0,0 +1,35 @@ +#!/bin/sh +# +# OpenIPC profile for SpezVision SVI-252B K202 +# Board: BLK16CV-0323-38X38-V1.01 +# SoC: HiSilicon Hi3516CV200 +# Sensor: Sony IMX323, I2C/DC +# Flash: 8 MiB SPI NOR +# +# Majestic uses legacy HiSilicon GPIO numbering: bank * 8 + bit. +# +# Stock Sofia's IMX323 day/night path for product NID 0x11 uses: +# - GPIO3_0 = 24 as the digital daylight sensor input; +# - GPIO4_2 = 34 and GPIO4_1 = 33 as the bistable IR-cut outputs. +# +# Stock code muxes GPIO3_0 with 0x200f0034 = 0 before reading it. +# The board pinmux is reapplied on every boot by /usr/share/openipc/muxes.sh, +# independently of the selected streamer. +# +# The IR illuminator control is still unresolved, so backlightPin remains +# intentionally unset. +# + +fw_setenv upgrade 'https://github.com/OpenIPC/builder/releases/download/latest/hi3516cv200_lite_spezvision-svi-252b-k202-nor.tgz' +fw_setenv sensor imx323 + +cli -s .isp.sensorConfig /etc/sensors/imx323_i2c_dc_1080p.ini +cli -s .nightMode.lightMonitor true +cli -s .nightMode.lightSensorPin 24 +cli -s .nightMode.lightSensorInvert false +cli -s .nightMode.irCutPin1 34 +cli -s .nightMode.irCutPin2 33 +cli -s .video0.codec h264 +cli -s .video0.fps 25 + +exit 0 diff --git a/devices/hi3516cv200_lite_spezvision-svi-252b-k202/general/overlay/usr/share/openipc/muxes.sh b/devices/hi3516cv200_lite_spezvision-svi-252b-k202/general/overlay/usr/share/openipc/muxes.sh new file mode 100644 index 000000000..87e534efb --- /dev/null +++ b/devices/hi3516cv200_lite_spezvision-svi-252b-k202/general/overlay/usr/share/openipc/muxes.sh @@ -0,0 +1,11 @@ +#!/bin/sh +# +# SpezVision SVI-252B K202 board pinmux preset. +# S30customizer runs this script on every boot. +# +# Stock Sofia configures GPIO3_0 as the digital daylight sensor input by +# selecting mux function 0 at 0x200f0034. Keep this board contract outside +# Majestic so another streamer/runtime sees the same hardware setup. +# + +devmem 0x200f0034 32 0 diff --git a/devices/hi3516cv200_lite_spezvision-svi-252b-k202/general/scripts/excludes/hi3516cv200_lite.list b/devices/hi3516cv200_lite_spezvision-svi-252b-k202/general/scripts/excludes/hi3516cv200_lite.list new file mode 100644 index 000000000..8aee311e1 --- /dev/null +++ b/devices/hi3516cv200_lite_spezvision-svi-252b-k202/general/scripts/excludes/hi3516cv200_lite.list @@ -0,0 +1,72 @@ +/etc/sensors/ar0130_i2c_720p.ini +/etc/sensors/ar0237_i2c_dc_1080p.ini +/etc/sensors/gc1034_i2c_720p.ini +/etc/sensors/gc2023_mipi_1080p.ini +/etc/sensors/imx222_i2c_1080p.ini +/etc/sensors/imx222_i2c_720p.ini +/etc/sensors/imx291_i2c_lvds_1080p.ini +/etc/sensors/imx323_spi_dc_1080p.ini +/etc/sensors/jxf22_i2c_1080p.ini +/etc/sensors/jxf23_i2c_1080p.ini +/etc/sensors/jxh62_i2c_720p.ini +/etc/sensors/jxh65_i2c_960p.ini +/etc/sensors/ov2710_dc_1080p.ini +/etc/sensors/ov2710_mipi_1080p.ini +/etc/sensors/ov2735_i2c_1080p.ini +/etc/sensors/ov2735_mipi_1080p.ini +/etc/sensors/ov9712_i2c_720p.ini +/etc/sensors/ov9732_i2c_720p.ini +/etc/sensors/ov9750_i2c_960p.ini +/etc/sensors/sc1135_i2c_720p.ini +/etc/sensors/sc1145_i2c_720p.ini +/etc/sensors/sc1235_i2c_dc_960p.ini +/etc/sensors/sc2035_i2c_1080p.ini +/etc/sensors/sc2135_i2c_1080p.ini +/etc/sensors/sc2235_i2c_dc_1080p.ini +# +/etc/sensors/iq/default.ini +/etc/sensors/iq/ar0130.ini +/etc/sensors/iq/ar0230.ini +/etc/sensors/iq/imx222.ini +/etc/sensors/iq/ov2710.ini +/etc/sensors/iq/ov9732.ini +/etc/sensors/iq/ov9750.ini +# +/usr/lib/sensors/libsns_9m034.so +/usr/lib/sensors/libsns_ar0130.so +/usr/lib/sensors/libsns_ar0230.so +/usr/lib/sensors/libsns_ar0237.so +/usr/lib/sensors/libsns_gc1034.so +/usr/lib/sensors/libsns_gc2023.so +/usr/lib/sensors/libsns_imx122.so +/usr/lib/sensors/libsns_imx222.so +/usr/lib/sensors/libsns_imx291.so +/usr/lib/sensors/libsns_jxf22.so +/usr/lib/sensors/libsns_jxf23.so +/usr/lib/sensors/libsns_jxh42.so +/usr/lib/sensors/libsns_jxh62.so +/usr/lib/sensors/libsns_jxh65.so +/usr/lib/sensors/libsns_mn34222.so +/usr/lib/sensors/libsns_ov2710.so +/usr/lib/sensors/libsns_ov2710_dc.so +/usr/lib/sensors/libsns_ov2710_mipi.so +/usr/lib/sensors/libsns_ov2718.so +/usr/lib/sensors/libsns_ov2735.so +/usr/lib/sensors/libsns_ov9712.so +/usr/lib/sensors/libsns_ov9732.so +/usr/lib/sensors/libsns_ov9750.so +/usr/lib/sensors/libsns_ov9752.so +/usr/lib/sensors/libsns_sc1135.so +/usr/lib/sensors/libsns_sc1145.so +/usr/lib/sensors/libsns_sc1235.so +/usr/lib/sensors/libsns_sc2035.so +/usr/lib/sensors/libsns_sc2135.so +/usr/lib/sensors/libsns_sc2235.so +# +/usr/bin/ircut_demo +/lib/modules/4.9.37/hisilicon/ir.ko +/lib/modules/4.9.37/hisilicon/hi_rtc.ko +/lib/modules/4.9.37/hisilicon/piris.ko +# +/lib/modules/4.9.37/kernel/drivers/staging/*/*.ko +/lib/modules/4.9.37/kernel/fs/f2fs/*.ko From b1774121489bdc2baee44f62054b7a484a4f7e4a Mon Sep 17 00:00:00 2001 From: AI Dev Date: Sat, 19 Sep 2026 12:08:25 +0000 Subject: [PATCH 2/2] svi-252b: drop two exclude entries that can never match MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit rootfs_script.sh tests every entry with [ -e "${TARGET_DIR}${entry}" ] against the literal string, so a path containing a glob never expands and never deletes anything. Both lines came across from the sibling hi3516cv200_lite list: /lib/modules/4.9.37/kernel/drivers/staging/*/*.ko /lib/modules/4.9.37/kernel/fs/f2fs/*.ko Neither has a live target on this board in any case. hi3516cv200.generic.config carries "# CONFIG_F2FS_FS is not set", and the one staging module that would otherwise be built here is r8188eu, which this device's kernel fragment already switches off at CONFIG_R8188EU. Left in, every build of this device would print "excludes: 2 of 72 entries in hi3516cv200_lite.list matched no file" — the same permanently-on warning #155 cleared out of five hi3518ev200_lite lists. That warning is how a stale exclude gets noticed, so it should not be on by default. --- .../general/scripts/excludes/hi3516cv200_lite.list | 3 --- 1 file changed, 3 deletions(-) diff --git a/devices/hi3516cv200_lite_spezvision-svi-252b-k202/general/scripts/excludes/hi3516cv200_lite.list b/devices/hi3516cv200_lite_spezvision-svi-252b-k202/general/scripts/excludes/hi3516cv200_lite.list index 8aee311e1..7609bd911 100644 --- a/devices/hi3516cv200_lite_spezvision-svi-252b-k202/general/scripts/excludes/hi3516cv200_lite.list +++ b/devices/hi3516cv200_lite_spezvision-svi-252b-k202/general/scripts/excludes/hi3516cv200_lite.list @@ -67,6 +67,3 @@ /lib/modules/4.9.37/hisilicon/ir.ko /lib/modules/4.9.37/hisilicon/hi_rtc.ko /lib/modules/4.9.37/hisilicon/piris.ko -# -/lib/modules/4.9.37/kernel/drivers/staging/*/*.ko -/lib/modules/4.9.37/kernel/fs/f2fs/*.ko