Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ VStarcam CS55 T31N GC2053 RTL8188FU_USB NOR_16M in pr
VStarcam C8622 T23N SC2336P AIC8800DL_? NOR_8M **INIT** - in progress
XiongMai 85H50AI HI3516EV300 IMX335 - NOR_8M testing, motorized zoom+focus (pelco-xm)
XiongMai HI3516D_N81820 HI3516DV100 IMX291 - NOR_16M testing, motorized zoom+focus (ms41908 SPI)
XiongMai XM72050200 GK7201V200 SC2336 RTL8733BU_USB NOR_16M done
VStarcam C8892WIP HI3518EV200 AR0237 MT7601U_USB NOR_16M done
VStarcam C8896WIP GK7102C_A GC2033 RTL8189ES_SDIO NOR_8M wip
Wansview Q5 1080p T21Z OV2735B RTL8188FU_USB NOR_16M in progress
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Architecture
BR2_arm=y
Comment thread
qodo-free-for-open-source-projects[bot] marked this conversation as resolved.
BR2_cortex_a7=y
BR2_ARM_EABI=y
BR2_ARM_FPU_NEON_VFPV4=y
BR2_ARM_INSTRUCTIONS_THUMB2=y

# Toolchain
# BR2_GCC_VERSION_11_X=y
# BR2_GCC_VERSION="11.4.0"
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
BR2_TOOLCHAIN_EXTERNAL_URL="https://github.com/openipc/firmware/releases/download/$(OPENIPC_TOOLCHAIN).tgz"
BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX="arm-openipc-linux-musleabi"
BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_9=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/$(OPENIPC_KERNEL).tar.gz"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(EXTERNAL_VENDOR)/board/$(OPENIPC_SOC_FAMILY)/gk7201v200.generic.config"
BR2_LINUX_KERNEL_UIMAGE=y
BR2_LINUX_KERNEL_XZ=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="goke"
BR2_OPENIPC_SOC_MODEL="gk7201v200"
BR2_OPENIPC_SOC_FAMILY="gk7205v500"
BR2_OPENIPC_VARIANT="lite"
BR2_OPENIPC_FLASH_SIZE="16"

# Packages
BR2_PACKAGE_DROPBEAR_OPENIPC=y
BR2_PACKAGE_GOKE_OSDRV_GK7205V500=y
BR2_PACKAGE_HISILICON_OPENSDK=y
BR2_PACKAGE_IPCTOOL=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_LINUX_FIRMWARE_OPENIPC is not set
BR2_PACKAGE_RTL8733BU_OPENIPC=y
BR2_PACKAGE_MAJESTIC_FONTS=y
BR2_PACKAGE_MAJESTIC_WEBUI=y
BR2_PACKAGE_MAJESTIC=y
BR2_PACKAGE_MBEDTLS_OPENIPC=y
BR2_PACKAGE_MOTORS=y
BR2_PACKAGE_OPUS_OPENIPC=y
BR2_PACKAGE_OPUS_OPENIPC_FIXED_POINT=y
BR2_PACKAGE_VTUND_OPENIPC=y
BR2_PACKAGE_YAML_CLI=y
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#!/bin/sh
# RTL8733BU stability tuning for mains-powered OpenIPC cameras.

WIFI_IF=wlan0
RTW=/proc/net/rtl8733bu/$WIFI_IF
TAG=wifi-tune

wait_associated() {
i=0
while [ "$i" -lt 30 ]; do
if command -v wpa_cli >/dev/null 2>&1; then
[ "$(wpa_cli -i "$WIFI_IF" status 2>/dev/null | sed -n 's/^wpa_state=//p')" = COMPLETED ] && return 0
elif command -v iwconfig >/dev/null 2>&1 && \
iwconfig "$WIFI_IF" 2>/dev/null | grep -qv 'Access Point: Not-Associated'; then
return 0
fi
i=$((i+1)); sleep 1
done
return 1
}

