build: 🛠 Improve Justfile help output
Enter `just` to see a list of available commands with explanations. Added `just ci` step. Added `just fmt-check`. Removed unnecessary kernel file removals. Moved sdeject task and added `just device-eject`.
This commit is contained in:
parent
cc4170200f
commit
b26d61cb67
48
Justfile
48
Justfile
|
@ -1,62 +1,80 @@
|
|||
_default:
|
||||
@just --list
|
||||
|
||||
# Build and run kernel in QEMU with serial port emulation
|
||||
zellij:
|
||||
# Build and run kernel in QEMU with serial port emulation
|
||||
cargo make zellij-config
|
||||
zellij --layout-path emulation/layout.zellij
|
||||
|
||||
# Build and run kernel in QEMU
|
||||
qemu:
|
||||
# Build and run kernel in QEMU
|
||||
cargo make qemu
|
||||
|
||||
# Build and run kernel in QEMU with GDB port enabled
|
||||
qemu-gdb:
|
||||
# Build and run kernel in QEMU with GDB port enabled
|
||||
cargo make qemu-gdb
|
||||
|
||||
# Build and write kernel to an SD Card
|
||||
device:
|
||||
# Build and write kernel to an SD Card
|
||||
cargo make sdcard
|
||||
|
||||
# Build and write kernel to an SD Card, then eject the SD Card volume
|
||||
device-eject:
|
||||
cargo make sdeject
|
||||
|
||||
# Build default hw kernel
|
||||
build:
|
||||
# Build default hw kernel
|
||||
cargo make build
|
||||
|
||||
# Clean project
|
||||
clean:
|
||||
# Clean project
|
||||
cargo make clean
|
||||
rm -f kernel8 kernel8.img
|
||||
|
||||
# Run clippy checks
|
||||
clippy:
|
||||
# Run clippy checks
|
||||
# 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:
|
||||
# Run tests in QEMU
|
||||
cargo make test
|
||||
|
||||
alias disasm := hopper
|
||||
|
||||
# Build and disassemble kernel
|
||||
hopper:
|
||||
# Build and disassemble kernel
|
||||
cargo make hopper
|
||||
|
||||
alias ocd := openocd
|
||||
|
||||
# Start openocd (by default connected via JTAG to a target device)
|
||||
openocd:
|
||||
# Start openocd (by default connected via JTAG to a target device)
|
||||
cargo make openocd
|
||||
|
||||
# Build and run kernel in GDB using openocd or QEMU as target (gdb port 5555)
|
||||
gdb:
|
||||
# Build and run kernel in GDB using openocd or QEMU as target (gdb port 5555)
|
||||
cargo make gdb
|
||||
|
||||
# Build and print all symbols in the kernel
|
||||
nm:
|
||||
# Build and print all symbols in the kernel
|
||||
cargo make nm
|
||||
|
||||
# Check formatting
|
||||
fmt-check:
|
||||
cargo fmt -- --check
|
||||
|
||||
# Run `cargo expand` on nucleus
|
||||
expand:
|
||||
# Run `cargo expand` on modules
|
||||
cargo make expand -- nucleus
|
||||
|
||||
# Generate and open documentation
|
||||
doc:
|
||||
# Generate and open documentation
|
||||
cargo make docs-flow
|
||||
|
||||
# Run CI tasks
|
||||
ci: clean build test clippy fmt-check
|
||||
|
|
|
@ -77,3 +77,9 @@ dependencies = ["kernel-binary"]
|
|||
[tasks.modules]
|
||||
command = "cargo"
|
||||
args = ["modules", "tree"]
|
||||
|
||||
[tasks.sdeject]
|
||||
dependencies = ["sdcard"]
|
||||
script = [
|
||||
"diskutil unmount ${VOLUME}"
|
||||
]
|
||||
|
|
|
@ -94,6 +94,14 @@ You need to have [Hopper](https://hopperapp.com) and hopperv4 cli helper install
|
|||
just disasm
|
||||
```
|
||||
|
||||
### To see other available commands
|
||||
|
||||
```
|
||||
just
|
||||
```
|
||||
|
||||
It will list all just commands with their short descriptions.
|
||||
|
||||
## Development flow
|
||||
|
||||
`mainline`, `develop` and `released` branches:
|
||||
|
|
|
@ -122,12 +122,6 @@ script = [
|
|||
'''
|
||||
]
|
||||
|
||||
[tasks.sdeject]
|
||||
dependencies = ["sdcard"]
|
||||
script = [
|
||||
"diskutil unmount ${VOLUME}"
|
||||
]
|
||||
|
||||
[tasks.clippy]
|
||||
env = { "TARGET_FEATURES" = { value = "--features=${CLIPPY_FEATURES}", condition = { env_set = ["CLIPPY_FEATURES"] } } }
|
||||
command = "cargo"
|
||||
|
|
Loading…
Reference in New Issue