From 73aeae480df8e5f4e209750b7c354fbb25cee9c1 Mon Sep 17 00:00:00 2001 From: bunnie Date: Mon, 8 Apr 2024 23:41:48 +0800 Subject: [PATCH] add plaintext debug output for swap image --- xtask/src/builder.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/xtask/src/builder.rs b/xtask/src/builder.rs index 848bcb541..189a70054 100644 --- a/xtask/src/builder.rs +++ b/xtask/src/builder.rs @@ -983,6 +983,7 @@ impl Builder { String::new() }; let mut swap_file = PathBuf::new(); + let mut swap_dbg_file = PathBuf::new(); if self.swap.is_some() { args.push("--swap"); args.push(&swap_spec); @@ -991,7 +992,13 @@ impl Builder { swap_file.push(stream); swap_file.push("swap.img"); args.push("--swap-name"); - args.push(swap_file.to_str().unwrap()) + args.push(swap_file.to_str().unwrap()); + swap_dbg_file.push("target"); + swap_dbg_file.push(self.target.as_ref().expect("target")); + swap_dbg_file.push(stream); + swap_dbg_file.push("swap-debug.img"); + args.push("--swap-debug-name"); + args.push(swap_dbg_file.to_str().unwrap()); } if memory_spec.len() == 1 {