diff options
author | Christian Poessinger <christian@poessinger.com> | 2019-01-05 22:13:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-05 22:13:13 +0100 |
commit | c329a9291c58a9cd340035b5508c3b869d094fd8 (patch) | |
tree | d3f3c9404123065e4cbcdf6de0c1905c8b765e05 | |
parent | bfc8cfc8910e09b97734da7c796cf9339694987e (diff) | |
parent | a47e9599b48e5402a1b14228cf6e019078116365 (diff) | |
download | vyos-build-c329a9291c58a9cd340035b5508c3b869d094fd8.tar.gz vyos-build-c329a9291c58a9cd340035b5508c3b869d094fd8.zip |
Merge pull request #34 from runborg/current
Added support for compiling `vyos-accel-ppp` in `build-submodules`
-rw-r--r-- | Dockerfile | 8 | ||||
-rwxr-xr-x | scripts/build-submodules | 33 |
2 files changed, 40 insertions, 1 deletions
@@ -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 c4b24a1..43568cf 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 |