feature (build system): added toolchain check to build.sh
This commit is contained in:
parent
cebae95696
commit
088efd4b56
38
build.sh
38
build.sh
|
@ -30,6 +30,27 @@ workspace_setup() {
|
||||||
echo ""
|
echo ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
check_toolchain() {
|
||||||
|
echo " --> Checking Toolchain"
|
||||||
|
hash gcc
|
||||||
|
echo " |--> found gcc"
|
||||||
|
hash ld
|
||||||
|
echo " |--> found ld"
|
||||||
|
hash nasm
|
||||||
|
echo " |--> found nasm"
|
||||||
|
hash cmake
|
||||||
|
echo " |--> found cmake"
|
||||||
|
hash xorriso
|
||||||
|
echo " |--> found xorriso"
|
||||||
|
hash qemu-system-x86_64
|
||||||
|
echo " |--> found qemu"
|
||||||
|
|
||||||
|
[ ! -d "/usr/share/ovmf/x64/" ] && echo "OVMF binaries not found!" && exit 255
|
||||||
|
echo " |--> found ovmf"
|
||||||
|
|
||||||
|
echo " --> All checks passed"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
kernel_build() {
|
kernel_build() {
|
||||||
echo " --> Building kernel"
|
echo " --> Building kernel"
|
||||||
|
@ -88,11 +109,18 @@ generate_image() {
|
||||||
|
|
||||||
echo "!=====[ NoxOS build script ]=====!"
|
echo "!=====[ NoxOS build script ]=====!"
|
||||||
|
|
||||||
workspace_setup
|
case $1 in
|
||||||
kernel_build
|
"check")
|
||||||
[ ! -d "build/limine" ] && limine_install
|
check_toolchain
|
||||||
generate_initial_ramdisk
|
;;
|
||||||
generate_image
|
*)
|
||||||
|
workspace_setup
|
||||||
|
kernel_build
|
||||||
|
[ ! -d "build/limine" ] && limine_install
|
||||||
|
generate_initial_ramdisk
|
||||||
|
generate_image
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
echo "!=====[ Finished ]=====!"
|
echo "!=====[ Finished ]=====!"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue