Skip to content

nt98566_ultimate_xm-rm1: add the XM IPC-RM1-BLK562 (NT98566 + SC501AI, ATBM6062 USB Wi-Fi, pan/tilt) - #297

Open
Simi541 wants to merge 2 commits into
OpenIPC:masterfrom
Simi541:nt98566-xm-rm1
Open

Simi541 wants to merge 2 commits into
OpenIPC:masterfrom
Simi541:nt98566-xm-rm1

Conversation

@Simi541

@Simi541 Simi541 commented Dec 4, 2026

Copy link
Copy Markdown

Adds nt98566_lite_xm-rm1: the XM pan/tilt dome board IPC-RM1-BLK562-M335-MINI-ETH V1.02 (sold as Loosafe). NT98566 + SmartSens SC501AI, 16 MB NOR (XM FM25Q128A), AltoBeam ATBM6062 Wi-Fi 6 on USB. Stock firmware General_IPC_NT98566_N8-WQ_S38 (product IPG-N8-WQ-BL).

It starts from nt98566_lite_xm-ivg-n8s: the same 8 MB lite layout, with the SC501AI kept and the IMX415 dropped in the excludes list.

What changes

  • Wi-Fi: BR2_PACKAGE_ATBM606X_OPENIPC=y, wlandev atbm606x-generic-usb. The stock firmware loads atbm6062u.ko wifi_bt_comb=1 from loadpublic. Following the Yoton WS03 profile, a kernel fragment turns off the kernel's cfg80211/mac80211 (the package brings its own) and keeps WIRELESS_EXT by building R8712U (CONFIG_STAGING=y). The excludes list then drops r8712u.ko. USB host has been in nt98566.generic.config since nt9856x: USB host in the kernel configs firmware#3038.

  • Night mode: confirmed on the board with the Day / Night pin map on a generic nt98566_lite image:

    • IR-cut: one pad, 225 (DSI 1), LOW at night → irCutSingleInvert: true
    • IR lamp 232 (DSI 8), white lamp 233 (DSI 9), both lit HIGH
    • photocell 231 (DSI 7), HIGH when dark

    The wiki's IVG-N8S row has the photocell and white lamp the other way round.

  • Pan/tilt: ptz_control gpio, ptz_gpio '230 229 228 227 66 67 234 224'. These come from the stock XmMotor gpio_pin=0x76,0x75,0x74,0x73,0x22,0x23,0x7A,0x70, which packs XM's group << 4 | pin, with group 7 = DSI and group 2 = S. In kernel numbers that is DSI_GPIO(n) = 0xE0 + n and S_GPIO(n) = 0x40 + n (gpio-nvt-na51089, base 0).

  • README row.

Status

  • Video: OK on the generic nt98566_lite image.
  • Night-mode pins: confirmed on hardware as listed above.
  • Not yet run on hardware: this image itself, Wi-Fi, pan/tilt phase order and direction, and whether the Wi-Fi module needs a power GPIO (the stock XmWlanDaemon has one, kept in an encrypted config). The image size against the 5 MB lite rootfs is also unchecked. I'll flash the CI build and report back here.
  • lightSensorInvert is left at its default for now; it will be set from the camera's saved config in a follow-up.

.github/scripts/ci-matrix.py --self-test passes, and the change narrows the matrix to this one device.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LNoep3b7y4pGrqdg7ZUyks

…h ATBM6062 USB Wi-Fi

XM pan/tilt dome board IPC-RM1-BLK562-M335-MINI-ETH V1.02 (sold as Loosafe),
16 MB NOR, stock firmware General_IPC_NT98566_N8-WQ_S38. Built on the IVG-N8S
profile: the same 8 MB lite layout, the SC501AI kept and the IMX415 dropped.

- Wi-Fi: atbm606x-openipc for the on-board ATBM6062 on USB (the stock
  firmware loads atbm6062u.ko), with a kernel fragment that turns off the
  kernel's cfg80211/mac80211 and keeps wireless extensions via R8712U, as on
  the Yoton WS03. USB host is in the generic config since OpenIPC/firmware#3038.
