make the signature check/security elements more clearly optional

the problem with it being default in most configurations is that
it pulls in a sha-2 and ed25519 dependency into routines that
never rely on them. now libs that rely on the sigcheck need to
specify the feature explicitly to pull in the depedency.
This commit is contained in:
bunnie 2025-12-22 16:17:08 +08:00
parent c297ca5f2e
commit 88a6492481
2 changed files with 5 additions and 7 deletions

View file

@ -70,7 +70,6 @@ board-baosec = [
"utralib/bao1x", "utralib/bao1x",
"ux-api/board-baosec", "ux-api/board-baosec",
"ux-api/std", "ux-api/std",
"sigcheck",
] # USB form factor token ] # USB form factor token
loader-baosec = [ loader-baosec = [
"utralib/bao1x", "utralib/bao1x",
@ -79,7 +78,6 @@ loader-baosec = [
"axp2101", "axp2101",
"bmp180", "bmp180",
"ux-api/loader-baosec", "ux-api/loader-baosec",
"sigcheck",
] ]
kernel = [] kernel = []
kernel-baosec = ["utralib/bao1x", "kernel"] kernel-baosec = ["utralib/bao1x", "kernel"]
@ -93,11 +91,10 @@ board-baosor = [
"axp2101", "axp2101",
"utralib/bao1x", "utralib/bao1x",
"ux-api/std", "ux-api/std",
"sigcheck",
] # Precursor form factor ] # Precursor form factor
loader-baosor = [] loader-baosor = []
board-dabao = ["utralib/bao1x", "sigcheck"] # Dev board form factor board-dabao = ["utralib/bao1x"] # Dev board form factor
loader-dabao = ["sigcheck"] loader-dabao = []
verilator-only = ["utralib/bao1x"] verilator-only = ["utralib/bao1x"]
mpw = ["utralib/bao1x"] mpw = ["utralib/bao1x"]
hdl-test = ["utralib/bao1x"] hdl-test = ["utralib/bao1x"]
@ -107,6 +104,7 @@ debug-print-duart = ["debug-print", "debug-countermeasures"]
debug-print-uart = ["debug-print"] debug-print-uart = ["debug-print"]
debug-countermeasures = [] debug-countermeasures = []
debug-wfi = [] debug-wfi = []
security = ["sigcheck"]
udma-stress-test = [ udma-stress-test = [
] # For RTL simulation testing - aggravates a key corner case ] # For RTL simulation testing - aggravates a key corner case

View file

@ -36,7 +36,7 @@ pub mod buram;
pub mod clocks; pub mod clocks;
#[cfg(not(feature = "hosted-baosec"))] #[cfg(not(feature = "hosted-baosec"))]
pub mod coreuser; pub mod coreuser;
#[cfg(all(not(feature = "hosted-baosec"), not(feature = "kernel")))] #[cfg(feature = "security")]
pub mod hardening; pub mod hardening;
#[cfg(feature = "std")] #[cfg(feature = "std")]
pub mod i2c; pub mod i2c;
@ -48,7 +48,7 @@ pub mod mbox;
pub mod rram; pub mod rram;
#[cfg(not(feature = "hosted-baosec"))] #[cfg(not(feature = "hosted-baosec"))]
pub mod rtc; pub mod rtc;
#[cfg(all(not(feature = "hosted-baosec"), not(feature = "kernel")))] #[cfg(feature = "security")]
pub mod sigcheck; pub mod sigcheck;
#[cfg(not(feature = "hosted-baosec"))] #[cfg(not(feature = "hosted-baosec"))]
pub mod sram_trim; pub mod sram_trim;