From 89daf48c398afed7966c0f058246d5bbc549e758 Mon Sep 17 00:00:00 2001 From: bunnie Date: Thu, 4 Apr 2024 19:23:26 +0800 Subject: [PATCH] the image creator is sensitive to the target for swap configs --- xtask/src/builder.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/xtask/src/builder.rs b/xtask/src/builder.rs index 52db53892..848bcb541 100644 --- a/xtask/src/builder.rs +++ b/xtask/src/builder.rs @@ -933,7 +933,18 @@ impl Builder { memory_spec: Vec, ) -> Result { let stream = self.stream.as_str(); - let mut args = vec!["run", "--package", "tools", "--bin", "create-image", "--"]; + let mut args = vec!["run", "--package", "tools", "--bin", "create-image"]; + args.push("--features"); + if self.utra_target.contains("renode") { + args.push("renode"); + } else if self.utra_target.contains("precursor") { + args.push("precursor"); + } else if self.utra_target.contains("atsama5d2") { + args.push("atsama5d2"); + } else if self.utra_target.contains("cramium-soc") { + args.push("cramium-soc") + } + args.push("--"); let mut output_file = PathBuf::new(); output_file.push("target");