mirror of
https://github.com/nikdoof/builder.git
synced 2025-12-14 16:12:15 +00:00
add tp-link tapo c310 v1 with binary sensor driver for tests
This commit is contained in:
13
devices/ssc325_lite_tp-link-tapo-c310-v1/general/overlay/etc/wireless/usb
Executable file
13
devices/ssc325_lite_tp-link-tapo-c310-v1/general/overlay/etc/wireless/usb
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
set_gpio() {
|
||||
[ "$2" -eq 1 ] && gpio set $1 || gpio clear $1
|
||||
sleep 1
|
||||
}
|
||||
|
||||
if [ "$1" = "rtl8192eu-ssc325-tapo-c310v1" ]; then
|
||||
modprobe 8192eu
|
||||
exit 0
|
||||
fi
|
||||
|
||||
exit 1
|
||||
@@ -0,0 +1,27 @@
|
||||
#!/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/ssc325_lite_tp-link-tapo-c310-v1-nor.tgz'
|
||||
#
|
||||
#
|
||||
# Set custom majestic settings
|
||||
#
|
||||
#cli -s .nightMode.enabled true
|
||||
#cli -s .nightMode.irCutPin1 78
|
||||
#cli -s .nightMode.irCutPin2 79
|
||||
#cli -s .nightMode.backlightPin 52
|
||||
#cli -s .nightMode.colorToGray true
|
||||
cli -s .video0.codec h264
|
||||
#
|
||||
#
|
||||
# Set wlan device and credentials if need
|
||||
#
|
||||
fw_setenv wlandev rtl8192eu-ssc325-tapo-c310v1
|
||||
#fw_setenv wlanssid Router
|
||||
#fw_setenv wlanpass 12345678
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,70 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# OpenIPC.org | 2024
|
||||
#
|
||||
|
||||
PATH_MODULE=/lib/modules/4.9.84/sigmastar
|
||||
PATH_SENSOR=${PATH_MODULE}/sensor
|
||||
SENSOR=$(fw_printenv -n sensor)
|
||||
|
||||
detect_sensor() {
|
||||
insmod ${PATH_SENSOR}/sensor_config.ko
|
||||
if [ -e /dev/srcfg ]; then
|
||||
echo srcfg 0 1 0 0 0 0 > /dev/srcfg
|
||||
rmmod sensor_config
|
||||
fi
|
||||
SENSOR=$(ipcinfo -s)
|
||||
fw_setenv sensor ${SENSOR}
|
||||
}
|
||||
|
||||
set_sensor() {
|
||||
case ${SENSOR} in
|
||||
gc2053|imx307|sc3335)
|
||||
insmod ${PATH_SENSOR}/sensor_${SENSOR}_mipi.ko chmap=1
|
||||
;;
|
||||
sc2239|sc2335)
|
||||
[ "$(fw_printenv -n soc)" = "ssc325de" ] && IFACE=parl
|
||||
insmod ${PATH_SENSOR}/sensor_${SENSOR}_${IFACE:-mipi}.ko chmap=1
|
||||
;;
|
||||
*)
|
||||
echo -e "\n\e[1;31mUNSUPPORTED sensor - ${SENSOR}\e[0m\n" | logger -s -t OpenIPC
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
insert_ko() {
|
||||
insmod ${PATH_MODULE}/mhal.ko
|
||||
insmod ${PATH_MODULE}/mi_common.ko
|
||||
insmod ${PATH_MODULE}/mi_sys.ko logBufSize=256 default_config_path=/usr/bin
|
||||
insmod ${PATH_MODULE}/mi_rgn.ko
|
||||
insmod ${PATH_MODULE}/mi_ai.ko
|
||||
insmod ${PATH_MODULE}/mi_ao.ko
|
||||
insmod ${PATH_MODULE}/mi_sensor.ko
|
||||
insmod ${PATH_MODULE}/mi_shadow.ko
|
||||
insmod ${PATH_MODULE}/mi_divp.ko
|
||||
insmod ${PATH_MODULE}/mi_vif.ko
|
||||
insmod ${PATH_MODULE}/mi_vpe.ko
|
||||
insmod ${PATH_MODULE}/mi_venc.ko
|
||||
}
|
||||
|
||||
if [ ! -e /sys/module/mhal ]; then
|
||||
insert_ko
|
||||
fi
|
||||
|
||||
if [ -z ${SENSOR} ]; then
|
||||
echo -e "\n\e[1;33mAutodetect sensor\e[0m\n" | logger -s -t OpenIPC
|
||||
detect_sensor
|
||||
fi
|
||||
|
||||
if [ -z ${SENSOR} ]; then
|
||||
echo -e "\n\e[1;31mSensor parameter MISSING\e[0m\n" | logger -s -t OpenIPC
|
||||
exit 1
|
||||
else
|
||||
echo -e "\n\e[1;32mSensor assigned - ${SENSOR}\e[0m\n" | logger -s -t OpenIPC
|
||||
if [ -e /sys/module/sensor* ]; then
|
||||
rmmod $(ls -d /sys/module/sensor* | cut -d/ -f4)
|
||||
fi
|
||||
set_sensor
|
||||
fi
|
||||
|
||||
exit 0
|
||||
Binary file not shown.
@@ -0,0 +1,40 @@
|
||||
################################################################################
|
||||
#
|
||||
# sigmastar-osdrv-infinity6
|
||||
#
|
||||
################################################################################
|
||||
|
||||
SIGMASTAR_OSDRV_INFINITY6_VERSION =
|
||||
SIGMASTAR_OSDRV_INFINITY6_SITE =
|
||||
SIGMASTAR_OSDRV_INFINITY6_LICENSE = MIT
|
||||
SIGMASTAR_OSDRV_INFINITY6_LICENSE_FILES = LICENSE
|
||||
|
||||
SIGMASTAR_OSDRV_INFINITY6_DEPENDENCIES = ipctool
|
||||
|
||||
define SIGMASTAR_OSDRV_INFINITY6_BUILD_CMDS
|
||||
cp -rf $(SIGMASTAR_OSDRV_INFINITY6_PKGDIR)/files/src $(@D)
|
||||
$(TARGET_CC) $(@D)/src/config_tool.c -o $(@D)/config_tool -lipchw -s
|
||||
endef
|
||||
|
||||
define SIGMASTAR_OSDRV_INFINITY6_INSTALL_TARGET_CMDS
|
||||
$(INSTALL) -m 755 -d $(TARGET_DIR)/lib/modules/4.9.84/sigmastar
|
||||
$(INSTALL) -m 644 -t $(TARGET_DIR)/lib/modules/4.9.84/sigmastar $(SIGMASTAR_OSDRV_INFINITY6_PKGDIR)/files/kmod/*
|
||||
|
||||
$(INSTALL) -m 755 -d $(TARGET_DIR)/lib/modules/4.9.84/sigmastar/sensor
|
||||
$(INSTALL) -m 644 -t $(TARGET_DIR)/lib/modules/4.9.84/sigmastar/sensor $(SIGMASTAR_OSDRV_INFINITY6B0_PKGDIR)/files/sensor/kmod/*
|
||||
|
||||
$(INSTALL) -m 755 -d $(TARGET_DIR)/etc/firmware
|
||||
$(INSTALL) -m 644 -t $(TARGET_DIR)/etc/firmware $(SIGMASTAR_OSDRV_INFINITY6_PKGDIR)/files/sensor/firmware/*
|
||||
|
||||
$(INSTALL) -m 755 -d $(TARGET_DIR)/etc/sensors
|
||||
$(INSTALL) -m 644 -t $(TARGET_DIR)/etc/sensors $(SIGMASTAR_OSDRV_INFINITY6_PKGDIR)/files/sensor/configs/*
|
||||
|
||||
$(INSTALL) -m 755 -d $(TARGET_DIR)/usr/lib
|
||||
$(INSTALL) -m 644 -t $(TARGET_DIR)/usr/lib $(SIGMASTAR_OSDRV_INFINITY6_PKGDIR)/files/lib/*
|
||||
|
||||
$(INSTALL) -m 755 -d $(TARGET_DIR)/usr/bin
|
||||
$(INSTALL) -m 755 -t $(TARGET_DIR)/usr/bin $(@D)/config_tool
|
||||
$(INSTALL) -m 755 -t $(TARGET_DIR)/usr/bin $(SIGMASTAR_OSDRV_INFINITY6_PKGDIR)/files/script/*
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
@@ -0,0 +1,16 @@
|
||||
/etc/sensors/gc2053.bin
|
||||
/etc/sensors/imx307.bin
|
||||
/etc/sensors/sc2239.bin
|
||||
/etc/sensors/sc2335.bin
|
||||
#
|
||||
/lib/modules/4.9.84/sigmastar/sensor/sensor_gc2053_mipi.ko
|
||||
/lib/modules/4.9.84/sigmastar/sensor/sensor_imx307_mipi.ko
|
||||
/lib/modules/4.9.84/sigmastar/sensor/sensor_sc2239_mipi.ko
|
||||
/lib/modules/4.9.84/sigmastar/sensor/sensor_sc2239_parl.ko
|
||||
/lib/modules/4.9.84/sigmastar/sensor/sensor_sc2335_mipi.ko
|
||||
/lib/modules/4.9.84/sigmastar/sensor/sensor_sc2335_parl.ko
|
||||
#
|
||||
/lib/modules/4.9.84/kernel/fs/lockd/*.ko
|
||||
/lib/modules/4.9.84/kernel/fs/nfs/*.ko
|
||||
/lib/modules/4.9.84/kernel/fs/nfs_common/*.ko
|
||||
/lib/modules/4.9.84/kernel/net/sunrpc/*.ko
|
||||
Reference in New Issue
Block a user