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:
@ -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!===="
|
||||
|
||||
@ -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
|
||||
|
||||
Reference in New Issue
Block a user