Compare commits
3 Commits
1ad60a7351
...
4f5da10be1
Author | SHA1 | Date |
---|---|---|
Eric-Paul Ickhorn | 4f5da10be1 | |
Eric-Paul Ickhorn | 09ed173eef | |
Eric-Paul Ickhorn | 3a90af4704 |
|
@ -4,6 +4,20 @@
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
PROJECT_ROOT=$PWD
|
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() {
|
workspace_setup() {
|
||||||
echo " --> Setting up workspace"
|
echo " --> Setting up workspace"
|
||||||
|
@ -27,13 +41,11 @@ check_toolchain() {
|
||||||
hash qemu-system-x86_64
|
hash qemu-system-x86_64
|
||||||
echo " |--> found qemu"
|
echo " |--> found qemu"
|
||||||
|
|
||||||
[ ! -d "/usr/share/ovmf/x64/" ] && echo "OVMF binaries not found!" && exit 255
|
|
||||||
echo " |--> found ovmf"
|
|
||||||
|
|
||||||
echo " --> All checks passed"
|
echo " --> All checks passed"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
kernel_build() {
|
kernel_build() {
|
||||||
echo " --> Building kernel"
|
echo " --> Building kernel"
|
||||||
cd build/cmake
|
cd build/cmake
|
||||||
|
@ -97,12 +109,20 @@ generate_image() {
|
||||||
echo ""
|
echo ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cleanup_files() {
|
||||||
|
|
||||||
|
rm -Rf build/
|
||||||
|
}
|
||||||
|
|
||||||
echo "!=====[ NOXOS build script ]=====!"
|
echo "!=====[ NOXOS build script ]=====!"
|
||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
"check")
|
"check")
|
||||||
check_toolchain
|
check_toolchain
|
||||||
;;
|
;;
|
||||||
|
"cleanup")
|
||||||
|
cleanup_files
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
workspace_setup
|
workspace_setup
|
||||||
kernel_build
|
kernel_build
|
Loading…
Reference in New Issue