mirror of https://github.com/OpenIPC/firmware.git
				
				
				
			Merge branch 'master' of github2:OpenIPC/firmware
						commit
						4cbd583836
					
				|  | @ -48,6 +48,9 @@ jobs: | ||||||
|           - t21_lite |           - t21_lite | ||||||
|           - t30_lite |           - t30_lite | ||||||
| 
 | 
 | ||||||
|  |           # Ingenic [T23] | ||||||
|  |           - t23_lite | ||||||
|  | 
 | ||||||
|           # Ingenic [T31] |           # Ingenic [T31] | ||||||
|           - t31_lite |           - t31_lite | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -6,7 +6,7 @@ on: | ||||||
| 
 | 
 | ||||||
| env: | env: | ||||||
|   SIGMASTAR: ssc30kd ssc30kq ssc325 ssc333 ssc335 ssc335de ssc337 ssc337de ssc338q ssc377 ssc377d ssc377de ssc378de |   SIGMASTAR: ssc30kd ssc30kq ssc325 ssc333 ssc335 ssc335de ssc337 ssc337de ssc338q ssc377 ssc377d ssc377de ssc378de | ||||||
|   INGENIC: t10 t10l t20 t20l t20x t21n t30a t30a1 t30l t30n t30x t31a t31al t31l t31lc t31n t31x |   INGENIC: t10 t10l t20 t20l t20x t21n t23n t30a t30a1 t30l t30n t30x t31a t31al t31l t31lc t31n t31x | ||||||
|   ALLWINNER: v851s |   ALLWINNER: v851s | ||||||
|   TAG_NAME: image |   TAG_NAME: image | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -10,7 +10,7 @@ jobs: | ||||||
|       - name: Prepare |       - name: Prepare | ||||||
|         run: | |         run: | | ||||||
|           sudo apt-get update |           sudo apt-get update | ||||||
|           sudo apt-get install gcc-arm-linux-gnueabi gcc-mipsel-linux-gnu u-boot-tools lzop gnutls-dev lzma-alone |           sudo apt-get install gcc-arm-linux-gnueabi gcc-mipsel-linux-gnu u-boot-tools lzop gnutls-dev lzma-alone uuid-dev | ||||||
| 
 | 
 | ||||||
|       - name: Allwinner |       - name: Allwinner | ||||||
|         run: | |         run: | | ||||||
|  |  | ||||||
											
												
													File diff suppressed because it is too large
													Load Diff
												
											
										
									
								|  | @ -17,7 +17,7 @@ BR2_TOOLCHAIN_EXTERNAL_CXX=y | ||||||
| # Kernel | # Kernel | ||||||
| BR2_LINUX_KERNEL=y | BR2_LINUX_KERNEL=y | ||||||
| BR2_LINUX_KERNEL_CUSTOM_TARBALL=y | BR2_LINUX_KERNEL_CUSTOM_TARBALL=y | ||||||
| BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/openipc/linux/archive/$(OPENIPC_SOC_VENDOR)-t31.tar.gz" | BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/openipc/linux/archive/ingenic-t31.tar.gz" | ||||||
| BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y | BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y | ||||||
| BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(EXTERNAL_VENDOR)/board/$(OPENIPC_SOC_FAMILY)/t10.generic.config" | BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(EXTERNAL_VENDOR)/board/$(OPENIPC_SOC_FAMILY)/t10.generic.config" | ||||||
| BR2_LINUX_KERNEL_LZMA=y | BR2_LINUX_KERNEL_LZMA=y | ||||||
|  |  | ||||||
|  | @ -17,7 +17,7 @@ BR2_TOOLCHAIN_EXTERNAL_CXX=y | ||||||
| # Kernel | # Kernel | ||||||
| BR2_LINUX_KERNEL=y | BR2_LINUX_KERNEL=y | ||||||
| BR2_LINUX_KERNEL_CUSTOM_TARBALL=y | BR2_LINUX_KERNEL_CUSTOM_TARBALL=y | ||||||
| BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/openipc/linux/archive/$(OPENIPC_SOC_VENDOR)-t31.tar.gz" | BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/openipc/linux/archive/ingenic-t31.tar.gz" | ||||||
| BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y | BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y | ||||||
| BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(EXTERNAL_VENDOR)/board/$(OPENIPC_SOC_FAMILY)/t20.generic.config" | BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(EXTERNAL_VENDOR)/board/$(OPENIPC_SOC_FAMILY)/t20.generic.config" | ||||||
| BR2_LINUX_KERNEL_LZMA=y | BR2_LINUX_KERNEL_LZMA=y | ||||||
|  |  | ||||||
|  | @ -17,7 +17,7 @@ BR2_TOOLCHAIN_EXTERNAL_CXX=y | ||||||
| # Kernel | # Kernel | ||||||
| BR2_LINUX_KERNEL=y | BR2_LINUX_KERNEL=y | ||||||
| BR2_LINUX_KERNEL_CUSTOM_TARBALL=y | BR2_LINUX_KERNEL_CUSTOM_TARBALL=y | ||||||
| BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/openipc/linux/archive/$(OPENIPC_SOC_VENDOR)-t31.tar.gz" | BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/openipc/linux/archive/ingenic-t31.tar.gz" | ||||||
| BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y | BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y | ||||||
| BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(EXTERNAL_VENDOR)/board/$(OPENIPC_SOC_FAMILY)/t20.generic.config" | BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(EXTERNAL_VENDOR)/board/$(OPENIPC_SOC_FAMILY)/t20.generic.config" | ||||||
| BR2_LINUX_KERNEL_LZMA=y | BR2_LINUX_KERNEL_LZMA=y | ||||||
|  |  | ||||||
|  | @ -17,7 +17,7 @@ BR2_TOOLCHAIN_EXTERNAL_CXX=y | ||||||
| # Kernel | # Kernel | ||||||
| BR2_LINUX_KERNEL=y | BR2_LINUX_KERNEL=y | ||||||
| BR2_LINUX_KERNEL_CUSTOM_TARBALL=y | BR2_LINUX_KERNEL_CUSTOM_TARBALL=y | ||||||
| BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/openipc/linux/archive/$(OPENIPC_SOC_VENDOR)-t31.tar.gz" | BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/openipc/linux/archive/ingenic-t31.tar.gz" | ||||||
| BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y | BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y | ||||||
| BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(EXTERNAL_VENDOR)/board/$(OPENIPC_SOC_FAMILY)/t21.generic.config" | BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(EXTERNAL_VENDOR)/board/$(OPENIPC_SOC_FAMILY)/t21.generic.config" | ||||||
| BR2_LINUX_KERNEL_LZMA=y | BR2_LINUX_KERNEL_LZMA=y | ||||||
|  |  | ||||||
|  | @ -17,7 +17,7 @@ BR2_TOOLCHAIN_EXTERNAL_CXX=y | ||||||
| # Kernel | # Kernel | ||||||
| BR2_LINUX_KERNEL=y | BR2_LINUX_KERNEL=y | ||||||
| BR2_LINUX_KERNEL_CUSTOM_TARBALL=y | BR2_LINUX_KERNEL_CUSTOM_TARBALL=y | ||||||
| BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/openipc/linux/archive/$(OPENIPC_SOC_VENDOR)-t31.tar.gz" | BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/openipc/linux/archive/ingenic-t31.tar.gz" | ||||||
| BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y | BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y | ||||||
| BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(EXTERNAL_VENDOR)/board/$(OPENIPC_SOC_FAMILY)/t21.generic.config" | BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(EXTERNAL_VENDOR)/board/$(OPENIPC_SOC_FAMILY)/t21.generic.config" | ||||||
| BR2_LINUX_KERNEL_LZMA=y | BR2_LINUX_KERNEL_LZMA=y | ||||||
|  |  | ||||||
|  | @ -0,0 +1,66 @@ | ||||||
|  | # Architecture | ||||||
|  | BR2_mipsel=y | ||||||
|  | BR2_mips_xburst=y | ||||||
|  | # BR2_MIPS_SOFT_FLOAT is not set | ||||||
|  | BR2_MIPS_FP32_MODE_32=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/toolchain/toolchain.ingenic-t31.tgz" | ||||||
|  | BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX="mipsel-openipc-linux-musl" | ||||||
|  | BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_10=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/ingenic-t23.tar.gz" | ||||||
|  | BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y | ||||||
|  | BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(EXTERNAL_VENDOR)/board/$(OPENIPC_SOC_FAMILY)/t23.generic.config" | ||||||
|  | BR2_LINUX_KERNEL_LZMA=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_PACKAGE_WIRELESS_TOOLS=y | ||||||
|  | BR2_PACKAGE_WPA_SUPPLICANT=y | ||||||
|  | BR2_PACKAGE_WPA_SUPPLICANT_CLI=y | ||||||
|  | BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE=y | ||||||
|  | BR2_TARGET_ROOTFS_CPIO=y | ||||||
|  | BR2_TARGET_ROOTFS_SQUASHFS=y | ||||||
|  | BR2_TARGET_ROOTFS_SQUASHFS4_XZ=y | ||||||
|  | 
 | ||||||
|  | # OpenIPC | ||||||
|  | BR2_OPENIPC_SOC_VENDOR="ingenic" | ||||||
|  | BR2_OPENIPC_SOC_MODEL="t23" | ||||||
|  | BR2_OPENIPC_SOC_FAMILY="t23" | ||||||
|  | BR2_OPENIPC_VARIANT="lite" | ||||||
|  | BR2_OPENIPC_FLASH_SIZE="8" | ||||||
|  | 
 | ||||||
|  | # Packages | ||||||
|  | BR2_PACKAGE_DROPBEAR_OPENIPC=y | ||||||
|  | BR2_PACKAGE_INGENIC_OSDRV_T23=y | ||||||
|  | BR2_PACKAGE_IPCTOOL=y | ||||||
|  | BR2_PACKAGE_JSONFILTER=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_OPUS_OPENIPC_FIXED_POINT=y | ||||||
|  | BR2_PACKAGE_VTUND_OPENIPC=y | ||||||
|  | BR2_PACKAGE_YAML_CLI=y | ||||||
|  | @ -17,7 +17,7 @@ BR2_TOOLCHAIN_EXTERNAL_CXX=y | ||||||
| # Kernel | # Kernel | ||||||
| BR2_LINUX_KERNEL=y | BR2_LINUX_KERNEL=y | ||||||
| BR2_LINUX_KERNEL_CUSTOM_TARBALL=y | BR2_LINUX_KERNEL_CUSTOM_TARBALL=y | ||||||
| BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/openipc/linux/archive/$(OPENIPC_SOC_VENDOR)-t31.tar.gz" | BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/openipc/linux/archive/ingenic-t31.tar.gz" | ||||||
| BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y | BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y | ||||||
| BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(EXTERNAL_VENDOR)/board/$(OPENIPC_SOC_FAMILY)/t30.generic.config" | BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(EXTERNAL_VENDOR)/board/$(OPENIPC_SOC_FAMILY)/t30.generic.config" | ||||||
| BR2_LINUX_KERNEL_LZMA=y | BR2_LINUX_KERNEL_LZMA=y | ||||||
|  |  | ||||||
|  | @ -0,0 +1,18 @@ | ||||||
|  | #!/bin/sh | ||||||
|  | 
 | ||||||
|  | case "$1" in | ||||||
|  | 	start) | ||||||
|  | 		wgc=$(fw_printenv -n wg_privkey) | ||||||
|  | 		if [ -n "$wgc" ]; then | ||||||
|  | 			wireguard | ||||||
|  | 		fi | ||||||
|  | 		;; | ||||||
|  | 
 | ||||||
|  | 	stop) | ||||||
|  | 		;; | ||||||
|  | 
 | ||||||
|  | 	*) | ||||||
|  | 		echo "Usage: $0 {start}" | ||||||
|  | 		exit 1 | ||||||
|  | 		;; | ||||||
|  | esac | ||||||
|  | @ -75,4 +75,27 @@ if [ "$1" = "l716-t31-camhi" ]; then | ||||||
| 	exit 0 | 	exit 0 | ||||||
| fi | fi | ||||||
| 
 | 
 | ||||||
|  | # SIMCOM7600G/SIMCOM7600G-H | ||||||
|  | if [ "$1" = "sim7600g" ]; then | ||||||
|  | 	modprobe rndis_host | ||||||
|  | 	modprobe option | ||||||
|  | 	echo "1e0e 9011" > /sys/bus/usb-serial/drivers/option1/new_id | ||||||
|  | 	sleep 5 | ||||||
|  | 	exit 0 | ||||||
|  | fi | ||||||
|  | 
 | ||||||
