summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRunar Borge <runar@borge.nu>2019-01-01 23:34:27 +0100
committerRunar Borge <runar@borge.nu>2019-01-01 23:34:27 +0100
commitb66718a87b2599e34945000d2301959cce90152a (patch)
treeb189540585b16fee317612693623e55d270e88a4
parentaa0eb3349d354ea245a243124ee7b3b4cb8ca81f (diff)
downloadvyos-build-b66718a87b2599e34945000d2301959cce90152a.tar.gz
vyos-build-b66718a87b2599e34945000d2301959cce90152a.zip
Added support for compiiling vyos-accel-ppp
-rw-r--r--Dockerfile8
-rwxr-xr-xscripts/build-submodules33
2 files changed, 40 insertions, 1 deletions
diff --git a/Dockerfile b/Dockerfile
index b8ec8149..737fa5d6 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -113,9 +113,15 @@ RUN apt-get install -y \
libmnl-dev
# Packages needed for kernel
-RuN apt-get install -y \
+RUN apt-get install -y \
libelf-dev
+# Packages needed for vyos-accel-ppp
+RUN apt-get install -y \
+ cdbs \
+ cmake \
+ liblua5.1-dev
+
# Update live-build
RUN echo 'deb http://ftp.debian.org/debian stretch main' | tee -a /etc/apt/sources.list.d/stretch.list &&\
apt-get update &&\
diff --git a/scripts/build-submodules b/scripts/build-submodules
index 1981759f..c89d4388 100755
--- a/scripts/build-submodules
+++ b/scripts/build-submodules
@@ -157,3 +157,36 @@ if [ -d "packages/vyos-wireguard/debian" ]; then
else
status_skip "No source for: vyos-wireguard"
fi
+
+
+# ACCEL-PPP
+if [ -d "packages/vyos-accel-ppp/debian" ]; then
+ if [ -f "packages/vyos-kernel/Makefile" ]; then
+ status_start "Building package: vyos-accel-ppp"
+ if grep -q "KBUILD_OUTPUT" packages/vyos-kernel/Makefile; then
+ VERSION=$(grep "^VERSION" packages/vyos-kernel/Makefile | grep -Eo '[0-9]{1,4}')
+ PATCHLEVEL=$(grep "^PATCHLEVEL" packages/vyos-kernel/Makefile | grep -Eo '[0-9]{1,4}')
+ SUBLEVEL=$(grep "^SUBLEVEL" packages/vyos-kernel/Makefile | grep -Eo '[0-9]{1,4}')
+ ARCH=$(dpkg --print-architecture)
+ pushd packages/vyos-accel-ppp > /dev/null
+ #echo "src/wireguard.ko /lib/modules/$VERSION.$PATCHLEVEL.$SUBLEVEL-$ARCH-vyos/extra" > debian/wireguard-modules.install
+ echo "lib/modules/$VERSION.$PATCHLEVEL.$SUBLEVEL-$ARCH-vyos/extra/*.ko" > debian/vyos-accel-ppp-ipoe-kmod.install
+ sed -i "s#[0-9].[0-9][0-9].[0-9]-amd64-vyos#$VERSION.$PATCHLEVEL.$SUBLEVEL-$ARCH-vyos#g" debian/rules
+ KERNELDIR=$PKGDIR/vyos-kernel dpkg-buildpackage -uc -us -tc -b >$PKGDIR/vyos-accel-ppp.buildlog 2>&1
+ if [ $? -ne 0 ]; then
+ status_fail
+ error_msg "Failed to build package vyos-accel-ppp, look in vyos-accel-ppp.buildlog to examine the fault\n"
+ else
+ status_ok
+ fi
+ popd > /dev/null
+ else
+ status_fail
+ error_msg "Failed to build package vyos-accel-ppp, no kernel source found\n"
+ fi
+ else
+ seeor_msg "Something wrong with the kernel module?"
+ fi
+else
+ status_skip "No source for: vyos-accel-ppp"
+fi