]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - make.sh
IPsec: Allow to configure a connection in waiting state
[people/pmueller/ipfire-2.x.git] / make.sh
diff --git a/make.sh b/make.sh
index 33ebc16bb01bceb0f8fc733d6df10e67f4fb10e0..e8591f363bc179ddd711a894d78a53bc8543017a 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -24,7 +24,7 @@
 
 NAME="IPFire"                                                  # Software name
 SNAME="ipfire"                                                 # Short name
-VERSION="2.19"                                                 # Version number
+VERSION="2.21"                                                 # Version number
 CORE="121"                                                     # Core Level (Filename)
 PAKFIRE_CORE="120"                                             # Core Level (PAKFIRE)
 GIT_BRANCH=`git rev-parse --abbrev-ref HEAD`                   # Git Branch
@@ -37,7 +37,7 @@ KVER=`grep --max-count=1 VER lfs/linux | awk '{ print $3 }'`
 GIT_TAG=$(git tag | tail -1)                                   # Git Tag
 GIT_LASTCOMMIT=$(git log | head -n1 | cut -d" " -f2 |head -c8) # Last commit
 
-TOOLCHAINVER=20180213
+TOOLCHAINVER=20180606
 
 ###############################################################################
 #
@@ -225,6 +225,30 @@ configure_build() {
 
                MAKETUNING="-j${parallelism}"
        fi
+
+       # Compression parameters
+       # We use mode 8 for reasonable memory usage when decompressing
+       # but with overall good compression
+       XZ_OPT="-8"
+
+       # We try to use as many cores as possible
+       XZ_OPT="${XZ_OPT} -T0"
+
+       # We need to limit memory because XZ uses too much when running
+       # in parallel and it isn't very smart in limiting itself.
+       # We allow XZ to use up to 70% of all system memory.
+       local xz_memory=$(( HOST_MEM * 7 / 10 ))
+
+       # XZ memory cannot be larger than 2GB on 32 bit systems
+       case "${build_arch}" in
+               i*86|armv*)
+                       if [ ${xz_memory} -gt 2048 ]; then
+                               xz_memory=2048
+                       fi
+                       ;;
+       esac
+
+       XZ_OPT="${XZ_OPT} --memory=${xz_memory}MiB"
 }
 
 configure_build_guess() {
@@ -861,21 +885,6 @@ fi
 # Get the amount of memory in this build system
 HOST_MEM=$(system_memory)
 
-# Checking host memory, tuning XZ_OPT
-
-if [ $HOST_MEM -lt 1024 ]; then
-       print_build_stage "Host-Memory: $HOST_MEM MiB"
-       print_build_stage "Not enough host memory (less than 1024 MiB, please consider upgrading)"
-
-       exit 1
-
-else
-
-       XZ_MEM="$(( HOST_MEM * 7 / 10 ))MiB"
-       XZ_OPT="-T4 -8 --memory=$XZ_MEM"
-
-fi
-
 if [ -n "${BUILD_ARCH}" ]; then
        configure_build "${BUILD_ARCH}"
 else
@@ -1133,6 +1142,7 @@ buildipfire() {
                lfsmake2 linux-initrd                   KCFG="-multi"
                ;;
   esac
+  lfsmake2 intel-microcode
   lfsmake2 xtables-addons                      USPACE="1"
   lfsmake2 openssl
   [ "${BUILD_ARCH}" = "i586" ] && lfsmake2 openssl KCFG='-sse2'
@@ -1573,7 +1583,7 @@ buildpackages() {
        lfsmake2 flash-images
   fi
 
-  mv $LFS/install/images/{*.iso,*.tgz,*.img.gz,*.bz2} $BASEDIR >> $LOGFILE 2>&1
+  mv $LFS/install/images/{*.iso,*.img.xz,*.bz2} $BASEDIR >> $LOGFILE 2>&1
 
   ipfirepackages
 
@@ -1585,7 +1595,7 @@ buildpackages() {
   # remove not useable iso on armv5tel (needed to build flash images)
   [ "${BUILD_ARCH}" = "armv5tel" ] && rm -rf *.iso
 
-  for i in `ls *.bz2 *.img.gz *.iso`; do
+  for i in `ls *.bz2 *.img.xz *.iso`; do
        md5sum $i > $i.md5
   done
   cd $PWD
@@ -1776,8 +1786,8 @@ toolchain)
        buildtoolchain
        echo "`date -u '+%b %e %T'`: Create toolchain image for ${BUILD_ARCH}" | tee -a $LOGFILE
        test -d $BASEDIR/cache/toolchains || mkdir -p $BASEDIR/cache/toolchains
-       cd $BASEDIR && XZ_OPT="$(XZ_OPT)" tar -Jc --exclude='log/_build.*.log' -f cache/toolchains/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-${BUILD_ARCH}.tar.xz \
-               build/${TOOLS_DIR} build/bin/sh log >> $LOGFILE
+       cd $BASEDIR && tar -cf- --exclude='log/_build.*.log' build/${TOOLS_DIR} build/bin/sh log | xz ${XZ_OPT} \
+               > cache/toolchains/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-${BUILD_ARCH}.tar.xz
        md5sum cache/toolchains/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-${BUILD_ARCH}.tar.xz \
                > cache/toolchains/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-${BUILD_ARCH}.md5
        stdumount