aboutsummaryrefslogtreecommitdiff
path: root/run
diff options
context:
space:
mode:
authorMarvin Borner2021-05-21 10:51:25 +0200
committerMarvin Borner2021-05-21 10:51:25 +0200
commit6c3c1060e2d662b36704be11d006e036b7f85200 (patch)
treebd35cdf1ef8d7eb2cba1603495e9aa41dabe8b0a /run
parent3020f8d6c53f54f439f77673eb7773e0e630a1da (diff)
Disabled grub install for non-release builds
Diffstat (limited to 'run')
-rwxr-xr-xrun15
1 files changed, 10 insertions, 5 deletions
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() {