- Night mode, confirmed on the board with the Day / Night pin map: single-pad
  IR-cut 225 (LOW at night), IR lamp 232, white lamp 233, photocell 231.
- Pan/tilt: GPIO steppers 230 229 228 227 / 66 67 234 224, from the stock
  loadpublic XmMotor line; not yet run on hardware.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LNoep3b7y4pGrqdg7ZUyks
@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

PR Summary by Qodo

nt98566_lite_xm-rm1: add XM IPC-RM1-BLK562 (NT98566, SC501AI, ATBM6062 Wi-Fi)

✨ Enhancement ⚙️ Configuration changes 🕐 20-40 Minutes

Grey Divider

AI Description

• Adds the XM IPC-RM1-BLK562 board (NT98566, SC501AI) as a new nt98566_lite_xm-rm1 device profile.
• Enables ATBM6062 USB Wi-Fi via atbm606x-openipc, with a kernel fragment replacing the kernel
 cfg80211/mac80211 stack.
• Sets night-mode pins and pan/tilt GPIO steppers from the stock firmware; Wi-Fi, pan/tilt and this
 image are not yet tested on hardware.
Merge Risk 🟡 Medium

Blast radius 🟡 Medium 💥 5 capabilities

  • 5 affected capabilities within one bounded functional scope: nt98566_xm_rm1_camera_integration.
  • The defconfig, sensor excludes, kernel selection, packages, and split-NOR settings jointly define one end-to-end firmware integration for this camera; they are build and runtime hops of the same board capability.
  • The package, kernel compatibility fragment, exclusion entry, and wlandev environment all serve one bounded on-camera Wi-Fi integration; the kernel module is an implementation hop, not an independent capability.
  • The PTZ mode, GPIO sequence, and capability labels produce one bounded pan/tilt user operation; they are configuration and consumer hops of that operation.
  • The IR-cut, lamp, inversion, and sensor settings jointly control one bounded night-mode behavior; they are not separate capabilities merely because they target different GPIOs.
  • The customizer's URL and the upgrade client together implement one bounded firmware-delivery operation for this board; the URL is configuration state, not an independent capability.
Sources

devices/nt98566_ultimate_xm-rm1/br-ext-chip-novatek/configs/nt98566_ultimate_xm-rm1_defconfig[20-29]

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)/nt98566.generic.config"
# The generic NT98566 kernel (USB host since OpenIPC/firmware#3038) without its
# own cfg80211/mac80211, which atbm606x-openipc brings itself.
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(EXTERNAL_VENDOR)/board/$(OPENIPC_SOC_FAMILY)/nt98566-xm-rm1.config"
BR2_LINUX_KERNEL_UIMAGE=y
BR2_LINUX_KERNEL_XZ=y

devices/nt98566_ultimate_xm-rm1/general/scripts/excludes/nt98566_ultimate.list[1-5]

# The board's sensor is the SC501AI: every other sensor's files go.
/etc/sensors/imx415.yaml
/etc/sensors/os05a10.yaml
/etc/sensors/sc401ai.yaml
/etc/sensors/sc430ai.yaml

devices/nt98566_ultimate_xm-rm1/br-ext-chip-novatek/configs/nt98566_ultimate_xm-rm1_defconfig[43-56]

BR2_OPENIPC_SOC_VENDOR="novatek"
BR2_OPENIPC_SOC_MODEL="nt98566"
BR2_OPENIPC_SOC_FAMILY="nt9856x"
BR2_OPENIPC_VARIANT="ultimate"
# 16 MB NOR (XM FM25Q128A). Ultimate, since the flash leaves room for it: majestic
# ultimate with the NPU's object detector (nvtnpu-models), LAME,
# exFAT and ZeroTier, on the split NOR layout.
BR2_OPENIPC_FLASH_SIZE="16"
BR2_OPENIPC_MAJESTIC="ultimate"

