diff --git a/loader/Cargo.toml b/loader/Cargo.toml index 3509654b3..4b1a8ee0f 100644 --- a/loader/Cargo.toml +++ b/loader/Cargo.toml @@ -18,13 +18,13 @@ branch = "main" lazy_static = "1.4.0" [features] -precursor = ["utralib/precursor", "ed25519-dalek-loader/precursor", "curve25519-dalek-loader/precursor", "resume"] -renode = ["utralib/renode", "ed25519-dalek-loader/renode", "curve25519-dalek-loader/renode", "resume"] -cramium = ["utralib/cramium"] +precursor = ["utralib/precursor", "ed25519-dalek-loader/precursor", "curve25519-dalek-loader/precursor", "resume", "secboot"] +renode = ["utralib/renode", "ed25519-dalek-loader/renode", "curve25519-dalek-loader/renode", "resume", "secboot"] platform-tests = [] debug-print = [] earlyprintk = [] renode-bypass = [] +secboot = [] #default = ["debug-print"] resume = [] # suspend/resume pathway code default = [] \ No newline at end of file diff --git a/loader/src/main.rs b/loader/src/main.rs index 00b0c1bb1..5cecbc964 100644 --- a/loader/src/main.rs +++ b/loader/src/main.rs @@ -55,8 +55,9 @@ const VVDBG: bool = false; // very verbose debug mod debug; mod fonts; - +#[cfg(feature="secboot")] mod secboot; +#[cfg(feature="secboot")] use secboot::SIGBLOCK_SIZE; // Install a panic handler when not running tests. @@ -1396,6 +1397,7 @@ pub unsafe extern "C" fn rust_entry(signed_buffer: *const usize, signature: u32) // initially validate the whole image on disk (including kernel args) // kernel args must be validated because tampering with them can change critical assumptions about // how data is loaded into memory + #[cfg(feature="secboot")] if !secboot::validate_xous_img(signed_buffer as *const u32) { loop {} };