NAME="IPFire" # Software name
SNAME="ipfire" # Short name
VERSION="2.19" # Version number
-CORE="120" # Core Level (Filename)
+CORE="121" # Core Level (Filename)
PAKFIRE_CORE="120" # Core Level (PAKFIRE)
GIT_BRANCH=`git rev-parse --abbrev-ref HEAD` # Git Branch
SLOGAN="www.ipfire.org" # Software slogan
# Checking if running as root user
if [ $(id -u) -ne 0 ]; then
- exiterror "Not building as root"
+ exiterror "root privileges required for building"
fi
# Checking for necessary temporary space
CCACHE_COMPRESS="${CCACHE_COMPRESS}" \
CCACHE_COMPILERCHECK="${CCACHE_COMPILERCHECK}" \
KVER="${KVER}" \
+ XZ_OPT="${XZ_OPT}" \
$(fake_environ) \
$(qemu_environ) \
"$@"
# 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
+ exiterror "You will need more than 1GB or host memory to run the build"
+fi
+
+# We compress archives with "xz -8", using all cores and up to 70% of memory
+XZ_MEM=$(( HOST_MEM * 7 / 10 ))
+
+# XZ memory cannot be larger than 2GB on 32 bit systems
+case "${HOST_ARCH}" in
+ i*86|armv*)
+ if [ ${XZ_MEM} -gt 2048 ]; then
+ XZ_MEM=2048
+ fi
+ ;;
+esac
+
+XZ_OPT="-T$(system_processors) -8 --memory=${XZ_MEM}MiB"
+
if [ -n "${BUILD_ARCH}" ]; then
configure_build "${BUILD_ARCH}"
else
lfsmake2 python-ipaddress
lfsmake2 glib
lfsmake2 GeoIP
- lfsmake2 noip_updater
lfsmake2 ntp
lfsmake2 openssh
lfsmake2 fontconfig
lfsmake2 parted
lfsmake2 swig
lfsmake2 u-boot
+ lfsmake2 u-boot-kirkwood
lfsmake2 python-typing
lfsmake2 python-m2crypto
lfsmake2 wireless-regdb
lfsmake2 flash-images
fi
- mv $LFS/install/images/{*.iso,*.tgz,*.img.gz,*.bz2} $BASEDIR >> $LOGFILE 2>&1
+ mv $LFS/install/images/{*.iso,*.tgz,*.img.xz,*.bz2} $BASEDIR >> $LOGFILE 2>&1
ipfirepackages
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="-T0 -8" tar -Jc --exclude='log/_build.*.log' -f cache/toolchains/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-${BUILD_ARCH}.tar.xz \
+ cd $BASEDIR && XZ_OPT="$(XZ_OPT)" tar -Jc --exclude='log/_build.*.log' -f cache/toolchains/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-${BUILD_ARCH}.tar.xz --xz \
build/${TOOLS_DIR} build/bin/sh log >> $LOGFILE
md5sum cache/toolchains/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-${BUILD_ARCH}.tar.xz \
> cache/toolchains/$SNAME-$VERSION-toolchain-$TOOLCHAINVER-${BUILD_ARCH}.md5