summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xhyra-build.sh17
-rw-r--r--sys/kern/init_main.c4
2 files changed, 17 insertions, 4 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"
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c
index 577b7ec..4a0f7a8 100644
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -111,8 +111,6 @@ main(void)
/* Expose the console to devfs */
cons_expose();
- uacpi_init();
-
/* Start scheduler and bootstrap APs */
md_intoff();
sched_init();
@@ -124,6 +122,8 @@ main(void)
spawn(&g_proc0, start_init, NULL, 0, &g_init);
md_inton();
+ uacpi_init();
+
/* Load all early drivers */
DRIVERS_INIT();