|
@@ -10,6 +10,7 @@
|
|
|
# VERSION = the version tag (can only be empty if BRANCH=experimental)
|
|
|
# BUILD_TS = build timestamp (format: %Y-%m-%d %H:%M:%S)
|
|
|
# BROKEN = 0 (default) or 1, build the untested hardware model firmwares, too
|
|
|
+# MAKEJOBS = number of compiler processes running in parallel (default: number of CPUs/Cores)
|
|
|
#
|
|
|
|
|
|
if [ "_$BRANCH" == "_" ]; then
|
|
@@ -81,21 +82,22 @@ if [ "$BRANCH" != "experimental" ]; then
|
|
|
fi
|
|
|
|
|
|
### PREPARE
|
|
|
+[ -n "${MAKEJOBS}" ] || MAKEJOBS=$(grep -c "^processor" /proc/cpuinfo)
|
|
|
progress "Preparing the build environment (make update) ..."
|
|
|
make update
|
|
|
[ "$?" -eq "0" ] || abort "Failed to update the build environment, mimimi."
|
|
|
|
|
|
### BUILD TOOLCHAIN
|
|
|
progress "Building toolchain if necessary (this is not possible on a fresh build) ..."
|
|
|
-faketime "$BUILD_TS" make toolchain -j 1
|
|
|
+faketime "$BUILD_TS" make toolchain -j ${MAKEJOBS}
|
|
|
|
|
|
### BUILD FIRMWARE
|
|
|
progress "Building the firmware - please stand by!"
|
|
|
[ "_$BROKEN" == "_" ] && export BROKEN=0
|
|
|
if [ "$BRANCH" != "experimental" ]; then
|
|
|
- GLUON_BRANCH=$BRANCH GLUON_RELEASE=$VERSION BROKEN=$BROKEN faketime "$BUILD_TS" make -j 4
|
|
|
+ GLUON_BRANCH=$BRANCH GLUON_RELEASE=$VERSION BROKEN=$BROKEN faketime "$BUILD_TS" make -j ${MAKEJOBS}
|
|
|
else
|
|
|
- GLUON_BRANCH=experimental BROKEN=$BROKEN faketime "$BUILD_TS" make -j 4
|
|
|
+ GLUON_BRANCH=experimental faketime "$BUILD_TS" make -j ${MAKEJOBS}
|
|
|
fi
|
|
|
|
|
|
[ "$?" -eq "0" ] || abort "Failed to build the firmware, mimimi."
|