add --with-jump flag for image creation of cramium target

This commit is contained in:
bunnie 2024-04-26 18:12:47 +08:00
parent c407db877e
commit 8746fc5a76

View file

@ -865,7 +865,29 @@ impl Builder {
return Err("cargo build failed".into()); return Err("cargo build failed".into());
} }
let status = Command::new(cargo()) let status = if self.utra_target.contains("cramium") {
Command::new(cargo())
.current_dir(project_root())
.args([
"run",
"--package",
"tools",
"--bin",
"sign-image",
"--",
"--loader-image",
loader_presign.to_str().unwrap(),
"--loader-key",
&self.loader_key,
"--loader-output",
loader_bin.to_str().unwrap(),
"--min-xous-ver",
&self.min_ver,
"--with-jump", // cramium target has a jump inserted in the loader sig block
])
.status()?
} else {
Command::new(cargo())
.current_dir(project_root()) .current_dir(project_root())
.args([ .args([
"run", "run",
@ -883,7 +905,8 @@ impl Builder {
"--min-xous-ver", "--min-xous-ver",
&self.min_ver, &self.min_ver,
]) ])
.status()?; .status()?
};
if !status.success() { if !status.success() {
return Err("loader image sign failed".into()); return Err("loader image sign failed".into());
} }