Add t31_lite_zte-k545 device profile (ZTE K545, SC4336, ATBM6012B Wi-Fi) (#151)

A clone of the in-tree t31_lite_zte-k540 with the K545's own deltas: gpio-motors driven by ptz_control/ptz_gpio rather than the older motors package, majestic IR-cut, backlight and speaker pins, and the same SD-card detect patch (GPIO_PB(18) is pin 50). It reuses K540's atbm603x-t31-zte-k540 wlandev profile, which is already upstream in firmware's shared adapter table.

Built green on CI, narrowed to this device. Two points left open with the author, both inherited from K540 rather than introduced here: the defconfig declares an 8M flash while the README row says NOR_16M, which caps the rootfs partition at 5120KB instead of 8192KB; and the device ships no t31_lite.list, as K540 does not either.
This commit is contained in:
TagBug
2026-09-11 20:27:47 +03:00
committed by GitHub
parent 3bd11b95cc
commit 4a96c82eb4
4 changed files with 135 additions and 0 deletions
+1
View File
@@ -102,6 +102,7 @@ Xiaomi MJSXJ03HL T31N JXQ03P RTL8189FS_SDIO NOR_16M done
Xiaomi MJSXJ05HL T31L GC2053 ATBM6031_SDIO NOR_16M preparation
YuanCam DGK-423403 HI3518EV300 JXH62 RTL8188FU_USB NOR_8M research
ZTE K540 T31X SC4336 ATBM6012B_USB NOR_16M done
ZTE K545 T31X SC4336 ATBM6012B_USB NOR_16M done
4G Camera XG521 V1.2 GK7202V300 GC1054 EC800E-CN_USB NOR_8M done
XM IPG-G3-WR GK7202V300 JXH63 ATBM60321S_USB NOR_8M done
```
@@ -0,0 +1,71 @@
# 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/$(OPENIPC_TOOLCHAIN).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/$(OPENIPC_KERNEL).tar.gz"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(EXTERNAL_VENDOR)/board/$(OPENIPC_SOC_FAMILY)/t31.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 is not set
# BR2_PACKAGE_WIREGUARD_TOOLS is not set
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="t31"
BR2_OPENIPC_SOC_FAMILY="t31"
BR2_OPENIPC_SNS_MODEL="sc4336"
BR2_OPENIPC_VARIANT="lite"
BR2_OPENIPC_FLASH_SIZE="8"
# Packages
BR2_PACKAGE_ATBM60XX=y
BR2_PACKAGE_ATBM60XX_MODEL_603X=y
BR2_PACKAGE_DROPBEAR_OPENIPC=y
BR2_PACKAGE_INGENIC_OSDRV_T31=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_MAJESTIC_FONTS=y
BR2_PACKAGE_MAJESTIC_WEBUI=y
BR2_PACKAGE_MAJESTIC=y
BR2_PACKAGE_MBEDTLS_OPENIPC=y
# BR2_PACKAGE_MOTORS is not set
BR2_PACKAGE_GPIO_MOTORS=y
BR2_PACKAGE_OPUS_OPENIPC=y
BR2_PACKAGE_OPUS_OPENIPC_FIXED_POINT=y
# BR2_PACKAGE_QUIRC_OPENIPC=y
# BR2_PACKAGE_VTUND_OPENIPC is not set
BR2_PACKAGE_YAML_CLI=y
@@ -0,0 +1,50 @@
#!/bin/sh
#
# Perform basic settings on a known IP camera
#
#
# Set custom upgrade url
#
fw_setenv upgrade 'https://github.com/OpenIPC/builder/releases/download/latest/t31_lite_zte-k545-nor.tgz'
#
#
# Set custom majestic settings
#
cli -s .nightMode.irCutPin1 57
cli -s .nightMode.irCutPin2 58
cli -s .nightMode.colorToGray true
cli -s .nightMode.backlightPin 11
cli -s .video0.codec h264
cli -s .audio.speakerPin 64
cli -s .audio.speakerPinInvert true
#
#
# Set wlan device and credentials if need
#
fw_setenv wlandev atbm603x-t31-zte-k540
#fw_setenv wlanssid Router
#fw_setenv wlanpass 12345678
#
#
# Set ptz motor pins
#
fw_setenv ptz_control gpio
fw_setenv ptz_gpio '49 63 62 61 59 52 53 54'
#
#
# Set osmem and rmem
#
fw_setenv osmem 64M
fw_setenv rmem 64M@0x4000000
#
# Status LEDs (active low: 0 = on, 1 = off):
# Blue: GPIO 10
# Red: GPIO 16
# Green: GPIO 17
#
# Example to turn on green LED on boot:
# echo 17 > /sys/class/gpio/export 2>/dev/null
# echo out > /sys/class/gpio/gpio17/direction 2>/dev/null
# echo 0 > /sys/class/gpio/gpio17/value 2>/dev/null
#
exit 0
@@ -0,0 +1,13 @@
diff --git a/arch/mips/xburst/soc-t31/chip-t31/isvp/Swan/board.h b/arch/mips/xburst/soc-t31/chip-t31/isvp/Swan/board.h
index d9058e1271..b53c252c64 100644
--- a/arch/mips/xburst/soc-t31/chip-t31/isvp/Swan/board.h
+++ b/arch/mips/xburst/soc-t31/chip-t31/isvp/Swan/board.h
@@ -32,7 +32,7 @@
/* ****************************GPIO MMC START******************************** */
#define GPIO_MMC_RST_N -1
#define GPIO_MMC_RST_N_LEVEL LOW_ENABLE
-#define GPIO_MMC_CD_N GPIO_PB(27)
+#define GPIO_MMC_CD_N GPIO_PB(18)
#define GPIO_MMC_CD_N_LEVEL LOW_ENABLE
#define GPIO_MMC_PWR -1
#define GPIO_MMC_PWR_LEVEL HIGH_ENABLE