add TRASSIR TR-D4121IR1 v2

This commit is contained in:
cronyx
2024-01-03 22:10:03 +03:00
parent 7e68bb24f0
commit 46e7b1c43f
27 changed files with 2913 additions and 1900 deletions

View File

@@ -92,6 +92,7 @@ BR2_PACKAGE_WPA_SUPPLICANT=y
BR2_PACKAGE_WPA_SUPPLICANT_CLI=y
BR2_PACKAGE_WPA_SUPPLICANT_NL80211=y
BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE=y
BR2_PACKAGE_RTL8189ES_OPENIPC=y
# WIREGUARD
# BR2_PACKAGE_WIREGUARD_LINUX_COMPAT is not set

View File

@@ -0,0 +1,52 @@
#!/bin/sh
kernel_ver=$(uname -r)
cd /lib/modules/$kernel_ver/goke
USE_OLD_SENSOR_DRIVER=NO #YES or NO, default no use.
USE_LOAD_HAL_DRIVER=YES #YES or NO, default no use.
if [ $USE_LOAD_HAL_DRIVER = "YES" ];then
insmod hal.ko
fi
insmod hw_crypto.ko
insmod media.ko
insmod audio.ko
if [ $USE_OLD_SENSOR_DRIVER = "YES" ]; then
if [ -e ${1}.ko ];then
insmod ${1}.ko
else
echo "${1}.ko is no exist."
exit 0
fi
else
insmod sensor.ko
# Use sensor.ko
rm /tmp/sensor_hw.bin -f
rm /tmp/sensor_ex.ko -f
if [ $# -ne 1 ] ;then
sensordetect
else
if [ -e /etc/sensors/$1"_hw.bin" ];then
if [ -e /tmp/sensor_hw.bin ]; then
rm /tmp/sensor_hw.bin -f
fi
ln -s /etc/sensors/$1"_hw.bin" /tmp/sensor_hw.bin
else
echo "\"/etc/sensors/${1}_hw.bin\" is no exist."
exit 0
fi
if [ -e $1"_ex.ko" ];then
if [ -e /tmp/sensor_ex.ko ]; then
rm /tmp/sensor_ex.ko -f
fi
ln -s $1"_ex.ko" /tmp/sensor_ex.ko
else
echo "\"${1}_ex.ko\" is no exist."
fi
fi
if [ -e /tmp/sensor_ex.ko ];then
insmod /tmp/sensor_ex.ko
fi
fi

View File

@@ -0,0 +1,41 @@
################################################################################
#
# goke-osdrv-gk710x
#
################################################################################
GOKE_OSDRV_GK710X_VERSION =
GOKE_OSDRV_GK710X_SITE =
GOKE_OSDRV_GK710X_LICENSE = MIT
GOKE_OSDRV_GK710X_LICENSE_FILES = LICENSE
ifeq ($(OPENIPC_SOC_MODEL),gk7102)
GOKE_OSDRV_GK710X_FIRMWARE = gk_fw_710x.bin
else ifeq ($(OPENIPC_SOC_MODEL),gk7102s)
GOKE_OSDRV_GK710X_FIRMWARE = gk_fw_710xs.bin
else ifeq ($(OPENIPC_SOC_MODEL),gk7102c)
GOKE_OSDRV_GK710X_FIRMWARE = gk_fw_7102c.bin
else ifeq ($(OPENIPC_SOC_MODEL),gk7102c_a)
GOKE_OSDRV_GK710X_FIRMWARE = gk_fw_7102c_a.bin
endif
define GOKE_OSDRV_GK710X_INSTALL_TARGET_CMDS
$(INSTALL) -m 755 -d $(TARGET_DIR)/etc/sensors
$(INSTALL) -m 644 -t $(TARGET_DIR)/etc/sensors $(GOKE_OSDRV_GK710X_PKGDIR)/files/sensor/config/*.bin
$(INSTALL) -m 755 -d $(TARGET_DIR)/lib/firmware
# $(INSTALL) -m 644 -t $(TARGET_DIR)/lib/firmware $(GOKE_OSDRV_GK710X_PKGDIR)/files/sensor/fw/$(GOKE_OSDRV_GK710X_FIRMWARE)
cp $(GOKE_OSDRV_GK710X_PKGDIR)/files/sensor/fw/$(GOKE_OSDRV_GK710X_FIRMWARE) $(TARGET_DIR)/lib/firmware/gk_fw.bin
$(INSTALL) -m 755 -d $(TARGET_DIR)/lib/modules/3.4.43-Goke/goke
$(INSTALL) -m 644 -t $(TARGET_DIR)/lib/modules/3.4.43-Goke/goke $(GOKE_OSDRV_GK710X_PKGDIR)/files/kmod/*.ko
$(INSTALL) -m 644 -t $(TARGET_DIR)/lib/modules/3.4.43-Goke/goke $(GOKE_OSDRV_GK710X_PKGDIR)/files/sensor/*.ko
$(INSTALL) -m 755 -d $(TARGET_DIR)/usr/bin
$(INSTALL) -m 755 -t $(TARGET_DIR)/usr/bin $(GOKE_OSDRV_GK710X_PKGDIR)/files/script/load*
$(INSTALL) -m 755 -d $(TARGET_DIR)/usr/lib
$(INSTALL) -m 644 -t $(TARGET_DIR)/usr/lib/ $(GOKE_OSDRV_GK710X_PKGDIR)/files/lib/*.so
endef
$(eval $(generic-package))

View File

@@ -0,0 +1,123 @@
# Architecture
BR2_arm=y
BR2_arm926t=y
BR2_ARM_EABI=y
# BR2_ARM_INSTRUCTIONS_THUMB is not set
BR2_KERNEL_HEADERS_VERSION=y
BR2_DEFAULT_KERNEL_VERSION="4.9.37"
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_9=y
# Toolchain
BR2_PER_PACKAGE_DIRECTORIES=y
BR2_GCC_VERSION_12_X=y
# BR2_TOOLCHAIN_USES_UCLIBC is not set
# BR2_TOOLCHAIN_BUILDROOT_UCLIBC is not set
# BR2_TOOLCHAIN_BUILDROOT_LIBC="uclibc"
BR2_TOOLCHAIN_USES_MUSL=y
BR2_TOOLCHAIN_BUILDROOT_MUSL=y
BR2_TOOLCHAIN_BUILDROOT_LIBC="musl"
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_TOOLCHAIN_BUILDROOT_LOCALE=y
BR2_TOOLCHAIN_BUILDROOT_USE_SSP=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/hi3516cv200/kernel/hi3518ev200.generic.config"
BR2_LINUX_KERNEL_UIMAGE=y
BR2_LINUX_KERNEL_XZ=y
# OpenIPC
BR2_OPENIPC_SOC_VENDOR="hisilicon"
BR2_OPENIPC_SOC_MODEL="hi3518ev200"
BR2_OPENIPC_SOC_FAMILY="hi3516cv200"
BR2_OPENIPC_FLAVOR="lite"
BR2_OPENIPC_FLASH_SIZE="8"
# Filesystem
# BR2_TARGET_TZ_INFO is not set
BR2_TARGET_ROOTFS_CPIO=y
BR2_TARGET_ROOTFS_SQUASHFS=y
BR2_TARGET_ROOTFS_SQUASHFS4_XZ=y
BR2_ROOTFS_OVERLAY="$(BR2_EXTERNAL)/overlay"
BR2_ROOTFS_POST_BUILD_SCRIPT="$(BR2_EXTERNAL)/scripts/rootfs_script.sh"
# OpenIPC configuration
BR2_TOOLCHAIN_BUILDROOT_VENDOR="openipc"
BR2_TARGET_GENERIC_ISSUE="Welcome to OpenIPC"
BR2_TARGET_GENERIC_HOSTNAME="openipc-hi3518ev200"
BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL)/package/all-patches"
# OpenIPC packages
BR2_PACKAGE_BUSYBOX_CONFIG="$(BR2_EXTERNAL)/package/busybox/busybox.config"
BR2_PACKAGE_DROPBEAR_OPENIPC=y
# BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set
# BR2_PACKAGE_FDK_AAC_OPENIPC is not set
BR2_PACKAGE_UBOOT_TOOLS=y
# BR2_PACKAGE_HISI_GPIO is not set
BR2_PACKAGE_HISILICON_OSDRV_HI3516CV200=y
BR2_PACKAGE_IPCTOOL=y
BR2_PACKAGE_JSON_C=y
BR2_PACKAGE_JSONFILTER=y
BR2_PACKAGE_LIBCURL_OPENIPC=y
BR2_PACKAGE_LIBCURL_OPENIPC_CURL=y
# BR2_PACKAGE_LIBCURL_OPENIPC_VERBOSE is not set
# 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_LIBCURL_OPENIPC_MBEDTLS=y
BR2_PACKAGE_LIBEVENT_OPENIPC=y
BR2_PACKAGE_LIBEVENT_OPENIPC_REMOVE_PYSCRIPT=y
BR2_PACKAGE_LIBOGG_OPENIPC=y
BR2_PACKAGE_LIBYAML=y
BR2_PACKAGE_MAJESTIC_FONTS=y
BR2_PACKAGE_MAJESTIC=y
BR2_PACKAGE_MBEDTLS_OPENIPC=y
# BR2_PACKAGE_MBEDTLS_OPENIPC_PROGRAMS is not set
# BR2_PACKAGE_MBEDTLS_OPENIPC_COMPRESSION is not set
BR2_PACKAGE_MICROBE_WEB=y
# BR2_PACKAGE_MINI_SNMPD is not set
# BR2_PACKAGE_MOTORS is not set
BR2_PACKAGE_OPUS_OPENIPC=y
BR2_PACKAGE_OPUS_OPENIPC_FIXED_POINT=y
# BR2_PACKAGE_SSHPASS is not set
# BR2_PACKAGE_UACME_OPENIPC is not set
BR2_PACKAGE_VTUND_OPENIPC=y
BR2_PACKAGE_YAML_CLI=y
# BR2_PACKAGE_QUIRC_OPENIPC is not set
# WiFi
BR2_PACKAGE_WIRELESS_TOOLS=y
BR2_PACKAGE_WPA_SUPPLICANT=y
BR2_PACKAGE_WPA_SUPPLICANT_CLI=y
BR2_PACKAGE_WPA_SUPPLICANT_NL80211=y
BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE=y
# BR2_PACKAGE_LINUX_FIRMWARE_OPENIPC is not set
# BR2_PACKAGE_LINUX_FIRMWARE_OPENIPC_MEDIATEK_MT7601U is not set
# WIREGUARD
BR2_PACKAGE_WIREGUARD_LINUX_COMPAT=y
BR2_PACKAGE_WIREGUARD_TOOLS=y
# DEBUG
# BR2_PACKAGE_HOST_GDB is not set
# BR2_PACKAGE_GDB is not set
# CCACHE
BR2_CCACHE=y
BR2_CCACHE_DIR="$(HOME)/.ccache"
# Compression
BR2_PACKAGE_ZLIB=y
# External
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM_MUSL=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX="arm-openipc-linux-musleabi"
BR2_TOOLCHAIN_EXTERNAL_CXX=y
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_9=y
BR2_TOOLCHAIN_EXTERNAL_URL="https://github.com/openipc/firmware/releases/download/$(OPENIPC_TOOLCHAIN).tgz"

View File

@@ -0,0 +1,3 @@
#
Experimental system for building OpenIPC firmware for known devices
#

View File

@@ -0,0 +1,33 @@
#!/bin/sh
#
# Perform basic settings on a known IP camera
#
#
# Set custom upgrade url
#
fw_setenv upgrade 'https://github.com/OpenIPC/builder/releases/download/latest/hi3518ev200_lite_trassir-tr-d4121ir1-v2-nor.tgz'
#
#
# Set custom majestic settings
#
cli -s .system.staticDir /var/www/majestic
cli -s .nightMode.enabled true
#cli -s .nightMode.irSensorPin ??
#cli -s .nightMode.irSensorPinInvert true
#cli -s .nightMode.irCutPin1 ??
#cli -s .nightMode.irCutPin2 ??
#cli -s .nightMode.backlightPin ??
cli -s .video0.codec h264
cli -s .video0.fps 30
cli -s .isp.slowShutter disabled
#
# front white led gpio - 0
# reset gpio - ?
#
# Set wlan device and credentials if need
#
#fw_setenv wlandev mt7601u-generic
#fw_setenv wlanssid Router
#fw_setenv wlanpass 12345678
exit 0

View File

@@ -0,0 +1,55 @@
etc/sensors/ar0130_i2c_720p.ini
etc/sensors/gc1034_i2c_720p.ini
etc/sensors/imx222_i2c_1080p.ini
etc/sensors/imx222_i2c_720p.ini
etc/sensors/imx291_i2c_lvds_1080p.ini
etc/sensors/imx323_i2c_dc_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/ov2735_i2c_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/ar0230.ini
etc/sensors/iq/imx222.ini
etc/sensors/iq/ov9732.ini
etc/sensors/iq/ov9750.ini
#
usr/lib/sensors/libsns_ar0130.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_imx323_i2c_dc.so
usr/lib/sensors/libsns_imx323_i2c_dc_v1.so
usr/lib/sensors/libsns_jxf22.so
usr/lib/sensors/libsns_jxf23.so
usr/lib/sensors/libsns_jxh62.so
usr/lib/sensors/libsns_jxh65.so
usr/lib/sensors/libsns_mn34222.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
#
lib/modules/4.9.37/kernel/drivers/staging
lib/modules/4.9.37/kernel/fs/f2fs