summaryrefslogtreecommitdiff
path: root/hyra-build.sh
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-08-14 01:56:25 -0400
committerIan Moffett <ian@osmora.org>2025-08-14 01:56:25 -0400
commit42b59c66f158c093ca64cba9e881ea043f5872a7 (patch)
tree10e4cc3c4830265f0340abe2275a2de4cc40c8f2 /hyra-build.sh
parente1b4932b5a133351e9d4aefee9c9f7280f86412f (diff)
build: Speed up build with -j$(nproc)expt
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'hyra-build.sh')
-rwxr-xr-xhyra-build.sh17
1 files changed, 15 insertions, 2 deletions
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"