-
Notifications
You must be signed in to change notification settings - Fork 4
/
Justfile
132 lines (101 loc) · 2.88 KB
/
Justfile
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
_default:
@just --list
# Update all dependencies
deps-up:
cargo update
# Build default hw kernel and run chainofcommand to boot this kernel onto the board
boot: chainofcommand
cargo make chainboot # make boot-kernel ?
# Build and run kernel in QEMU with serial port emulation
zellij:
cargo make zellij-nucleus
zellij --layout emulation/layout.zellij
# Build and run chainboot in QEMU with serial port emulation
zellij-cb:
# Connect to it via chainofcommand to load an actual kernel
# TODO: actually run chainofcommand in a zellij session too
cargo make zellij-cb
zellij --layout emulation/layout.zellij
# Build chainofcommand serial loader
chainofcommand:
cd bin/chainofcommand
cargo make build # --workspace=bin/chainofcommand
# Build and run kernel in QEMU
qemu:
cargo make qemu
# Build and run kernel in QEMU with GDB port enabled
qemu-gdb:
cargo make qemu-gdb
# Build and run chainboot in QEMU
qemu-cb:
# Connect to it via chainofcommand to load an actual kernel
cargo make qemu-cb
# Build and run chainboot in QEMU with GDB port enabled
qemu-cb-gdb:
# Connect to it via chainofcommand to load an actual kernel
cargo make qemu-cb-gdb
# Build and write kernel to an SD Card
device:
cargo make sdcard
# Build and write kernel to an SD Card, then eject the SD Card volume
device-eject:
cargo make sdeject
# Build and write chainboot to an SD Card, then eject the SD Card volume
cb-eject:
cd bin/chainboot
cargo make cb-eject
# Build default hw kernel
build:
cargo make build
# Build default hw kernel (quietly)
qbuild:
cargo make build
alias b := build
# Clean project
clean:
cargo make clean
# Run clippy checks
clippy:
# TODO: use cargo-hack
cargo make clippy
env CLIPPY_FEATURES=noserial cargo make clippy
env CLIPPY_FEATURES=qemu cargo make clippy
env CLIPPY_FEATURES=noserial,qemu cargo make clippy
env CLIPPY_FEATURES=jtag cargo make clippy
env CLIPPY_FEATURES=noserial,jtag cargo make clippy
# Run tests in QEMU
test:
cargo make test
alias disasm := hopper
# Build and disassemble kernel
hopper:
cargo make xtool-hopper
alias ocd := openocd
# Start openocd (by default connected via JTAG to a target device)
openocd:
cargo make openocd
# Build and run kernel in GDB using openocd or QEMU as target (gdb port 5555)
gdb:
cargo make gdb
# Build and run chainboot in GDB using openocd or QEMU as target (gdb port 5555)
gdb-cb:
cargo make gdb-cb
# Build and print all symbols in the kernel
nm:
cargo make xtool-nm
# Run `cargo expand` on nucleus
expand:
cargo make xtool-expand-target -- nucleus
# Render modules dependency tree
modules:
cargo make xtool-modules
# Generate and open documentation
doc:
cargo make docs-flow
# Check formatting
fmt-check:
cargo fmt -- --check
# Run lint tasks
lint: clippy fmt-check
# Run CI tasks
ci: clean build test lint