|  | # EG25/EC25-xxx (RNDIS, AT+QCFG="usbnet",3) | ||||||
|  | if [ "$1" = "rndis-ec25" ]; then | ||||||
|  | 	modprobe rndis_host | ||||||
|  | 	modprobe option | ||||||
|  | 	sleep 5 | ||||||
|  | 	exit 0 | ||||||
|  | fi | ||||||
|  | 
 | ||||||
|  | # EG25/EC25-xxx (ECM, AT+QCFG="usbnet",1) | ||||||
|  | if [ "$1" = "ec25" ]; then | ||||||
|  | 	modprobe option | ||||||
|  | 	sleep 5 | ||||||
|  | 	exit 0 | ||||||
|  | fi | ||||||
| exit 1 | exit 1 | ||||||
|  |  | ||||||
|  | @ -13,7 +13,7 @@ my_umount() { | ||||||
| my_mount() { | my_mount() { | ||||||
| 	mkdir -p "${destdir}/$1" || exit 1 | 	mkdir -p "${destdir}/$1" || exit 1 | ||||||
| 
 | 
 | ||||||
| 	if ! mount -t auto -o sync "/dev/$1" "${destdir}/$1"; then | 	if ! mount -t auto "/dev/$1" "${destdir}/$1"; then | ||||||
| 		# failed to mount, clean up mountpoint | 		# failed to mount, clean up mountpoint | ||||||
| 		rmdir "${destdir}/$1" | 		rmdir "${destdir}/$1" | ||||||
| 		exit 1 | 		exit 1 | ||||||
|  |  | ||||||
|  | @ -66,6 +66,10 @@ case "$CMD" in | ||||||
| 		echo -e "  recorded - $(fw_printenv -n sensor)\n" | 		echo -e "  recorded - $(fw_printenv -n sensor)\n" | ||||||
|                 ;; |                 ;; | ||||||
| 
 | 
 | ||||||
|  |         netip_hash) | ||||||
|  |                 echo -n "$@" | md5sum | fold -w 2 | awk 'NR<17{printf "%d\n", "0x"$0}' | sed 'N;s/\n/ /' | awk '{c=($1+$2)%62; if (c<10) c+=48; else if (c<36) c+=55; else c+=61; printf "%c", c}' | ||||||
|  |                 ;; | ||||||
|  | 
 | ||||||
| 	*) | 	*) | ||||||
| 		;; | 		;; | ||||||
| esac | esac | ||||||
|  |  | ||||||
|  | @ -0,0 +1 @@ | ||||||
|  | extutils | ||||||
|  | @ -0,0 +1,29 @@ | ||||||
|  | #!/bin/sh | ||||||
|  | 
 | ||||||
|  | modprobe wireguard || { echo "Error: Failed to load wireguard module." >&2; exit 1; } | ||||||
|  | ip link add dev wg0 type wireguard || { echo "Error: Failed to create wg0 interface." >&2; exit 1; } | ||||||
|  | 
 | ||||||
|  | WG_PRIVKEY="$(fw_printenv -n wg_privkey)" | ||||||
|  | ( echo "#" | ||||||
|  |   echo "[Interface]" | ||||||
|  |   echo "PrivateKey = $WG_PRIVKEY" | ||||||
|  |   # echo "Address = $(fw_printenv -n wg_address)" | ||||||
|  |   # echo "DNS = $(fw_printenv -n wg_dns)" | ||||||
|  |   echo | ||||||
|  |   echo "[Peer]" | ||||||
|  |   echo "Endpoint = $(fw_printenv -n wg_endpoint)" | ||||||
|  |   echo "PersistentKeepalive = $(fw_printenv -n wg_alive)" | ||||||
|  |   echo "PublicKey = $(fw_printenv -n wg_pubkey)" | ||||||
|  |   echo "PresharedKey = $(fw_printenv -n wg_sharkey)" | ||||||
|  |   echo "AllowedIPs = $(fw_printenv -n wg_allowed)" | ||||||
|  |   echo "#" | ||||||
|  | ) >>/tmp/wireguard.conf | ||||||
|  | 
 | ||||||
|  | wg setconf wg0 /tmp/wireguard.conf | ||||||
|  | wg_address="$(fw_printenv -n wg_address)" | ||||||
|  | if [ -z "$wg_address" ]; then | ||||||
|  |     echo "Error: wg_address environment variable is not set or empty." >&2 | ||||||
|  |     exit 1 | ||||||
|  | fi | ||||||
|  | ip address add dev wg0 "$wg_address" | ||||||
|  | ip link set up dev wg0 | ||||||
|  | @ -38,6 +38,7 @@ source "$BR2_EXTERNAL_GENERAL_PATH/package/i2c-telemetry/Config.in" | ||||||
| source "$BR2_EXTERNAL_GENERAL_PATH/package/ingenic-opensdk/Config.in" | source "$BR2_EXTERNAL_GENERAL_PATH/package/ingenic-opensdk/Config.in" | ||||||
| source "$BR2_EXTERNAL_GENERAL_PATH/package/ingenic-osdrv-t20/Config.in" | source "$BR2_EXTERNAL_GENERAL_PATH/package/ingenic-osdrv-t20/Config.in" | ||||||
| source "$BR2_EXTERNAL_GENERAL_PATH/package/ingenic-osdrv-t21/Config.in" | source "$BR2_EXTERNAL_GENERAL_PATH/package/ingenic-osdrv-t21/Config.in" | ||||||
|  | source "$BR2_EXTERNAL_GENERAL_PATH/package/ingenic-osdrv-t23/Config.in" | ||||||
| source "$BR2_EXTERNAL_GENERAL_PATH/package/ingenic-osdrv-t30/Config.in" | source "$BR2_EXTERNAL_GENERAL_PATH/package/ingenic-osdrv-t30/Config.in" | ||||||
| source "$BR2_EXTERNAL_GENERAL_PATH/package/ingenic-osdrv-t31/Config.in" | source "$BR2_EXTERNAL_GENERAL_PATH/package/ingenic-osdrv-t31/Config.in" | ||||||
| source "$BR2_EXTERNAL_GENERAL_PATH/package/ingenic-osdrv-t40/Config.in" | source "$BR2_EXTERNAL_GENERAL_PATH/package/ingenic-osdrv-t40/Config.in" | ||||||
|  | @ -85,7 +86,6 @@ source "$BR2_EXTERNAL_GENERAL_PATH/package/rtl8812au/Config.in" | ||||||
| source "$BR2_EXTERNAL_GENERAL_PATH/package/rtl88x2eu-openipc/Config.in" | source "$BR2_EXTERNAL_GENERAL_PATH/package/rtl88x2eu-openipc/Config.in" | ||||||
| source "$BR2_EXTERNAL_GENERAL_PATH/package/rtw-hostapd/Config.in" | source "$BR2_EXTERNAL_GENERAL_PATH/package/rtw-hostapd/Config.in" | ||||||
| source "$BR2_EXTERNAL_GENERAL_PATH/package/rubyfpv/Config.in" | source "$BR2_EXTERNAL_GENERAL_PATH/package/rubyfpv/Config.in" | ||||||
| source "$BR2_EXTERNAL_GENERAL_PATH/package/sigmastar-motors/Config.in" |  | ||||||
| source "$BR2_EXTERNAL_GENERAL_PATH/package/sigmastar-osdrv-infinity6/Config.in" | source "$BR2_EXTERNAL_GENERAL_PATH/package/sigmastar-osdrv-infinity6/Config.in" | ||||||
| source "$BR2_EXTERNAL_GENERAL_PATH/package/sigmastar-osdrv-infinity6b0/Config.in" | source "$BR2_EXTERNAL_GENERAL_PATH/package/sigmastar-osdrv-infinity6b0/Config.in" | ||||||
| source "$BR2_EXTERNAL_GENERAL_PATH/package/sigmastar-osdrv-infinity6c/Config.in" | source "$BR2_EXTERNAL_GENERAL_PATH/package/sigmastar-osdrv-infinity6c/Config.in" | ||||||
|  | @ -102,8 +102,8 @@ source "$BR2_EXTERNAL_GENERAL_PATH/package/venc-openipc/Config.in" | ||||||
| source "$BR2_EXTERNAL_GENERAL_PATH/package/vtund-openipc/Config.in" | source "$BR2_EXTERNAL_GENERAL_PATH/package/vtund-openipc/Config.in" | ||||||
| source "$BR2_EXTERNAL_GENERAL_PATH/package/w1-ds18b20/Config.in" | source "$BR2_EXTERNAL_GENERAL_PATH/package/w1-ds18b20/Config.in" | ||||||
| source "$BR2_EXTERNAL_GENERAL_PATH/package/webrtc-audio-processing-openipc/Config.in" | source "$BR2_EXTERNAL_GENERAL_PATH/package/webrtc-audio-processing-openipc/Config.in" | ||||||
| source "$BR2_EXTERNAL_GENERAL_PATH/package/wifibroadcast-ext/Config.in" |  | ||||||
| source "$BR2_EXTERNAL_GENERAL_PATH/package/wifibroadcast-ng/Config.in" | source "$BR2_EXTERNAL_GENERAL_PATH/package/wifibroadcast-ng/Config.in" | ||||||
|  | source "$BR2_EXTERNAL_GENERAL_PATH/package/wq9001/Config.in" | ||||||
| source "$BR2_EXTERNAL_GENERAL_PATH/package/xiongmai-opensdk-xm510/Config.in" | source "$BR2_EXTERNAL_GENERAL_PATH/package/xiongmai-opensdk-xm510/Config.in" | ||||||
| source "$BR2_EXTERNAL_GENERAL_PATH/package/xiongmai-osdrv-xm510/Config.in" | source "$BR2_EXTERNAL_GENERAL_PATH/package/xiongmai-osdrv-xm510/Config.in" | ||||||
| source "$BR2_EXTERNAL_GENERAL_PATH/package/xiongmai-osdrv-xm530/Config.in" | source "$BR2_EXTERNAL_GENERAL_PATH/package/xiongmai-osdrv-xm530/Config.in" | ||||||
|  | @ -116,6 +116,7 @@ source "$BR2_EXTERNAL_GENERAL_PATH/package/legacy/ambarella-osdrv-s3l/Config.in" | ||||||
| source "$BR2_EXTERNAL_GENERAL_PATH/package/legacy/autonight/Config.in" | source "$BR2_EXTERNAL_GENERAL_PATH/package/legacy/autonight/Config.in" | ||||||
| source "$BR2_EXTERNAL_GENERAL_PATH/package/legacy/capjpeg/Config.in" | source "$BR2_EXTERNAL_GENERAL_PATH/package/legacy/capjpeg/Config.in" | ||||||
| source "$BR2_EXTERNAL_GENERAL_PATH/package/legacy/datalink/Config.in" | source "$BR2_EXTERNAL_GENERAL_PATH/package/legacy/datalink/Config.in" | ||||||
|  | source "$BR2_EXTERNAL_GENERAL_PATH/package/legacy/gk7205v200-motors/Config.in" | ||||||
| source "$BR2_EXTERNAL_GENERAL_PATH/package/legacy/gst1-plugins-bad-openipc/Config.in" | source "$BR2_EXTERNAL_GENERAL_PATH/package/legacy/gst1-plugins-bad-openipc/Config.in" | ||||||
| source "$BR2_EXTERNAL_GENERAL_PATH/package/legacy/hisilicon-osdrv-serdes/Config.in" | source "$BR2_EXTERNAL_GENERAL_PATH/package/legacy/hisilicon-osdrv-serdes/Config.in" | ||||||
| source "$BR2_EXTERNAL_GENERAL_PATH/package/legacy/hisilicon-osdrv1-sources/Config.in" | source "$BR2_EXTERNAL_GENERAL_PATH/package/legacy/hisilicon-osdrv1-sources/Config.in" | ||||||
|  | @ -125,6 +126,7 @@ source "$BR2_EXTERNAL_GENERAL_PATH/package/legacy/mavlink-router/Config.in" | ||||||
| source "$BR2_EXTERNAL_GENERAL_PATH/package/legacy/microsnander/Config.in" | source "$BR2_EXTERNAL_GENERAL_PATH/package/legacy/microsnander/Config.in" | ||||||
| source "$BR2_EXTERNAL_GENERAL_PATH/package/legacy/mini-snmpd-openipc/Config.in" | source "$BR2_EXTERNAL_GENERAL_PATH/package/legacy/mini-snmpd-openipc/Config.in" | ||||||
| source "$BR2_EXTERNAL_GENERAL_PATH/package/legacy/rcjoystick/Config.in" | source "$BR2_EXTERNAL_GENERAL_PATH/package/legacy/rcjoystick/Config.in" | ||||||
|  | source "$BR2_EXTERNAL_GENERAL_PATH/package/legacy/sigmastar-motors/Config.in" | ||||||
| source "$BR2_EXTERNAL_GENERAL_PATH/package/legacy/sigmastar-osdrv-msc313e/Config.in" | source "$BR2_EXTERNAL_GENERAL_PATH/package/legacy/sigmastar-osdrv-msc313e/Config.in" | ||||||
| source "$BR2_EXTERNAL_GENERAL_PATH/package/legacy/webui/Config.in" | source "$BR2_EXTERNAL_GENERAL_PATH/package/legacy/webui/Config.in" | ||||||
| source "$BR2_EXTERNAL_GENERAL_PATH/package/legacy/wifibroadcast/Config.in" | source "$BR2_EXTERNAL_GENERAL_PATH/package/legacy/wifibroadcast/Config.in" | ||||||
|  |  | ||||||
|  | @ -5,7 +5,8 @@ | ||||||
| ################################################################################
 | ################################################################################
 | ||||||
