WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit f4fe8cc

Browse files
committed
install: Add option to disable VPMADT032 echo canceller driver.
Due to Sangoma's persistent negligence and incompetence, the VPMADT032 drivers cannot be built on newer kernels, due to the objtool change made in kernel commit torvalds/linux@0b10177. Since the VPMADT032 involves a binary, the source for which is not present in the tree, only Sangoma can fix this issue. Since this is unlikely to happen anytime soon, given their incompetence and gross mismanagement to date, add an option to disable this particular driver so the rest of DAHDI Linux can successfully compile and install.
1 parent aea7a46 commit f4fe8cc

File tree

5 files changed

+115
-3
lines changed

5 files changed

+115
-3
lines changed

.github/workflows/main.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,35 @@ jobs:
166166
cd $GITHUB_WORKSPACE
167167
./phreaknet.sh make
168168
GIT_REPO_PATH=${GITHUB_WORKSPACE} KSRC=/usr/src/linux-next phreaknet dahdi --drivers
169+
dahdi-next-no-vpmadt032:
170+
runs-on: ubuntu-24.04
171+
name: DAHDI, next kernel (VPMADT032 disabled)
172+
container: debian:13
173+
steps:
174+
- name: Install packages
175+
run: |
176+
apt-get -y update
177+
apt-get -y upgrade
178+
apt-get -y install git gcc make perl-modules flex bison wget libssl-dev libelf-dev bc curl
179+
- name: Clone kernel
180+
run: |
181+
cd /usr/src
182+
git clone --depth 1 git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
183+
- name: Checkout
184+
uses: actions/checkout@v4
185+
- name: Build kernel
186+
run: |
187+
cd /usr/src/linux-next
188+
make -j$(nproc) kernelversion
189+
make -j$(nproc) x86_64_defconfig
190+
make -j$(nproc) modules_prepare
191+
make -j$(nproc)
192+
make -j$(nproc) modules
193+
- name: Build DAHDI
194+
run: |
195+
cd $GITHUB_WORKSPACE
196+
./phreaknet.sh make
197+
GIT_REPO_PATH=${GITHUB_WORKSPACE} KSRC=/usr/src/linux-next phreaknet dahdi --drivers --disable-vpmadt032
169198
dahdi-next-fortified:
170199
runs-on: ubuntu-24.04
171200
name: DAHDI, fortified
@@ -293,6 +322,16 @@ jobs:
293322
run: |
294323
./phreaknet.sh make
295324
GIT_REPO_PATH=${GITHUB_WORKSPACE} INSTALL_LIBPRI=0 INSTALL_LIBSS7=0 phreaknet install --fast --dahdi --autokvers --drivers --devmode --lightweight --vanilla
325+
alpine-linux:
326+
runs-on: ubuntu-24.04
327+
name: Alpine Linux
328+
container: alpine:latest
329+
steps:
330+
- uses: actions/checkout@v4
331+
- name: Build DAHDI and Asterisk
332+
run: |
333+
./phreaknet.sh make
334+
GIT_REPO_PATH=${GITHUB_WORKSPACE} phreaknet install --fast --dahdi --autokvers --drivers --devmode --disable-vpmadt032
296335
alpine-linux-322:
297336
runs-on: ubuntu-24.04
298337
# Newer versions need the fatal objtool patch reverted, which requires building the kernel... not worth it on Alpine

patches/vpmadt032_disable.diff

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
diff --git a/drivers/dahdi/Kbuild b/drivers/dahdi/Kbuild
2+
index d9d26da..5029aa7 100644
3+
--- a/drivers/dahdi/Kbuild
4+
+++ b/drivers/dahdi/Kbuild
5+
@@ -132,16 +132,16 @@ endif
6+
# VPMADT032 Loader
7+
###############################################################################
8+
9+
-dahdi_vpmadt032_loader-objs := vpmadt032_loader/dahdi_vpmadt032_loader.o
10+
-
11+
-ifneq ($(DAHDI_ARCH),)
12+
- ifneq ($(wildcard $(src)/vpmadt032_loader/vpmadt032_$(DAHDI_ARCH).o_shipped),)
13+
- $(shell touch $(KBUILD_EXTMOD)/vpmadt032_loader/.vpmadt032_$(DAHDI_ARCH).o.cmd)
14+
- VPMADT032_LOADER_PRESENT=yes
15+
- dahdi_vpmadt032_loader-objs += vpmadt032_loader/vpmadt032_$(DAHDI_ARCH).o
16+
- obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_VPMADT032_LOADER) += dahdi_vpmadt032_loader.o
17+
- endif
18+
-endif
19+
+#dahdi_vpmadt032_loader-objs := vpmadt032_loader/dahdi_vpmadt032_loader.o
20+
+
21+
+#ifneq ($(DAHDI_ARCH),)
22+
+# ifneq ($(wildcard $(src)/vpmadt032_loader/vpmadt032_$(DAHDI_ARCH).o_shipped),)
23+
+# $(shell touch $(KBUILD_EXTMOD)/vpmadt032_loader/.vpmadt032_$(DAHDI_ARCH).o.cmd)
24+
+# VPMADT032_LOADER_PRESENT=yes
25+
+# dahdi_vpmadt032_loader-objs += vpmadt032_loader/vpmadt032_$(DAHDI_ARCH).o
26+
+# obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_VPMADT032_LOADER) += dahdi_vpmadt032_loader.o
27+
+# endif
28+
+#endif
29+
30+
###############################################################################
31+
# HPEC Support

