From e1ff953af6fce8756e5dfe5eddb7e1ec5ee24439 Mon Sep 17 00:00:00 2001 From: Nathan Date: Wed, 5 Feb 2025 10:26:07 -0600 Subject: [PATCH] Updated build script to allocate threads for building based on the number of threads the build system has available --- build-kernel.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build-kernel.sh b/build-kernel.sh index d3d00671e..a498288cf 100755 --- a/build-kernel.sh +++ b/build-kernel.sh @@ -182,7 +182,7 @@ if [ "$RV1106" == "1" ]; then export CROSS_COMPILE=arm-linux-gnueabi- fi make ARCH=arm LOCALVERSION= $cfg - make ARCH=arm LOCALVERSION= -j8 + make ARCH=arm LOCALVERSION= -j$(($(nproc) - 2)) cp arch/arm/boot/zImage vmlinuz for dtb_f in $dtb do @@ -198,8 +198,8 @@ if [ "$RV1106" == "1" ]; then mkdir -p out/extlinux else make ARCH=arm64 LOCALVERSION= $cfg - make ARCH=arm64 LOCALVERSION= -j8 - make ARCH=arm64 LOCALVERSION= modules -j8 + make ARCH=arm64 LOCALVERSION= -j$(($(nproc) - 2)) + make ARCH=arm64 LOCALVERSION= modules -j$(($(nproc) - 2)) cp arch/arm64/boot/Image.gz vmlinuz cp arch/arm64/boot/Image Image for dtb_f in $dtb