Skip to content

Commit

Permalink
Makefile has configurable ports
Browse files Browse the repository at this point in the history
  • Loading branch information
Orycterope committed Jun 30, 2018
1 parent 38c07a3 commit 356c24e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Makefile.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
[env]
RUST_TARGET_PATH = "${PWD}"
GDB_PORT = { script = ["echo ${GDB_PORT:-9090}"] }
VNC_PORT = { script = ["echo ${VNC_PORT:-:0}"] }

[tasks.iso]
description = "Creates a bootable ISO containing the kernel and grub."
Expand Down Expand Up @@ -35,13 +37,13 @@ args = ["xbuild", "--target=i386-unknown-none", "--release", "--bin=kfs"]
description = "Runs the bootable ISO in qemu."
dependencies = ["iso-release"]
command = "qemu-system-i386"
args = ["-cdrom", "os.iso", "-serial", "stdio", "-vnc", ":0", "-no-reboot", "-enable-kvm"]
args = ["-cdrom", "os.iso", "-serial", "stdio", "-vnc", "${VNC_PORT}", "-no-reboot", "-enable-kvm"]

[tasks.qemu-debug]
description = "Runs the bootable ISO in qemu with gdb support"
dependencies = ["iso"]
command = "qemu-system-i386"
args = ["-cdrom", "os.iso", "-serial", "stdio", "-vnc", ":0", "-no-reboot", "-gdb", "tcp::9090", "-S", "-d", "int,cpu_reset"]
args = ["-cdrom", "os.iso", "-serial", "stdio", "-vnc", "${VNC_PORT}", "-no-reboot", "-gdb", "tcp::${GDB_PORT}", "-S", "-d", "int,cpu_reset"]

[tasks.doc]
description = "Document the kernel"
Expand Down

0 comments on commit 356c24e

Please sign in to comment.