From 42b59c66f158c093ca64cba9e881ea043f5872a7 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Thu, 14 Aug 2025 01:56:25 -0400 Subject: build: Speed up build with -j$(nproc) Signed-off-by: Ian Moffett --- hyra-build.sh | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'hyra-build.sh') diff --git a/hyra-build.sh b/hyra-build.sh index 1ebc3bb..ab19724 100755 --- a/hyra-build.sh +++ b/hyra-build.sh @@ -34,6 +34,7 @@ set -e RAMFS_TOOL="tools/omar/bin/omar" RAMFS_NAME="ramfs.omar" install_flag="false" +NTHREADS="-j$(nproc)" ############################### # Generate sysroot skeleton @@ -85,6 +86,17 @@ gen_isofs() { stand/limine/limine bios-install $1 } +build() { + echo "-- Building libs --" + make libs + + echo "-- Building world --" + make $NTHREADS sbin bin + + echo "-- Building kernel --" + make $NTHREADS base/boot/hyra.krq +} + #################################### # Stage 1 - build production media #################################### @@ -93,7 +105,7 @@ stage1() { sysroot_skel echo "[*] stage1: Build kernel" - make + build echo "[*] stage1: Generate stage 1 RAMFS via OMAR" $RAMFS_TOOL -i base/ -o $RAMFS_NAME @@ -123,7 +135,8 @@ stage2() { echo "[*] stage2: Build kernel" gen_iso_root - make KBUILD_ARGS="-D_INSTALL_MEDIA=1" + export KBUILD_ARGS="-D_INSTALL_MEDIA=1" + build echo "[*] stage2: Generate stage 2 ISOFS (installer)" gen_isofs "Hyra-install.iso" -- cgit v1.2.3