# Packages
# Wi-Fi: the on-board AltoBeam ATBM6062 on USB, which the stock firmware drives
# with atbm6062u.ko (insmod atbm6062u.ko wifi_bt_comb=1 in its loadpublic).
BR2_PACKAGE_ATBM606X_OPENIPC=y

devices/nt98566_ultimate_xm-rm1/general/overlay/usr/share/openipc/customizer.sh[29-46]

fw_setenv ptz_control gpio
fw_setenv ptz_gpio '230 229 228 227 66 67 234 224'
fw_setenv ptz_caps 'pan tilt'
#
# Set majestic settings
#
# Night mode, confirmed on this board with the Day / Night pin map: the IR-cut
# filter is a single pad (DSI 1, LOW at night), the IR lamp DSI 8 and the white
# lamp DSI 9 (both lit HIGH), the photocell DSI 7 (HIGH when dark). The XM
# IVG-N8S table in the wiki has the photocell and white lamp the other way
# round.
#
cli -s .nightMode.irCutPin1 225
cli -s .nightMode.irCutSingleInvert true
cli -s .nightMode.backlightPin 232
cli -s .nightMode.whiteLightPin 233
cli -s .nightMode.lightMonitor true
cli -s .nightMode.lightSensorPin 231
Behavioral complexity 🟡 Medium 🧩 Compatibility cases, Coordinated invariants

  • Before, this repository had no NT98566 XM-RM1 board integration.
  • After, the image must coordinate the selected kernel, package set, sensor exclusions, 16 MB split-NOR layout, and bootloader read bound.
  • New correctness conditions are that the produced image remains bootable within the layout and retains every required camera dependency while pruning only unused files.
  • The configuration is declarative, but these values interact across build and deployment boundaries.
Sources

devices/nt98566_ultimate_xm-rm1/br-ext-chip-novatek/configs/nt98566_ultimate_xm-rm1_defconfig[20-29]

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)/nt98566.generic.config"
# The generic NT98566 kernel (USB host since OpenIPC/firmware#3038) without its
# own cfg80211/mac80211, which atbm606x-openipc brings itself.
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(EXTERNAL_VENDOR)/board/$(OPENIPC_SOC_FAMILY)/nt98566-xm-rm1.config"
BR2_LINUX_KERNEL_UIMAGE=y
BR2_LINUX_KERNEL_XZ=y

devices/nt98566_ultimate_xm-rm1/br-ext-chip-novatek/configs/nt98566_ultimate_xm-rm1_defconfig[43-56]

BR2_OPENIPC_SOC_VENDOR="novatek"
BR2_OPENIPC_SOC_MODEL="nt98566"
BR2_OPENIPC_SOC_FAMILY="nt9856x"
BR2_OPENIPC_VARIANT="ultimate"
# 16 MB NOR (XM FM25Q128A). Ultimate, since the flash leaves room for it: majestic
# ultimate with the NPU's object detector (nvtnpu-models), LAME,
# exFAT and ZeroTier, on the split NOR layout.
BR2_OPENIPC_FLASH_SIZE="16"
BR2_OPENIPC_MAJESTIC="ultimate"

# Packages
# Wi-Fi: the on-board AltoBeam ATBM6062 on USB, which the stock firmware drives
# with atbm6062u.ko (insmod atbm6062u.ko wifi_bt_comb=1 in its loadpublic).
BR2_PACKAGE_ATBM606X_OPENIPC=y

devices/nt98566_ultimate_xm-rm1/general/scripts/excludes/nt98566_ultimate.list[1-5]

# The board's sensor is the SC501AI: every other sensor's files go.
/etc/sensors/imx415.yaml
/etc/sensors/os05a10.yaml
/etc/sensors/sc401ai.yaml
/etc/sensors/sc430ai.yaml
Potential damage 🔴 High 🩹 Critical loss

  • If the generated image does not boot or omits a required camera runtime component, this board loses its camera firmware capability.
  • Reverting the builder change restores the prior source state, but an already-installed image requires a successful reflash; persistent device state is not shown to be automatically repaired.
  • Reflash of a known-good image is the supported recovery prerequisite; no automatic repair path is present in this repository.
Sources

