Compare commits

...

3 Commits

Author SHA1 Message Date
Eric-Paul Ickhorn 4f5da10be1 Renamed run.sh to run.bash aswell 2023-05-29 23:45:29 +02:00
Eric-Paul Ickhorn 09ed173eef Renamed build.sh to build.bash to more clearly indicate bash 2023-05-29 23:43:36 +02:00
Eric-Paul Ickhorn 3a90af4704 Added cleanup-functionality to build.sh 2023-05-29 23:43:16 +02:00
2 changed files with 24 additions and 4 deletions

View File

@ -4,6 +4,20 @@
set -e
PROJECT_ROOT=$PWD
OVMF_PATH=" "
if [[ -f "/usr/share/ovmf/x64/OVMF.fd" ]]; then
OVMF_PATH="/usr/share/ovmf/x64/OVMF.fd"
elif [[ -f "/usr/share/OVMF/OVMF.fd" ]]; then
OVMF_PATH="/usr/share/OVMF/OVMF.fd"
elif [[ -f "$PROECT_ROOT/build/ovmf/x64/OVMF.fd" ]]; then
OVMF_PATH="$PROECT_ROOT/build/ovmf/x64/OVMF.fd"
else
echo "Could not find OVMF-file! Did search at:"
echo "1) /usr/share/ovmf/x64/OVMF.fd"
echo "2) /usr/share/OVMF/OVMF.fd"
echo "3) $PROECT_ROOT/build/OVMF/x64/OVMF.fd"
exit 255
fi
workspace_setup() {
echo " --> Setting up workspace"
@ -27,13 +41,11 @@ check_toolchain() {
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"
cd build/cmake
@ -97,12 +109,20 @@ generate_image() {
echo ""
}
cleanup_files() {
rm -Rf build/
}
echo "!=====[ NOXOS build script ]=====!"
case $1 in
"check")
check_toolchain
;;
"cleanup")
cleanup_files
;;
*)
workspace_setup
kernel_build

View File