X-Git-Url: http://git.ipfire.org/?p=ipfire-2.x.git;a=blobdiff_plain;f=make.sh;h=0702716584e1ad44c25bea2f4e5bb2d524c475fe;hp=7067b84bab35153819ac8cac187861900ccefadf;hb=212f17c1145bb6978b4797eb9c805f603ecb1f29;hpb=0245f3b6e1c41a91cc3c915a48ea0a3ad4b56deb diff --git a/make.sh b/make.sh index 7067b84bab..0702716584 100755 --- a/make.sh +++ b/make.sh @@ -25,7 +25,7 @@ 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 @@ -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() { @@ -416,7 +440,7 @@ prepareenv() { # 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 @@ -526,6 +550,7 @@ enterchroot() { CCACHE_COMPRESS="${CCACHE_COMPRESS}" \ CCACHE_COMPILERCHECK="${CCACHE_COMPILERCHECK}" \ KVER="${KVER}" \ + XZ_OPT="${XZ_OPT}" \ $(fake_environ) \ $(qemu_environ) \ "$@" @@ -1249,7 +1274,6 @@ buildipfire() { lfsmake2 python-ipaddress lfsmake2 glib lfsmake2 GeoIP - lfsmake2 noip_updater lfsmake2 ntp lfsmake2 openssh lfsmake2 fontconfig @@ -1431,6 +1455,7 @@ buildipfire() { lfsmake2 parted lfsmake2 swig lfsmake2 u-boot + lfsmake2 u-boot-kirkwood lfsmake2 python-typing lfsmake2 python-m2crypto lfsmake2 wireless-regdb @@ -1557,7 +1582,7 @@ buildpackages() { 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 @@ -1760,7 +1785,7 @@ 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="-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