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
|
||||
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"
|
||||
|
@ -26,14 +40,12 @@ check_toolchain() {
|
|||
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"
|
||||
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
|
Loading…
Reference in New Issue