devices/nt98566_ultimate_xm-rm1/br-ext-chip-novatek/configs/nt98566_ultimate_xm-rm1_defconfig[20-29]

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)/nt98566.generic.config"
# The generic NT98566 kernel (USB host since OpenIPC/firmware#3038) without its
# own cfg80211/mac80211, which atbm606x-openipc brings itself.
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(EXTERNAL_VENDOR)/board/$(OPENIPC_SOC_FAMILY)/nt98566-xm-rm1.config"
BR2_LINUX_KERNEL_UIMAGE=y
BR2_LINUX_KERNEL_XZ=y

devices/nt98566_ultimate_xm-rm1/br-ext-chip-novatek/configs/nt98566_ultimate_xm-rm1_defconfig[43-56]

BR2_OPENIPC_SOC_VENDOR="novatek"
BR2_OPENIPC_SOC_MODEL="nt98566"
BR2_OPENIPC_SOC_FAMILY="nt9856x"
BR2_OPENIPC_VARIANT="ultimate"
# 16 MB NOR (XM FM25Q128A). Ultimate, since the flash leaves room for it: majestic
# ultimate with the NPU's object detector (nvtnpu-models), LAME,
# exFAT and ZeroTier, on the split NOR layout.
BR2_OPENIPC_FLASH_SIZE="16"
BR2_OPENIPC_MAJESTIC="ultimate"

# Packages
# Wi-Fi: the on-board AltoBeam ATBM6062 on USB, which the stock firmware drives
# with atbm6062u.ko (insmod atbm6062u.ko wifi_bt_comb=1 in its loadpublic).
BR2_PACKAGE_ATBM606X_OPENIPC=y

devices/nt98566_ultimate_xm-rm1/general/scripts/excludes/nt98566_ultimate.list[1-5]

# The board's sensor is the SC501AI: every other sensor's files go.
/etc/sensors/imx415.yaml
/etc/sensors/os05a10.yaml
/etc/sensors/sc401ai.yaml
/etc/sensors/sc430ai.yaml
Assessed commit 8712c11
Diagram

graph TD
  A["nt98566_lite_xm-rm1 defconfig"] --> B["Kernel config fragment"] --> C["Kernel cfg80211 off"]
  A --> D["atbm606x-openipc Wi-Fi"]
  C --> E["R8712U keeps WIRELESS_EXT"]
  A --> F["Excludes list"]
  A --> G["customizer.sh"]
  G --> H["Night mode and pan/tilt"]
Loading
High-Level Assessment

The PR follows the Yoton WS03 pattern for Wi-Fi, which is a reasonable choice. Enabling the kernel's cfg80211 would clash with the package's same-named modules, and WIRELESS_EXT is hidden, so a driver has to select it. R8712U is the only option here that needs just WLAN and USB. Keeping the 8 MB lite layout is deliberate: it is the layout the owner's camera already runs, and the 16 MB table is untested. Hardware testing of Wi-Fi, pan/tilt and the image should come before merge, since those are the largest unverified parts.

Files changed (5) +176 / -0

Documentation (1) +1 / -0
README.mdAdd XM IPC-RM1-BLK562 row to the device table +1/-0

Add XM IPC-RM1-BLK562 row to the device table

• Adds a supported-devices row for the NT98566 + SC501AI board with ATBM6062 Wi-Fi, marked as testing with the video, IR-cut, lamps and photocell pins confirmed. Wi-Fi and pan/tilt are listed as untested.

README.md

Other (4) +175 / -0
nt98566-xm-rm1.configKernel fragment replacing cfg80211/mac80211 and enabling R8712U +11/-0

Kernel fragment replacing cfg80211/mac80211 and enabling R8712U

• Turns off the kernel's CFG80211 and MAC80211 so atbm606x-openipc can supply its own. Sets CONFIG_STAGING=y and CONFIG_R8712U=m so WIRELESS_EXT is selected, since no other option works on this kernel.

devices/nt98566_lite_xm-rm1/br-ext-chip-novatek/board/nt9856x/nt98566-xm-rm1.config

