rockchip: change multiple jobs based on the number of CPUs online

Change-Id: Ie5ffb3baa6c7004d208dd5d3370d8b1bd53854e1
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
This commit is contained in:
Caesar Wang
2018-06-27 14:04:32 +08:00
parent 6ea5e91a98
commit 49a2415bb7
8 changed files with 36 additions and 12 deletions

View File

@ -1,6 +1,12 @@
#!/bin/bash
cd kernel && make ARCH=arm64 rockchip_linux_defconfig && make ARCH=arm64 rk3399-sapphire-excavator-linux.img -j12 && cd -
#
# Do a parallel build with multiple jobs, based on the number of CPUs online
# in this system: 'make -j8' on a 8-CPU system, etc.
#
JOBS=$(grep -c ^processor /proc/cpuinfo)
cd kernel && make ARCH=arm64 rockchip_linux_defconfig && make ARCH=arm64 rk3399-sapphire-excavator-linux.img -j$JOBS && cd -
if [ $? -eq 0 ]; then
echo "====Build kernel ok!===="

View File

@ -2,7 +2,7 @@
#buildroot defconfig
LUNCH=rockchip_rk3399
#build jobs
JOBS=12
JOBS=$(grep -c ^processor /proc/cpuinfo)
TOP_DIR=$(pwd)
source buildroot/build/envsetup.sh $LUNCH
TARGET_PRODUCT=`get_target_board_type $LUNCH`
@ -13,7 +13,7 @@ echo "$BUILD_CONFIG"
ROOTFS_IMAGE=buildroot/output/$BUILD_CONFIG/images/rootfs.img
# build rootfs
echo "====Start build rootfs===="
make
make -j$JOBS
if [ $? -eq 0 ]; then
echo "====Build rootfs ok!===="
else