-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.toml
96 lines (78 loc) · 2.26 KB
/
Makefile.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
[config]
default_to_workspace = false
[env]
CPUS = 2
MEMORY = "512M"
QEMU_RISCV = "qemu-system-riscv64"
QEMU_X86 = "qemu-system-x86_64.exe"
QEMU_ARM = "qemu-system-aarch64.exe"
QEMU_RISCV_OPTS = """
-machine virt \
-kernel target/riscv64imac-unknown-none-elf/debug/basic_os \
"""
QEMU_X86_OPTS = """
-machine microvm \
-kernel target/x86_64-unknown-none/debug/basic_os \
"""
QEMU_ARM_OPTS = """
-cpu cortex-a76 \
-machine virt \
-kernel target/aarch64-unknown-none/debug/basic_os \
"""
QEMU_OPTS = """
-smp ${CPUS} \
-m ${MEMORY} \
-nographic \
"""
QEMU_GDB_OPTS = "-S -gdb tcp::26000" # The port 26000 must be the same as in the .gdbinit
[tasks.build]
command = "cargo"
args = ["build"]
[tasks.qemu-x86]
linux_alias = "linux_qemu_x86"
windows_alias = "windows_qemu_x86"
[tasks.linux_qemu_x86]
script = "${QEMU_X86} ${QEMU_X86_OPTS} ${QEMU_OPTS}"
dependencies = ["build"]
[tasks.windows_qemu_x86]
script = "%QEMU_X86% %QEMU_X86_OPTS% %QEMU_OPTS%"
dependencies = ["build"]
[tasks.qemu-riscv]
linux_alias = "linux_qemu_riscv"
windows_alias = "windows_qemu_riscv"
[tasks.linux_qemu_riscv]
script = "${QEMU_RISCV} ${QEMU_RISCV_OPTS} ${QEMU_OPTS}"
dependencies = ["build"]
[tasks.windows_qemu_riscv]
script = "%QEMU_RISCV% %QEMU_RISCV_OPTS% %QEMU_OPTS%"
dependencies = ["build"]
[tasks.qemu-arm]
linux_alias = "linux_qemu_arm"
windows_alias = "windows_qemu_arm"
[tasks.linux_qemu_arm]
script = "${QEMU_ARM} ${QEMU_ARM_OPTS} ${QEMU_OPTS}"
dependencies = ["build"]
[tasks.windows_qemu_arm]
script = "%QEMU_ARM% %QEMU_ARM_OPTS% %QEMU_OPTS%"
dependencies = ["build"]
[tasks.qemu-riscv-gdb]
linux_alias = "linux_qemu_riscv_gdb"
windows_alias = "windows_qemu_riscv_gdb"
[tasks.linux_qemu_riscv_gdb]
script = "${QEMU_RISCV} ${QEMU_RISCV_OPTS} ${QEMU_OPTS} ${QEMU_GDB_OPTS}"
dependencies = ["build"]
[tasks.windows_qemu_riscv_gdb]
script = "%QEMU_RISCV% %QEMU_RISCV_OPTS% %QEMU_OPTS% %QEMU_GDB_OPTS%"
dependencies = ["build"]
[tasks.qemu-arm-gdb]
linux_alias = "linux_qemu_arm_gdb"
windows_alias = "windows_qemu_arm_gdb"
[tasks.linux_qemu_arm_gdb]
script = "${QEMU_ARM} ${QEMU_ARM_OPTS} ${QEMU_OPTS} ${QEMU_GDB_OPTS}"
dependencies = ["build"]
[tasks.windows_qemu_arm_gdb]
script = "%QEMU_ARM% %QEMU_ARM_OPTS% %QEMU_OPTS% %QEMU_GDB_OPTS%"
dependencies = ["build"]
[tasks.clean]
command = "cargo"
args = ["clean"]