aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kernel/multiboot.c13
-rwxr-xr-xrun15
2 files changed, 20 insertions, 8 deletions
diff --git a/kernel/multiboot.c b/kernel/multiboot.c
index 02a05cf..c0c9522 100644
--- a/kernel/multiboot.c
+++ b/kernel/multiboot.c
@@ -13,16 +13,23 @@ PROTECTED static char vbe[256] = { 0 };
CLEAR static void multiboot_parse_cmdline(const char *line)
{
+ u8 nolog = 0;
+
const char *start = line;
for (const char *p = line; p && *p; p++) {
if (*p == ' ')
start = p + 1;
- if (memcmp(start, "log", 3) == 0 && !ALPHANUMERIC(start[3])) {
- serial_enable();
- start += 3;
+ if (memcmp(start, "nolog", 5) == 0 && !ALPHANUMERIC(start[5])) {
+ nolog = 1;
+ start += 5;
}
}
+
+ if (nolog)
+ serial_disable();
+ else
+ serial_enable();
}
CLEAR u32 multiboot_vbe(void)
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() {