diff --git a/px3se/mk-kernel.sh b/px3se/mk-kernel.sh index 6b0df9a..5f5be5b 100755 --- a/px3se/mk-kernel.sh +++ b/px3se/mk-kernel.sh @@ -1,6 +1,12 @@ #!/bin/bash -cd kernel && make ARCH=arm rockchip_linux_defconfig && make ARCH=arm px3se-evb.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=arm rockchip_linux_defconfig && make ARCH=arm px3se-evb.img -j$JOBS && cd - if [ $? -eq 0 ]; then echo "====Build kernel ok!====" diff --git a/px3se/mk-rootfs.sh b/px3se/mk-rootfs.sh index 8a76f8d..6084657 100755 --- a/px3se/mk-rootfs.sh +++ b/px3se/mk-rootfs.sh @@ -2,7 +2,7 @@ #buildroot defconfig LUNCH=rockchip_px3se #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 diff --git a/rk3288/mk-kernel.sh b/rk3288/mk-kernel.sh index 7089f1b..7781baf 100755 --- a/rk3288/mk-kernel.sh +++ b/rk3288/mk-kernel.sh @@ -1,6 +1,12 @@ #!/bin/bash -cd kernel && make ARCH=arm rockchip_linux_defconfig && make ARCH=arm rk3288-evb-rk808-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=arm rockchip_linux_defconfig && make ARCH=arm rk3288-evb-rk808-linux.img -j$JOBS && cd - if [ $? -eq 0 ]; then echo "====Build kernel ok!====" diff --git a/rk3288/mk-rootfs.sh b/rk3288/mk-rootfs.sh index 3497285..59d2da2 100755 --- a/rk3288/mk-rootfs.sh +++ b/rk3288/mk-rootfs.sh @@ -2,7 +2,7 @@ #buildroot defconfig LUNCH=rockchip_rk3288 #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 diff --git a/rk3326/mk-kernel.sh b/rk3326/mk-kernel.sh index 4b21e5a..11aa865 100755 --- a/rk3326/mk-kernel.sh +++ b/rk3326/mk-kernel.sh @@ -1,6 +1,12 @@ #!/bin/bash -cd kernel && make ARCH=arm64 rk3326_linux_defconfig && make ARCH=arm64 rk3326-evb-linux-lp3-v10.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 rk3326_linux_defconfig && make ARCH=arm64 rk3326-evb-linux-lp3-v10.img -j$JOBS && cd - if [ $? -eq 0 ]; then echo "====Build kernel ok!====" diff --git a/rk3326/mk-rootfs.sh b/rk3326/mk-rootfs.sh index f49a69d..c366ad7 100755 --- a/rk3326/mk-rootfs.sh +++ b/rk3326/mk-rootfs.sh @@ -2,7 +2,7 @@ #buildroot defconfig LUNCH=rockchip_rk3326 #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 diff --git a/rk3399/mk-kernel.sh b/rk3399/mk-kernel.sh index 3ab47b4..c262230 100755 --- a/rk3399/mk-kernel.sh +++ b/rk3399/mk-kernel.sh @@ -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!====" diff --git a/rk3399/mk-rootfs.sh b/rk3399/mk-rootfs.sh index 1c950f5..15fbf52 100755 --- a/rk3399/mk-rootfs.sh +++ b/rk3399/mk-rootfs.sh @@ -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