summaryrefslogtreecommitdiff
path: root/virtual/miller-base
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2016-05-06 20:07:06 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2016-05-06 20:07:06 +0100
commit5bb294967efa5a72ee7e8ef7b3315b52ac2a3c52 (patch)
tree3fb7d9bd8a7c882aa07e6a98bf381228e0126394 /virtual/miller-base
parentUse ccache (diff)
downloadportage-5bb294967efa5a72ee7e8ef7b3315b52ac2a3c52.tar.bz2
portage-5bb294967efa5a72ee7e8ef7b3315b52ac2a3c52.tar.xz
portage-5bb294967efa5a72ee7e8ef7b3315b52ac2a3c52.zip
Use all the cores
Diffstat (limited to 'virtual/miller-base')
-rwxr-xr-xvirtual/miller-base/files/update-kernel9
1 files 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