mirror of
https://github.com/nikdoof/builder.git
synced 2025-12-13 15:42:20 +00:00
add babysense see hd ip206 (#14)
* add babysense see hd ip206 * change webui to webui-next
This commit is contained in:
1
.github/workflows/master.yml
vendored
1
.github/workflows/master.yml
vendored
@@ -31,6 +31,7 @@ jobs:
|
||||
- ssc325de_lite_imou-c22ep-s2
|
||||
- ssc333_lite_meari-speed-6s
|
||||
- ssc333_lite_tp-link-tapo-c110-v2
|
||||
- ssc333_lite_babysense-see-hd-ip206
|
||||
- ssc335_lite_tp-link-tapo-c110-v1
|
||||
- ssc335_lite_trassir-tr-w2c1-v2
|
||||
- ssc335de_lite_uniview-c1l-2wn-g
|
||||
|
||||
@@ -59,6 +59,7 @@ JVS INGT10 GQS60EP T10A OV9750 - NOR_8M done
|
||||
Lenovo Snowman 1080P HI3518EV200 SC2035 RTL8188EUS_USB NOR_16M in progress, LightSensor-no
|
||||
ZTE K540 T31X SC4336 ATBM6012B_USB NOR_16M done
|
||||
H3C TC2101 SSC337 JXQ03 RTL8188FU_USB NOR_16M done
|
||||
Babysense See HD IP206 SSC333 GC2053 RTL8188FU_USB NOR_16M done
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,120 @@
|
||||
# Architecture
|
||||
BR2_arm=y
|
||||
BR2_cortex_a7=y
|
||||
BR2_ARM_EABIHF=y
|
||||
BR2_ARM_FPU_NEON_VFPV4=y
|
||||
BR2_ARM_INSTRUCTIONS_THUMB2=y
|
||||
BR2_KERNEL_HEADERS_VERSION=y
|
||||
BR2_DEFAULT_KERNEL_VERSION="4.9.84"
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_9=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_MUSL=y
|
||||
BR2_TOOLCHAIN_BUILDROOT_MUSL=y
|
||||
BR2_TOOLCHAIN_BUILDROOT_LIBC="musl"
|
||||
BR2_TOOLCHAIN_BUILDROOT_CXX=y
|
||||
# BR2_TOOLCHAIN_BUILDROOT_LOCALE is not set
|
||||
BR2_TOOLCHAIN_BUILDROOT_USE_SSP=y
|
||||
|
||||
# Kernel
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/openipc/linux/archive/$(OPENIPC_KERNEL).tar.gz"
|
||||
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(EXTERNAL_VENDOR)/board/$(OPENIPC_SOC_FAMILY)/kernel/infinity6b0-ssc009a.config"
|
||||
BR2_LINUX_KERNEL_UIMAGE=y
|
||||
BR2_LINUX_KERNEL_XZ=y
|
||||
|
||||
# OpenIPC
|
||||
BR2_OPENIPC_SOC_VENDOR="sigmastar"
|
||||
BR2_OPENIPC_SOC_MODEL="ssc333"
|
||||
BR2_OPENIPC_SOC_FAMILY="infinity6b0"
|
||||
BR2_OPENIPC_VARIANT="lite"
|
||||
BR2_OPENIPC_FLASH_SIZE="8"
|
||||
|
||||
# Filesystem
|
||||
# BR2_TARGET_TZ_INFO is not set
|
||||
BR2_TARGET_ROOTFS_CPIO=y
|
||||
BR2_TARGET_ROOTFS_SQUASHFS=y
|
||||
BR2_TARGET_ROOTFS_SQUASHFS4_XZ=y
|
||||
BR2_ROOTFS_OVERLAY="$(BR2_EXTERNAL)/overlay"
|
||||
BR2_ROOTFS_POST_BUILD_SCRIPT="$(BR2_EXTERNAL)/scripts/rootfs_script.sh"
|
||||
|
||||
# OpenIPC configuration
|
||||
BR2_TOOLCHAIN_BUILDROOT_VENDOR="openipc"
|
||||
BR2_TARGET_GENERIC_ISSUE="Welcome to OpenIPC"
|
||||
BR2_TARGET_GENERIC_HOSTNAME="openipc-ssc333"
|
||||
BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL)/package/all-patches"
|
||||
|
||||
# OpenIPC packages
|
||||
# BR2_PACKAGE_AWS_WEBRTC is not set
|
||||
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_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=y
|
||||
BR2_PACKAGE_MAJESTIC_FONTS=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_NEXT=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_SIGMASTAR_OSDRV_INFINITY6B0=y
|
||||
BR2_PACKAGE_EXFAT_OPENIPC=y
|
||||
BR2_PACKAGE_EXFATPROGS=y
|
||||
# BR2_PACKAGE_SSHPASS is not set
|
||||
# BR2_PACKAGE_UACME_OPENIPC is not set
|
||||
BR2_PACKAGE_VTUND_OPENIPC=y
|
||||
BR2_PACKAGE_YAML_CLI=y
|
||||
BR2_PACKAGE_QUIRC_OPENIPC=y
|
||||
BR2_PACKAGE_ZLIB=y
|
||||
BR2_PACKAGE_SIGMASTAR_MOTORS=y
|
||||
|
||||
# Wireless
|
||||
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_RTL8188FU_OPENIPC=y
|
||||
|
||||
# Debug
|
||||
# BR2_PACKAGE_HOST_GDB is not set
|
||||
# BR2_PACKAGE_GDB is not set
|
||||
|
||||
# CCACHE
|
||||
BR2_CCACHE=y
|
||||
BR2_CCACHE_DIR="$(HOME)/.ccache"
|
||||
|
||||
# External
|
||||
BR2_TOOLCHAIN_EXTERNAL=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_CUSTOM_MUSL=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX="arm-openipc-linux-musleabihf"
|
||||
BR2_TOOLCHAIN_EXTERNAL_CXX=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_9=y
|
||||
BR2_TOOLCHAIN_EXTERNAL_URL="https://github.com/openipc/firmware/releases/download/$(OPENIPC_TOOLCHAIN).tgz"
|
||||
@@ -0,0 +1,26 @@
|
||||
#!/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/ssc333_lite_babysense-see-hd-ip206-nor.tgz'
|
||||
#
|
||||
#
|
||||
# Set custom majestic settings
|
||||
#
|
||||
cli -s .nightMode.enabled true
|
||||
cli -s .nightMode.irCutPin1 79
|
||||
cli -s .nightMode.irCutPin2 78
|
||||
cli -s .nightMode.backlightPin 61
|
||||
cli -s .audio.speakerPin 15
|
||||
#
|
||||
#
|
||||
# Set wlan device and credentials if need
|
||||
#
|
||||
fw_setenv wlandev rtl8188fu-babysense-see-hd-ip206
|
||||
#fw_setenv wlanssid Router
|
||||
#fw_setenv wlanpass 12345678
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,136 @@
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
#define DEV_NAME "/dev/gpiochip0"
|
||||
#define STEP_TIME 250
|
||||
#define STEP_COUNT 4
|
||||
#define MAX_COUNT 16
|
||||
#define SEQ_COUNT 8
|
||||
|
||||
int device_x5[] = {44, 46, 45, 47, 0, 0, 0, 0};
|
||||
|
||||
int gpio_x[4];
|
||||
int gpio_y[4];
|
||||
|
||||
int sequence[][4] = {
|
||||
{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},
|
||||
{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},
|
||||
};
|
||||
|
||||
int write_gpio(int pin, int val) {
|
||||
struct gpiohandle_request rq;
|
||||
struct gpiohandle_data data;
|
||||
|
||||
int fd = open(DEV_NAME, O_RDONLY);
|
||||
if (fd < 0) {
|
||||
printf("Unable to open chip: %s\n", strerror(errno));
|
||||
return 1;
|
||||
}
|
||||
|
||||
rq.lineoffsets[0] = pin;
|
||||
rq.flags = GPIOHANDLE_REQUEST_OUTPUT;
|
||||
rq.lines = 1;
|
||||
|
||||
if (ioctl(fd, GPIO_GET_LINEHANDLE_IOCTL, &rq) < 0) {
|
||||
printf("Unable to request gpio %d: %s\n", pin, strerror(errno));
|
||||
return 1;
|
||||
}
|
||||
|
||||
close(fd);
|
||||
data.values[0] = val;
|
||||
|
||||
if (ioctl(rq.fd, GPIOHANDLE_SET_LINE_VALUES_IOCTL, &data) < 0) {
|
||||
printf("Unable to set value %d: %s\n", val, strerror(errno));
|
||||
return 1;
|
||||
}
|
||||
|
||||
close(rq.fd);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int motor_control(int *gpio, int count, char direction ) {
|
||||
if (direction == 'x') {
|
||||
write_gpio(53, 1);
|
||||
write_gpio(16, 0);
|
||||
}
|
||||
else {
|
||||
write_gpio(53, 0);
|
||||
write_gpio(16, 1);
|
||||
}
|
||||
for (int i = count; i < count + SEQ_COUNT; i++) {
|
||||
for (int j = 0; j < 4; j++) {
|
||||
if (write_gpio(gpio[j], sequence[i][j])) {
|
||||
return 1;
|
||||
}
|
||||
usleep(STEP_TIME);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int gpio_export(int *gpio) {
|
||||
for (int i = 0; i < 4; i++) {
|
||||
if (write_gpio(gpio[i], 0)) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int limit_value(int x) {
|
||||
if (x < -MAX_COUNT) {
|
||||
x = -MAX_COUNT;
|
||||
}
|
||||
|
||||
if (x > MAX_COUNT) {
|
||||
x = MAX_COUNT;
|
||||
}
|
||||
|
||||
return x;
|
||||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
if (argc < 2 || argc > 3) {
|
||||
printf("Usage: %s [x_step] [y_step]\n", argv[0]);
|
||||
return -1;
|
||||
}
|
||||
|
||||
int x = limit_value(argv[1] ? atoi(argv[1]) : 0);
|
||||
int y = limit_value(argv[2] ? atoi(argv[2]) : 0);
|
||||
|
||||
memcpy(gpio_x, device_x5 + 0, sizeof(gpio_x));
|
||||
memcpy(gpio_y, device_x5 + 0, sizeof(gpio_y));
|
||||
|
||||
if (gpio_export(gpio_x) || gpio_export(gpio_y)) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
for (int i = 0; i < abs(x) * STEP_COUNT * 2; i++) {
|
||||
if (motor_control(gpio_x, (x < 0) ? SEQ_COUNT : 0, 'x')) {
|
||||
goto reset;
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < abs(y) * STEP_COUNT; i++) {
|
||||
if (motor_control(gpio_y, (y < 0) ? 0 : SEQ_COUNT, 'y')) {
|
||||
goto reset;
|
||||
}
|
||||
}
|
||||
|
||||
reset:
|
||||
gpio_export(gpio_x);
|
||||
gpio_export(gpio_y);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
/etc/sensors/gc4023.bin
|
||||
/etc/sensors/gc4653.bin
|
||||
/etc/sensors/imx307.bin
|
||||
/etc/sensors/imx335.bin
|
||||
/etc/sensors/jxf37.bin
|
||||
/etc/sensors/jxq03.bin
|
||||
/etc/sensors/sc200ai.bin
|
||||
/etc/sensors/sc223a.bin
|
||||
/etc/sensors/sc2335.bin
|
||||
/etc/sensors/sc2336.bin
|
||||
/etc/sensors/sc3338.bin
|
||||
/etc/sensors/sc401ai.bin
|
||||
#
|
||||
/lib/modules/4.9.84/sigmastar/sensor/sensor_gc2083_mipi.ko
|
||||
/lib/modules/4.9.84/sigmastar/sensor/sensor_gc4023_mipi.ko
|
||||
/lib/modules/4.9.84/sigmastar/sensor/sensor_gc4653_mipi.ko
|
||||
/lib/modules/4.9.84/sigmastar/sensor/sensor_imx307_mipi.ko
|
||||
/lib/modules/4.9.84/sigmastar/sensor/sensor_imx335_mipi.ko
|
||||
/lib/modules/4.9.84/sigmastar/sensor/sensor_jxf37_mipi.ko
|
||||
/lib/modules/4.9.84/sigmastar/sensor/sensor_jxq03_mipi.ko
|
||||
/lib/modules/4.9.84/sigmastar/sensor/sensor_os02g10_mipi.ko
|
||||
/lib/modules/4.9.84/sigmastar/sensor/sensor_sc200ai_mipi.ko
|
||||
/lib/modules/4.9.84/sigmastar/sensor/sensor_sc2239_mipi.ko
|
||||
/lib/modules/4.9.84/sigmastar/sensor/sensor_sc223a_mipi.ko
|
||||
/lib/modules/4.9.84/sigmastar/sensor/sensor_sc2335_mipi.ko
|
||||
/lib/modules/4.9.84/sigmastar/sensor/sensor_sc2336_mipi.ko
|
||||
/lib/modules/4.9.84/sigmastar/sensor/sensor_sc3335_mipi.ko
|
||||
/lib/modules/4.9.84/sigmastar/sensor/sensor_sc3338_mipi.ko
|
||||
/lib/modules/4.9.84/sigmastar/sensor/sensor_sc401ai_mipi.ko
|
||||
#
|
||||
/lib/modules/4.9.84/kernel/fs/lockd/lockd.ko
|
||||
/lib/modules/4.9.84/kernel/fs/nfs/nfs.ko
|
||||
/lib/modules/4.9.84/kernel/fs/nfs/nfsv3.ko
|
||||
/lib/modules/4.9.84/kernel/fs/nfs_common/grace.ko
|
||||
/lib/modules/4.9.84/kernel/net/sunrpc/sunrpc.ko
|
||||
Reference in New Issue
Block a user