summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2013-05-01 21:57:29 (GMT)
committerH. Peter Anvin <hpa@linux.intel.com>2013-05-01 21:57:29 (GMT)
commit4888992585e4953fdd710549dd11ee93c2dbd640 (patch)
tree3a1e7fc3ef26eca8c12b8ab401074c5bd9a3b95d
parentff10318e702301ccec8bedc8fa1269086ecd5495 (diff)
downloadktest-4888992585e4953fdd710549dd11ee93c2dbd640.zip
ktest-4888992585e4953fdd710549dd11ee93c2dbd640.tar.gz
ktest-4888992585e4953fdd710549dd11ee93c2dbd640.tar.bz2
ktest-4888992585e4953fdd710549dd11ee93c2dbd640.tar.xz
allmake: parallellize better, add timestamping
-rwxr-xr-xallmake.sh25
1 files changed, 18 insertions, 7 deletions
diff --git a/allmake.sh b/allmake.sh
index 8fd8c53..9c4467a 100755
--- a/allmake.sh
+++ b/allmake.sh
@@ -7,6 +7,11 @@ fi
set -xe
+date +'*** Start: %Y-%m-%d %H:%M:%S'
+
+ulimit -u hard
+ulimit -n hard
+
canned='i386 x86_64 i386-pae'
special='i386-allconfig x86_64-allconfig i386-modconfig x86_64-modconfig i386-noconfig x86_64-noconfig'
@@ -18,7 +23,7 @@ here="$(cd "$(dirname "$0")" && pwd)"
if [ -z "$JOBS" ]; then
cpus=$(grep '^processor' < /proc/cpuinfo | wc -l)
- JOBS=$((cpus))
+ JOBS=$((cpus*2))
fi
# This can be 'ccache gcc'
@@ -33,9 +38,9 @@ for c in $canned; do
cp "$here"/config.$c o.$c/.config
fi
if grep -q -s '^CONFIG_X86_64=' o.$c/.config; then
- yes '' | make ARCH=x86_64 O=o.$c CC="$gcc" oldconfig
+ yes '' | make -j$JOBS ARCH=x86_64 O=o.$c CC="$gcc" oldconfig &
else
- yes '' | make ARCH=i386 O=o.$c CC="$gcc -m32" oldconfig
+ yes '' | make -j$JOBS ARCH=i386 O=o.$c CC="$gcc -m32" oldconfig &
fi
done
@@ -45,15 +50,19 @@ done
for a in x86_64 i386; do
if [ "$a" = i386 ]; then gccopt=' -m32'; else gccopt=''; fi
mkdir -p o.$a-allconfig o.$a-modconfig o.$a-noconfig
- KCONFIG_ALLCONFIG="$here"/override.yes make ARCH=$a O=o.$a-allconfig CC="$gcc$gccopt" allyesconfig
- KCONFIG_ALLCONFIG="$here"/override.mod make ARCH=$a O=o.$a-modconfig CC="$gcc$gccopt" allmodconfig
- KCONFIG_ALLCONFIG="$here"/override.no make ARCH=$a O=o.$a-noconfig CC="$gcc$gccopt" allnoconfig
+ KCONFIG_ALLCONFIG="$here"/override.yes make -j$JOBS ARCH=$a O=o.$a-allconfig CC="$gcc$gccopt" allyesconfig &
+ KCONFIG_ALLCONFIG="$here"/override.mod make -j$JOBS ARCH=$a O=o.$a-modconfig CC="$gcc$gccopt" allmodconfig &
+ KCONFIG_ALLCONFIG="$here"/override.no make -j$JOBS ARCH=$a O=o.$a-noconfig CC="$gcc$gccopt" allnoconfig &
done
+wait
+
+date +'*** Config done: %Y-%m-%d %H:%M:%S'
+
MKFILE=/tmp/allmake.$$
rm -f $MKFILE
-fdargs='ro root=/dev/sda1 console=tty0 console=ttyS0,115200 earlyprintk=serial,ttyS0 debug'
+fdargs='ro root=/dev/sda1 console=tty0 console=ttyS0,115200 earlyprintk=serial,ttyS0 debug memblock=debug'
cat > $MKFILE <<EOF
TARGET=all
@@ -81,3 +90,5 @@ done
make -j$JOBS -f $MKFILE "$@"
make -j$JOBS -f $MKFILE FDARGS="$fdargs" TARGET=isoimage TEEOPT='-a' "$@"
rm -f $MKFILE
+
+date +'*** End: %Y-%m-%d %H:%M:%S'