From 78f0fcac1a679b14ccdea66a7539bf3a35414578 Mon Sep 17 00:00:00 2001 From: bunnie Date: Thu, 13 Nov 2025 22:20:10 +0800 Subject: [PATCH] add more differentiation of alt-boot/boot configs also clear the baosec flag when dabao is forced --- bao1x-boot/boot1/src/main.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bao1x-boot/boot1/src/main.rs b/bao1x-boot/boot1/src/main.rs index 3fc06b3e0..dac9958d1 100644 --- a/bao1x-boot/boot1/src/main.rs +++ b/bao1x-boot/boot1/src/main.rs @@ -78,7 +78,10 @@ pub unsafe extern "C" fn rust_entry() -> ! { crate::println_d!("TX_IDLE: {:?}", crate::platform::usb::TX_IDLE.load(Ordering::SeqCst)); let perclk: u32; (board_type, perclk) = crate::platform::early_init(board_type); + #[cfg(not(feature = "alt-boot1"))] crate::println!("\n~~Boot1 up! ({}: {})~~\n", crate::version::SEMVER, RELEASE_DESCRIPTION); + #[cfg(feature = "alt-boot1")] + crate::println!("\n~~Alt-Boot1 up! ({}: {})~~\n", crate::version::SEMVER, RELEASE_DESCRIPTION); crate::println!("Configured board type: {:?}", board_type); if board_type == BoardTypeCoding::Baosec { IS_BAOSEC.store(true, Ordering::SeqCst); @@ -91,6 +94,7 @@ pub unsafe extern "C" fn rust_entry() -> ! { } board_type = one_way.get_decoded::().expect("owc coding error"); crate::println!("Re-configured board type: {:?}", board_type); + IS_BAOSEC.store(false, Ordering::SeqCst); } }