diff options
Diffstat (limited to 'kernel/run')
-rwxr-xr-x | kernel/run | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -12,6 +12,7 @@ build_mode=release action=help target=x86_64 test_mode=false +serial_mode=false function define_vars() { target_name="$target-$name" target_path="target/" @@ -20,7 +21,7 @@ function define_vars() { iso_path="$target_path/iso/" obj_path="$iso_path/obj/" src_path="src/" - asm_path="$src_path/" + asm_path="$src_path/asm/" link_script="$src_path/linker.ld" grub_cfg="$src_path/grub.cfg" } @@ -33,6 +34,7 @@ print_help() { echo " -mode=<str> set build mode (standard: $build_mode)" echo " -target=<str> set target (standard: $target)" echo " -test enable test mode (standard: disabled)" + echo " -serial enable serial mode (standard: disabled)" echo echo "actions:" echo " build build the iso" @@ -90,7 +92,10 @@ run() { "x86_64") qemu="qemu-system-x86_64 -cdrom $iso_path/$name.iso" if $test_mode; then - qemu="$qemu -device isa-debug-exit,iobase=0xf4,iosize=0x04 -serial stdio -display none" + qemu="$qemu -device isa-debug-exit,iobase=0xf4,iosize=0x04 -serial stdio" + if $serial_mode; then + qemu="$qemu -display none" + fi fi $qemu case "$?" in @@ -115,14 +120,15 @@ for arg in "$@"; do target="$(echo $arg | sed "s/^-target=//")"; define_vars;; -test) test_mode=true; define_vars;; - /*kernel-*) - kernel_libary=$arg;; + -serial) + serial_mode=true; define_vars;; "run") action=run;; "build") action=build;; "test") action=test;; "help") action=help;; *) - echo "warn: ignoring unknown option '$arg'";; + echo "warn: ignoring unknown option '$arg'" + kernel_libary=$arg;; esac done |