From 1af58621732ae5456fdae05e3e4a8c127ef7f887 Mon Sep 17 00:00:00 2001 From: InterLinked1 <24227567+InterLinked1@users.noreply.github.com> Date: Thu, 21 Nov 2024 18:05:21 -0500 Subject: [PATCH] CI: Fix kernel-next build. --- .github/workflows/main.yml | 5 +++-- patches/vpmadt032.diff | 13 +++++++++++++ phreaknet.sh | 8 +++++++- 3 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 patches/vpmadt032.diff diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1accce8..a95c8a5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -109,9 +109,10 @@ jobs: run: | cd /usr/src git clone --depth 1 git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git + mv linux-next linux - name: Build kernel run: | - cd /usr/src/linux-next + cd /usr/src/linux make -j$(nproc) kernelversion make -j$(nproc) x86_64_defconfig make -j$(nproc) modules_prepare @@ -122,7 +123,7 @@ jobs: - name: Build DAHDI run: | ./phreaknet.sh make - KSRC=/usr/src/linux-next phreaknet dahdi --drivers + KSRC=/usr/src/linux phreaknet dahdi --drivers ubuntu-latest: runs-on: ubuntu-24.04 name: Ubuntu 24.04 diff --git a/patches/vpmadt032.diff b/patches/vpmadt032.diff new file mode 100644 index 0000000..4649c8c --- /dev/null +++ b/patches/vpmadt032.diff @@ -0,0 +1,13 @@ +diff --git a/drivers/dahdi/Kbuild b/drivers/dahdi/Kbuild +index d9d26da..b8b63ed 100644 +--- a/drivers/dahdi/Kbuild ++++ b/drivers/dahdi/Kbuild +@@ -138,7 +138,7 @@ ifneq ($(DAHDI_ARCH),) + ifneq ($(wildcard $(src)/vpmadt032_loader/vpmadt032_$(DAHDI_ARCH).o_shipped),) + $(shell touch $(KBUILD_EXTMOD)/vpmadt032_loader/.vpmadt032_$(DAHDI_ARCH).o.cmd) + VPMADT032_LOADER_PRESENT=yes +- dahdi_vpmadt032_loader-objs += vpmadt032_loader/vpmadt032_$(DAHDI_ARCH).o ++ #dahdi_vpmadt032_loader-objs += vpmadt032_loader/vpmadt032_$(DAHDI_ARCH).o + obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_VPMADT032_LOADER) += dahdi_vpmadt032_loader.o + endif + endif diff --git a/phreaknet.sh b/phreaknet.sh index 8c372a1..78a564c 100755 --- a/phreaknet.sh +++ b/phreaknet.sh @@ -910,7 +910,7 @@ install_prereq() { # wget should already be installed at this point, so it's not included here PREREQ_PACKAGES="" RHEL_MAJOR_VERSION_8=0 - printf "Installing prerequisites for %s..." "$OS_DIST_INFO" + printf "Installing prerequisites for %s...\n" "$OS_DIST_INFO" # Even if we are just installing DAHDI (without Asterisk), $CHAN_DAHDI should be set to 1 at this point. # libnewt-dev is needed for newt, which dahdi_tool requires. If it's not available, it won't get built. # dwarves is needed for pahole, which DAHDI Linux install needs for BTF generation @@ -1879,6 +1879,8 @@ install_dahdi() { git_custom_patch "https://patch-diff.githubusercontent.com/raw/asterisk/dahdi-linux/pull/66.diff" # PR 66: Add braces around empty if body git_custom_patch "https://patch-diff.githubusercontent.com/raw/asterisk/dahdi-linux/pull/69.diff" # PR 69: DEFINE_SEMAPHORE for RHEL + git_custom_patch "https://raw.githubusercontent.com/InterLinked1/phreakscript/kernel-next/patches/vpmadt032.diff" + KERN_VER_MM=$( uname -r | cut -d. -f1-2 ) OS_DIST_2=$( printf "$OS_DIST_INFO" | cut -d' ' -f1-2) if [ "$KERN_VER_MM" = "4.18" ] && [ "$OS_DIST_2" = "Rocky Linux" ]; then @@ -1946,6 +1948,10 @@ install_dahdi() { # if KSRC/KVERS env vars are set, they will automatically propagate to children $AST_MAKE -j$(nproc) $DAHDI_CFLAGS if [ $? -ne 0 ]; then + if [ "$KSRC" != "" ]; then + # With debug, and not parallelized + $AST_MAKE -n $DAHDI_CFLAGS + fi die "DAHDI Linux compilation failed, aborting install" fi $AST_MAKE install $DAHDI_CFLAGS