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 ""
|
||||
}
|
||||
|
||||
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() {
|
||||
echo " --> Building kernel"
|
||||
|
@ -88,11 +109,18 @@ generate_image() {
|
|||
|
||||
echo "!=====[ NoxOS build script ]=====!"
|
||||
|
||||
workspace_setup
|
||||
kernel_build
|
||||
[ ! -d "build/limine" ] && limine_install
|
||||
generate_initial_ramdisk
|
||||
generate_image
|
||||
case $1 in
|
||||
"check")
|
||||
check_toolchain
|
||||
;;
|
||||
*)
|
||||
workspace_setup
|
||||
kernel_build
|
||||
[ ! -d "build/limine" ] && limine_install
|
||||
generate_initial_ramdisk
|
||||
generate_image
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "!=====[ Finished ]=====!"
|
||||
|
||||
|
|
Loading…
Reference in New Issue