From 41b654fe83e2908f400af9f261deeafd90cf3664 Mon Sep 17 00:00:00 2001 From: bunnie Date: Fri, 5 Jan 2024 16:03:06 +0800 Subject: [PATCH] add --debug-loader option to xtask passing this flag causes the loader to print debug output. This slows down the loading process but gives you some visibility into what's going on (maybe also an idea for the future to add VDBG flags for verbosity, they exist in the code but not exposed as command line options). --- xtask/src/main.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xtask/src/main.rs b/xtask/src/main.rs index b8a0bbb4e..d7fb5ddf9 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -152,6 +152,9 @@ fn main() -> Result<(), Box> { if gdb_stub { builder.add_kernel_feature("gdb-stub"); } + if env::args().filter(|x| x == "--debug-loader").count() != 0 { + builder.add_loader_feature("debug-print"); + } // ---- now process the verb plus position dependent arguments ---- let mut args = env::args(); @@ -450,6 +453,7 @@ fn print_help() { [--no-timestamp] [--no-verify] [--gdb-stub] + [--debug-loader] [cratespecs] is a list of 0 or more items of the following syntax: [name] crate 'name' to be built from local source @@ -467,6 +471,7 @@ be merged in with explicit app/service treatment with the following flags: [--no-timestamp] Do not include a timestamp in the build. By default, `ticktimer` is rebuilt on every run to encode a timestamp. [--no-verify] Do not verify that local sources match crates.io downloaded sources [--gdb-stub] Build the kernel with GDB support +[--debug-loader] Enable debug printing in the loader - An 'app' must be enumerated in apps/manifest.json. A pre-processor configures the launch menu based on the list of specified apps.