# # SPDX-License-Identifier: BlueOak-1.0.0 # # Copyright (c) Berkus Decker # [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 ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/targets/bcm2710-rpi-3-b-plus.dtb -kernel ${KERNEL_BIN}" ] [tasks.qemu] extend = "qemu-runner" env = { "QEMU_RUNNER_OPTS" = "${QEMU_SERIAL_OPTS}" } [tasks.qemu-gdb] extend = "qemu-runner" env = { "QEMU_RUNNER_OPTS" = "${QEMU_SERIAL_OPTS} ${QEMU_GDB_OPTS}" } [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" ''' ] [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 = basename ${KERNEL_BIN} cp ${KERNEL_BIN} ${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}" ]