summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build-submodules25
1 files changed, 11 insertions, 14 deletions
diff --git a/scripts/build-submodules b/scripts/build-submodules
index 2b29907e..3a7ea3a5 100755
--- a/scripts/build-submodules
+++ b/scripts/build-submodules
@@ -1,5 +1,4 @@
-#!/bin/bash
-#set -x
+#!/bin/bash
if [ ! -d "packages" ]; then
echo "This script needs to be executed inside the top root of vyos-build"
@@ -12,28 +11,28 @@ print_help() {
echo "Execute this sctipt from the root of the vyos-build directory"
echo ""
echo "This script could be executed from a Debian Jessie installation with all dependencies"
- echo "or from the vyos-builder docker container"
- echo "docker instructions"
+ echo "or from the vyos-builder docker container."
+ echo ""
echo "Build the container:"
- echo " docker build -t vyos-builder ."
+ echo " docker build -t vyos-builder ."
echo "Compile packages:"
- echo " docker run --rm -it -v $(pwd):/vyos -w /vyos --sysctl net.ipv6.conf.lo.disable_ipv6=0 vyos-builder scripts/build-docker-subpaclages"
+ echo " docker run --rm -it -v $(pwd):/vyos -w /vyos --sysctl net.ipv6.conf.lo.disable_ipv6=0 vyos-builder scripts/build-submodules"
+ echo ""
echo "Parameters:"
echo " --init-packages - Initiate all subpackages before building"
}
-
while test $# -gt 0
do
case "$1" in
- -h|-?|--help)
+ -h|-?|--help)
print_help
exit 0
;;
- --init-packages)
+ --init-packages)
INIT_PACKAGES=1
;;
- *)
+ *)
(>&2 echo "Error: Argument $1 is not valid")
echo ""
print_help
@@ -100,8 +99,6 @@ build_package() {
status_ok
}
-
-
echo "Cleaning up buildfiles..."
rm -rf $PKGDIR/*.deb
rm -rf $PKGDIR/*.changes
@@ -158,6 +155,7 @@ for PKG in mdns-repeater \
build_package "$PKG"
done
+
# KERNEL
build_kernel() {
status_start "Building-package: vyos-kernel"
@@ -185,7 +183,6 @@ build_kernel() {
build_kernel
-
# WIREGUARD
build_wireguard() {
status_start "Building package: vyos-wireguard"
@@ -249,7 +246,7 @@ build_accel-ppp() {
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)
-
+
( set -e
pushd packages/vyos-accel-ppp > /dev/null
#echo "src/wireguard.ko /lib/modules/$VERSION.$PATCHLEVEL.$SUBLEVEL-$ARCH-vyos/extra" > debian/wireguard-modules.install