Compare commits
No commits in common. "4f5da10be1af6bb6c8cf44c25ed0a974f7525b5f" and "1ad60a735118df25bc5fa5716760e8df1e747351" have entirely different histories.
4f5da10be1
...
1ad60a7351
|
@ -4,20 +4,6 @@
|
||||||
|
|
||||||
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"
|
||||||
|
@ -40,12 +26,14 @@ check_toolchain() {
|
||||||
echo " |--> found xorriso"
|
echo " |--> found xorriso"
|
||||||
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
|
||||||
|
@ -109,20 +97,12 @@ 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