phreaknet.1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,9 @@ Install DAHDI along with Asterisk.
291291
\f[B]--drivers\f[R]
292292
Also install DAHDI drivers removed in 2018 by Sangoma
293293
.TP
294+
\f[B]--disable-vpmadt032\f[R]
295+
Disable VPMADT032 echo canceller driver from building (temporarily required on newer kernels)
296+
.TP
294297
\f[B]-f\f[R], \f[B]--force\f[R]
295298
Force install a new version of DAHDI/Asterisk, even if one already
296299
exists, overwriting old source directories if necessary.

phreaknet.1.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,9 @@ The following options may be used with the **install** command.
300300
**--drivers**
301301
: Also install DAHDI drivers removed in 2018 by Sangoma
302302

303+
**--disable-vpmadt032**
304+
: Disable VPMADT032 echo canceller driver from building (temporarily required on newer kernels)
305+
303306
**--generic**
304307
: Use generic kernel headers that do not match the installed kernel version
305308

phreaknet.sh

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@ CHAN_SCCP=0
250250
RPT_MODULES=0
251251
CHAN_DAHDI=0
252252
DAHDI_OLD_DRIVERS=0
253+
DAHDI_DISABLE_VPMADT032=0
253254
EMPULSE=1 # Automatically enable EMPULSE, cause why not?
254255
DAHDI_WANPIPE=0 # wanpipe only needed for Sangoma cards
255256
DEVMODE=0
@@ -636,6 +637,7 @@ Options:
636637
--rpt install: Add radio repeater modules
637638
--sccp install: Install chan_sccp channel driver (Cisco Skinny)
638639
--drivers install: Also install DAHDI drivers removed in 2018
640+
--disable-vpmadt032 install: Disable VPMADT032 echo canceller driver from building (temporarily required on newer kernels)
639641
--generic install: Use generic kernel headers that do not match the installed kernel version
640642
--autokvers install: Automatically pass the appropriate value for KVERS for DAHDI compilation (only needed on non-Debian systems)
641643
--extcodecs install: Specify this if any external codecs are being or will be installed
@@ -2108,12 +2110,22 @@ get_dahlin_source() {
21082110

21092111
# Not yet merged
21102112
dahlin_apply_pr 77 # EXTRA_CFLAGS removal
2111-
dahlin_apply_pr 79 # vpmadt032 binary blob
21122113
dahlin_apply_pr 92 # del_timer_sync wrapper
21132114
dahlin_apply_pr 96 # from_timer renamed to timer_container_of
21142115
dahlin_apply_pr 98 # hrtimer_init changed to hrtimer_setup
21152116
dahlin_apply_pr 99 # use module_init/module_exit instead of init_module/cleanup_module
21162117

2118+
# See https://github.com/asterisk/dahdi-linux/issues/97
2119+
# Sangoma needs to recreate the binary, until they do that, this driver is unusable on newer kernels
2120+
# and the target must be disabled to build the rest of DAHDI Linux.
2121+
# Sangoma is AWOL, so it might be a while...
2122+
if [ "$DAHDI_DISABLE_VPMADT032" = "1" ]; then
2123+
git_patch "vpmadt032_disable.diff"
2124+
else
2125+
# Not yet merged
2126+
dahlin_apply_pr 79 # vpmadt032 binary blob
2127+
fi
2128+
21172129
# New Features
21182130
if [ "$EXTRA_FEATURES" = "1" ]; then
21192131
# Real time dial pulsing (DAHDI to Asterisk)
@@ -2273,7 +2285,30 @@ install_dahdi() {
22732285
# if KSRC/KVERS env vars are set, they will automatically propagate to children
22742286
$AST_MAKE $DAHDI_CFLAGS
22752287
if [ $? -ne 0 ]; then
2276-
die "DAHDI Linux compilation failed, aborting install"
2288+
echoerr "DAHDI Linux compilation failed, aborting install"
2289+
if [ "$DAHDI_DISABLE_VPMADT032" != "1" ]; then
2290+
echoerr "*** Suggestion ***"
2291+
echoerr "If using a newer kernel, consider retrying install with --disable-vpmadt032 if VPMADT032 echo canceller is not required."
2292+
echoerr ""
2293+
echoerr "*** More Details ***"
2294+
echoerr "As you may know, Sangoma has not been maintaining DAHDI for years, even to perform adequate maintenance,"
2295+
echoerr "and DAHDI is currently community maintained, e.g. via PhreakScript."
2296+
echoerr "However, the VPMADT032 EC requires a binary firmware blob, an updated version of which is required,"
2297+
echoerr "and which can only come from Sangoma. As a result, until Sangoma gets their act together,"
2298+
echoerr "if you use an affected kernel version, the only way to successfully build DAHDI Linux"
2299+
echoerr "is to either:"
2300+
echoerr "1) Disable this driver, and that is what --disable-vpmadt032 does."
2301+
echoerr "2) Build the kernel from source, applying this patch: https://github.com/InterLinked1/phreakscript/blob/master/patches/objtool_check_nonfatal.diff"
2302+
echoerr " (There are some examples of this in the CI, if you choose this route: https://github.com/InterLinked1/phreakscript/blob/master/.github/workflows/main.yml)"
2303+
echoerr ""
2304+
echoerr "See this issue for more details: https://github.com/asterisk/dahdi-linux/issues/97"
2305+
echoerr ""
2306+
echoerr "The only way to get this fixed is to get Sangoma to do something about it."
2307+
echoerr "We suggest you call Sangoma to file a complaint at (877) 344-4861 x2,3,5"
2308+
echoerr "or by opening a case online at https://help.sangoma.com/s/"
2309+
echoerr "Otherwise, they will continue doing nothing, just like they have been."
2310+
fi
2311+
exit 1
22772312
fi
22782313
$AST_MAKE install $DAHDI_CFLAGS
22792314

@@ -3315,7 +3350,7 @@ else
33153350
fi
33163351

33173352
FLAG_TEST=0
3318-
PARSED_ARGUMENTS=$(getopt -n phreaknet -o bc:u:dfhostu:v:w -l backtraces,cc:,dahdi,force,flag-test,help,sip,testsuite,user:,version:,weaktls,alsa,cisco,rpt,sccp,clli:,debug:,devmode,disa:,drivers,experimental,extcodecs,g72x,fast,freepbx,generic,autokvers,lightweight,api-key:,rotate,audit,boilerplate,upstream:,manselect,minimal,vanilla,wanpipe,offline,noupdate -- "$@")
3353+
PARSED_ARGUMENTS=$(getopt -n phreaknet -o bc:u:dfhostu:v:w -l backtraces,cc:,dahdi,force,flag-test,help,sip,testsuite,user:,version:,weaktls,alsa,cisco,rpt,sccp,clli:,debug:,devmode,disa:,drivers,disable-vpmadt032,experimental,extcodecs,g72x,fast,freepbx,generic,autokvers,lightweight,api-key:,rotate,audit,boilerplate,upstream:,manselect,minimal,vanilla,wanpipe,offline,noupdate -- "$@")
33193354
VALID_ARGUMENTS=$?
33203355
if [ "$VALID_ARGUMENTS" != "0" ]; then
33213356
usage
@@ -3356,6 +3391,7 @@ while true; do
33563391
--debug ) DEBUG_LEVEL=$2; shift 2;;
33573392
--devmode ) DEVMODE=1; shift ;;
33583393
--drivers ) DAHDI_OLD_DRIVERS=1; shift ;;
3394+
--disable-vpmadt032 ) DAHDI_DISABLE_VPMADT032=1; shift ;;
33593395
--experimental ) EXPERIMENTAL_FEATURES=1; shift ;;
33603396
--extcodecs ) EXTERNAL_CODECS=1; shift ;;
33613397
--fast ) FAST_COMPILE=1; shift ;;

0 commit comments

Comments
 (0)