From 5b06c4cab1559999100b377e49e8eb2580db1a2d Mon Sep 17 00:00:00 2001 From: viktorxda <35473052+viktorxda@users.noreply.github.com> Date: Sat, 10 Feb 2024 23:52:27 +0100 Subject: [PATCH 1/4] Sync firmware changes (#12) --- .../configs/ssc338q_fpv_urllc_openipc-19x19-v2_defconfig | 1 + .../configs/t20_ultimate_azarton-c1_defconfig | 1 + .../configs/t31_ultimate_azarton-c1-t31x_defconfig | 1 + 3 files changed, 3 insertions(+) diff --git a/devices/ssc338q_fpv_urllc_openipc-19x19-v2/br-ext-chip-sigmastar/configs/ssc338q_fpv_urllc_openipc-19x19-v2_defconfig b/devices/ssc338q_fpv_urllc_openipc-19x19-v2/br-ext-chip-sigmastar/configs/ssc338q_fpv_urllc_openipc-19x19-v2_defconfig index 1b583ad..62a4abf 100644 --- a/devices/ssc338q_fpv_urllc_openipc-19x19-v2/br-ext-chip-sigmastar/configs/ssc338q_fpv_urllc_openipc-19x19-v2_defconfig +++ b/devices/ssc338q_fpv_urllc_openipc-19x19-v2/br-ext-chip-sigmastar/configs/ssc338q_fpv_urllc_openipc-19x19-v2_defconfig @@ -33,6 +33,7 @@ BR2_OPENIPC_SOC_MODEL="ssc338q" BR2_OPENIPC_SOC_FAMILY="infinity6e" BR2_OPENIPC_VARIANT="fpv" BR2_OPENIPC_FLASH_SIZE="16" +BR2_OPENIPC_MAJESTIC="lite" # Filesystem # BR2_TARGET_TZ_INFO is not set diff --git a/devices/t20_ultimate_azarton-c1/br-ext-chip-ingenic/configs/t20_ultimate_azarton-c1_defconfig b/devices/t20_ultimate_azarton-c1/br-ext-chip-ingenic/configs/t20_ultimate_azarton-c1_defconfig index d3b5eb5..bfda5bf 100644 --- a/devices/t20_ultimate_azarton-c1/br-ext-chip-ingenic/configs/t20_ultimate_azarton-c1_defconfig +++ b/devices/t20_ultimate_azarton-c1/br-ext-chip-ingenic/configs/t20_ultimate_azarton-c1_defconfig @@ -40,6 +40,7 @@ BR2_OPENIPC_SOC_FAMILY="t20" BR2_OPENIPC_SNS_MODEL="jxf23" BR2_OPENIPC_VARIANT="ultimate" BR2_OPENIPC_FLASH_SIZE="16" +BR2_OPENIPC_MAJESTIC="lite" # Filesystem # BR2_TARGET_TZ_INFO is not set diff --git a/devices/t31_ultimate_azarton-c1-t31x/br-ext-chip-ingenic/configs/t31_ultimate_azarton-c1-t31x_defconfig b/devices/t31_ultimate_azarton-c1-t31x/br-ext-chip-ingenic/configs/t31_ultimate_azarton-c1-t31x_defconfig index e118cec..330bbbc 100644 --- a/devices/t31_ultimate_azarton-c1-t31x/br-ext-chip-ingenic/configs/t31_ultimate_azarton-c1-t31x_defconfig +++ b/devices/t31_ultimate_azarton-c1-t31x/br-ext-chip-ingenic/configs/t31_ultimate_azarton-c1-t31x_defconfig @@ -40,6 +40,7 @@ BR2_OPENIPC_SOC_FAMILY="t31" BR2_OPENIPC_SNS_MODEL="gc2053" BR2_OPENIPC_VARIANT="ultimate" BR2_OPENIPC_FLASH_SIZE="16" +BR2_OPENIPC_MAJESTIC="lite" # Filesystem # BR2_TARGET_TZ_INFO is not set From 00004d804f5bd4c095b2cdf6d6faef72b6b199b2 Mon Sep 17 00:00:00 2001 From: cronyx Date: Wed, 14 Feb 2024 12:36:29 +0300 Subject: [PATCH 2/4] fix profile name --- .github/workflows/master.yml | 2 +- .../configs/ssc338q_fpv_openipc-urllc-19x19-v2_defconfig} | 0 .../general/overlay/usr/share/openipc/customizer.sh | 2 +- .../general/scripts/excludes/ssc338q_fpv.list | 0 4 files changed, 2 insertions(+), 2 deletions(-) rename devices/{ssc338q_fpv_urllc_openipc-19x19-v2/br-ext-chip-sigmastar/configs/ssc338q_fpv_urllc_openipc-19x19-v2_defconfig => ssc338q_fpv_openipc-urllc-19x19-v2/br-ext-chip-sigmastar/configs/ssc338q_fpv_openipc-urllc-19x19-v2_defconfig} (100%) rename devices/{ssc338q_fpv_urllc_openipc-19x19-v2 => ssc338q_fpv_openipc-urllc-19x19-v2}/general/overlay/usr/share/openipc/customizer.sh (91%) rename devices/{ssc338q_fpv_urllc_openipc-19x19-v2 => ssc338q_fpv_openipc-urllc-19x19-v2}/general/scripts/excludes/ssc338q_fpv.list (100%) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 3b20c82..284f5bc 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -34,7 +34,7 @@ jobs: - ssc335_lite_trassir-tr-w2c1-v2 - ssc335de_lite_uniview-c1l-2wn-g - ssc337_lite_h3c-tc2101 - - ssc338q_fpv_urllc_openipc-19x19-v2 + - ssc338q_fpv_openipc-urllc-19x19-v2 - t20_ultimate_azarton-c1 - t31_lite_vstarcam-cs55 - t21_lite_x-06s diff --git a/devices/ssc338q_fpv_urllc_openipc-19x19-v2/br-ext-chip-sigmastar/configs/ssc338q_fpv_urllc_openipc-19x19-v2_defconfig b/devices/ssc338q_fpv_openipc-urllc-19x19-v2/br-ext-chip-sigmastar/configs/ssc338q_fpv_openipc-urllc-19x19-v2_defconfig similarity index 100% rename from devices/ssc338q_fpv_urllc_openipc-19x19-v2/br-ext-chip-sigmastar/configs/ssc338q_fpv_urllc_openipc-19x19-v2_defconfig rename to devices/ssc338q_fpv_openipc-urllc-19x19-v2/br-ext-chip-sigmastar/configs/ssc338q_fpv_openipc-urllc-19x19-v2_defconfig diff --git a/devices/ssc338q_fpv_urllc_openipc-19x19-v2/general/overlay/usr/share/openipc/customizer.sh b/devices/ssc338q_fpv_openipc-urllc-19x19-v2/general/overlay/usr/share/openipc/customizer.sh similarity index 91% rename from devices/ssc338q_fpv_urllc_openipc-19x19-v2/general/overlay/usr/share/openipc/customizer.sh rename to devices/ssc338q_fpv_openipc-urllc-19x19-v2/general/overlay/usr/share/openipc/customizer.sh index 8bf22a1..c7907eb 100644 --- a/devices/ssc338q_fpv_urllc_openipc-19x19-v2/general/overlay/usr/share/openipc/customizer.sh +++ b/devices/ssc338q_fpv_openipc-urllc-19x19-v2/general/overlay/usr/share/openipc/customizer.sh @@ -5,7 +5,7 @@ # # Set custom upgrade url # -fw_setenv upgrade 'https://github.com/OpenIPC/builder/releases/download/latest/ssc338q_fpv_urllc_openipc-19x19-v2-nor.tgz' +fw_setenv upgrade 'https://github.com/OpenIPC/builder/releases/download/latest/ssc338q_fpv_openipc-urllc-19x19-v2-nor.tgz' # # # Set custom majestic settings diff --git a/devices/ssc338q_fpv_urllc_openipc-19x19-v2/general/scripts/excludes/ssc338q_fpv.list b/devices/ssc338q_fpv_openipc-urllc-19x19-v2/general/scripts/excludes/ssc338q_fpv.list similarity index 100% rename from devices/ssc338q_fpv_urllc_openipc-19x19-v2/general/scripts/excludes/ssc338q_fpv.list rename to devices/ssc338q_fpv_openipc-urllc-19x19-v2/general/scripts/excludes/ssc338q_fpv.list From 15ddf671708b950982b477626dca06a1c7fb5efc Mon Sep 17 00:00:00 2001 From: cronyx Date: Wed, 14 Feb 2024 13:52:09 +0300 Subject: [PATCH 3/4] add G.Craftsman GCA50 --- .github/workflows/master.yml | 1 + README.md | 1 + .../t31_ultimate_gcraftsman-gca50_defconfig | 150 ++++++++++++++++++ .../overlay/usr/share/openipc/customizer.sh | 20 +++ 4 files changed, 172 insertions(+) create mode 100644 devices/t31_ultimate_gcraftsman-gca50/br-ext-chip-ingenic/configs/t31_ultimate_gcraftsman-gca50_defconfig create mode 100644 devices/t31_ultimate_gcraftsman-gca50/general/overlay/usr/share/openipc/customizer.sh diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 284f5bc..00207d9 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -46,6 +46,7 @@ jobs: - t31_lite_xiaomi-mjsxj03hl - t31_lite_tuya-gv7630-t31-ptz - t31_ultimate_azarton-c1-t31x + - t31_ultimate_gcraftsman-gca50 - t31_lite_zte-k540 - t10_lite_jvs-ingt10-gqs60ep diff --git a/README.md b/README.md index 8118786..b439e41 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,7 @@ Aoni EP01J05 T31L ? RTL8188FU_USB NOR_16M new ChinaTelecom DS-YTJ5301 SSC30KD GC2053 RTL8188FU_USB NOR_16M video-ok, wifi-no, motors-no ChinaTelecom Y4H-50 T31L ? ? NOR_16M new Cootli CAMV0103 GK7202V300 SC223A SSV6355_USB NOR_8M in progress +G.Craftsman GCA50 T31ZX GC4653 - NOR_16M done Imilab EC3 CMSXJ25A SSC325 GC2053 MT7603UN_? NOR_16M in progress Imou IPC-C22EP-S2 SSC325DE SC2239 RTL8188FU_USB NAND testing stage 1 Imou IPC-C22EP-S2 ? SSC325DE SC2335 RTL8188FU_USB NAND wait driver diff --git a/devices/t31_ultimate_gcraftsman-gca50/br-ext-chip-ingenic/configs/t31_ultimate_gcraftsman-gca50_defconfig b/devices/t31_ultimate_gcraftsman-gca50/br-ext-chip-ingenic/configs/t31_ultimate_gcraftsman-gca50_defconfig new file mode 100644 index 0000000..12425c9 --- /dev/null +++ b/devices/t31_ultimate_gcraftsman-gca50/br-ext-chip-ingenic/configs/t31_ultimate_gcraftsman-gca50_defconfig @@ -0,0 +1,150 @@ +# Architecture +BR2_mipsel=y +BR2_mips_xburst=y +# BR2_MIPS_SOFT_FLOAT is not set +BR2_MIPS_FP32_MODE_32=y +# BR2_MIPS_FP32_MODE_XX is not set +BR2_MIPS_NAN_LEGACY=y +BR2_MIPS_OABI32=y +BR2_KERNEL_HEADERS_VERSION=y +BR2_DEFAULT_KERNEL_VERSION="3.10.14" +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_10=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_EXTRA_GCC_CONFIG_OPTIONS="--with-float=hard" +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/$(OPENIPC_SOC_FAMILY)/kernel/t31.generic.config" +BR2_LINUX_KERNEL_UIMAGE=y +BR2_LINUX_KERNEL_LZMA=y + +# OpenIPC +BR2_OPENIPC_SOC_VENDOR="ingenic" +BR2_OPENIPC_SOC_MODEL="t31" +BR2_OPENIPC_SOC_FAMILY="t31" +BR2_OPENIPC_SNS_MODEL="gc4653" +BR2_OPENIPC_VARIANT="ultimate" +BR2_OPENIPC_FLASH_SIZE="16" + +# 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-t31" +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_INGENIC_OSDRV_T31=y +BR2_PACKAGE_IPCTOOL=y +BR2_PACKAGE_JSON_C=y +BR2_PACKAGE_JSONFILTER=y +BR2_PACKAGE_LAME_OPENIPC=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_LIBWEBSOCKETS_OPENIPC=y +BR2_PACKAGE_LIBYAML=y +BR2_PACKAGE_MAJESTIC_FONTS=y +BR2_PACKAGE_MAJESTIC=y +BR2_PACKAGE_MAJESTIC_PLUGINS=y +BR2_PACKAGE_MBEDTLS_OPENIPC=y +# BR2_PACKAGE_MBEDTLS_OPENIPC_PROGRAMS is not set +# BR2_PACKAGE_MBEDTLS_OPENIPC_COMPRESSION is not set +BR2_PACKAGE_WEBUI=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=y +BR2_PACKAGE_VTUND_OPENIPC=y +BR2_PACKAGE_YAML_CLI=y +# BR2_PACKAGE_QUIRC_OPENIPC is not set +# BR2_PACKAGE_AUTONIGHT 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 +# BR2_PACKAGE_ATBM60XX is not set +# BR2_PACKAGE_ATBM60XX_MODEL_601X is not set +# BR2_PACKAGE_ATBM60XX_MODEL_602X is not set +# BR2_PACKAGE_ATBM60XX_MODEL_603X is not set +# BR2_PACKAGE_ATBM60XX_MODEL_6041 is not set +# BR2_PACKAGE_ATBM60XX_INTERFACE_SDIO is not set +# BR2_PACKAGE_ATBM60XX_INTERFACE_USB is not set +# BR2_PACKAGE_RTL8189FS_OPENIPC is not set +# BR2_PACKAGE_RTL8188EU is not set + +# WIREGUARD +BR2_PACKAGE_WIREGUARD_LINUX_COMPAT=y +BR2_PACKAGE_WIREGUARD_TOOLS=y + +# MQTT +# BR2_PACKAGE_MOSQUITTO is not set +# BR2_PACKAGE_MOSQUITTO_BROKER is not set + +# ZEROTIER +BR2_PACKAGE_ZEROTIER_ONE=y + +# NABTO +# BR2_PACKAGE_NABTO is not set + +# DEBUG +# BR2_PACKAGE_LOGCAT_OPENIPC is not set +# BR2_PACKAGE_INGENIC_PWM is not set +# BR2_PACKAGE_INGENIC_DIAG_TOOLS is not set +# BR2_PACKAGE_HOST_GDB is not set +# BR2_PACKAGE_GDB is not set + +# CCACHE +BR2_CCACHE=y +BR2_CCACHE_DIR="$(HOME)/.ccache" + +# External +BR2_TOOLCHAIN_EXTERNAL=y +BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y +BR2_TOOLCHAIN_EXTERNAL_CUSTOM_MUSL=y +BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX="mipsel-openipc-linux-musl" +BR2_TOOLCHAIN_EXTERNAL_CXX=y +BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y +BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_10=y +BR2_TOOLCHAIN_EXTERNAL_URL="https://github.com/openipc/firmware/releases/download/$(OPENIPC_TOOLCHAIN).tgz" diff --git a/devices/t31_ultimate_gcraftsman-gca50/general/overlay/usr/share/openipc/customizer.sh b/devices/t31_ultimate_gcraftsman-gca50/general/overlay/usr/share/openipc/customizer.sh new file mode 100644 index 0000000..cf5f5f1 --- /dev/null +++ b/devices/t31_ultimate_gcraftsman-gca50/general/overlay/usr/share/openipc/customizer.sh @@ -0,0 +1,20 @@ +#!/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/t31_ultimate_gcraftsman-gca50-nor.tgz' +# +# +# Set custom majestic settings +# +cli -s .system.plugins true +cli -s .nightMode.enabled true +cli -s .nightMode.irCutPin1 58 +cli -s .nightMode.irCutPin2 57 +cli -s .nightMode.backlightPin 50 +cli -s .video0.codec h264 +# +exit 0 From 735363dd476c72783b44ba05c5ac6a67d4cc3c96 Mon Sep 17 00:00:00 2001 From: cronyx Date: Wed, 14 Feb 2024 15:10:47 +0300 Subject: [PATCH 4/4] add Xiaomi MJSXJ03HL with JXQ03 --- .github/workflows/master.yml | 1 + README.md | 1 + .../t31_lite_xiaomi-mjsxj03hl-jxq03_defconfig | 133 ++++++++++++++++++ .../general/overlay/etc/init.d/S00autoled | 41 ++++++ .../general/overlay/usr/sbin/autoled.sh | 62 ++++++++ .../general/overlay/usr/sbin/led_control.sh | 36 +++++ .../overlay/usr/share/openipc/customizer.sh | 35 +++++ 7 files changed, 309 insertions(+) create mode 100644 devices/t31_lite_xiaomi-mjsxj03hl-jxq03/br-ext-chip-ingenic/configs/t31_lite_xiaomi-mjsxj03hl-jxq03_defconfig create mode 100755 devices/t31_lite_xiaomi-mjsxj03hl-jxq03/general/overlay/etc/init.d/S00autoled create mode 100755 devices/t31_lite_xiaomi-mjsxj03hl-jxq03/general/overlay/usr/sbin/autoled.sh create mode 100755 devices/t31_lite_xiaomi-mjsxj03hl-jxq03/general/overlay/usr/sbin/led_control.sh create mode 100644 devices/t31_lite_xiaomi-mjsxj03hl-jxq03/general/overlay/usr/share/openipc/customizer.sh diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 00207d9..0e02b34 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -44,6 +44,7 @@ jobs: - t31_lite_chinamobile-hdc-51-a6-v11 - t31_lite_chinatelecom-y4h-50 - t31_lite_xiaomi-mjsxj03hl + - t31_lite_xiaomi-mjsxj03hl-jxq03 - t31_lite_tuya-gv7630-t31-ptz - t31_ultimate_azarton-c1-t31x - t31_ultimate_gcraftsman-gca50 diff --git a/README.md b/README.md index b439e41..4dbe5c0 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,7 @@ VStarcam CS55 T31N GC2053 RTL8188FU_USB NOR_16M in pr Wansview Q5 1080p T21Z OV2735B RTL8188FU_USB NOR_16M in progress Wansview Q5 2K T31L SC2336 ATBM6031_SDIO NOR_8M done Xiaomi MJSXJ02HL HI3518EV300 JXF22 RTL8189FS_SDIO NOR_16M preparation +Xiaomi MJSXJ03HL T31N JXQ03 RTL8189FS_SDIO NOR_16M done Xiaomi MJSXJ03HL T31N JXQ03P RTL8189FS_SDIO NOR_16M done Xiaomi MJSXJ05HL T31L GC2053 ATBM6031_SDIO NOR_16M preparation X-06S v2.2 T21 JXH62 RTL8188FU_USB NOR_8M in progress diff --git a/devices/t31_lite_xiaomi-mjsxj03hl-jxq03/br-ext-chip-ingenic/configs/t31_lite_xiaomi-mjsxj03hl-jxq03_defconfig b/devices/t31_lite_xiaomi-mjsxj03hl-jxq03/br-ext-chip-ingenic/configs/t31_lite_xiaomi-mjsxj03hl-jxq03_defconfig new file mode 100644 index 0000000..86f4358 --- /dev/null +++ b/devices/t31_lite_xiaomi-mjsxj03hl-jxq03/br-ext-chip-ingenic/configs/t31_lite_xiaomi-mjsxj03hl-jxq03_defconfig @@ -0,0 +1,133 @@ +# Architecture +BR2_mipsel=y +BR2_mips_xburst=y +# BR2_MIPS_SOFT_FLOAT is not set +BR2_MIPS_FP32_MODE_32=y +# BR2_MIPS_FP32_MODE_XX is not set +BR2_MIPS_NAN_LEGACY=y +BR2_MIPS_OABI32=y +BR2_KERNEL_HEADERS_VERSION=y +BR2_DEFAULT_KERNEL_VERSION="3.10.14" +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_10=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_EXTRA_GCC_CONFIG_OPTIONS="--with-float=hard" +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/$(OPENIPC_SOC_FAMILY)/kernel/t31.generic.config" +BR2_LINUX_KERNEL_UIMAGE=y +BR2_LINUX_KERNEL_LZMA=y + +# OpenIPC +BR2_OPENIPC_SOC_VENDOR="ingenic" +BR2_OPENIPC_SOC_MODEL="t31" +BR2_OPENIPC_SOC_FAMILY="t31" +BR2_OPENIPC_SNS_MODEL="jxq03" +BR2_OPENIPC_VARIANT="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-t31" +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_INGENIC_OSDRV_T31=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_WEBUI=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=y +# BR2_PACKAGE_AUTONIGHT 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_RTL8189FS_OPENIPC=y + +# WIREGUARD +BR2_PACKAGE_WIREGUARD_LINUX_COMPAT=y +BR2_PACKAGE_WIREGUARD_TOOLS=y + +# EXPERIMENTAL +# BR2_PACKAGE_ONVIF_SIMPLE_SERVER is not set + +# DEBUG +# BR2_PACKAGE_INGENIC_PWM is not set +# BR2_PACKAGE_LOGCAT_OPENIPC is not set +# BR2_PACKAGE_INGENIC_DIAG_TOOLS is not set +# 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="mipsel-openipc-linux-musl" +BR2_TOOLCHAIN_EXTERNAL_CXX=y +BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y +BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_10=y +BR2_TOOLCHAIN_EXTERNAL_URL="https://github.com/openipc/firmware/releases/download/$(OPENIPC_TOOLCHAIN).tgz" diff --git a/devices/t31_lite_xiaomi-mjsxj03hl-jxq03/general/overlay/etc/init.d/S00autoled b/devices/t31_lite_xiaomi-mjsxj03hl-jxq03/general/overlay/etc/init.d/S00autoled new file mode 100755 index 0000000..e43eb0f --- /dev/null +++ b/devices/t31_lite_xiaomi-mjsxj03hl-jxq03/general/overlay/etc/init.d/S00autoled @@ -0,0 +1,41 @@ +#!/bin/sh + +AUTOLED_ARGS="" +AUTOLED_PID_FILE=/var/run/autoled.pid + +start() { + printf "Starting automatic LED control: " + umask 077 + start-stop-daemon -b -m -S -q -p $AUTOLED_PID_FILE \ + --exec /usr/sbin/autoled.sh -- $AUTOLED_ARGS + [ $? = 0 ] && echo "OK" || echo "FAIL" +} + +stop() { + printf "Stopping automatic LED control: " + start-stop-daemon -K -q -p $AUTOLED_PID_FILE + [ $? = 0 ] && echo "OK" || echo "FAIL" +} + +restart() { + stop + start +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart | reload) + restart + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 + ;; +esac + +exit $? diff --git a/devices/t31_lite_xiaomi-mjsxj03hl-jxq03/general/overlay/usr/sbin/autoled.sh b/devices/t31_lite_xiaomi-mjsxj03hl-jxq03/general/overlay/usr/sbin/autoled.sh new file mode 100755 index 0000000..4c079e2 --- /dev/null +++ b/devices/t31_lite_xiaomi-mjsxj03hl-jxq03/general/overlay/usr/sbin/autoled.sh @@ -0,0 +1,62 @@ +#!/bin/sh +# +# Automatic LED control for Xiaomi MJSXJ03HL + +streamerProcess="majestic" +serviceProcess="sysupgrade" +pollingInterval=1 + +show_help() { + echo "Usage: $0 [-p process] [-s process] [-i value] [-h] + -p process Monitored streamer process (default = ${streamerProcess}). + -s process Monitored service process (default = ${serviceProcess}). + -i value Polling interval in seconds (default = ${pollingInterval}). + -h Show this help." + exit 0 +} + +# override config values with command line arguments +while getopts H:L:i:h flag; do + case ${flag} in + p) + streamerProcess=${OPTARG} + ;; + s) + serviceProcess=${OPTARG} + ;; + i) + pollingInterval=${OPTARG} + ;; + h | *) + show_help + ;; + esac +done + +echo "Streamer process: ${streamerProcess}" +echo "Service process: ${serviceProcess}" +echo "Polling interval: ${pollingInterval} sec" + +led_state=0 +/usr/sbin/led_control.sh -o 0 -b 0 + +while true; do + if killall -q -0 $serviceProcess; then + if [ $led_state -ne 3 ]; then + echo "$serviceProcess is running, turn white LED on" + /usr/sbin/led_control.sh -o 1 -b 1 + led_state=3 + fi + else + if [ $led_state -ne 1 ] && ! killall -q -0 $streamerProcess; then + echo "$streamerProcess is not running, turn orange LED on" + /usr/sbin/led_control.sh -o 1 -b 0 + led_state=1 + elif [ $led_state -ne 2 ] && killall -q -0 $streamerProcess; then + echo "$streamerProcess is running, turn blue LED on" + /usr/sbin/led_control.sh -o 0 -b 1 + led_state=2 + fi + fi + sleep $pollingInterval +done diff --git a/devices/t31_lite_xiaomi-mjsxj03hl-jxq03/general/overlay/usr/sbin/led_control.sh b/devices/t31_lite_xiaomi-mjsxj03hl-jxq03/general/overlay/usr/sbin/led_control.sh new file mode 100755 index 0000000..2289940 --- /dev/null +++ b/devices/t31_lite_xiaomi-mjsxj03hl-jxq03/general/overlay/usr/sbin/led_control.sh @@ -0,0 +1,36 @@ +#!/bin/sh +# +# LED control for Xiaomi MJSXJ03HL + +show_help() { + echo "Usage: $0 [-o <0|1>] [-b <0|1>] + -o <0|1> Switch state for orange LED. + -b <0|1> Switch state for blue LED." + exit 0 +} + +led_control() { + echo "Switching LED with GPIO${1} to state ${2}" + if [ ! -d /sys/class/gpio/gpio${1}/ ]; then + echo ${1} > /sys/class/gpio/export + echo out > /sys/class/gpio/gpio${1}/direction + fi + echo ${2} > /sys/class/gpio/gpio${1}/value +} + +if [ $# -eq 0 ]; then show_help; fi +while getopts o:b: flag; do + case ${flag} in + o) + [ ${OPTARG} -eq 0 -o ${OPTARG} -eq 1 ] || show_help + led_control 39 ${OPTARG} + ;; + b) + [ ${OPTARG} -eq 0 -o ${OPTARG} -eq 1 ] || show_help + led_control 38 ${OPTARG} + ;; + *) + show_help + ;; + esac +done diff --git a/devices/t31_lite_xiaomi-mjsxj03hl-jxq03/general/overlay/usr/share/openipc/customizer.sh b/devices/t31_lite_xiaomi-mjsxj03hl-jxq03/general/overlay/usr/share/openipc/customizer.sh new file mode 100644 index 0000000..15607f2 --- /dev/null +++ b/devices/t31_lite_xiaomi-mjsxj03hl-jxq03/general/overlay/usr/share/openipc/customizer.sh @@ -0,0 +1,35 @@ +#!/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/t31_lite_xiaomi-mjsxj03hl-jxq03-nor.tgz' +# +# +# Set custom majestic settings +# +cli -s .system.webAdmin disabled +cli -s .system.staticDir /var/www/majestic +cli -s .isp.blkCnt 1 +cli -s .nightMode.enabled true +cli -s .nightMode.irCutPin1 49 +cli -s .nightMode.irCutPin2 50 +cli -s .nightMode.backlightPin 60 +cli -s .video0.codec h264 +# +# +# Set wlan device and credentials if need +# +fw_setenv wlandev rtl8189fs-generic +#fw_setenv wlanssid Router +#fw_setenv wlanpass 12345678 +# +# +# Set osmem and rmem +# +fw_setenv osmem 39M +fw_setenv rmem 25M@0x2700000 +# +exit 0