|
2 | 2 |
|
3 | 3 | # PhreakScript
|
4 | 4 | # (C) 2021-2024 Naveen Albert, PhreakNet, and others - https://github.com/InterLinked1/phreakscript ; https://portal.phreaknet.org ; https://docs.phreaknet.org
|
5 |
| -# v1.1.5 (2024-09-15) |
| 5 | +# v1.1.6 (2024-09-16) |
6 | 6 |
|
7 | 7 | # Setup (as root):
|
8 | 8 | # cd /usr/local/src
|
|
13 | 13 | # phreaknet install
|
14 | 14 |
|
15 | 15 | ## Begin Change Log:
|
| 16 | +# 2024-09-16 1.1.6 DAHDI: Add patch to enable building of XPP drivers on 32-bit architectures |
16 | 17 | # 2024-09-15 1.1.5 DAHDI: Massive overhaul to DAHDI stop/start/restart logic, fixes for manual span assignment
|
17 | 18 | # 2024-09-11 1.1.4 DAHDI: Target DAHDI 3.4.0, update patches
|
18 | 19 | # 2024-03-17 1.1.3 DAHDI: Only build wanpipe if requested
|
@@ -1552,9 +1553,20 @@ install_dahdi() {
|
1552 | 1553 | echoerr "Skipping DAHDI Linux feature patches..."
|
1553 | 1554 | fi
|
1554 | 1555 |
|
1555 |
| - # Don't compile the XPP driver for 32-bit |
1556 |
| - if [ "`uname -m`" = "armv7l" ] || [ "`uname -m`" = "i386" ] || [ "`uname -m`" = "i686" ]; then |
1557 |
| - echoerr "Not compiling XPP driver for 32-bit" |
| 1556 | + # Fix or skip compilation of the XPP driver for 32-bit |
| 1557 | + OS_ARCH=$( uname -m ) |
| 1558 | + printf "Detected architecture: %s\n" "$OS_ARCH" |
| 1559 | + if [ "$OS_ARCH" = "i386" ] || [ "$OS_ARCH" = "i686" ]; then |
| 1560 | + printf "32-bit OS detected... patching division in XPP drivers\n" |
| 1561 | + # This fixes this issue: |
| 1562 | + # ERROR: modpost: "__divdi3" [/usr/src/dahdi-linux-3.4.0/drivers/dahdi/xpp/xpp.ko] undefined! |
| 1563 | + # ERROR: modpost: "__divmoddi4" [/usr/src/dahdi-linux-3.4.0/drivers/dahdi/xpp/xpp.ko] undefined! |
| 1564 | + git_custom_patch "https://patch-diff.githubusercontent.com/raw/asterisk/dahdi-linux/pull/32.patch" # PR 32, not yet merged |
| 1565 | + elif [ "$OS_ARCH" = "armv7l" ]; then |
| 1566 | + # I can't test this build at the moment, so to play it safe, I'm going to keep it disabled in this case, |
| 1567 | + # given that the xpp drivers are seldom used and especially unlikely to be used by someone with this architecture. |
| 1568 | + # TODO Slightly related, once GitHub allows free arm64 builds, do more testing: https://github.com/orgs/community/discussions/19197 |
| 1569 | + echoerr "Skipping compilation of XPP driver for this 32-bit architecture! ($OS_ARCH)" |
1558 | 1570 | mv $AST_SOURCE_PARENT_DIR/$DAHDI_LIN_SRC_DIR/drivers/dahdi/xpp/Kbuild $AST_SOURCE_PARENT_DIR/$DAHDI_LIN_SRC_DIR/drivers/dahdi/xpp/Bad-Kbuild
|
1559 | 1571 | fi
|
1560 | 1572 |
|
|
0 commit comments