From 1c8af5e6e0491903c5c1a77ca4b05ba1850da0e2 Mon Sep 17 00:00:00 2001 From: Igor Zalatov Date: Fri, 14 Jul 2023 17:11:28 +0300 Subject: [PATCH] External ONVIF integration, jump to mbedtls, add new 4G modem (#912) --- .../configs/hi3518ev200_lite_defconfig | 3 +++ br-ext-chip-ingenic/configs/t31_lite_defconfig | 3 +++ general/overlay/etc/wireless | 10 ++++++++++ .../01-enable-mbedtls-only.patch | 18 ++++++++++++++++++ .../01-removing-old-anchors.patch | 12 ------------ general/package/onvif-simple-server/Config.in | 2 -- .../onvif-simple-server/onvif-simple-server.mk | 4 ++-- 7 files changed, 36 insertions(+), 16 deletions(-) create mode 100644 general/package/onvif-simple-server/01-enable-mbedtls-only.patch delete mode 100644 general/package/onvif-simple-server/01-removing-old-anchors.patch diff --git a/br-ext-chip-hisilicon/configs/hi3518ev200_lite_defconfig b/br-ext-chip-hisilicon/configs/hi3518ev200_lite_defconfig index a04cd091..84a64355 100644 --- a/br-ext-chip-hisilicon/configs/hi3518ev200_lite_defconfig +++ b/br-ext-chip-hisilicon/configs/hi3518ev200_lite_defconfig @@ -110,6 +110,9 @@ BR2_PACKAGE_MOSQUITTO=y # FEATURES # BR2_PACKAGE_COMGT is not set +# EXPERIMENTAL +BR2_PACKAGE_ONVIF_SIMPLE_SERVER=y + # DEBUG # BR2_PACKAGE_HOST_GDB is not set # BR2_PACKAGE_GDB is not set diff --git a/br-ext-chip-ingenic/configs/t31_lite_defconfig b/br-ext-chip-ingenic/configs/t31_lite_defconfig index c8b7752b..fd7439c6 100644 --- a/br-ext-chip-ingenic/configs/t31_lite_defconfig +++ b/br-ext-chip-ingenic/configs/t31_lite_defconfig @@ -107,6 +107,9 @@ BR2_PACKAGE_LINUX_FIRMWARE_OPENIPC_MEDIATEK_MT7601U=y BR2_PACKAGE_WIREGUARD_LINUX_COMPAT=y BR2_PACKAGE_WIREGUARD_TOOLS=y +# EXPERIMENTAL +BR2_PACKAGE_ONVIF_SIMPLE_SERVER=y + # DEBUG # BR2_PACKAGE_HOST_GDB is not set # BR2_PACKAGE_GDB is not set diff --git a/general/overlay/etc/wireless b/general/overlay/etc/wireless index 25fc350c..d164951c 100755 --- a/general/overlay/etc/wireless +++ b/general/overlay/etc/wireless @@ -76,12 +76,22 @@ if [ "$1" = "ec200-t31-camhi" ]; then exit 0 fi +# T31 CamHi with Quectel EC800G-CN and usb0 +if [ "$1" = "ec800-t31-camhi" ]; then + set_gpio 61 0 + modprobe usbserial vendor=0x2c7c product=0x904 + modprobe rndis_host + sleep 10 + exit 0 +fi + # T31 CamHi with Fibocom L610-CN and usb0 if [ "$1" = "l610-t31-camhi" ]; then set_gpio 61 0 modprobe usbserial vendor=0x1782 product=0x4d11 modprobe rndis_host sleep 10 + echo "AT+GTRNDIS=1,2" >/dev/ttyUSB0 exit 0 fi diff --git a/general/package/onvif-simple-server/01-enable-mbedtls-only.patch b/general/package/onvif-simple-server/01-enable-mbedtls-only.patch new file mode 100644 index 00000000..25382154 --- /dev/null +++ b/general/package/onvif-simple-server/01-enable-mbedtls-only.patch @@ -0,0 +1,18 @@ +--- a/Makefile 2023-07-04 13:52:08.000000000 +0300 ++++ b/Makefile 2023-07-11 00:10:53.987288000 +0300 +@@ -2,13 +2,8 @@ + + OBJECTS_O = onvif_simple_server.o device_service.o media_service.o ptz_service.o utils.o log.o + OBJECTS_W = wsd_simple_server.o utils.o log.o +-ifdef HAVE_MBEDTLS +-INCLUDE = -DHAVE_MBEDTLS -I../mbedtls/include -ffunction-sections -fdata-sections +-LIBS_O = -Wl,--gc-sections ../mbedtls/library/libmbedcrypto.a -lpthread +-else +-INCLUDE = -I../libtomcrypt/src/headers -ffunction-sections -fdata-sections +-LIBS_O = -Wl,--gc-sections ../libtomcrypt/libtomcrypt.a -lpthread +-endif ++INCLUDE = -DHAVE_MBEDTLS -ffunction-sections -fdata-sections ++LIBS_O = -Wl,--gc-sections -lmbedtls -lmbedcrypto -lpthread + LIBS_W = -Wl,--gc-sections + + all: onvif_simple_server wsd_simple_server diff --git a/general/package/onvif-simple-server/01-removing-old-anchors.patch b/general/package/onvif-simple-server/01-removing-old-anchors.patch deleted file mode 100644 index d6354f6d..00000000 --- a/general/package/onvif-simple-server/01-removing-old-anchors.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/Makefile 2023-06-20 14:53:35.000000000 +0300 -+++ b/Makefile 2023-07-02 17:55:34.483218477 +0300 -@@ -1,7 +1,7 @@ - OBJECTS_O = onvif_simple_server.o device_service.o media_service.o ptz_service.o utils.o log.o - OBJECTS_W = wsd_simple_server.o utils.o log.o --INCLUDE = -I../libtomcrypt/src/headers -ffunction-sections -fdata-sections --LIBS_O = -Wl,--gc-sections ../libtomcrypt/libtomcrypt.a -lpthread -+INCLUDE = -ffunction-sections -fdata-sections -+LIBS_O = -Wl,--gc-sections -lpthread -ltomcrypt - LIBS_W = -Wl,--gc-sections - - all: onvif_simple_server wsd_simple_server diff --git a/general/package/onvif-simple-server/Config.in b/general/package/onvif-simple-server/Config.in index 617e9d2a..35a6b1ff 100644 --- a/general/package/onvif-simple-server/Config.in +++ b/general/package/onvif-simple-server/Config.in @@ -1,8 +1,6 @@ config BR2_PACKAGE_ONVIF_SIMPLE_SERVER bool "onvif-simple-server" default n - #select BR2_PACKAGE_LIBTOMCRYPT - #depends on BR2_INSTALL_LIBTOMCRYPT help onvif_simple_server is a C light implementation of an onvif server intended for use in resource-constrained devices diff --git a/general/package/onvif-simple-server/onvif-simple-server.mk b/general/package/onvif-simple-server/onvif-simple-server.mk index 2d0d97f5..ab14c440 100644 --- a/general/package/onvif-simple-server/onvif-simple-server.mk +++ b/general/package/onvif-simple-server/onvif-simple-server.mk @@ -6,9 +6,9 @@ ONVIF_SIMPLE_SERVER_SITE_METHOD = git ONVIF_SIMPLE_SERVER_SITE = https://github.com/roleoroleo/onvif_simple_server -ONVIF_SIMPLE_SERVER_VERSION = 8a19b6662af3ab123bb000a09710728cc355359c +ONVIF_SIMPLE_SERVER_VERSION = 7dc083fdd2a3cf3465945616c6d8d15e200a5707 -ONVIF_SIMPLE_SERVER_DEPENDENCIES = libtomcrypt +ONVIF_SIMPLE_SERVER_DEPENDENCIES = mbedtls-openipc ONVIF_SIMPLE_SERVER_LICENSE = MIT ONVIF_SIMPLE_SERVER_LICENSE_FILES = LICENSE