Boot Linux faster!

Check our new training course

Boot Linux faster!

Check our new training course
and Creative Commons CC-BY-SA
lecture and lab materials

Bootlin logo

Elixir Cross Referencer

#!/bin/bash

#
# Copyright (c) 2014-2015 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#

[ x$(which grep) = x ] && exit -1

num_cpus=$(\grep -c "^processor" /proc/cpuinfo)

if [ x${ZEPHYR_JOBS} = x ]; then
	ZEPHYR_JOBS=$((${num_cpus} * 2 + 1))
fi

echo Using $ZEPHYR_JOBS threads
nice make --jobs=${ZEPHYR_JOBS} --load-average=${num_cpus} $@