script: Fix to use NCPUS dynamically 28/249728/1
authorHoegeun Kwon <hoegeun.kwon@gmail.com>
Mon, 14 Dec 2020 14:24:34 +0000 (23:24 +0900)
committerHoegeun Kwon <hoegeun.kwon@samsung.com>
Wed, 16 Dec 2020 09:06:05 +0000 (18:06 +0900)
It uses NCPUS dynamically.

Change-Id: Ib7b1229f387b9c91f4eb2b29cc8f3bfe207fcaaa
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@gmail.com>
build-rpi4.sh

index 34abe1b..c109144 100755 (executable)
@@ -1,5 +1,7 @@
 #!/bin/bash
 
+NCPUS=`cat /proc/cpuinfo | grep processor | wc -l`
+
 if [ $# != 1 ]; then
        echo "Usage : $0 <architecture>"
        echo "  architecture : arm or arm64"
@@ -28,7 +30,7 @@ if [ $1 = "arm" ]; then
                make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- tizen_bcm2711_defconfig
        fi
 
-       make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j8
+       make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j $NCPUS
 
        if [ ! -f "./arch/arm/boot/zImage" ]; then
                echo "Build fail"