| 
 | 
 | ||||||
| ADAPTIVE_LINK_SITE = $(call github,openipc,adaptive-link,$(ADAPTIVE_LINK_VERSION)) | ADAPTIVE_LINK_SITE = $(call github,openipc,adaptive-link,$(ADAPTIVE_LINK_VERSION)) | ||||||
| ADAPTIVE_LINK_VERSION = '2c45d5fb0cac64c3654bc8d6043ed3d8c2e85f9e' | ADAPTIVE_LINK_VERSION = 'dca368dbaa025472e9836712c52d41bca1a9042b' | ||||||
|  | ADAPTIVE_LINK_DEPENDENCIES = yaml-cli-multi | ||||||
| 
 | 
 | ||||||
| ADAPTIVE_LINK_LICENSE = GPL-3.0 | ADAPTIVE_LINK_LICENSE = GPL-3.0 | ||||||
| ADAPTIVE_LINK_LICENSE_FILES = LICENSE | ADAPTIVE_LINK_LICENSE_FILES = LICENSE | ||||||
|  | @ -27,6 +28,7 @@ define ADAPTIVE_LINK_INSTALL_TARGET_CMDS | ||||||
| 	$(INSTALL) -m 755 -d $(TARGET_DIR)/usr/bin | 	$(INSTALL) -m 755 -d $(TARGET_DIR)/usr/bin | ||||||
| 
 | 
 | ||||||
| 	$(INSTALL) -m 644 -t $(TARGET_DIR)/etc $(@D)/alink.conf | 	$(INSTALL) -m 644 -t $(TARGET_DIR)/etc $(@D)/alink.conf | ||||||
|  | 	$(INSTALL) -m 644 -t $(TARGET_DIR)/etc $(@D)/wlan_adapters.yaml | ||||||
| 	$(INSTALL) -m 644 -t $(TARGET_DIR)/etc $(@D)/txprofiles/txprofiles.conf | 	$(INSTALL) -m 644 -t $(TARGET_DIR)/etc $(@D)/txprofiles/txprofiles.conf | ||||||
| 	$(INSTALL) -m 755 -t $(TARGET_DIR)/usr/bin $(@D)/alink_drone | 	$(INSTALL) -m 755 -t $(TARGET_DIR)/usr/bin $(@D)/alink_drone | ||||||
| endef | endef | ||||||
|  |  | ||||||
|  | @ -18,7 +18,11 @@ ATBM_WIFI_MODULE_MAKE_OPTS = KSRC=$(LINUX_DIR) | ||||||
| ATBM_WIFI_MODEL_NAME = | ATBM_WIFI_MODEL_NAME = | ||||||
| 
 | 
 | ||||||
| # Disable all models by default
 | # Disable all models by default
 | ||||||
| ATBM_WIFI_MODULE_MAKE_OPTS += CONFIG_ATBM6012B_y=n CONFIG_ATBM603x=n CONFIG_ATBM6132=n | ATBM_WIFI_MODULE_MAKE_OPTS += \
 | ||||||
|  | 	CONFIG_ATBM6012B_y=n \
 | ||||||
|  | 	CONFIG_ATBM603x=n \
 | ||||||
|  | 	CONFIG_ATBM6132=n \
 | ||||||
|  | 	CONFIG_ATBM_USE_FIRMWARE_H=y | ||||||
| 
 | 
 | ||||||
| # Enable the selected model and set the interface type
 | # Enable the selected model and set the interface type
 | ||||||
| ifeq ($(BR2_PACKAGE_ATBM_WIFI_MODEL_6012B),y) | ifeq ($(BR2_PACKAGE_ATBM_WIFI_MODEL_6012B),y) | ||||||
|  |  | ||||||
											
												Binary file not shown.
											
										
									
								|  | @ -0,0 +1,64 @@ | ||||||
|  | ## Introduction | ||||||
|  | 
 | ||||||
|  | This package is created and intended for unification and use in all firmware and on various processors where the method of connecting motors via GPIO is used. | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | ## Configuring known devices | ||||||
|  | 
 | ||||||
|  | #### Basic Example | ||||||
|  | ``` | ||||||
|  | fw_setenv gpio_motors 'H1 H2 H3 H4 V1 V2 V3 V4' | ||||||
|  | ``` | ||||||
|  | First, the GPIOs responsible for Horizontal rotation are added, and next then the GPIOs responsible for Vertical rotation are added, a total of 8 characters. | ||||||
|  | 
 | ||||||
|  | #### GK7205V200 (unknown model) | ||||||
|  | ``` | ||||||
|  | fw_setenv gpio_motors '52 53 56 57 69 70 59 58' | ||||||
|  | ``` | ||||||
|  | 
 | ||||||
|  | #### GM8136, Faleemi | ||||||
|  | ``` | ||||||
|  | fw_setenv gpio_motors '51 52 53 54 55 28 29 30' | ||||||
|  | ``` | ||||||
|  | 
 | ||||||
|  | #### HI3516CV200, FDT | ||||||
|  | ``` | ||||||
|  | fw_setenv gpio_motors '60 61 37 38 54 55 56 57' | ||||||
|  | ``` | ||||||
|  | 
 | ||||||
|  | #### SSC337DE, Foscam | ||||||
|  | ``` | ||||||
|  | fw_setenv gpio_motors '1 2 12 13 62 63 64 65' | ||||||
|  | ``` | ||||||
|  | 
 | ||||||
|  | #### SSC30KD, CMCC DS-YTJ5101 | ||||||
|  | ``` | ||||||
|  | fw_setenv gpio_motors '111 112 113 114 59 60 8 9' | ||||||
|  | ``` | ||||||
|  | 
 | ||||||
|  | #### T31, Jooan Q3R-U | ||||||
|  | ``` | ||||||
|  | fw_setenv gpio_motors 53 52 54 14 17 | ||||||
|  | ``` | ||||||
|  | This type of device has only 4 GPIOs intended for controlling motors at one time and 1 additional GPIO for switching the Horizontal/Vertical mode.  | ||||||
|  | It is on this device that temporary incorrect operation of the camera's diagonal movement is possible. | ||||||
|  | 
 | ||||||
|  | ## Using the utility | ||||||
|  | ``` | ||||||
|  | gpio-motors <pan steps> <tilt steps> <delay (ms)> | ||||||
|  | ``` | ||||||
|  | 
 | ||||||
|  | ``` | ||||||
|  | gpio-motors 20 0 30 | ||||||
|  | gpio-motors -20 0 30 | ||||||
|  | # | ||||||
|  | gpio-motors 0 20 30 | ||||||
|  | gpio-motors 0 -20 30 | ||||||
|  | # | ||||||
|  | gpio-motors 20 10 30 | ||||||
|  | gpio-motors -20 10 30 | ||||||
|  | ``` | ||||||
|  | 
 | ||||||
|  | ## More info | ||||||
|  | 
 | ||||||
