diff --git a/Justfile b/Justfile index d101266..1863a2d 100644 --- a/Justfile +++ b/Justfile @@ -1,6 +1,10 @@ _default: @just --list +# Build default hw kernel and run chainofcommand to boot this kernel onto the board +boot: chainofcommand + cargo make chainboot + # Build and run kernel in QEMU with serial port emulation zellij: cargo make zellij-nucleus diff --git a/Makefile.toml b/Makefile.toml index e9c416c..3502a58 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -75,6 +75,9 @@ GDB_CONNECT_FILE = "${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/target/${TARGET}/g KERNEL_ELF = "${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/target/${TARGET}/release/nucleus" KERNEL_BIN = "${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/target/nucleus.bin" +CHAINBOOT_SERIAL = "/dev/tty.SLAB_USBtoUART" +CHAINBOOT_BAUD = 115200 + [tasks.default] alias = "all" @@ -189,3 +192,8 @@ dependencies = ["sdcard"] script = [ "diskutil unmount ${VOLUME}" ] + +[tasks.chainboot] +dependencies = ["build", "kernel-binary"] +command = "echo" +args = ["\n***===***\n", "Run the following command in your terminal:\n", " ${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/target/debug/chainofcommand ${CHAINBOOT_SERIAL} ${CHAINBOOT_BAUD} --kernel ${KERNEL_BIN}\n", "***===***\n\n"]