72 lines
2.2 KiB
TOML
72 lines
2.2 KiB
TOML
#
|
|
# SPDX-License-Identifier: BlueOak-1.0.0
|
|
#
|
|
# Copyright (c) Berkus Decker <berkus+vesper@metta.systems>
|
|
#
|
|
[tasks.kernel-binary]
|
|
env = { "BINARY_FILE" = "${KERNEL_ELF}" }
|
|
run_task = "custom-binary"
|
|
|
|
[tasks.qemu-runner]
|
|
dependencies = ["build-qemu", "kernel-binary"]
|
|
env = { "TARGET_FEATURES" = "${QEMU_FEATURES}" }
|
|
script = [
|
|
"${QEMU} ${QEMU_OPTS} ${QEMU_RUNNER_OPTS} -dtb ${TARGET_DTB} -kernel ${KERNEL_BIN}"
|
|
]
|
|
|
|
[tasks.qemu]
|
|
extend = "qemu-runner"
|
|
env = { "QEMU_RUNNER_OPTS" = "${QEMU_SERIAL_OPTS}", "TARGET_DTB" = "${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/targets/bcm2710-rpi-3-b-plus.dtb" }
|
|
|
|
[tasks.qemu-gdb]
|
|
extend = "qemu-runner"
|
|
env = { "QEMU_RUNNER_OPTS" = "${QEMU_SERIAL_OPTS} ${QEMU_GDB_OPTS}", "TARGET_DTB" = "${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/targets/bcm2710-rpi-3-b-plus.dtb" }
|
|
|
|
[tasks.zellij-nucleus]
|
|
env = { "KERNEL_BIN" = "${KERNEL_BIN}" }
|
|
run_task = "zellij-config"
|
|
|
|
[tasks.gdb-config]
|
|
script_runner = "@duckscript"
|
|
script = [
|
|
'''
|
|
writefile ${GDB_CONNECT_FILE} "target extended-remote :5555\n"
|
|
appendfile ${GDB_CONNECT_FILE} "break 0x80000\n"
|
|
appendfile ${GDB_CONNECT_FILE} "continue\n"
|
|
'''
|
|
]
|
|
|
|
# Problem: this eats STDIN! need to run in subshell or sth
|
|
[tasks.gdb]
|
|
dependencies = ["build", "kernel-binary", "gdb-config"]
|
|
env = { "RUST_GDB" = "${GDB}" }
|
|
script = [
|
|
"rust-gdb -x ${GDB_CONNECT_FILE} ${KERNEL_ELF}"
|
|
]
|
|
|
|
[tasks.nm]
|
|
dependencies = ["build", "kernel-binary"]
|
|
script = [
|
|
"${NM} -- ${KERNEL_ELF} | sort"
|
|
]
|
|
install_crate = { crate_name = "cargo-binutils", binary = "rust-nm", test_arg = ["--help"] }
|
|
|
|
[tasks.sdcard]
|
|
dependencies = ["build", "kernel-binary"]
|
|
script_runner = "@duckscript"
|
|
script = [
|
|
'''
|
|
kernelImage = set "kernel8.img"
|
|
cp ${KERNEL_BIN} ${VOLUME}/${kernelImage}
|
|
echo "Copied nucleus to ${VOLUME}/${kernelImage}"
|
|
'''
|
|
]
|
|
|
|
[tasks.hopper]
|
|
dependencies = ["build", "kernel-binary"]
|
|
# The cmd line below causes a bug in hopper, see https://www.dropbox.com/s/zyw5mfx0bepcjb1/hopperv4-RAW-bug.mov?dl=0
|
|
#"hopperv4 --loader RAW --base-address 0x80000 --entrypoint 0x80000 --file-offset 0 --plugin arm --cpu aarch64 --variant generic --contains-code true --executable ${KERNEL_BIN}"
|
|
script = [
|
|
"hopperv4 --loader ELF --executable ${KERNEL_ELF}"
|
|
]
|