nt98566_lite_xm-rm1_defconfigNew NT98566 lite defconfig for the XM RM1 board +76/-0

New NT98566 lite defconfig for the XM RM1 board

• Defines the board's toolchain, kernel with the custom config and fragment, 8 MB lite flash layout and package set. Enables ATBM606X_OPENIPC for Wi-Fi, along with the Majestic, Novatek SDK and motors packages.

devices/nt98566_lite_xm-rm1/br-ext-chip-novatek/configs/nt98566_lite_xm-rm1_defconfig

customizer.shFirst-boot settings for Wi-Fi, night mode and pan/tilt +48/-0

First-boot settings for Wi-Fi, night mode and pan/tilt

• Sets wlandev to atbm606x-generic-usb and the GPIO stepper pins for pan/tilt. Configures night-mode IR-cut, lamp and photocell pins with the pin map confirmed on the board. Sets the upgrade URL.

devices/nt98566_lite_xm-rm1/general/overlay/usr/share/openipc/customizer.sh

nt98566_lite.listExclude non-SC501AI sensor files and the unused r8712u module +40/-0

Exclude non-SC501AI sensor files and the unused r8712u module

• Removes sensor configs and modules for every sensor except SC501AI from the image. Also drops r8712u.ko, which is built only to pull in WIRELESS_EXT and is not loaded at runtime.

devices/nt98566_lite_xm-rm1/general/scripts/excludes/nt98566_lite.list

@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)

Grey Divider


Remediation recommended

1. Flash size set to 8 MB on a 16 MB board ⊘ Outdated Rule violation Correctness
Description
BR2_OPENIPC_FLASH_SIZE is set to 8, so the image is built for the 8 MB NOR layout, while the
README row and the PR description both say this board has 16 MB NOR (XM FM25Q128A). The comment
justifies the choice as keeping the lite layout the owner's camera already runs, but the rule
requires the flash size to match the target. The image will not use the chip's extra 8 MB, and the
16 MB layout has not been tried on this board.

Grey Divider

Tip of the day
💡 Did you know, you can open the rule or relationship behind a finding in one click

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

The flash is 16 MB, so the profile is ultimate rather than lite on the
8 MB layout: majestic ultimate with the NPU's object detector
(nvtnpu-models), LAME, exFAT and ZeroTier, as firmware's nt98566 ultimate
carries them, but on NOR. majestic-af is left out: the lens is fixed.

The image is packaged with post-image-split.sh and the kernel read size
firmware's nt98566_lite uses since the split move (OpenIPC/firmware#3049),
so OpenIPC's Novatek U-Boot, which scans only up to 0x400000, boots it.

The directory, defconfig, exclude list and upgrade URL follow the new name.
@openipc-ai openipc-ai changed the title nt98566_lite_xm-rm1: add the XM IPC-RM1-BLK562 (NT98566 + SC501AI, ATBM6062 USB Wi-Fi, pan/tilt) nt98566_ultimate_xm-rm1: add the XM IPC-RM1-BLK562 (NT98566 + SC501AI, ATBM6062 USB Wi-Fi, pan/tilt) Dec 5, 2026

@openipc-ai openipc-ai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this is a careful first profile. Decoding XM's group << 4 | pin into kernel GPIO numbers, and confirming the night-mode pins on the board, is exactly the evidence a profile needs.

