Skip to content

Commit 1288aa8

Browse files
committed
DAHDI Linux: Update patch categorization.
* Move merged DAHDI Linux patches to merged section. They are not yet included in an official release, so this is not a functional change. * Always apply PR 32, which is still not yet merged. * Slipstream Asterisk PR 1030 (chan_dahdi fix).
1 parent fb99ea6 commit 1288aa8

File tree

1 file changed

+15
-19
lines changed

1 file changed

+15
-19
lines changed

phreaknet.sh

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1876,8 +1876,6 @@ install_dahdi() {
18761876
# Merged in master, but not yet in a current release
18771877
git_custom_patch "https://github.com/asterisk/dahdi-linux/commit/d7bbc8a96fe767bc4eee15dd43170f298282a4c3.diff" # RHEL fixes for const struct device *dev
18781878
git_custom_patch "https://github.com/asterisk/dahdi-linux/commit/d932d9fbc8b3559829a76fffcedceb78d1fc1887.diff" # dahdi_spantype fix
1879-
1880-
# Not yet merged
18811879
git_custom_patch "https://patch-diff.githubusercontent.com/raw/asterisk/dahdi-linux/pull/57.diff" # PR 57: RHEL build fixes
18821880
git_custom_patch "https://patch-diff.githubusercontent.com/raw/asterisk/dahdi-linux/pull/58.diff" # PR 58: non-RHEL build fixes for older kernels
18831881
git_custom_patch "https://patch-diff.githubusercontent.com/raw/asterisk/dahdi-linux/pull/60.diff" # PR 60: Fix old style declaration error on newer systems
@@ -1886,6 +1884,20 @@ install_dahdi() {
18861884
git_custom_patch "https://patch-diff.githubusercontent.com/raw/asterisk/dahdi-linux/pull/66.diff" # PR 66: Add braces around empty if body
18871885
git_custom_patch "https://patch-diff.githubusercontent.com/raw/asterisk/dahdi-linux/pull/69.diff" # PR 69: DEFINE_SEMAPHORE for RHEL
18881886

1887+
# Not yet merged
1888+
git_custom_patch "https://patch-diff.githubusercontent.com/raw/asterisk/dahdi-linux/pull/32.patch" # PR 32, not yet merged
1889+
1890+
# Fix or skip compilation of the XPP driver for 32-bit
1891+
OS_ARCH=$( uname -m )
1892+
printf "Detected architecture: %s\n" "$OS_ARCH"
1893+
if [ "$OS_ARCH" = "armv7l" ]; then
1894+
# I can't test this build at the moment, so to play it safe, I'm going to keep it disabled in this case,
1895+
# given that the xpp drivers are seldom used and especially unlikely to be used by someone with this architecture.
1896+
# TODO Slightly related, once GitHub allows free arm64 builds, do more testing: https://github.com/orgs/community/discussions/19197
1897+
echoerr "Skipping compilation of XPP driver for this 32-bit architecture! ($OS_ARCH)"
1898+
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
1899+
fi
1900+
18891901
KERN_VER_MM=$( uname -r | cut -d. -f1-2 )
18901902
OS_DIST_2=$( printf "$OS_DIST_INFO" | cut -d' ' -f1-2)
18911903
if [ "$KERN_VER_MM" = "4.18" ] && [ "$OS_DIST_2" = "Rocky Linux" ]; then
@@ -1922,23 +1934,6 @@ install_dahdi() {
19221934
echoerr "Skipping DAHDI Linux feature patches..."
19231935
fi
19241936

1925-
# Fix or skip compilation of the XPP driver for 32-bit
1926-
OS_ARCH=$( uname -m )
1927-
printf "Detected architecture: %s\n" "$OS_ARCH"
1928-
if [ "$OS_ARCH" = "i386" ] || [ "$OS_ARCH" = "i686" ]; then
1929-
printf "32-bit OS detected... patching division in XPP drivers\n"
1930-
# This fixes this issue:
1931-
# ERROR: modpost: "__divdi3" [/usr/src/dahdi-linux-3.4.0/drivers/dahdi/xpp/xpp.ko] undefined!
1932-
# ERROR: modpost: "__divmoddi4" [/usr/src/dahdi-linux-3.4.0/drivers/dahdi/xpp/xpp.ko] undefined!
1933-
git_custom_patch "https://patch-diff.githubusercontent.com/raw/asterisk/dahdi-linux/pull/32.patch" # PR 32, not yet merged
1934-
elif [ "$OS_ARCH" = "armv7l" ]; then
1935-
# I can't test this build at the moment, so to play it safe, I'm going to keep it disabled in this case,
1936-
# given that the xpp drivers are seldom used and especially unlikely to be used by someone with this architecture.
1937-
# TODO Slightly related, once GitHub allows free arm64 builds, do more testing: https://github.com/orgs/community/discussions/19197
1938-
echoerr "Skipping compilation of XPP driver for this 32-bit architecture! ($OS_ARCH)"
1939-
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
1940-
fi
1941-
19421937
# If IPv6 is disabled, force wget downloads to use the IPv4 address
19431938
# Could also use --prefer-family, but is IPv6 is disabled, we have to use IPv4 anyways
19441939
if [ "$IPV6_DISABLED" = "1" ]; then
@@ -2328,6 +2323,7 @@ phreak_patches() { # $1 = $PATCH_DIR, $2 = $AST_SRC_DIR
23282323
## Unmerged patches: remove or switch to asterisk_pr_if once merged
23292324
asterisk_pr_unconditional 918 # config.c #tryinclude fixes
23302325
asterisk_pr_unconditional 971 # config.c fix issues w/ whitespace in comments
2326+
asterisk_pr_unconditional 1030 # chan_dahdi: Fix wrong channel state when RINGING recieved
23312327

23322328
if [ $AST_MAJOR_VER -lt 21 ]; then
23332329
if [ "$EXTERNAL_CODECS" = "1" ]; then

0 commit comments

Comments
 (0)