From f4418c3164dd8a96f973acc128cb0482582e69de Mon Sep 17 00:00:00 2001 From: Berkus Decker Date: Thu, 10 Feb 2022 01:51:37 +0200 Subject: [PATCH] =?UTF-8?q?feat:=20=E2=9C=A8=20Add=20`just=20boot`=20comma?= =?UTF-8?q?nd?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Due to just or cargo-make taking over the controlling PTY we cannot launch an interactive command from a cargo-make file, so just print the command line to launch. --- Justfile | 4 ++++ Makefile.toml | 8 ++++++++ 2 files changed, 12 insertions(+) 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"]