I pushed one change to the branch (8712c11) and renamed the PR to match. Since you haven't flashed anything from this branch yet, now was the cheapest moment for it:

  • nt98566_lite_xm-rm1 → nt98566_ultimate_xm-rm1, BR2_OPENIPC_FLASH_SIZE="16". This repo builds boards with more than 8 MB of flash as ultimate. Lite is a size compromise, and on this SoC it leaves out majestic ultimate and the NPU's object detector (nvtnpu-models). The package set is firmware's nt98566_ultimate (which is NAND-only) adapted to NOR: NVTNPU_MODELS, LAME, EXFAT, ZEROTIER. I left out MAJESTIC_AF, since this lens is fixed. The IVG-N8S profile you started from is still lite on the 8 MB layout only because it was added before that rule.
  • Split NOR layout. Firmware moved the NT98566 profiles to post-image-split.sh in OpenIPC/firmware#3049, together with BR2_OPENIPC_NOR_KERNEL_READ_SIZE=0x3B0000 so OpenIPC's Novatek U-Boot (which scans only up to 0x400000) boots the image. Your defconfig, copied from IVG-N8S, had neither, so it would have built the old fixed layout. Both are in now.
  • The exclude list became nt98566_ultimate.list, and the upgrade URL is now nt98566_ultimate_xm-rm1-nor.tgz. The rest is unchanged: the Wi-Fi fragment (the R8712U trick for WIRELESS_EXT, as on the WS03), the exclude list's contents, the pins.

This also settles the question you left open about fitting the 5 MB lite rootfs. CI will report the real size against the 16 MB layout.

I'm approving the CI run now. Once it's built, please flash it and report back, as you planned: boot, video, Wi-Fi (and whether the module needs a power GPIO), pan/tilt direction and phase order, and night mode on this image. With video, Wi-Fi and night mode confirmed on the CI image, it's ready to merge. Pan/tilt can stay "untested" in the README row if the stepper order still needs work.

@Simi541

Simi541 commented Dec 5, 2026

Copy link
Copy Markdown
Author

CI fails inside the Wi-Fi driver package, not in this profile:

atbm606x/hal_apollo/mac80211/iface.c:2001:14: error: 'struct net_device' has no member named 'destructor'; did you mean 'priv_destructor'?

ieee80211_if_setup() switches to needs_free_netdev / priv_destructor only from 4.20, and ieee80211_if_free() sits behind the same 4.20 guard. But .destructor went away in 4.12 (cf124db566e6, also in 4.11.9), so the NT98566's 4.19.91 is the first kernel in that gap this driver has been built for. Moving both guards to 4.11.9, the bound the tree's own backport-include/linux/netdevice.h already uses for netdev_set_priv_destructor(), fixes it. Kernels below 4.11.9 and from 4.20 on build the same code as before:

diff --git a/atbm606x/hal_apollo/mac80211/iface.c b/atbm606x/hal_apollo/mac80211/iface.c
index eed876b..d69b08d 100644
--- a/atbm606x/hal_apollo/mac80211/iface.c
+++ b/atbm606x/hal_apollo/mac80211/iface.c
@@ -1977,7 +1977,7 @@ static const struct net_device_ops ieee80211_monitorif_ops = {
 	.ndo_do_ioctl = ieee80211_netdev_ioctrl,
 #endif
 };
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 9))
 static void ieee80211_if_free(struct net_device *dev)
 {
         free_percpu(dev->tstats);
@@ -1994,7 +1994,7 @@ static void ieee80211_if_setup(struct net_device *dev)
 	/* we will validate the address ourselves in ->open */
 	dev->validate_addr = NULL;
 #endif
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 9))
 	dev->needs_free_netdev = true;
     dev->priv_destructor = ieee80211_if_free;
 #else

Checked locally against the NT98566 kernel (openipc/linux novatek-nt9856x at 8e3fb8b, nt98566.generic.config plus this PR's fragment), with the package's own MODULE_MAKE_OPTS:

  • unpatched: the same error as CI, and the only one in the driver (make -k);
  • patched: atbm606x_wifi_usb.ko and cfg80211.ko build with no errors, and modpost against the full kernel's Module.symvers reports no undefined symbols, so the R8712U / WIRELESS_EXT fragment covers what the bundled cfg80211 needs.

ble_host/os/linux/atbm_os_skbuf.c has the same pattern (a 4.19 guard, then an unconditional dev->destructor = free_netdev). It isn't built with this package's options, so I left it alone.

Could this go into OpenIPC/atbm_60xx, with ATBM606X_OPENIPC_VERSION bumped in firmware? A re-run here should then get through. I can open those PRs instead if that's easier.

@Simi541
Simi541 requested a review from openipc-ai December 5, 2026 20:28

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants