Skip to content

Commit 0ec8cd5

Browse files
committed
build.sh: allow limiting threads and show execution time for build
1 parent 3c125c4 commit 0ec8cd5

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

build.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ uploaddir=/var/lib/tftp
77

88
builddir=../build
99
ramdisksize=4G
10+
#numproc=8
1011

1112
board=bpi-r2
1213
#board=bpi-r64

build.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ then
55
exit 1;
66
fi
77

8+
numproc=$(grep ^processor /proc/cpuinfo | wc -l)
9+
810
. build.conf
911

1012
r64newswver=1.0
@@ -1016,7 +1018,7 @@ if [ -n "$kernver" ]; then
10161018
action=$1
10171019
file=$2
10181020
LANG=C
1019-
CFLAGS=-j$(grep ^processor /proc/cpuinfo | wc -l)
1021+
CFLAGS=-j${numproc}
10201022

10211023
#echo $action
10221024

@@ -1181,7 +1183,8 @@ if [ -n "$kernver" ]; then
11811183

11821184
"build")
11831185
echo "Build Kernel"
1184-
build
1186+
echo "building with ${numproc} threads"
1187+
time build
11851188
#$0 cryptodev
11861189
;;
11871190
"clean")

0 commit comments

Comments
 (0)