-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.toml
86 lines (77 loc) · 1.68 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
[env]
CARGO_MAKE_WORKSPACE_SKIP_MEMBERS = "xv7-boot;xv7-usyscall"
ESP = "target/esp"
QEMU_X86_64 = "qemu-system-x86_64"
QEMU_X86_64_OPT = '''
-drive if=pflash,format=raw,file=.qemu/OVMF-pure-efi.fd,readonly=on
-device isa-debug-exit,iobase=0xf4,iosize=0x04
-serial stdio
-m 1G
-net none
'''
[tasks.xbuild]
command = "cargo"
args = ["xbuild"]
[tasks.member-xbuild]
command = "cargo"
args = ["make", "xbuild"]
[tasks.compose-esp]
workspace = false
dependencies = ["member-xbuild"]
script_runner = "@shell"
script = [
'''
mkdir -p ${ESP}/EFI/Boot
cp target/x86_64-unknown-uefi/debug/xv7-bootloader-uefi.efi ${ESP}/EFI/Boot/BootX64.efi
mkdir -p ${ESP}/EFI/xv7
cp target/x86_64/debug/xv7-kernel ${ESP}/EFI/xv7/kernel
rust-objdump \
--disassemble \
--source \
--dynamic-reloc \
${ESP}/EFI/xv7/kernel | \
rustfilt > \
${ESP}/EFI/xv7/kernel.asm || true
'''
]
[tasks.qemu]
workspace = false
dependencies = ["compose-esp"]
script_runner = "@shell"
script = [
'''
${QEMU_X86_64} ${QEMU_X86_64_OPT} \
-drive format=raw,file=fat:rw:${ESP}
'''
]
[tasks.qemu-kvm]
workspace = false
dependencies = ["compose-esp"]
script_runner = "@shell"
script = [
'''
${QEMU_X86_64} ${QEMU_X86_64_OPT} \
-drive format=raw,file=fat:rw:${ESP} \
-enable-kvm
'''
]
[tasks.qemu-gdb]
workspace = false
dependencies = ["compose-esp"]
script_runner = "@shell"
script = [
'''
${QEMU_X86_64} ${QEMU_X86_64_OPT} \
-drive format=raw,file=fat:rw:${ESP} \
-S -gdb tcp::1234
'''
]
[tasks.doc]
workspace = false
command = "cargo"
args = ["doc", "--no-deps", "--open"]
[tasks.compose-image]
workspace = false
dependencies = ["member-xbuild"]
script_runner = "@rust"
script = { file = "compose.rs" }