Skip to content

dahdi-linux: forward-port to 6.18 kernel APIs, fix build flags, disable OSLEC#929

Open
graysky2 wants to merge 1 commit intoopenwrt:masterfrom
graysky2:dahdi
Open

dahdi-linux: forward-port to 6.18 kernel APIs, fix build flags, disable OSLEC#929
graysky2 wants to merge 1 commit intoopenwrt:masterfrom
graysky2:dahdi

Conversation

@graysky2
Copy link
Copy Markdown

@graysky2 graysky2 commented Dec 25, 2025

Maintainer: no one
Compile tested: (put here arch, model, OpenWrt version) SNAPSHOT
Run tested: (put here arch, model, OpenWrt version, tests done) not run tested

Description:

This patchset updates DAHDI 3.4.0 to build cleanly on Linux 6.18 and modern OpenWrt toolchains. Changes include:

  • Add kernel API compatibility shims:

  • Replace deprecated EXTRA_CFLAGS with ccflags-y across all Kbuilds to match upstream kernel changes and resolve build failures. Relating to oct612x include paths using ccflags-y, aligning with upstream PR sipp: fix musl compatibility #76[2]
    .

  • Disable OSLEC echo canceller:

    • OpenWrt provides only oslec.h without echo.c implementation
    • Prevents undefined oslec_* symbol failures during modpost
    • Marks dahdi-echocan-oslec package as unavailable on >= 6.18
  • Minor Makefile adjustments for OpenWrt packaging consistency.

These changes collectively restore a complete, warning-free build of DAHDI 3.4.0 on Linux 6.18 while preserving compatibility with existing drivers and OpenWrt module packaging.

  1. dahdi_dummy: Build failure with kernel >= 6.15 asterisk/dahdi-linux#93
  2. oct612x: Build failure due to EXTRA_CFLAGS being removed in the kernel asterisk/dahdi-linux#76

…le OSLEC

This patchset updates DAHDI 3.4.0 to build cleanly on Linux 6.18 and
modern OpenWrt toolchains. Changes include:

* Add kernel API compatibility shims:
  - Provide hrtimer_init() wrapper using hrtimer_setup()
  - Restore from_timer() helper
  - Map del_timer*() to timer_delete*() on >= 6.15, aligning with
    upstream PR openwrt#93[1].

* Replace deprecated EXTRA_CFLAGS with ccflags-y across all Kbuilds
  to match upstream kernel changes and resolve build failures. Relating
  to oct612x include paths using ccflags-y, aligning with upstream
  PR openwrt#76.[2]

* Disable OSLEC echo canceller:
  - OpenWrt provides only oslec.h without echo.c implementation
  - Prevents undefined oslec_* symbol failures during modpost
  - Marks dahdi-echocan-oslec package as unavailable on >= 6.18

* Minor Makefile adjustments for OpenWrt packaging consistency.

These changes collectively restore a complete, warning-free build of
DAHDI 3.4.0 on Linux 6.18 while preserving compatibility with existing
drivers and OpenWrt module packaging.

1. asterisk/dahdi-linux#93
2. asterisk/dahdi-linux#76

Signed-off-by: John Audia <therealgraysky@proton.me>
@dangowrt
Copy link
Copy Markdown
Member

OSLEC used to work fine with older kernels, it is built as module kmod-echo. It would be nice if don't have to drop it, I'm actively using it with the HFC-S BRI driver (HFC-S is a low-cost BRI chip without any DSP functionality, without OSLEC there is no echo cancelation at all, which is the more annoying the more latency there is in a call)

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.

2 participants