add gk7102c_a boards for devs

This commit is contained in:
cronyx
2024-01-04 22:17:53 +03:00
parent 053ddbe572
commit 294262a675
61 changed files with 2253 additions and 57 deletions

View File

@@ -1,52 +0,0 @@
#!/bin/sh
kernel_ver=$(uname -r)
cd /lib/modules/$kernel_ver/goke
USE_OLD_SENSOR_DRIVER=NO #YES or NO, default no use.
USE_LOAD_HAL_DRIVER=YES #YES or NO, default no use.
if [ $USE_LOAD_HAL_DRIVER = "YES" ];then
insmod hal.ko
fi
insmod hw_crypto.ko
insmod media.ko
insmod audio.ko
if [ $USE_OLD_SENSOR_DRIVER = "YES" ]; then
if [ -e ${1}.ko ];then
insmod ${1}.ko
else
echo "${1}.ko is no exist."
exit 0
fi
else
insmod sensor.ko
# Use sensor.ko
rm /tmp/sensor_hw.bin -f
rm /tmp/sensor_ex.ko -f
if [ $# -ne 1 ] ;then
sensordetect
else
if [ -e /etc/sensors/$1"_hw.bin" ];then
if [ -e /tmp/sensor_hw.bin ]; then
rm /tmp/sensor_hw.bin -f
fi
ln -s /etc/sensors/$1"_hw.bin" /tmp/sensor_hw.bin
else
echo "\"/etc/sensors/${1}_hw.bin\" is no exist."
exit 0
fi
if [ -e $1"_ex.ko" ];then
if [ -e /tmp/sensor_ex.ko ]; then
rm /tmp/sensor_ex.ko -f
fi
ln -s $1"_ex.ko" /tmp/sensor_ex.ko
else
echo "\"${1}_ex.ko\" is no exist."
fi
fi
if [ -e /tmp/sensor_ex.ko ];then
insmod /tmp/sensor_ex.ko
fi
fi

View File

@@ -0,0 +1,125 @@
# Architecture
BR2_arm=y
BR2_arm1176jzf_s=y
BR2_ARM_EABI=y
BR2_KERNEL_HEADERS_VERSION=y
BR2_DEFAULT_KERNEL_VERSION="3.4.43"
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_4=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_TOOLCHAIN_USES_GLIBC=y
BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
BR2_TOOLCHAIN_BUILDROOT_LIBC="glibc"
# BR2_TOOLCHAIN_USES_MUSL is not set
# BR2_TOOLCHAIN_BUILDROOT_MUSL is not set
# 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_CUSTOM_TARBALL_LOCATION="https://github.com/cronyx/gk710x-linux/archive/main.tar.gz"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(EXTERNAL_VENDOR)/board/gk710x/kernel/gk7102c.generic.config"
BR2_LINUX_KERNEL_UIMAGE=y
BR2_LINUX_KERNEL_XZ=y
# OpenIPC
BR2_OPENIPC_SOC_VENDOR="goke"
BR2_OPENIPC_SOC_MODEL="gk7102ca"
BR2_OPENIPC_SOC_FAMILY="gk710x"
BR2_OPENIPC_FLAVOR="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-gk7102c"
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_GOKE_OSDRV_GK710X=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
# 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_RTL8189ES_OPENIPC=y
# WIREGUARD
# BR2_PACKAGE_WIREGUARD_LINUX_COMPAT is not set
# BR2_PACKAGE_WIREGUARD_TOOLS is not set
# DEBUG
# 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=n
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX="arm-openipc-linux-gnueabi"
# BR2_TOOLCHAIN_EXTERNAL_CUSTOM_MUSL=y
# BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX="arm-openipc-linux-musleabi"
BR2_TOOLCHAIN_EXTERNAL_CXX=y
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_4=y
BR2_TOOLCHAIN_EXTERNAL_URL="https://github.com/openipc/firmware/releases/download/$(OPENIPC_TOOLCHAIN).tgz"

View File

@@ -0,0 +1,8 @@
#!/bin/sh
mknod /dev/gk_video -m 666 c 248 0
mknod /dev/gk_log -m 666 c 248 249
mknod /dev/gk_fw -m 666 c 248 1
mknod /dev/debug -m 666 c 248 248
mknod /dev/ai_dev -m 666 c 245 0
mknod /dev/ao_dev -m 666 c 245 1

View File

@@ -0,0 +1,34 @@
#!/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/gk7102ca_lite-umea-qc01x-nor.tgz'
#
#
# Set custom majestic settings
#
#cli -s .system.webAdmin disabled
#cli -s .system.staticDir /var/www/majestic
#cli -s .nightMode.enabled true
#cli -s .nightMode.irSensorPin 23
#cli -s .nightMode.irCutPin1 17
#cli -s .nightMode.irCutPin2 14
#cli -s .nightMode.backlightPin 24
#cli -s .audio.speakerPin 12
#cli -s .video0.codec h264
#
#
# Set wlan device and credentials if need
#
#fw_setenv wlandev rda-generic
#fw_setenv wlanssid Router
#fw_setenv wlanpass 12345678
#
#
# reset gpio - 16
# wifi gpio - 4
#
exit 0

View File

@@ -0,0 +1,32 @@
#!/bin/sh
kernel_ver=$(uname -r)
cd /lib/modules/$kernel_ver/goke
USE_OLD_SENSOR_DRIVER=NO #YES or NO, default no use.
USE_LOAD_HAL_DRIVER=YES #YES or NO, default no use.
if [ $USE_LOAD_HAL_DRIVER = "YES" ];then
insmod hal.ko
fi
insmod hw_crypto.ko
insmod media.ko
insmod audio.ko
if [ $USE_OLD_SENSOR_DRIVER = "YES" ]; then
if [ -e ${1}.ko ];then
insmod ${1}.ko
else
echo "${1}.ko is no exist."
exit 0
fi
else
insmod sensor.ko
sensordetect
if [ -e /tmp/sensor_ex.ko ]; then
insmod /tmp/sensor_ex.ko
fi
fi

View File

@@ -15,21 +15,26 @@ else ifeq ($(OPENIPC_SOC_MODEL),gk7102s)
GOKE_OSDRV_GK710X_FIRMWARE = gk_fw_710xs.bin
else ifeq ($(OPENIPC_SOC_MODEL),gk7102c)
GOKE_OSDRV_GK710X_FIRMWARE = gk_fw_7102c.bin
else ifeq ($(OPENIPC_SOC_MODEL),gk7102c_a)
else ifeq ($(OPENIPC_SOC_MODEL),gk7102ca)
GOKE_OSDRV_GK710X_FIRMWARE = gk_fw_7102c_a.bin
endif
define GOKE_OSDRV_GK710X_INSTALL_TARGET_CMDS
$(INSTALL) -m 755 -d $(TARGET_DIR)/etc/sensors
$(INSTALL) -m 644 -t $(TARGET_DIR)/etc/sensors $(GOKE_OSDRV_GK710X_PKGDIR)/files/sensor/config/*.bin
# $(INSTALL) -m 644 -t $(TARGET_DIR)/etc/sensors $(GOKE_OSDRV_GK710X_PKGDIR)/files/sensor/config/*.bin
$(INSTALL) -m 644 -t $(TARGET_DIR)/etc/sensors $(GOKE_OSDRV_GK710X_PKGDIR)/files/sensor/config/color_matrix.bin
$(INSTALL) -m 644 -t $(TARGET_DIR)/etc/sensors $(GOKE_OSDRV_GK710X_PKGDIR)/files/sensor/config/color_reg.bin
$(INSTALL) -m 644 -t $(TARGET_DIR)/etc/sensors $(GOKE_OSDRV_GK710X_PKGDIR)/files/sensor/config/lens_shading.bin
$(INSTALL) -m 644 -t $(TARGET_DIR)/etc/sensors $(GOKE_OSDRV_GK710X_PKGDIR)/files/sensor/config/mis2003.bin
$(INSTALL) -m 644 -t $(TARGET_DIR)/etc/sensors $(GOKE_OSDRV_GK710X_PKGDIR)/files/sensor/config/mis2003_hw.bin
$(INSTALL) -m 644 -t $(TARGET_DIR)/etc/sensors $(GOKE_OSDRV_GK710X_PKGDIR)/files/sensor/config/sensor_detect.bin
$(INSTALL) -m 755 -d $(TARGET_DIR)/lib/firmware
# $(INSTALL) -m 644 -t $(TARGET_DIR)/lib/firmware $(GOKE_OSDRV_GK710X_PKGDIR)/files/sensor/fw/$(GOKE_OSDRV_GK710X_FIRMWARE)
cp $(GOKE_OSDRV_GK710X_PKGDIR)/files/sensor/fw/$(GOKE_OSDRV_GK710X_FIRMWARE) $(TARGET_DIR)/lib/firmware/gk_fw.bin
$(INSTALL) -m 755 -d $(TARGET_DIR)/lib/modules/3.4.43-Goke/goke
$(INSTALL) -m 644 -t $(TARGET_DIR)/lib/modules/3.4.43-Goke/goke $(GOKE_OSDRV_GK710X_PKGDIR)/files/kmod/*.ko
$(INSTALL) -m 644 -t $(TARGET_DIR)/lib/modules/3.4.43-Goke/goke $(GOKE_OSDRV_GK710X_PKGDIR)/files/sensor/*.ko
# $(INSTALL) -m 644 -t $(TARGET_DIR)/lib/modules/3.4.43-Goke/goke $(GOKE_OSDRV_GK710X_PKGDIR)/files/sensor/*.ko
$(INSTALL) -m 755 -d $(TARGET_DIR)/usr/bin
$(INSTALL) -m 755 -t $(TARGET_DIR)/usr/bin $(GOKE_OSDRV_GK710X_PKGDIR)/files/script/load*

View File

@@ -0,0 +1,32 @@
etc/sensors/ar0130.bin
etc/sensors/ar0237.bin
etc/sensors/bg0701.bin
etc/sensors/gc1024.bin
etc/sensors/gc1034.bin
etc/sensors/gc1034_hw.bin
etc/sensors/gc2053.bin
etc/sensors/gc2053_hw.bin
etc/sensors/imx122.bin
etc/sensors/imx291.bin
etc/sensors/imx323.bin
etc/sensors/jxf22.bin
etc/sensors/jxf37.bin
etc/sensors/jxf37_hw.bin
etc/sensors/jxh42.bin
etc/sensors/jxh61.bin
etc/sensors/jxh62.bin
etc/sensors/jxh62_hw.bin
etc/sensors/mis1002.bin
etc/sensors/ov2710.bin
etc/sensors/ov9732.bin
etc/sensors/ov9732_hw.bin
etc/sensors/ov9750.bin
etc/sensors/sc1035.bin
etc/sensors/sc1045.bin
etc/sensors/sc1135.bin
etc/sensors/sc1145.bin
etc/sensors/sc2035.bin
etc/sensors/sc2045.bin
etc/sensors/sc2135.bin
lib/modules/3.4.43-Goke/goke/gc1034_ex.ko
lib/modules/3.4.43-Goke/goke/sc1135_ex.ko

View File

@@ -31,7 +31,7 @@ BR2_LINUX_KERNEL_XZ=y
# OpenIPC
BR2_OPENIPC_SOC_VENDOR="goke"
BR2_OPENIPC_SOC_MODEL="gk7102c"
BR2_OPENIPC_SOC_MODEL="gk7102ca"
BR2_OPENIPC_SOC_FAMILY="gk710x"
BR2_OPENIPC_FLAVOR="lite"
BR2_OPENIPC_FLASH_SIZE="8"

View File

@@ -0,0 +1,3 @@
#
Experimental system for building OpenIPC firmware for known devices
#

View File

@@ -0,0 +1,8 @@
#!/bin/sh
mknod /dev/gk_video -m 666 c 248 0
mknod /dev/gk_log -m 666 c 248 249
mknod /dev/gk_fw -m 666 c 248 1
mknod /dev/debug -m 666 c 248 248
mknod /dev/ai_dev -m 666 c 245 0
mknod /dev/ao_dev -m 666 c 245 1

View File

@@ -0,0 +1,34 @@
#!/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/gk7102ca_lite-vstarcam-g8896wip-nor.tgz'
#
#
# Set custom majestic settings
#
#cli -s .system.webAdmin disabled
#cli -s .system.staticDir /var/www/majestic
#cli -s .nightMode.enabled true
#cli -s .nightMode.irSensorPin ??
#cli -s .nightMode.irCutPin1 ??
#cli -s .nightMode.irCutPin2 ??
#cli -s .nightMode.backlightPin ??
#cli -s .audio.speakerPin ??
#cli -s .video0.codec h264
#
#
# Set wlan device and credentials if need
#
#fw_setenv wlandev rtl8189es-generic
#fw_setenv wlanssid Router
#fw_setenv wlanpass 12345678
#
#
# reset gpio - ?
# wifi gpio - ?
#
exit 0

View File

@@ -0,0 +1,32 @@
#!/bin/sh
kernel_ver=$(uname -r)
cd /lib/modules/$kernel_ver/goke
USE_OLD_SENSOR_DRIVER=NO #YES or NO, default no use.
USE_LOAD_HAL_DRIVER=YES #YES or NO, default no use.
if [ $USE_LOAD_HAL_DRIVER = "YES" ];then
insmod hal.ko
fi
insmod hw_crypto.ko
insmod media.ko
insmod audio.ko
if [ $USE_OLD_SENSOR_DRIVER = "YES" ]; then
if [ -e ${1}.ko ];then
insmod ${1}.ko
else
echo "${1}.ko is no exist."
exit 0
fi
else
insmod sensor.ko
sensordetect
if [ -e /tmp/sensor_ex.ko ]; then
insmod /tmp/sensor_ex.ko
fi
fi

View File

@@ -0,0 +1,47 @@
################################################################################
#
# goke-osdrv-gk710x
#
################################################################################
GOKE_OSDRV_GK710X_VERSION =
GOKE_OSDRV_GK710X_SITE =
GOKE_OSDRV_GK710X_LICENSE = MIT
GOKE_OSDRV_GK710X_LICENSE_FILES = LICENSE
ifeq ($(OPENIPC_SOC_MODEL),gk7102)
GOKE_OSDRV_GK710X_FIRMWARE = gk_fw_710x.bin
else ifeq ($(OPENIPC_SOC_MODEL),gk7102s)
GOKE_OSDRV_GK710X_FIRMWARE = gk_fw_710xs.bin
else ifeq ($(OPENIPC_SOC_MODEL),gk7102c)
GOKE_OSDRV_GK710X_FIRMWARE = gk_fw_7102c.bin
else ifeq ($(OPENIPC_SOC_MODEL),gk7102ca)
GOKE_OSDRV_GK710X_FIRMWARE = gk_fw_7102c_a.bin
endif
define GOKE_OSDRV_GK710X_INSTALL_TARGET_CMDS
$(INSTALL) -m 755 -d $(TARGET_DIR)/etc/sensors
# $(INSTALL) -m 644 -t $(TARGET_DIR)/etc/sensors $(GOKE_OSDRV_GK710X_PKGDIR)/files/sensor/config/*.bin
$(INSTALL) -m 644 -t $(TARGET_DIR)/etc/sensors $(GOKE_OSDRV_GK710X_PKGDIR)/files/sensor/config/color_matrix.bin
$(INSTALL) -m 644 -t $(TARGET_DIR)/etc/sensors $(GOKE_OSDRV_GK710X_PKGDIR)/files/sensor/config/color_reg.bin
$(INSTALL) -m 644 -t $(TARGET_DIR)/etc/sensors $(GOKE_OSDRV_GK710X_PKGDIR)/files/sensor/config/lens_shading.bin
$(INSTALL) -m 644 -t $(TARGET_DIR)/etc/sensors $(GOKE_OSDRV_GK710X_PKGDIR)/files/sensor/config/gc2033.bin
$(INSTALL) -m 644 -t $(TARGET_DIR)/etc/sensors $(GOKE_OSDRV_GK710X_PKGDIR)/files/sensor/config/gc2033_hw.bin
$(INSTALL) -m 644 -t $(TARGET_DIR)/etc/sensors $(GOKE_OSDRV_GK710X_PKGDIR)/files/sensor/config/sensor_detect.bin
$(INSTALL) -m 755 -d $(TARGET_DIR)/lib/firmware
cp $(GOKE_OSDRV_GK710X_PKGDIR)/files/sensor/fw/$(GOKE_OSDRV_GK710X_FIRMWARE) $(TARGET_DIR)/lib/firmware/gk_fw.bin
$(INSTALL) -m 755 -d $(TARGET_DIR)/lib/modules/3.4.43-Goke/goke
$(INSTALL) -m 644 -t $(TARGET_DIR)/lib/modules/3.4.43-Goke/goke $(GOKE_OSDRV_GK710X_PKGDIR)/files/kmod/*.ko
$(INSTALL) -m 644 -t $(TARGET_DIR)/lib/modules/3.4.43-Goke/goke $(GOKE_OSDRV_GK710X_PKGDIR)/files/sensor/gc2033_ex.ko
# $(INSTALL) -m 644 -t $(TARGET_DIR)/lib/modules/3.4.43-Goke/goke $(GOKE_OSDRV_GK710X_PKGDIR)/files/sensor/*.ko
$(INSTALL) -m 755 -d $(TARGET_DIR)/usr/bin
$(INSTALL) -m 755 -t $(TARGET_DIR)/usr/bin $(GOKE_OSDRV_GK710X_PKGDIR)/files/script/load*
$(INSTALL) -m 755 -d $(TARGET_DIR)/usr/lib
$(INSTALL) -m 644 -t $(TARGET_DIR)/usr/lib/ $(GOKE_OSDRV_GK710X_PKGDIR)/files/lib/*.so
endef
$(eval $(generic-package))