From 5bb294967efa5a72ee7e8ef7b3315b52ac2a3c52 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Fri, 6 May 2016 20:07:06 +0100 Subject: Use all the cores --- virtual/miller-base/files/update-kernel | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/virtual/miller-base/files/update-kernel b/virtual/miller-base/files/update-kernel index 076a3c8..0720ad9 100755 --- a/virtual/miller-base/files/update-kernel +++ b/virtual/miller-base/files/update-kernel @@ -1,14 +1,15 @@ #!/bin/bash +CORES=$(grep core\ id /proc/cpuinfo | sort -u | wc -l) PATH="/usr/lib/ccache/bin:$PATH" cd /usr/src/linux || ( echo "No kernel directory"; exit 1 ) [ -f .config ] || ( echo "No kernel configuration"; exit 1 ) -make -j2 || ( echo "Make failed" ; exit 1 ) -make modules -j2 || ( echo "Make modules failed" ; exit 1 ) -make modules_install -j2 || ( echo "Make modules install failed" ; exit 1 ) +make -j$CORES || ( echo "Make failed" ; exit 1 ) +make modules -j$CORES || ( echo "Make modules failed" ; exit 1 ) +make modules_install -j$CORES || ( echo "Make modules install failed" ; exit 1 ) emerge -q1 @module-rebuild || exit 1 -make install -j2 || ( echo "Make install failed" ; exit 1 ) +make install -j$CORES || ( echo "Make install failed" ; exit 1 ) KV=$(head $(ls -1t /boot/config-* | head -n1) -n3 | tail -n1 | cut -d ' ' -f 3) if [ -x /usr/bin/dracut ] ; then -- cgit v1.2.3