|  | - [Our Wiki](https://github.com/OpenIPC/wiki/blob/master/en/motors.md) | ||||||
|  | @ -7,188 +7,180 @@ | ||||||
| 
 | 
 | ||||||
| int PAN_PINS[4]; | int PAN_PINS[4]; | ||||||
| int TILT_PINS[4]; | int TILT_PINS[4]; | ||||||
|  | int SELECT_PIN = -1; | ||||||
| 
 | 
 | ||||||
| int STEP_SEQUENCE[8][4] = { | int STEP_SEQUENCE[8][4] = { | ||||||
|     {1, 0, 0, 0}, {1, 1, 0, 0}, {0, 1, 0, 0}, {0, 1, 1, 0}, | 	{1, 0, 0, 0}, {1, 1, 0, 0}, {0, 1, 0, 0}, {0, 1, 1, 0}, | ||||||
|     {0, 0, 1, 0}, {0, 0, 1, 1}, {0, 0, 0, 1}, {1, 0, 0, 1} | 	{0, 0, 1, 0}, {0, 0, 1, 1}, {0, 0, 0, 1}, {1, 0, 0, 1} | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| int REVERSE_STEP_SEQUENCE[8][4] = { | int REVERSE_STEP_SEQUENCE[8][4] = { | ||||||
|     {1, 0, 0, 1}, {0, 0, 0, 1}, {0, 0, 1, 1}, {0, 0, 1, 0}, | 	{1, 0, 0, 1}, {0, 0, 0, 1}, {0, 0, 1, 1}, {0, 0, 1, 0}, | ||||||
|     {0, 1, 1, 0}, {0, 1, 0, 0}, {1, 1, 0, 0}, {1, 0, 0, 0} | 	{0, 1, 1, 0}, {0, 1, 0, 0}, {1, 1, 0, 0}, {1, 0, 0, 0} | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| void release_gpio(int pin) { | void gpio_release(int pin) { | ||||||
|     char path[50]; | 	char path[64]; | ||||||
|     snprintf(path, sizeof(path), "/sys/class/gpio/gpio%d/value", pin); | 	snprintf(path, sizeof(path), "/sys/class/gpio/gpio%d/value", pin); | ||||||
|     FILE *file = fopen(path, "w"); | 	FILE *file = fopen(path, "w"); | ||||||
|     if (file) { | 	if (file) { | ||||||
|         fprintf(file, "%d", 0); | 		fprintf(file, "%d", 0); | ||||||
|         fclose(file); | 		fclose(file); | ||||||
|     } else { | 	} | ||||||
|         printf("Unable to set value of GPIO %d to 0: [%d] %s\n", pin, errno, strerror(errno));     |  | ||||||
|     } |  | ||||||
| 
 | 
 | ||||||
|     file = fopen("/sys/class/gpio/unexport", "w"); | 	file = fopen("/sys/class/gpio/unexport", "w"); | ||||||
|     if (file) { | 	if (file) { | ||||||
|         fprintf(file, "%d", pin); | 		fprintf(file, "%d", pin); | ||||||
|         fclose(file); | 		fclose(file); | ||||||
|     } else { | 	} else { | ||||||
|         printf("Unable to unexport GPIO %d: [%d] %s\n", pin, errno, strerror(errno));     | 		printf("Unable to unexport GPIO %d: [%d] %s\n", pin, errno, strerror(errno)); | ||||||
|     } | 	} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void cleanup() { | void gpio_clean(int error) { | ||||||
|     for (int i = 0; i < 4; i++) { | 	for (int i = 0; i < 4; i++) { | ||||||
|         release_gpio(PAN_PINS[i]); | 		gpio_release(PAN_PINS[i]); | ||||||
|         release_gpio(TILT_PINS[i]); | 		gpio_release(TILT_PINS[i]); | ||||||
|     } | 	} | ||||||
|     exit(EXIT_FAILURE); | 
 | ||||||
|  | 	if (SELECT_PIN != -1) { | ||||||
|  | 		gpio_release(SELECT_PIN); | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	if (error) { | ||||||
|  | 		exit(EXIT_FAILURE); | ||||||
|  | 	} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void export_gpio(int pin) { | void gpio_export(int pin) { | ||||||
|     char path[50]; | 	char path[64]; | ||||||
|     FILE *file; | 	FILE *file; | ||||||
| 
 | 
 | ||||||
|     file = fopen("/sys/class/gpio/export", "w"); | 	file = fopen("/sys/class/gpio/export", "w"); | ||||||
|     if (file) { | 	if (file) { | ||||||
|         fprintf(file, "%d", pin); | 		fprintf(file, "%d", pin); | ||||||
|         fclose(file); | 		fclose(file); | ||||||
|     } else { | 	} else { | ||||||
|         printf("Unable export GPIO %d: [%d] %s\n", pin, errno, strerror(errno));     | 		printf("Unable export GPIO %d: [%d] %s\n", pin, errno, strerror(errno)); | ||||||
|         cleanup(); | 		gpio_clean(1); | ||||||
|     } | 	} | ||||||
| 
 | 
 | ||||||
|     snprintf(path, sizeof(path), "/sys/class/gpio/gpio%d/direction", pin); | 	snprintf(path, sizeof(path), "/sys/class/gpio/gpio%d/direction", pin); | ||||||
|     file = fopen(path, "w"); | 	file = fopen(path, "w"); | ||||||
|     if (file) { | 	if (file) { | ||||||
|         fprintf(file, "out"); | 		fprintf(file, "out"); | ||||||
|         fclose(file); | 		fclose(file); | ||||||
|     } else { | 	} else { | ||||||
|         printf("Unable to set direction of GPIO %d: [%d] %s\n", pin, errno, strerror(errno));     | 		printf("Unable to set direction of GPIO %d: [%d] %s\n", pin, errno, strerror(errno)); | ||||||
|         cleanup(); | 		gpio_clean(1); | ||||||
|     } | 	} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void unexport_gpio(int pin) { | void gpio_set(int pin, int value) { | ||||||
|     FILE *file = fopen("/sys/class/gpio/unexport", "w"); | 	char path[64]; | ||||||
|     if (file) { | 	snprintf(path, sizeof(path), "/sys/class/gpio/gpio%d/value", pin); | ||||||
|         fprintf(file, "%d", pin); | 	FILE *file = fopen(path, "w"); | ||||||
|         fclose(file); | 	if (file) { | ||||||
|     } else { | 		fprintf(file, "%d", value); | ||||||
|         printf("Unable to unexport GPIO %d: [%d] %s\n", pin, errno, strerror(errno));     | 		fclose(file); | ||||||
|         cleanup(); | 	} else { | ||||||
|     } | 		printf("Unable to set value of GPIO %d: [%d] %s\n", pin, errno, strerror(errno)); | ||||||
|  | 		gpio_clean(1); | ||||||
|  | 	} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void set_gpio(int pin, int value) { | void gpio_config() { | ||||||
|     char path[50]; | 	FILE *fp = popen("fw_printenv -n gpio_motors", "r"); | ||||||
|     snprintf(path, sizeof(path), "/sys/class/gpio/gpio%d/value", pin); | 	if (fp == NULL) { | ||||||
|     FILE *file = fopen(path, "w"); | 		printf("Unable to run fw_printenv\n"); | ||||||
|     if (file) { | 		exit(EXIT_FAILURE); | ||||||
|         fprintf(file, "%d", value); | 	} | ||||||
|         fclose(file); | 
 | ||||||
|     } else { | 	char line[64]; | ||||||
|         printf("Unable to set value of GPIO %d: [%d] %s\n", pin, errno, strerror(errno));     | 	if (fgets(line, sizeof(line), fp) != NULL) { | ||||||
|         cleanup(); | 		char *token = strtok(line, " "); | ||||||
|     } | 		int value[8]; | ||||||
|  | 		int count = 0; | ||||||
|  | 
 | ||||||
|  | 		while (token != NULL && count < 8) { | ||||||
|  | 			value[count++] = atoi(token); | ||||||
|  | 			token = strtok(NULL, " "); | ||||||
|  | 		} | ||||||
|  | 
 | ||||||
|  | 		if (count == 8 || count == 5) { | ||||||
|  | 			for (int i = 0; i < 4; i++) { | ||||||
|  | 				PAN_PINS[i] = value[i]; | ||||||
|  | 				TILT_PINS[i] = value[i + (count == 8 ? 4 : 0)]; | ||||||
|  | 			} | ||||||
|  | 
 | ||||||
|  | 			if (count == 5) { | ||||||
|  | 				SELECT_PIN = value[4]; | ||||||
|  | 			} | ||||||
|  | 		} else { | ||||||
|  | 			printf("Error: Expected 8 or 5 GPIO values, but got %d\n", count); | ||||||
|  | 			exit(EXIT_FAILURE); | ||||||
|  | 		} | ||||||
|  | 	} else { | ||||||
|  | 		printf("Error: Unable to read gpio_motors from fw_printenv\n"); | ||||||
|  | 		exit(EXIT_FAILURE); | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
|  | 	pclose(fp); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void get_gpio_config() { | void axis_run(const int pins[4], int level, int steps, int delay) { | ||||||
|     FILE *fp = popen("fw_printenv -n gpio_motors", "r"); | 	int remaining = abs(steps); | ||||||
|     if (fp == NULL) { | 	if (remaining == 0) { | ||||||
|         printf("Unable to run fw_printenv\n"); | 		return; | ||||||
|         exit(EXIT_FAILURE); | 	} | ||||||
|     } |  | ||||||
| 
 | 
 | ||||||
|     char line[32]; | 	const int (*seq)[4] = (steps < 0) ? REVERSE_STEP_SEQUENCE : STEP_SEQUENCE; | ||||||
|     if (fgets(line, sizeof(line), fp) != NULL) { | 	if (SELECT_PIN != -1) { | ||||||
|         char *token = strtok(line, " "); | 		gpio_set(SELECT_PIN, level); | ||||||
|         int index = 0; | 		usleep(100); | ||||||
|  | 	} | ||||||
| 
 | 
 | ||||||
|         while (token != NULL && index < 8) { | 	int micro = 0; | ||||||
|             if (index < 4) { | 	while (remaining > 0) { | ||||||
|                 PAN_PINS[index] = atoi(token); | 		for (int i = 0; i < 4; i++) { | ||||||
|             } else { | 			gpio_set(pins[i], seq[micro][i]); | ||||||
|                 TILT_PINS[index - 4] = atoi(token); | 		} | ||||||
|             } |  | ||||||
|             token = strtok(NULL, " "); |  | ||||||
|             index++; |  | ||||||
|         } |  | ||||||
| 
 | 
 | ||||||
|         if (index != 8) { | 		usleep(delay); | ||||||
|             printf("Error: Expected 8 GPIO values, but got %d.\n", index); | 		if (++micro >= 8) { | ||||||
|             exit(EXIT_FAILURE); | 			micro = 0; | ||||||
|         } | 			--remaining; | ||||||
|     } else { | 		} | ||||||
|         printf("Error: Unable to read gpio_motors from fw_printenv.\n"); | 	} | ||||||
|         exit(EXIT_FAILURE); |  | ||||||
|     } |  | ||||||
| 
 | 
 | ||||||
|     fclose(fp); | 	for (int i = 0; i < 4; i++) { | ||||||
|  | 		gpio_set(pins[i], 0); | ||||||
|  | 	} | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| int main(int argc, char *argv[]) { | int main(int argc, char *argv[]) { | ||||||
|     if (argc != 4) { | 	if (argc != 4) { | ||||||
|         fprintf(stderr, "Usage: %s <pan steps> <tilt steps> <delay (ms)>\n", argv[0]); | 		fprintf(stderr, "Usage: %s <pan steps> <tilt steps> <delay (ms)>\n", argv[0]); | ||||||
|         return 1; | 		return 1; | ||||||
|     } | 	} | ||||||
| 
 | 
 | ||||||
|     int pan_steps = atoi(argv[1]); | 	int pan_steps = atoi(argv[1]); | ||||||
|     int tilt_steps = atoi(argv[2]); | 	int tilt_steps = atoi(argv[2]); | ||||||
|     int delay = atoi(argv[3]) * 1000; | 	int delay = atoi(argv[3]) * 1000; | ||||||
| 
 | 
 | ||||||
|     get_gpio_config(); | 	gpio_config(); | ||||||
|  | 	for (int i = 0; i < 4; i++) { | ||||||
|  | 		gpio_export(PAN_PINS[i]); | ||||||
|  | 		gpio_export(TILT_PINS[i]); | ||||||
|  | 	} | ||||||
| 
 | 
 | ||||||
|     for (int i = 0; i < 4; i++) { | 	if (SELECT_PIN != -1) { | ||||||
|         export_gpio(PAN_PINS[i]); | 		gpio_export(SELECT_PIN); | ||||||
|         export_gpio(TILT_PINS[i]); | 	} | ||||||
|     } |  | ||||||
| 
 | 
 | ||||||
|     int pan_remaining = abs(pan_steps); | 	axis_run(PAN_PINS, 0, pan_steps, delay); | ||||||
|     int tilt_remaining = abs(tilt_steps); | 	axis_run(TILT_PINS, 1, tilt_steps, delay); | ||||||
|     int pan_reverse = (pan_steps < 0); | 	gpio_clean(0); | ||||||
|     int tilt_reverse = (tilt_steps < 0); |  | ||||||
|     int pan_micro = 0; |  | ||||||
|     int tilt_micro = 0; |  | ||||||
| 
 | 
 | ||||||
|     while (pan_remaining > 0 || tilt_remaining > 0) { | 	return 0; | ||||||
|         int pan_has = pan_remaining > 0; |  | ||||||
|         int tilt_has = tilt_remaining > 0; |  | ||||||
| 
 |  | ||||||
|         int pan_eff = pan_has ? (tilt_has ? delay : delay / 2) : 0; |  | ||||||
|         int tilt_eff = tilt_has ? (pan_has ? delay : delay / 2) : 0; |  | ||||||
|         int eff_delay = (pan_eff > tilt_eff) ? pan_eff : tilt_eff; |  | ||||||
| 
 |  | ||||||
|         if (pan_has) { |  | ||||||
|             const int (*seq)[4] = pan_reverse ? REVERSE_STEP_SEQUENCE : STEP_SEQUENCE; |  | ||||||
|             for (int k = 0; k < 4; k++) { |  | ||||||
|                 set_gpio(PAN_PINS[k], seq[pan_micro][k]); |  | ||||||
|             } |  | ||||||
|             if (++pan_micro >= 8) { |  | ||||||
|                 pan_micro = 0; |  | ||||||
|                 pan_remaining--; |  | ||||||
|             } |  | ||||||
|         } |  | ||||||
| 
 |  | ||||||
|         if (tilt_has) { |  | ||||||
|             const int (*seq)[4] = tilt_reverse ? REVERSE_STEP_SEQUENCE : STEP_SEQUENCE; |  | ||||||
|             for (int k = 0; k < 4; k++) { |  | ||||||
|                 set_gpio(TILT_PINS[k], seq[tilt_micro][k]); |  | ||||||
|             } |  | ||||||
|             if (++tilt_micro >= 8) { |  | ||||||
|                 tilt_micro = 0; |  | ||||||
|                 tilt_remaining--; |  | ||||||
|             } |  | ||||||
|         } |  | ||||||
| 
 |  | ||||||
|         usleep(eff_delay); |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     for (int i = 0; i < 4; i++) { |  | ||||||
|         release_gpio(PAN_PINS[i]); |  | ||||||
|         release_gpio(TILT_PINS[i]); |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     return 0; |  | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -34,6 +34,8 @@ define HISILICON_OPENSDK_INSTALL_TARGET_CMDS | ||||||
| 	$(INSTALL) -m 755 -d $(TARGET_DIR)/usr/lib/sensors | 	$(INSTALL) -m 755 -d $(TARGET_DIR)/usr/lib/sensors | ||||||
| 	$(INSTALL) -D -m 0644 $(@D)/libraries/sensor/$(OPENIPC_SOC_FAMILY)/sony_imx335/libsns_imx335.so $(TARGET_DIR)/usr/lib/sensors | 	$(INSTALL) -D -m 0644 $(@D)/libraries/sensor/$(OPENIPC_SOC_FAMILY)/sony_imx335/libsns_imx335.so $(TARGET_DIR)/usr/lib/sensors | ||||||
| 	$(INSTALL) -D -m 0644 $(@D)/libraries/sensor/$(OPENIPC_SOC_FAMILY)/sony_imx307/libsns_imx307.so $(TARGET_DIR)/usr/lib/sensors | 	$(INSTALL) -D -m 0644 $(@D)/libraries/sensor/$(OPENIPC_SOC_FAMILY)/sony_imx307/libsns_imx307.so $(TARGET_DIR)/usr/lib/sensors | ||||||
|  | 	# | ||||||
|  | 	# Using non-original SDK causes a lot of noise, the problem is not solved yet. Please use binary module or build this driver with original SDK from HiSilicon/Goke. | ||||||
|   # $(INSTALL) -D -m 0644 $(@D)/libraries/sensor/$(OPENIPC_SOC_FAMILY)/imagedesign_mis2008/libsns_mis2008.so $(TARGET_DIR)/usr/lib/sensors |   # $(INSTALL) -D -m 0644 $(@D)/libraries/sensor/$(OPENIPC_SOC_FAMILY)/imagedesign_mis2008/libsns_mis2008.so $(TARGET_DIR)/usr/lib/sensors | ||||||
| endef | endef | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -0,0 +1,6 @@ | ||||||
|  | config BR2_PACKAGE_INGENIC_OSDRV_T23 | ||||||
|  | 	bool "ingenic-osdrv-t23" | ||||||
|  | 	select BR2_PACKAGE_INGENIC_OPENSDK | ||||||
|  | 	help | ||||||
|  | 	  Ingenic T23 kernel modules and libraries | ||||||
|  | 	  https://openipc.org | ||||||
											
												Binary file not shown.
											
										
									
								
											
												Binary file not shown.
											
										
									
								
											
												Binary file not shown.
											
										
									
								|  | @ -0,0 +1,91 @@ | ||||||
|  | #!/bin/sh | ||||||
|  | KMOD_PATH=/lib/modules/$(uname -r)/ingenic | ||||||
|  | vendor=$(ipcinfo -v) | ||||||
|  | 
 | ||||||
|  | if [ ! -f /usr/sbin/sensor_cli ]; then | ||||||
|  | 	ln -s /usr/sbin/extutils /usr/sbin/sensor_cli | ||||||
|  | fi | ||||||
|  | 
 | ||||||
|  | echo 1 > /proc/sys/vm/overcommit_memory | ||||||
|  | 
 | ||||||
|  | log_vendor() { | ||||||
|  | 	logger -s -p daemon.info -t ${vendor} "$1" | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | check_return() { | ||||||
|  | 	if [ $? -ne 0 ]; then | ||||||
|  | 		echo err: $1 | ||||||
|  | 		echo exit | ||||||
|  | 		exit | ||||||
|  | 	fi | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | lsmod | grep -q "sinfo" | ||||||
|  | if [ $? -ne 0 ]; then | ||||||
|  | 	modprobe sinfo.ko | ||||||
|  | 	check_return "modprobe sinfo" | ||||||
|  | fi | ||||||
|  | 
 | ||||||
|  | SENSOR=$(fw_printenv -n sensor) | ||||||
|  | if [ -n "$SENSOR" ]; then | ||||||
|  | 	export ${SENSOR} | ||||||
|  | 	log_vendor "Get data from environment and set SENSOR as ${SENSOR}" | ||||||
|  | else | ||||||
|  | 	echo 1 >/proc/jz/sinfo/info | ||||||
|  | 	check_return "start sinfo" | ||||||
|  | 	SENSOR_INFO=$(cat /proc/jz/sinfo/info) | ||||||
|  | 	check_return "get sensor type" | ||||||
|  | 	SENSOR=${SENSOR_INFO#*:} | ||||||
|  | 	if [ "sensor not found" = "$SENSOR" ]; then | ||||||
|  | 		unset SENSOR | ||||||
|  | 		fw_setenv sensor | ||||||
|  | 	else | ||||||
|  | 		log_vendor "Get data from sinfo and set SENSOR as ${SENSOR}" | ||||||
|  | 		fw_setenv sensor $SENSOR && log_vendor "Write detected ${SENSOR} to U-Boot ENV" | ||||||
|  | 	fi | ||||||
|  | fi | ||||||
|  | 
 | ||||||
|  | case ${SENSOR} in | ||||||
|  | 	"imx307"|"sc2135"|"sc2232"|"sc2336") | ||||||
|  | 		ISP_PARAM="isp_clk=200000000" | ||||||
|  | 		;; | ||||||
|  | 
 | ||||||
|  | 	"gc2053"|"jxf23") | ||||||
|  | 		ISP_PARAM="isp_clk=200000000" | ||||||
|  | 		SENSOR_PARAM="sensor_max_fps=25 data_interface=1" | ||||||
|  | 		;; | ||||||
|  | 
 | ||||||
|  | 	*) | ||||||
|  | 		ISP_PARAM="isp_clk=125000000" | ||||||
|  | 		;; | ||||||
|  | esac | ||||||
|  | 
 | ||||||
|  | echo -------------------- | ||||||
|  | echo "ISP_PARAM: ${ISP_PARAM}" | ||||||
|  | echo "SENSOR: ${SENSOR}" | ||||||
|  | echo "SENSOR_PARAM: ${SENSOR_PARAM}" | ||||||
|  | echo -------------------- | ||||||
|  | 
 | ||||||
|  | lsmod | grep -q "tx_isp" | ||||||
|  | if [ $? -ne 0 ]; then | ||||||
|  | 	modprobe tx-isp-t23 ${ISP_PARAM} | ||||||
|  | 	check_return "modprobe isp drv" | ||||||
|  | fi | ||||||
|  | 
 | ||||||
|  | lsmod | grep -q ${SENSOR} | ||||||
|  | if [ $? -ne 0 ]; then | ||||||
|  | 	modprobe sensor_${SENSOR}_t23 ${SENSOR_PARAM} | ||||||
|  | 	check_return "modprobe sensor drv" | ||||||
|  | fi | ||||||
|  | 
 | ||||||
|  | lsmod | grep -q "audio" | ||||||
|  | if [ $? -ne 0 ]; then | ||||||
|  | 	modprobe audio spk_gpio=-1 | ||||||
|  | 	check_return "modprobe audio" | ||||||
|  | fi | ||||||
|  | 
 | ||||||
|  | lsmod | grep -q "jzmmc_v12" | ||||||
|  | if [ $? -ne 0 ]; then | ||||||
|  | 	modprobe jzmmc_v12 detect_pin=$(fw_printenv -n gpio_mmc || echo 59) | ||||||
|  | 	check_return "modprobe mmc" | ||||||
|  | fi | ||||||
|  | @ -0,0 +1,6 @@ | ||||||
|  | sensor: | ||||||
|  |   name: gc2053 | ||||||
|  |   address: 0x37 | ||||||
|  |   width: 1920 | ||||||
|  |   height: 1080 | ||||||
|  |   bus: i2c | ||||||
|  | @ -0,0 +1,6 @@ | ||||||
|  | sensor: | ||||||
|  |   name: imx327 | ||||||
|  |   address: 0x1a | ||||||
|  |   width: 1920 | ||||||
|  |   height: 1080 | ||||||
|  |   bus: i2c | ||||||
|  | @ -0,0 +1,6 @@ | ||||||
|  | sensor: | ||||||
|  |   name: jxf23 | ||||||
|  |   address: 0x40 | ||||||
|  |   width: 1920 | ||||||
|  |   height: 1080 | ||||||
|  |   bus: i2c | ||||||
|  | @ -0,0 +1,6 @@ | ||||||
|  | sensor: | ||||||
|  |   name: jxf37pa | ||||||
|  |   address: 0x40 | ||||||
|  |   width: 1920 | ||||||
|  |   height: 1080 | ||||||
|  |   bus: i2c | ||||||
|  | @ -0,0 +1,6 @@ | ||||||
|  | sensor: | ||||||
|  |   name: jxh63p | ||||||
|  |   address: 0x40 | ||||||
|  |   width: 1920 | ||||||
|  |   height: 1080 | ||||||
|  |   bus: i2c | ||||||
											
												Binary file not shown.
											
										
									
								
											
												Binary file not shown.
											
										
									
								
											
												Binary file not shown.
											
										
									
								
											
												Binary file not shown.
											
										
									
								
											
												Binary file not shown.
											
										
									
								
											
												Binary file not shown.
											
										
									
								
											
												Binary file not shown.
											
										
									
								
											
												Binary file not shown.
											
										
									
								
											
												Binary file not shown.
											
										
									
								
											
												Binary file not shown.
											
										
									
								
											
												Binary file not shown.
											
										
									
								
											
												Binary file not shown.
											
										
									
								|  | @ -0,0 +1,6 @@ | ||||||
|  | sensor: | ||||||
|  |   name: sc1346 | ||||||
|  |   address: 0x30 | ||||||
|  |   width: 1280 | ||||||
|  |   height: 720 | ||||||
|  |   bus: i2c | ||||||
|  | @ -0,0 +1,6 @@ | ||||||
|  | sensor: | ||||||
|  |   name: sc1a4t | ||||||
|  |   address: 0x30 | ||||||
|  |   width: 1280 | ||||||
|  |   height: 720 | ||||||
|  |   bus: i2c | ||||||
|  | @ -0,0 +1,6 @@ | ||||||
|  | sensor: | ||||||
|  |   name: sc200ai | ||||||
|  |   address: 0x30 | ||||||
|  |   width: 1920 | ||||||
|  |   height: 1080 | ||||||
|  |   bus: i2c | ||||||
|  | @ -0,0 +1,6 @@ | ||||||
|  | sensor: | ||||||
|  |   name: sc2310 | ||||||
|  |   address: 0x30 | ||||||
|  |   width: 1920 | ||||||
|  |   height: 1080 | ||||||
|  |   bus: i2c | ||||||
|  | @ -0,0 +1,6 @@ | ||||||
|  | sensor: | ||||||
|  |   name: sc2331 | ||||||
|  |   address: 0x30 | ||||||
|  |   width: 1920 | ||||||
|  |   height: 1080 | ||||||
|  |   bus: i2c | ||||||
|  | @ -0,0 +1,6 @@ | ||||||
|  | sensor: | ||||||
|  |   name: sc2336 | ||||||
|  |   address: 0x30 | ||||||
|  |   width: 1920 | ||||||
|  |   height: 1080 | ||||||
|  |   bus: i2c | ||||||
|  | @ -0,0 +1,6 @@ | ||||||
|  | sensor: | ||||||
|  |   name: sc301IoT | ||||||
|  |   address: 0x30 | ||||||
|  |   width: 1920 | ||||||
|  |   height: 1080 | ||||||
|  |   bus: i2c | ||||||
|  | @ -0,0 +1,38 @@ | ||||||
|  | ################################################################################
 | ||||||
|  | #
 | ||||||
|  | # ingenic-osdrv-t23
 | ||||||
|  | #
 | ||||||
|  | ################################################################################
 | ||||||
|  | 
 | ||||||
|  | INGENIC_OSDRV_T23_VERSION = | ||||||
|  | INGENIC_OSDRV_T23_SITE = | ||||||
|  | INGENIC_OSDRV_T23_LICENSE = MIT | ||||||
|  | INGENIC_OSDRV_T23_LICENSE_FILES = LICENSE | ||||||
|  | 
 | ||||||
|  | ifeq ($(OPENIPC_SNS_MODEL),) | ||||||
|  | define INGENIC_OSDRV_T23_INSTALL_TARGET_CMDS | ||||||
|  | 	$(INSTALL) -m 755 -d $(TARGET_DIR)/etc/sensor | ||||||
|  | 	$(INSTALL) -m 644 -t $(TARGET_DIR)/etc/sensor $(INGENIC_OSDRV_T23_PKGDIR)/files/sensor/*.yaml | ||||||
|  | 	$(INSTALL) -m 644 -t $(TARGET_DIR)/etc/sensor $(INGENIC_OSDRV_T23_PKGDIR)/files/sensor/params/*.bin | ||||||
|  | 
 | ||||||
|  | 	$(INSTALL) -m 755 -d $(TARGET_DIR)/usr/bin | ||||||
|  | 	$(INSTALL) -m 755 -t $(TARGET_DIR)/usr/bin $(INGENIC_OSDRV_T23_PKGDIR)/files/script/* | ||||||
|  | 
 | ||||||
|  | 	$(INSTALL) -m 755 -d $(TARGET_DIR)/usr/lib | ||||||
|  | 	$(INSTALL) -m 644 -t $(TARGET_DIR)/usr/lib/ $(INGENIC_OSDRV_T23_PKGDIR)/files/lib/* | ||||||
|  | endef | ||||||
|  | else | ||||||
|  | define INGENIC_OSDRV_T23_INSTALL_TARGET_CMDS | ||||||
|  | 	$(INSTALL) -m 755 -d $(TARGET_DIR)/etc/sensor | ||||||
|  | 	$(INSTALL) -m 644 -t $(TARGET_DIR)/etc/sensor $(INGENIC_OSDRV_T23_PKGDIR)/files/sensor/$(OPENIPC_SNS_MODEL).yaml | ||||||
|  | 	$(INSTALL) -m 644 -t $(TARGET_DIR)/etc/sensor $(INGENIC_OSDRV_T23_PKGDIR)/files/sensor/params/$(OPENIPC_SNS_MODEL)-$(OPENIPC_SOC_MODEL).bin | ||||||
|  | 
 | ||||||
|  | 	$(INSTALL) -m 755 -d $(TARGET_DIR)/usr/bin | ||||||
|  | 	$(INSTALL) -m 755 -t $(TARGET_DIR)/usr/bin $(INGENIC_OSDRV_T23_PKGDIR)/files/script/* | ||||||
|  | 
 | ||||||
|  | 	$(INSTALL) -m 755 -d $(TARGET_DIR)/usr/lib | ||||||
|  | 	$(INSTALL) -m 644 -t $(TARGET_DIR)/usr/lib/ $(INGENIC_OSDRV_T23_PKGDIR)/files/lib/* | ||||||
|  | endef | ||||||
|  | endif | ||||||
|  | 
 | ||||||
|  | $(eval $(generic-package)) | ||||||
|  | @ -9,7 +9,7 @@ MAJESTIC_WEBUI_VERSION = HEAD | ||||||
| MAJESTIC_WEBUI_LICENSE = MIT | MAJESTIC_WEBUI_LICENSE = MIT | ||||||
| MAJESTIC_WEBUI_LICENSE_FILES = LICENSE | MAJESTIC_WEBUI_LICENSE_FILES = LICENSE | ||||||
| 
 | 
 | ||||||
| ifneq ($(findstring fpv,$(OPENIPC_VARIANT)),) | ifeq ($(OPENIPC_VARIANT),fpv) | ||||||
| 	VERSION = FPV | 	VERSION = FPV | ||||||
| else | else | ||||||
| 	VERSION = STANDARD | 	VERSION = STANDARD | ||||||
|  |  | ||||||
|  | @ -5,7 +5,7 @@ | ||||||
| ################################################################################
 | ################################################################################
 | ||||||
| 
 | 
 | ||||||
| ONVIF_SIMPLE_SERVER_SITE = $(call github,roleoroleo,onvif_simple_server,$(ONVIF_SIMPLE_SERVER_VERSION)) | ONVIF_SIMPLE_SERVER_SITE = $(call github,roleoroleo,onvif_simple_server,$(ONVIF_SIMPLE_SERVER_VERSION)) | ||||||
| ONVIF_SIMPLE_SERVER_VERSION = e2370712b333068afb08051fe3046aa2324148ff | ONVIF_SIMPLE_SERVER_VERSION = 7c8672fe84a14dfdc02ba7fdb1f9f88074b2efc6 | ||||||
| 
 | 
 | ||||||
| ONVIF_SIMPLE_SERVER_DEPENDENCIES = mbedtls | ONVIF_SIMPLE_SERVER_DEPENDENCIES = mbedtls | ||||||
| ONVIF_SIMPLE_SERVER_LICENSE = MIT | ONVIF_SIMPLE_SERVER_LICENSE = MIT | ||||||
|  |  | ||||||
|  | @ -5,7 +5,7 @@ | ||||||
| ################################################################################
 | ################################################################################
 | ||||||
| 
 | 
 | ||||||
| RTL8189ES_OPENIPC_SITE = $(call github,jwrdegoede,rtl8189es_linux,$(RTL8189ES_OPENIPC_VERSION)) | RTL8189ES_OPENIPC_SITE = $(call github,jwrdegoede,rtl8189es_linux,$(RTL8189ES_OPENIPC_VERSION)) | ||||||
| RTL8189ES_OPENIPC_VERSION = HEAD | RTL8189ES_OPENIPC_VERSION = fcf2a5746e6fe11d9d71337ee5dac6cf43423a97 | ||||||
| 
 | 
 | ||||||
| RTL8189ES_OPENIPC_LICENSE = GPL-2.0 | RTL8189ES_OPENIPC_LICENSE = GPL-2.0 | ||||||
| RTL8189ES_OPENIPC_LICENSE_FILES = COPYING | RTL8189ES_OPENIPC_LICENSE_FILES = COPYING | ||||||
|  |  | ||||||
|  | @ -1,41 +0,0 @@ | ||||||
| --- a/Makefile	2024-08-27 14:13:17.943312156 +0300
 |  | ||||||
| +++ b/Makefile	2024-08-27 14:16:02.378077178 +0300
 |  | ||||||
| @@ -49,7 +49,7 @@
 |  | ||||||
|   |  | ||||||
|  ########################## WIFI IC ############################ |  | ||||||
|  CONFIG_RTL8812A = y |  | ||||||
| -CONFIG_RTL8821A = y
 |  | ||||||
| +CONFIG_RTL8821A = n
 |  | ||||||
|  CONFIG_RTL8814A = n |  | ||||||
|  ######################### Interface ########################### |  | ||||||
|  CONFIG_USB_HCI = y |  | ||||||
| @@ -216,9 +216,9 @@
 |  | ||||||
|  EXTRA_CFLAGS += -DDBG=0 |  | ||||||
|  endif |  | ||||||
|   |  | ||||||
| -ifeq ($(CONFIG_RTL8812A)_$(CONFIG_RTL8821A), y_y)
 |  | ||||||
| +ifeq ($(CONFIG_RTL8812A)_$(CONFIG_RTL8821A), y_n)
 |  | ||||||
|   |  | ||||||
| -EXTRA_CFLAGS += -DDRV_NAME=\"rtl88xxau_wfb\"
 |  | ||||||
| +EXTRA_CFLAGS += -DDRV_NAME=\"rtl88xxau\"
 |  | ||||||
|  ifeq ($(CONFIG_USB_HCI), y) |  | ||||||
|  USER_MODULE_NAME = 88XXau |  | ||||||
|  endif |  | ||||||
| @@ -301,7 +301,7 @@
 |  | ||||||
|  				hal/btc/halbtc8821c2ant.o |  | ||||||
|  endif |  | ||||||
|   |  | ||||||
| -include $(TopDIR)/hal/phydm/phydm.mk
 |  | ||||||
| +include $(src)/hal/phydm/phydm.mk
 |  | ||||||
|   |  | ||||||
|  ########### HAL_RTL8812A_RTL8821A ################################# |  | ||||||
|  ifneq ($(CONFIG_RTL8812A)_$(CONFIG_RTL8821A), n_n) |  | ||||||
| @@ -1533,7 +1533,7 @@
 |  | ||||||
|   |  | ||||||
|  USER_MODULE_NAME ?= |  | ||||||
|  ifneq ($(USER_MODULE_NAME),) |  | ||||||
| -MODULE_NAME := $(USER_MODULE_NAME)_wfb
 |  | ||||||
| +MODULE_NAME := $(USER_MODULE_NAME)
 |  | ||||||
|  endif |  | ||||||
|   |  | ||||||
|  ifneq ($(KERNELRELEASE),) |  | ||||||
|  | @ -1,36 +0,0 @@ | ||||||
| diff -Naur a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c
 |  | ||||||
| --- a/os_dep/linux/ioctl_cfg80211.c	2024-08-27 14:35:02.331289685 +0300
 |  | ||||||
| +++ b/os_dep/linux/ioctl_cfg80211.c	2024-08-27 14:37:53.039690680 +0300
 |  | ||||||
| @@ -4937,6 +4937,7 @@
 |  | ||||||
|        //RTW_INFO("%s dvobj null\n", __func__); |  | ||||||
|      } |  | ||||||
|      switch(pHalData->current_channel_bw){ |  | ||||||
| +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0))
 |  | ||||||
|        case CHANNEL_WIDTH_5: |  | ||||||
|  	//RTW_INFO("%s width 5\n", __func__); |  | ||||||
|  	width = NL80211_CHAN_WIDTH_5; |  | ||||||
| @@ -4947,6 +4948,7 @@
 |  | ||||||
|  	width = NL80211_CHAN_WIDTH_10; |  | ||||||
|  	center_freq = control_freq; |  | ||||||
|  	break; |  | ||||||
| +#endif
 |  | ||||||
|        case CHANNEL_WIDTH_20: |  | ||||||
|  	//RTW_INFO("%s width 20\n", __func__); |  | ||||||
|  	width = NL80211_CHAN_WIDTH_20; |  | ||||||
| diff -Naur a/os_dep/linux/wifi_regd.c b/os_dep/linux/wifi_regd.c
 |  | ||||||
| --- a/os_dep/linux/wifi_regd.c	2024-08-27 14:35:13.051313467 +0300
 |  | ||||||
| +++ b/os_dep/linux/wifi_regd.c	2024-08-27 14:38:18.297753594 +0300
 |  | ||||||
| @@ -334,11 +334,11 @@
 |  | ||||||
|  				if (ch) |  | ||||||
|  					ch->flags &= ~(IEEE80211_CHAN_DISABLED|IEEE80211_CHAN_NO_HT40PLUS| |  | ||||||
|  						IEEE80211_CHAN_NO_HT40MINUS|IEEE80211_CHAN_NO_80MHZ| |  | ||||||
| -						IEEE80211_CHAN_NO_160MHZ);
 |  | ||||||
| +						IEEE80211_CHAN_NO_160MHZ |
 |  | ||||||
|  #if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 0)) |  | ||||||
|  						IEEE80211_CHAN_NO_IBSS|IEEE80211_CHAN_PASSIVE_SCAN); |  | ||||||
|  #else |  | ||||||
| -						IEEE80211_CHAN_NO_IR;
 |  | ||||||
| +						IEEE80211_CHAN_NO_IR);
 |  | ||||||
|  #endif |  | ||||||
|  						//ch->flags = IEEE80211_CHAN_DISABLED; |  | ||||||
|  			} |  | ||||||
|  | @ -4,13 +4,14 @@ | ||||||
| #
 | #
 | ||||||
| ################################################################################
 | ################################################################################
 | ||||||
| 
 | 
 | ||||||
| RTL8812AU_OPENIPC_SITE = $(call github,svpcom,rtl8812au,$(RTL8812AU_OPENIPC_VERSION)) | RTL8812AU_OPENIPC_SITE = $(call github,openipc,realtek-wlan,$(RTL8812AU_OPENIPC_VERSION)) | ||||||
| RTL8812AU_OPENIPC_VERSION = f1f447e2e184167b70bed4884534a2c27f4aa16e | RTL8812AU_OPENIPC_VERSION = rtl8812au_fpv | ||||||
| 
 | 
 | ||||||
| RTL8812AU_OPENIPC_LICENSE = GPL-2.0 | RTL8812AU_OPENIPC_LICENSE = GPL-2.0 | ||||||
| RTL8812AU_OPENIPC_LICENSE_FILES = COPYING | RTL8812AU_OPENIPC_LICENSE_FILES = COPYING | ||||||
| 
 | 
 | ||||||
| RTL8812AU_OPENIPC_MODULE_MAKE_OPTS = CONFIG_RTL8812AU=m \
 | RTL8812AU_OPENIPC_MODULE_MAKE_OPTS = \
 | ||||||
|  | 	CONFIG_RTL8812AU=m \
 | ||||||
| 	KVER=$(LINUX_VERSION_PROBED) \
 | 	KVER=$(LINUX_VERSION_PROBED) \
 | ||||||
| 	KSRC=$(LINUX_DIR) | 	KSRC=$(LINUX_DIR) | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -1,3 +1,5 @@ | ||||||
|  | diff --git a/Makefile b/Makefile
 | ||||||
|  | index b6bc69c..dc09f76 100644
 | ||||||
| --- a/Makefile
 | --- a/Makefile
 | ||||||
| +++ b/Makefile
 | +++ b/Makefile
 | ||||||
| @@ -1,6 +1,7 @@
 | @@ -1,6 +1,7 @@
 | ||||||
|  | @ -9,3 +11,27 @@ | ||||||
|  #EXTRA_CFLAGS += -Wall |  #EXTRA_CFLAGS += -Wall | ||||||
|  #EXTRA_CFLAGS += -Wextra |  #EXTRA_CFLAGS += -Wextra | ||||||
|  #EXTRA_CFLAGS += -Werror |  #EXTRA_CFLAGS += -Werror | ||||||
|  | @@ -79,9 +80,9 @@ CONFIG_PCI_HCI = n
 | ||||||
|  |  CONFIG_SDIO_HCI = n | ||||||
|  |  CONFIG_GSPI_HCI = n | ||||||
|  |  ########################## Features ########################### | ||||||
|  | -CONFIG_AP_MODE = n
 | ||||||
|  | +CONFIG_AP_MODE = y
 | ||||||
|  |  CONFIG_P2P = n | ||||||
|  | -CONFIG_MP_INCLUDED = y
 | ||||||
|  | +CONFIG_MP_INCLUDED = n
 | ||||||
|  |  CONFIG_POWER_SAVING = n | ||||||
|  |  CONFIG_IPS_MODE = 0 | ||||||
|  |  CONFIG_LPS_MODE = 0 | ||||||
|  | @@ -103,9 +104,9 @@ CONFIG_RTW_ADAPTIVITY_EN = disable
 | ||||||
|  |  CONFIG_RTW_ADAPTIVITY_MODE = normal | ||||||
|  |  CONFIG_80211D = n | ||||||
|  |  CONFIG_SIGNAL_SCALE_MAPPING = n | ||||||
|  | -CONFIG_80211W = y
 | ||||||
|  | +CONFIG_80211W = n
 | ||||||
|  |  CONFIG_REDUCE_TX_CPU_LOADING = n | ||||||
|  | -CONFIG_BR_EXT = y
 | ||||||
|  | +CONFIG_BR_EXT = n
 | ||||||
|  |  CONFIG_TDLS = n | ||||||
|  |  CONFIG_WIFI_MONITOR = y | ||||||
|  |  CONFIG_MCC_MODE = n | ||||||
|  |  | ||||||
|  | @ -4,14 +4,8 @@ | ||||||
| #
 | #
 | ||||||
| ################################################################################
 | ################################################################################
 | ||||||
| 
 | 
 | ||||||
| ifeq ($(LOCAL_DOWNLOAD),y) | RTL88X2EU_OPENIPC_SITE = $(call github,libc0607,rtl88x2eu-20230815,$(RTL88X2EU_OPENIPC_VERSION)) | ||||||
| RTL88X2EU_OPENIPC_SITE_METHOD = git | RTL88X2EU_OPENIPC_VERSION = HEAD | ||||||
| RTL88X2EU_OPENIPC_SITE = https://github.com/libc0607/rtl88x2eu-20230815 |  | ||||||
| RTL88X2EU_OPENIPC_VERSION = $(shell git ls-remote $(RTL88X2EU_OPENIPC_SITE) HEAD | head -1 | cut -f1) |  | ||||||
| else |  | ||||||
| RTL88X2EU_OPENIPC_SITE = https://github.com/libc0607/rtl88x2eu-20230815/archive |  | ||||||
| RTL88X2EU_OPENIPC_SOURCE = master.tar.gz |  | ||||||
| endif |  | ||||||
| 
 | 
 | ||||||
| RTL88X2EU_OPENIPC_LICENSE = GPL-2.0 | RTL88X2EU_OPENIPC_LICENSE = GPL-2.0 | ||||||
| RTL88X2EU_OPENIPC_LICENSE_FILES = COPYING | RTL88X2EU_OPENIPC_LICENSE_FILES = COPYING | ||||||
|  |  | ||||||
|  | @ -12,8 +12,11 @@ detect_sensor() { | ||||||
| 		echo srcfg 0 1 0 0 0 0 > /dev/srcfg | 		echo srcfg 0 1 0 0 0 0 > /dev/srcfg | ||||||
| 		rmmod sensor_config | 		rmmod sensor_config | ||||||
| 	fi | 	fi | ||||||
|  | 
 | ||||||
| 	SENSOR=$(ipcinfo -s) | 	SENSOR=$(ipcinfo -s) | ||||||
| 	fw_setenv sensor "$SENSOR" | 	if ! grep -q fpv /etc/os-release; then | ||||||
|  | 		fw_setenv sensor "$SENSOR" | ||||||
|  | 	fi | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| set_sensor() { | set_sensor() { | ||||||
|  |  | ||||||
|  | @ -5,7 +5,6 @@ | ||||||
| 
 | 
 | ||||||
| MODULE=/lib/modules/4.9.84/sigmastar | MODULE=/lib/modules/4.9.84/sigmastar | ||||||
| SENSOR=$(fw_printenv -n sensor) | SENSOR=$(fw_printenv -n sensor) | ||||||
| BUILD=$(grep BUILD_OPTION /etc/os-release | cut -d= -f2) |  | ||||||
| 
 | 
 | ||||||
| detect_sensor() { | detect_sensor() { | ||||||
| 	insmod $MODULE/sensor_config.ko | 	insmod $MODULE/sensor_config.ko | ||||||
|  | @ -15,7 +14,7 @@ detect_sensor() { | ||||||
| 	fi | 	fi | ||||||
| 
 | 
 | ||||||
| 	SENSOR=$(ipcinfo -s) | 	SENSOR=$(ipcinfo -s) | ||||||
| 	if [ "$BUILD" != "fpv" ]; then | 	if ! grep -q fpv /etc/os-release; then | ||||||
| 		fw_setenv sensor "$SENSOR" | 		fw_setenv sensor "$SENSOR" | ||||||
| 	fi | 	fi | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -1,4 +0,0 @@ | ||||||
| config BR2_PACKAGE_WIFIBROADCAST_EXT |  | ||||||
| 	bool "wifibroadcast-ext" |  | ||||||
| 	help |  | ||||||
| 	  Additional scripts for wifibroadcast-ng |  | ||||||
|  | @ -1,18 +0,0 @@ | ||||||
| #!/bin/sh |  | ||||||
| 
 |  | ||||||
| case "$1" in |  | ||||||
| 	start) |  | ||||||
| 		echo "Starting temperature check..." |  | ||||||
| 		temp_monitor &>/dev/null & |  | ||||||
| 		;; |  | ||||||
| 
 |  | ||||||
| 	stop) |  | ||||||
| 		echo "Stopping temperature check..." |  | ||||||
| 		killall -q temp_monitor |  | ||||||
| 		;; |  | ||||||
| 
 |  | ||||||
| 	*) |  | ||||||
| 		echo "Usage: $0 {start|stop}" |  | ||||||
| 		exit 1 |  | ||||||
| 		;; |  | ||||||
| esac |  | ||||||
|  | @ -1,41 +0,0 @@ | ||||||
| #!/bin/sh |  | ||||||
| 
 |  | ||||||
| case "$1" in |  | ||||||
|     5) |  | ||||||
|         echo "Channel5 change." |  | ||||||
|         channel5.sh "$2" |  | ||||||
|         ;; |  | ||||||
|     6) |  | ||||||
|         echo "Channel6 change." |  | ||||||
|         channel6.sh "$2" |  | ||||||
|         ;; |  | ||||||
|     7) |  | ||||||
|         echo "Channel7 change." |  | ||||||
|         channel7.sh "$2" |  | ||||||
|         ;; |  | ||||||
|     8) |  | ||||||
|         echo "Channel8 change." |  | ||||||
|         channel8.sh "$2" |  | ||||||
|         ;; |  | ||||||
|     9) |  | ||||||
|         echo "Channel9 change." |  | ||||||
|         channel9.sh "$2" |  | ||||||
|         ;; |  | ||||||
|     10) |  | ||||||
|         echo "Channel10 change." |  | ||||||
|         channel10.sh "$2" |  | ||||||
|         ;; |  | ||||||
|     11) |  | ||||||
|         echo "Channel11 change." |  | ||||||
|         channel11.sh "$2" |  | ||||||
|         ;; |  | ||||||
|     12) |  | ||||||
|         echo "Channel12 change." |  | ||||||
|         channel12.sh "$2" |  | ||||||
|         ;; |  | ||||||
|     *) |  | ||||||
|         echo "No valid channel specified." |  | ||||||
|         ;; |  | ||||||
| esac |  | ||||||
| 
 |  | ||||||
| exit 0 |  | ||||||
|  | @ -1,74 +0,0 @@ | ||||||
| #!/bin/sh |  | ||||||
| # Define temperature thresholds: |  | ||||||
| NORMAL_THRESHOLD=85    # Normal if below 85°C |  | ||||||
| REBOOT_THRESHOLD=100   # Reboot if 100°C or higher |  | ||||||
| 
 |  | ||||||
| # --- Get Adapter info --- |  | ||||||
| for card in $(lsusb | awk '{print $6}' | sort | uniq); do |  | ||||||
|     case "$card" in |  | ||||||
|         "0bda:8812" | "0bda:881a" | "0b05:17d2" | "2357:0101" | "2604:0012") |  | ||||||
|             driver=88XXau |  | ||||||
|             ;; |  | ||||||
|         "0bda:a81a") |  | ||||||
|             driver=8812eu |  | ||||||
|             ;; |  | ||||||
|         "0bda:f72b" | "0bda:b733") |  | ||||||
|             driver=8733bu |  | ||||||
|             ;; |  | ||||||
|     esac |  | ||||||
| done |  | ||||||
| wifi_adapter=""$driver"" |  | ||||||
| echo "Wifi adapter found: $driver" |  | ||||||
| 
 |  | ||||||
| while true; do |  | ||||||
|     # --- Get VTX Temperature --- |  | ||||||
|     # Example output from ipcinfo --temp: "39.00" |  | ||||||
|     vtx_temp=$(ipcinfo --temp) |  | ||||||
|     vtx_int=$(echo "$vtx_temp" | cut -d. -f1) |  | ||||||
| 
 |  | ||||||
|     adapter_temp=0 |  | ||||||
|     if [ "$wifi_adapter" = "8733bu" ]; then |  | ||||||
|         # Expected format: "rf_path: 0, thermal_value: 37, offset: 45, temperature: 20" |  | ||||||
|         adapter_temp=$(grep -o 'temperature: [0-9]*' /proc/net/rtl8733bu/wlan0/thermal_state | awk '{print $2}') |  | ||||||
|     elif [ "$wifi_adapter" = "88XXau" ]; then |  | ||||||
|         echo "Adapter 88XXau temperature extraction not implemented yet." |  | ||||||
|         adapter_temp=0 |  | ||||||
|     elif [ "$wifi_adapter" = "8812eu" ]; then |  | ||||||
|         if [ -f /proc/net/rtl88x2eu/wlan0/thermal_state ]; then |  | ||||||
|             # Extract both temperature values and choose the highest |  | ||||||
|             adapter_temp=$(grep -o 'temperature: [0-9]*' /proc/net/rtl88x2eu/wlan0/thermal_state | awk '{print $2}' | sort -n | tail -1) |  | ||||||
|         else |  | ||||||
|             echo "Thermal state file for 8812eu not found." |  | ||||||
|             adapter_temp=0 |  | ||||||
|         fi |  | ||||||
|     else |  | ||||||
|         echo "Unknown adapter type: $wifi_adapter" |  | ||||||
|     fi |  | ||||||
| 
 |  | ||||||
|     # Fallback if adapter_temp is empty |  | ||||||
|     if [ -z "$adapter_temp" ]; then |  | ||||||
|         adapter_temp=0 |  | ||||||
|     fi |  | ||||||
| 
 |  | ||||||
|     echo "VTX temperature: ${vtx_temp}°C, Adapter temperature: ${adapter_temp}°C" |  | ||||||
| 
 |  | ||||||
|     # --- Determine the Highest Temperature --- |  | ||||||
|     if [ "$adapter_temp" -gt "$vtx_int" ]; then |  | ||||||
|         max_temp=$adapter_temp |  | ||||||
|     else |  | ||||||
|         max_temp=$vtx_int |  | ||||||
|     fi |  | ||||||
| 
 |  | ||||||
|     # --- Determine the current state based on max_temp --- |  | ||||||
|     if [ "$max_temp" -lt "$NORMAL_THRESHOLD" ]; then |  | ||||||
|         echo "All is well... Nothing to do" > /dev/null |  | ||||||
|     elif [ "$max_temp" -lt "$REBOOT_THRESHOLD" ]; then |  | ||||||
|         echo "Warning: High temperature was detected.\nVTX Temp:&T WifiTemp:&W &L30 &G8 &F18" > /tmp/MSPOSD.msg |  | ||||||
|     else |  | ||||||
|         echo "VTX will reboot due to thermal state...\nVTX Temp:&T WifiTemp:&W &L30 &G8 &F18.\nRebooting in 15 seconds..." > /tmp/MSPOSD.msg |  | ||||||
|         sleep 15 |  | ||||||
|         reboot |  | ||||||
|     fi |  | ||||||
| 
 |  | ||||||
|     sleep 5 |  | ||||||
| done |  | ||||||
|  | @ -1,16 +0,0 @@ | ||||||
| ################################################################################
 |  | ||||||
| #
 |  | ||||||
| # wifibroadcast-ext
 |  | ||||||
| #
 |  | ||||||
| ################################################################################
 |  | ||||||
| 
 |  | ||||||
| define WIFIBROADCAST_EXT_INSTALL_TARGET_CMDS |  | ||||||
| 	$(INSTALL) -m 755 -d $(TARGET_DIR)/etc/init.d |  | ||||||
| 	$(INSTALL) -m 755 -t $(TARGET_DIR)/etc/init.d $(WIFIBROADCAST_EXT_PKGDIR)/files/S991temp_monitor |  | ||||||
| 
 |  | ||||||
| 	$(INSTALL) -m 755 -d $(TARGET_DIR)/usr/bin |  | ||||||
| 	$(INSTALL) -m 755 -t $(TARGET_DIR)/usr/bin $(WIFIBROADCAST_EXT_PKGDIR)/files/temp_monitor |  | ||||||
| 	$(INSTALL) -m 755 -t $(TARGET_DIR)/usr/bin $(WIFIBROADCAST_EXT_PKGDIR)/files/channels.sh |  | ||||||
| endef |  | ||||||
| 
 |  | ||||||
| $(eval $(generic-package)) |  | ||||||
|  | @ -24,6 +24,7 @@ load_config() { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| load_modules() { | load_modules() { | ||||||
|  | 	adapter_id="" | ||||||
| 	for card in $(lsusb | awk '{print $6}' | uniq); do | 	for card in $(lsusb | awk '{print $6}' | uniq); do | ||||||
| 		case "$card" in | 		case "$card" in | ||||||
| 			"0bda:8812" | "0bda:881a" | "0b05:17d2" | "2357:0101" | "2604:0012") | 			"0bda:8812" | "0bda:881a" | "0b05:17d2" | "2357:0101" | "2604:0012") | ||||||
|  | @ -32,10 +33,12 @@ load_modules() { | ||||||
| 
 | 
 | ||||||
| 			"0bda:a81a") | 			"0bda:a81a") | ||||||
| 				driver=8812eu | 				driver=8812eu | ||||||
|  | 				adapter_id="bl-m8812eu2" | ||||||
| 				;; | 				;; | ||||||
| 
 | 
 | ||||||
| 			"0bda:f72b" | "0bda:b733") | 			"0bda:f72b" | "0bda:b733") | ||||||
| 				driver=8733bu | 				driver=8733bu | ||||||
|  | 				adapter_id="bl-m8731bu4" | ||||||
| 				;; | 				;; | ||||||
| 		esac | 		esac | ||||||
| 	done | 	done | ||||||
|  | @ -61,6 +64,11 @@ load_modules() { | ||||||
| 		echo_log "Wireless driver not found!" | 		echo_log "Wireless driver not found!" | ||||||
| 		exit 1 | 		exit 1 | ||||||
| 	fi | 	fi | ||||||
|  | 
 | ||||||
|  | 	# Set .wireless.wlan_adapter in /etc/wfb.yaml if adapter_id is set | ||||||
|  | 	if [ -n "$adapter_id" ]; then | ||||||
|  | 		yaml-cli-multi -i /etc/wfb.yaml -s .wireless.wlan_adapter "$adapter_id" | ||||||
|  | 	fi | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| load_mlink() { | load_mlink() { | ||||||
|  | @ -121,21 +129,64 @@ start_telemetry() { | ||||||
| 		fi | 		fi | ||||||
| 		msposd -b 115200 -c 8 -r "$osd_fps" -m /dev/"$serial" \ | 		msposd -b 115200 -c 8 -r "$osd_fps" -m /dev/"$serial" \ | ||||||
| 			-o 127.0.0.1:"$port_tx" -z "$size" > /dev/null & | 			-o 127.0.0.1:"$port_tx" -z "$size" > /dev/null & | ||||||
|  | 
 | ||||||
|  | 		sleep 5 | ||||||
|  | 		echo "&L70&F28&G8CPU:&C TEMP:&T\n&B" >/tmp/MSPOSD.msg | ||||||
| 	fi | 	fi | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| video_settings() { | video_settings() { | ||||||
|  | 	for card in $(lsusb | awk '{print $6}' | uniq); do | ||||||
|  | 		case "$card" in | ||||||
|  | 			"0bda:8812" | "0bda:881a" | "0b05:17d2" | "2357:0101" | "2604:0012") | ||||||
|  | 				driver=88XXau | ||||||
|  | 				wifibroadcast cli -s .wireless.txpower 20 | ||||||
|  | 				wifibroadcast cli -s .wireless.wlan_adapter bl-r8812af1 | ||||||
|  | 				wifibroadcast cli -s .broadcast.stbc 1 | ||||||
|  | 				wifibroadcast cli -s .broadcast.ldpc 1 | ||||||
|  | 				;; | ||||||
|  | 
 | ||||||
|  | 			"0bda:a81a") | ||||||
|  | 				driver=8812eu | ||||||
|  | 				wifibroadcast cli -s .wireless.txpower 40 | ||||||
|  | 				wifibroadcast cli -s .wireless.wlan_adapter bl-m8812eu2 | ||||||
|  | 				wifibroadcast cli -s .broadcast.stbc 1 | ||||||
|  | 				wifibroadcast cli -s .broadcast.ldpc 1 | ||||||
|  | 				;; | ||||||
|  | 
 | ||||||
|  | 			"0bda:f72b" | "0bda:b733") | ||||||
|  | 				driver=8733bu | ||||||
|  | 				wifibroadcast cli -s .wireless.txpower 20 | ||||||
|  | 				wifibroadcast cli -s .wireless.wlan_adapter bl-m8731bu4 | ||||||
|  | 				wifibroadcast cli -s .broadcast.stbc 0 | ||||||
|  | 				wifibroadcast cli -s .broadcast.ldpc 0 | ||||||
|  | 				;; | ||||||
|  | 		esac | ||||||
|  | 	done | ||||||
|  | 
 | ||||||
| 	sensor=$(ipcinfo -s) | 	sensor=$(ipcinfo -s) | ||||||
| 	cli -s .isp.sensorConfig /etc/sensors/"$sensor"_fpv.bin | 	cli -s .isp.sensorConfig /etc/sensors/"$sensor"_fpv.bin | ||||||
| 	cli -s .isp.exposure 5 | 	cli -s .isp.exposure 16 | ||||||
| 	cli -s .video0.fps 60 | 	cli -s .video0.fps 60 | ||||||
| 	cli -s .video0.bitrate 8192 | 	cli -s .video0.bitrate 8000 | ||||||
| 	cli -s .video0.codec h265 | 	cli -s .video0.codec h265 | ||||||
| 	cli -s .video0.rcMode cbr | 	cli -s .video0.rcMode cbr | ||||||
| 	cli -s .outgoing.enabled true | 	cli -s .outgoing.enabled true | ||||||
| 	cli -s .outgoing.wfb true | 	cli -s .outgoing.wfb true | ||||||
|  | 	cli -s .records.split 1 | ||||||
|  | 	cli -s .records.notime true | ||||||
| 	cli -s .fpv.enabled true | 	cli -s .fpv.enabled true | ||||||
| 	cli -s .fpv.noiseLevel 1 | 	cli -s .fpv.noiseLevel 0 | ||||||
|  | 
 | ||||||
|  | 	wifibroadcast cli -s .wireless.mlink 3994 | ||||||
|  | 	wifibroadcast cli -s .wireless.link_control alink | ||||||
|  | 	sed -i '/alink_drone &/d' /etc/rc.local && sed -i -e '$i alink_drone &' /etc/rc.local | ||||||
|  | 
 | ||||||
|  | 	if [ "$sensor" = "imx335" ]; then | ||||||
|  | 		cli -s .video0.size 1920x1440 | ||||||
|  | 	else | ||||||
|  | 		cli -s .video0.size 1920x1080 | ||||||
|  | 	fi | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| start() { | start() { | ||||||
|  |  | ||||||
|  | @ -4,7 +4,7 @@ | ||||||
| #
 | #
 | ||||||
| ################################################################################
 | ################################################################################
 | ||||||
| 
 | 
 | ||||||
| WIFIBROADCAST_NG_VERSION = 3648da920699c75ae349a2627b8e27fa680be941 | WIFIBROADCAST_NG_VERSION = 7ffc689e3f1194dca79dca4b5b56ee560c0cc3be | ||||||
| WIFIBROADCAST_NG_SITE = $(call github,svpcom,wfb-ng,$(WIFIBROADCAST_NG_VERSION)) | WIFIBROADCAST_NG_SITE = $(call github,svpcom,wfb-ng,$(WIFIBROADCAST_NG_VERSION)) | ||||||
| WIFIBROADCAST_NG_LICENSE = GPL-3.0 | WIFIBROADCAST_NG_LICENSE = GPL-3.0 | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -0,0 +1,5 @@ | ||||||
|  | config BR2_PACKAGE_WQ9001 | ||||||
|  | 	bool "wq9001" | ||||||
|  | 	depends on BR2_LINUX_KERNEL | ||||||
|  | 	help | ||||||
|  | 	  Wireless driver WQ9001 | ||||||
|  | @ -0,0 +1,20 @@ | ||||||
|  | ################################################################################
 | ||||||
|  | #
 | ||||||
|  | # wq9001
 | ||||||
|  | #
 | ||||||
|  | ################################################################################
 | ||||||
|  | 
 | ||||||
|  | WQ9001_SITE = $(call github,gtxaspec,wq9001-wifi,$(WQ9001_VERSION)) | ||||||
|  | WQ9001_VERSION = HEAD | ||||||
|  | WQ9001_LICENSE = GPL-2.0 | ||||||
|  | 
 | ||||||
|  | define WQ9001_INSTALL_TARGET_CMDS | ||||||
|  | 	$(INSTALL) -m 755 -d $(TARGET_DIR)/usr/share/wifi | ||||||
|  | 	$(INSTALL) -m 644 -t $(TARGET_DIR)/usr/share/wifi $(@D)/cal/WQ9001_WiFi_Mapfile.dat | ||||||
|  | endef | ||||||
|  | 
 | ||||||
|  | WQ9001_MODULE_MAKE_OPTS = \
 | ||||||
|  | 	KSRC=$(LINUX_DIR) | ||||||
|  | 
 | ||||||
|  | $(eval $(kernel-module)) | ||||||
|  | $(eval $(generic-package)) | ||||||
|  | @ -0,0 +1,5 @@ | ||||||
|  | config BR2_PACKAGE_YAML_CLI_MULTI | ||||||
|  | 	bool "Yaml parser" | ||||||
|  | 	help | ||||||
|  | 	  Parses yaml files. | ||||||
|  | 	  https://github.com/vertexodessa/yaml-cli-multi | ||||||
|  | @ -0,0 +1,31 @@ | ||||||
|  | ################################################################################
 | ||||||
|  | #
 | ||||||
|  | # Adaptive Link
 | ||||||
|  | #
 | ||||||
|  | ################################################################################
 | ||||||
|  | 
 | ||||||
|  | YAML_CLI_MULTI_SITE = $(call github,vertexodessa,yaml-cli-multi,$(YAML_CLI_MULTI_VERSION)) | ||||||
|  | YAML_CLI_MULTI_VERSION = 'a633865b5202dcd1f4f548e8486d3a334c79c03c' | ||||||
|  | 
 | ||||||
|  | YAML_CLI_MULTI_LICENSE = GPL-3.0 | ||||||
|  | YAML_CLI_MULTI_LICENSE_FILES = LICENSE | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),y) | ||||||
|  | 	YAML_CLI_MULTI_OPTIONS = "-rdynamic -s -Os -lm" | ||||||
|  | else | ||||||
|  | 	YAML_CLI_MULTI_OPTIONS = "-rdynamic -s -Os" | ||||||
|  | endif | ||||||
|  | 
 | ||||||
|  | define YAML_CLI_MULTI_BUILD_CMDS | ||||||
|  | 	@echo "Building yaml-cli-multi" | ||||||
|  | 	$(MAKE) CC=$(TARGET_CC) OPT=$(YAML_CLI_MULTI_OPTIONS) -C $(@D) | ||||||
|  | endef | ||||||
|  | 
 | ||||||
|  | define YAML_CLI_MULTI_INSTALL_TARGET_CMDS | ||||||
|  | 	$(INSTALL) -m 755 -d $(TARGET_DIR)/usr/bin | ||||||
|  | 
 | ||||||
|  | 	$(INSTALL) -m 755 -t $(TARGET_DIR)/usr/bin $(@D)/yaml-cli-multi | ||||||
|  | endef | ||||||
|  | 
 | ||||||
|  | $(eval $(generic-package)) | ||||||
		Loading…
	
		Reference in New Issue