tune() {
i=0
while [ ! -e "/sys/class/net/$WIFI_IF" ] && [ "$i" -lt 30 ]; do
i=$((i+1)); sleep 1
done
[ -e "/sys/class/net/$WIFI_IF" ] || { logger -t "$TAG" "$WIFI_IF not found"; return; }

# Disable Turbo-EDCA re-tuning
[ -e "$RTW/dis_turboedca" ] && echo 1 > "$RTW/dis_turboedca" 2>/dev/null

# Disable interface power management after association
wait_associated
command -v iwconfig >/dev/null 2>&1 && iwconfig "$WIFI_IF" power off >/dev/null 2>&1

ps=$(iwconfig "$WIFI_IF" 2>/dev/null | sed -n 's/.*Power Management:\([A-Za-z]*\).*/\1/p')
edca=$(sed -n '1p' "$RTW/dis_turboedca" 2>/dev/null)
logger -t "$TAG" "RTL8733BU tuned: WEXT=${ps:-?}; ${edca:-Turbo-EDCA ?}"
}

case "$1" in
start|restart|reload) ( tune ) & ;;
stop) : ;;
*) echo "Usage: $0 {start|stop|restart|reload}"; exit 1 ;;
esac

exit 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh

set_gpio() {
[ "$2" -eq 1 ] && gpio set $1 || gpio clear $1
sleep 1
}

if [ "$1" = "rtl8733bu-gk7201v200-xm" ]; then
set_gpio 9 0
modprobe 8733bu rtw_power_mgnt=0 rtw_ips_mode=0 rtw_enusbss=0
exit 0
fi

exit 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/sh

# Set custom upgrade url
fw_setenv upgrade 'https://github.com/OpenIPC/builder/releases/download/latest/gk7201v200_lite_xm-7205-rtl8733bu-16mb-nor.tgz'

# Set memory allocation (64M physical RAM, 32M for Linux, 32M for MMZ/ISP)
fw_setenv totalmem 64M
fw_setenv osmem 32M

# Set sensor boot variable and Majestic ISP profile
fw_setenv sensor sc2336
cli -s .isp.sensorConfig /etc/sensors/sc2336_i2c_1080p.ini

# Wireless driver configuration (configured via Web UI / CLI by the user)
fw_setenv wlandev rtl8733bu-gk7201v200-xm

# Set custom majestic settings
cli -s .nightMode.irCut off
cli -s .audio.enabled true
cli -s .audio.volume 50
cli -s .audio.srate 32000
cli -s .audio.codec aac
cli -s .onvif.enabled true

exit 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/etc/sensors/4l_sc223a_i2c_1080p.ini
Comment thread
oskarirauta marked this conversation as resolved.
/etc/sensors/5M_imx335.ini
/etc/sensors/bt656_720p.ini
/etc/sensors/gc1054_i2c_720p.ini
/etc/sensors/gc2053_i2c_1080p.ini
/etc/sensors/gc4023_i2c_4M.ini
/etc/sensors/gc4653_i2c_4M.ini
/etc/sensors/gc5603_i2c_5M.ini
/etc/sensors/imx307_i2c_2l_1080p.ini
/etc/sensors/imx335_i2c_4M.ini
/etc/sensors/jxf23_i2c_1080p.ini
/etc/sensors/jxf23_i2c_dc_1080p.ini
/etc/sensors/mis2008_i2c_1080p.ini
/etc/sensors/os02g10_i2c_1080p.ini
/etc/sensors/sc200ai_i2c_1080p.ini
/etc/sensors/sc2232h_i2c_1080p.ini
/etc/sensors/sc2239_i2c_1080p.ini
/etc/sensors/sc223a_i2c_1080p.ini
/etc/sensors/sc2335_i2c_1080p.ini
/etc/sensors/sc401ai_i2c_4M.ini
/etc/sensors/smtsec_imx307_i2c_4l_1080p.ini
#
/usr/lib/sensors/libsns_mis2008.so
/usr/lib/sensors/libsns_sc223a.so
/usr/lib/sensors/libsns_sc401ai.so
#
/lib/modules/4.9.37/kernel/drivers/scsi/scsi_mod.ko
/lib/modules/4.9.37/kernel/drivers/scsi/scsi_transport_fc.ko
/lib/modules/4.9.37/kernel/drivers/scsi/sd_mod.ko
Loading