From e8f06b603d9b2a590cc882113c481d4805741d93 Mon Sep 17 00:00:00 2001 From: valov Date: Wed, 26 Aug 2026 16:42:02 +0300 Subject: [PATCH 1/2] xm530: add anbiux A8B-3MP (IPC-RB-BLK530AI, ATBM6032 USB WiFi) The defconfig selects the atbm60xx driver (603x, USB) on top of xm530_lite, and drops the MT7601U firmware this radio does not use. The customizer sets wlandev to the atbm603x-xm530-usb case in firmware's /etc/wireless/usb and wifipdn to the PDN gpio (after which S40network applies the MAC and runs ifup), and points the upgrade url at this device's builder release. Depends on OpenIPC/firmware#2316: it provides the bring-up case, the depmod pass that makes the driver stack resolvable by modprobe, and the cfg80211 coexistence (the vendor rewrite ships as cfg80211_xm711.ko, atbm60xx uses the in-tree module). xm530_lite_anbiux-a8b-3mp joins SMOKE_TARGETS: the vendor:xiongmai trait must be covered or ci-matrix.py's self-test refuses to select a build matrix. --- .github/scripts/ci-matrix.py | 1 + README.md | 1 + .../xm530_lite_anbiux-a8b-3mp_defconfig | 71 +++++++++++++++++++ .../overlay/usr/share/openipc/customizer.sh | 19 +++++ .../general/scripts/excludes/xm530_lite.list | 5 ++ 5 files changed, 97 insertions(+) create mode 100644 devices/xm530_lite_anbiux-a8b-3mp/br-ext-chip-xiongmai/configs/xm530_lite_anbiux-a8b-3mp_defconfig create mode 100644 devices/xm530_lite_anbiux-a8b-3mp/general/overlay/usr/share/openipc/customizer.sh create mode 100644 devices/xm530_lite_anbiux-a8b-3mp/general/scripts/excludes/xm530_lite.list diff --git a/.github/scripts/ci-matrix.py b/.github/scripts/ci-matrix.py index c5dfb7f31..b0a72d304 100644 --- a/.github/scripts/ci-matrix.py +++ b/.github/scripts/ci-matrix.py @@ -117,6 +117,7 @@ "ssc30kq_rubyfpv_generic", # devices/common, rubyfpv "gk7205v200_otg_generic", # otg "ssc338q_apfpv", # devices/apfpv + "xm530_lite_anbiux-a8b-3mp", # Xiongmai ] # LICENSE and README anchored to whole filenames; unanchored they would also diff --git a/README.md b/README.md index cb70931e5..f97766ba4 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ _(based on Buildroot)_ ### List of known and supported devices ``` +anbiux A8B-3MP XM530AI SC3335 ATBM603X_USB NOR_8M in progress Aoni EP01J05 T31L ? RTL8188FU_USB NOR_16M new Azarton C1 T20X JXF23 RTL8189FS_SDIO NOR_16M done Azarton C1 T31X GC2053 RTL8189FS_SDIO NOR_16M done diff --git a/devices/xm530_lite_anbiux-a8b-3mp/br-ext-chip-xiongmai/configs/xm530_lite_anbiux-a8b-3mp_defconfig b/devices/xm530_lite_anbiux-a8b-3mp/br-ext-chip-xiongmai/configs/xm530_lite_anbiux-a8b-3mp_defconfig new file mode 100644 index 000000000..16d320c95 --- /dev/null +++ b/devices/xm530_lite_anbiux-a8b-3mp/br-ext-chip-xiongmai/configs/xm530_lite_anbiux-a8b-3mp_defconfig @@ -0,0 +1,71 @@ +# Architecture +BR2_arm=y +BR2_cortex_a5=y +BR2_ARM_INSTRUCTIONS_THUMB2=y + +# Toolchain +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_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)/xm530.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_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="xiongmai" +BR2_OPENIPC_SOC_MODEL="xm530" +BR2_OPENIPC_SOC_FAMILY="xm530" +# xm550 is firmware-identical to xm530 (same SOC_FAMILY, kernel, osdrv); it is +# built only as xm530 now and routed here for cameras still reporting xm550. +BR2_OPENIPC_SOC_ALIASES="xm550" +BR2_OPENIPC_VARIANT="lite" +BR2_OPENIPC_FLASH_SIZE="8" + +# Packages +# ATBM60XX WiFi: AltoBeam ATBM6032 USB chip (007a:8888), PDN on gpio 96 +BR2_PACKAGE_ATBM60XX=y +BR2_PACKAGE_ATBM60XX_MODEL_603X=y +BR2_PACKAGE_ATBM60XX_INTERFACE_USB=y +BR2_PACKAGE_DROPBEAR_OPENIPC=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=y +# BR2_PACKAGE_LINUX_FIRMWARE_OPENIPC_MEDIATEK_MT7601U is not set +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_VTUND_OPENIPC=y +BR2_PACKAGE_XIONGMAI_OSDRV_XM530=y +BR2_PACKAGE_YAML_CLI=y diff --git a/devices/xm530_lite_anbiux-a8b-3mp/general/overlay/usr/share/openipc/customizer.sh b/devices/xm530_lite_anbiux-a8b-3mp/general/overlay/usr/share/openipc/customizer.sh new file mode 100644 index 000000000..dd11f27d3 --- /dev/null +++ b/devices/xm530_lite_anbiux-a8b-3mp/general/overlay/usr/share/openipc/customizer.sh @@ -0,0 +1,19 @@ +#!/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/xm530_lite_anbiux-a8b-3mp-nor.tgz' +# +# Set wlan device, its PDN gpio and credentials if need +# +fw_setenv wlandev atbm603x-xm530-usb +fw_setenv wifipdn 96 +#fw_setenv wlanssid Router +#fw_setenv wlanpass 12345678 +# +(sleep 3 ; reboot -f) & + +exit 0 diff --git a/devices/xm530_lite_anbiux-a8b-3mp/general/scripts/excludes/xm530_lite.list b/devices/xm530_lite_anbiux-a8b-3mp/general/scripts/excludes/xm530_lite.list new file mode 100644 index 000000000..b04211516 --- /dev/null +++ b/devices/xm530_lite_anbiux-a8b-3mp/general/scripts/excludes/xm530_lite.list @@ -0,0 +1,5 @@ +# This device carries the AltoBeam ATBM6032 (USB) radio; prune the +# wifi stacks it does not use to leave room for the atbm60xx module. +/lib/modules/3.10.103+/xiongmai/xm711.ko +/lib/modules/3.10.103+/xiongmai/compat.ko +/lib/modules/3.10.103+/xiongmai/8188fu.ko From 826ab1db3eeb79873fb7661ef0867d03dd38f823 Mon Sep 17 00:00:00 2001 From: valov Date: Sun, 6 Sep 2026 23:36:13 +0300 Subject: [PATCH 2/2] builder: allow cloning firmware from a custom repo (OPENIPC_FW_REPO) builder.sh hardcoded the OpenIPC/firmware clone URL, so a device could never be built against a fork carrying unmerged changes (e.g. the xiongmai ATBM6032 USB WiFi branch). Route the clone through ${OPENIPC_FW_REPO:-https://github.com/OpenIPC/firmware.git} and expose it as the firmware_repo input of build-one, next to firmware_ref. --- .github/workflows/build-one.yml | 6 +++++- builder.sh | 11 +++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-one.yml b/.github/workflows/build-one.yml index 9ccfd1cc0..2d0d880d8 100644 --- a/.github/workflows/build-one.yml +++ b/.github/workflows/build-one.yml @@ -9,7 +9,10 @@ on: description: 'Builder commit SHA to build (optional; defaults to current branch HEAD). Use this from `git bisect run` or for one-off historic rebuilds.' required: false firmware_ref: - description: 'OpenIPC/firmware ref (SHA/tag/branch) to clone — for cross-repo bisect of size/regression issues. Defaults to firmware HEAD.' + description: 'Firmware ref (SHA/tag/branch) to clone — for cross-repo bisect of size/regression issues. Defaults to firmware HEAD.' + required: false + firmware_repo: + description: 'Firmware repo URL to clone (defaults to OpenIPC/firmware). Point at a fork to build unmerged changes together with firmware_ref.' required: false jobs: @@ -85,6 +88,7 @@ jobs: BUILD_SHA: ${{ needs.resolve.outputs.ref }} BUILD_PLATFORM: ${{ inputs.platform }} OPENIPC_FW_REV: ${{ inputs.firmware_ref }} + OPENIPC_FW_REPO: ${{ inputs.firmware_repo }} run: | export GIT_HASH=$(git rev-parse --short ${GITHUB_SHA}) export GIT_BRANCH=${GITHUB_REF_NAME} diff --git a/builder.sh b/builder.sh index 958987da1..f1a08ac91 100755 --- a/builder.sh +++ b/builder.sh @@ -127,17 +127,20 @@ echo_c 33 "\nUpdating Builder" git pull rm -rf openipc -# OPENIPC_FW_REV pins firmware to a specific ref (branch, tag, or SHA) for +# OPENIPC_FW_REPO selects the firmware repo to clone (default: OpenIPC/firmware) +# — point it at a fork to build changes that are not merged upstream yet. +# OPENIPC_FW_REV pins a specific ref (branch, tag, or SHA) on that repo for # cross-repo bisect of size/regression issues — set by build-one.yml's -# firmware_ref input. When unset, clones HEAD of master as before. +# firmware_ref input. When unset, clones HEAD of the default branch as before. +FW_REPO="${OPENIPC_FW_REPO:-https://github.com/OpenIPC/firmware.git}" if [ ! -d "$FIRMWARE_DIR" ]; then if [ -n "$OPENIPC_FW_REV" ]; then echo_c 33 "\nDownloading Firmware @ ${OPENIPC_FW_REV}" - git clone https://github.com/OpenIPC/firmware.git "$FIRMWARE_DIR" + git clone "$FW_REPO" "$FIRMWARE_DIR" git -C "$FIRMWARE_DIR" checkout "$OPENIPC_FW_REV" else echo_c 33 "\nDownloading Firmware" - git clone --depth=1 https://github.com/OpenIPC/firmware.git "$FIRMWARE_DIR" + git clone --depth=1 "$FW_REPO" "$FIRMWARE_DIR" fi cd "$FIRMWARE_DIR" else