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

View file

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