From f04a8560378a813ef783dd7c585f8246fafceb70 Mon Sep 17 00:00:00 2001 From: bunnie Date: Wed, 1 Oct 2025 02:56:53 +0800 Subject: [PATCH] allow .bin as uf2 conversion target --- tools/src/bin/sign-image.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/src/bin/sign-image.rs b/tools/src/bin/sign-image.rs index 6181b9feb..8787df260 100644 --- a/tools/src/bin/sign-image.rs +++ b/tools/src/bin/sign-image.rs @@ -141,13 +141,15 @@ fn main() -> Result<(), Box> { )?; if matches.is_present("bao1x") { - if loader_output.ends_with(".img") { + if loader_output.ends_with(".img") || loader_output.ends_with(".bin") { let loader_uf2 = format!("{}uf2", &loader_output[..loader_output.len() - 3]); // generate a uf2 file convert_to_uf2(&loader_output, &loader_uf2, matches.value_of("function-code"), None)?; println!("Created UF2 at {}", loader_uf2); } else { - Err("Can't generate UF2 file because the output file is not specified with a .img suffix")?; + Err( + "Can't generate UF2 file because the output file is not specified with a .img/.bin suffix", + )?; } } }