From 6c3c1060e2d662b36704be11d006e036b7f85200 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Fri, 21 May 2021 10:51:25 +0200 Subject: Disabled grub install for non-release builds --- run | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'run') diff --git a/run b/run index c36cc2e..cb89ef8 100755 --- a/run +++ b/run @@ -187,8 +187,13 @@ make_build() { $SUDO cp -r disk/* mnt/ $SUDO chmod -R 0 mnt/conf/ $SUDO cp -r build/apps/ mnt/apps/ - $SUDO grub-install --boot-directory=mnt/boot --target=i386-pc --modules="ext2" "$DEV" - $SUDO umount mnt/ || (sleep 1 && sync && sudo umount mnt) + + # Install grub if release + if [ "$MELVIX_CONFIG" = "release" ]; then + $SUDO grub-install --boot-directory=mnt/boot --target=i386-pc --modules="ext2" "$DEV" + fi + + $SUDO umount mnt/ || (sync && sudo umount mnt/) $SUDO rm -rf mnt/ if [ "$(uname -s)" = "OpenBSD" ]; then @@ -202,17 +207,17 @@ make_build() { make_test() { if [ "$mode" = "test" ]; then - qemu_with_flags -serial file:test.log -nographic -drive file=build/disk.img,format=raw,index=1,media=disk + qemu_with_flags -serial file:test.log -nographic -kernel build/apps/kernel/exec -drive file=build/disk.img,format=raw,index=1,media=disk echo grep -E 'PASS|FAIL' test.log if grep -q "All tests passed" test.log; then exit 0; else exit 1; fi else - qemu_with_flags -serial stdio -drive file=build/disk.img,format=raw,index=1,media=disk + qemu_with_flags -serial stdio -kernel build/apps/kernel/exec -drive file=build/disk.img,format=raw,index=1,media=disk fi } make_debug() { - qemu_with_flags -serial stdio -drive file=build/disk.img,format=raw,index=1,media=disk -s -S + qemu_with_flags -serial stdio -kernel build/apps/kernel/exec -drive file=build/disk.img,format=raw,index=1,media=disk -s -S } make_disasm() { -- cgit v1.2.3