diff --git a/services/graphics-server/src/sleep_note.rs b/services/graphics-server/src/sleep_note.rs index eea1d7ca4..7da2f1de9 100644 --- a/services/graphics-server/src/sleep_note.rs +++ b/services/graphics-server/src/sleep_note.rs @@ -1,3 +1,4 @@ +#[cfg_attr(not(any(target_os = "none", target_os = "xous")), allow(dead_code))] pub const LOGO_MAP: [u32; 11 * 160] = [ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffff0000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffff0000, diff --git a/services/jtag/src/main.rs b/services/jtag/src/main.rs index dd2153264..287ebabab 100644 --- a/services/jtag/src/main.rs +++ b/services/jtag/src/main.rs @@ -493,7 +493,7 @@ mod implementation { JtagPhy { } } - pub fn sync(&mut self, tdi: bool, tms: bool) -> bool { + pub fn sync(&mut self, _tdi: bool, _tms: bool) -> bool { false } } diff --git a/services/root-keys/src/api.rs b/services/root-keys/src/api.rs index 2fd07d694..a076f753c 100644 --- a/services/root-keys/src/api.rs +++ b/services/root-keys/src/api.rs @@ -79,7 +79,7 @@ pub enum PasswordType { Boot = 1, Update = 2, } - +#[cfg_attr(not(any(target_os = "none", target_os = "xous")), allow(dead_code))] #[derive(Debug, Copy, Clone, PartialEq, Eq)] pub enum RootkeyResult { AlignmentError, diff --git a/services/root-keys/src/main.rs b/services/root-keys/src/main.rs index 1b12b8724..4cc1bc07d 100644 --- a/services/root-keys/src/main.rs +++ b/services/root-keys/src/main.rs @@ -74,7 +74,6 @@ pub struct MetadataInFlash { // a stub to try to avoid breaking hosted mode for as long as possible. #[cfg(not(any(target_os = "none", target_os = "xous")))] mod implementation { - use crate::ROOTKEY_MODAL_NAME; use crate::PasswordRetentionPolicy; use crate::PasswordType; use gam::modal::{Modal, Slider}; @@ -121,7 +120,7 @@ mod implementation { } pub fn is_initialized(&self) -> bool {true} pub fn setup_key_init(&mut self) {} - pub fn do_key_init(&mut self, rootkeys_modal: &mut Modal, main_cid: xous::CID) -> Result<(), RootkeyResult> { + fn fake_progress(&mut self, rootkeys_modal: &mut Modal, main_cid: xous::CID, msg: &str) -> Result<(), RootkeyResult> { let mut progress_action = Slider::new(main_cid, Opcode::UxGutter.to_u32().unwrap(), 0, 100, 10, Some("%"), 0, true, true ); @@ -129,7 +128,7 @@ mod implementation { // now show the init wait note... rootkeys_modal.modify( Some(ActionType::Slider(progress_action)), - Some(t!("rootkeys.setup_wait", xous::LANG)), false, + Some(msg), false, None, true, None); rootkeys_modal.activate(); @@ -145,17 +144,28 @@ mod implementation { } Ok(()) } + pub fn do_key_init(&mut self, rootkeys_modal: &mut Modal, main_cid: xous::CID) -> Result<(), RootkeyResult> { + self.fake_progress(rootkeys_modal, main_cid, t!("rootkeys.setup_wait", xous::LANG)) + } + pub fn do_gateware_update(&mut self, rootkeys_modal: &mut Modal, main_cid: xous::CID) -> Result<(), RootkeyResult> { + self.fake_progress(rootkeys_modal, main_cid, t!("rootkeys.gwup_starting", xous::LANG)) + } + pub fn do_sign_xous(&mut self, rootkeys_modal: &mut Modal, main_cid: xous::CID) -> Result<(), RootkeyResult> { + self.fake_progress(rootkeys_modal, main_cid, t!("rootkeys.init.signing_kernel", xous::LANG)) + } + pub fn purge_password(&mut self, _ptype: PasswordType) {} + pub fn get_ux_password_type(&self) -> Option {self.password_type} pub fn finish_key_init(&mut self) {} pub fn verify_gateware_self_signature(&mut self) -> bool { true } - pub fn test(&mut self, rootkeys_modal: &mut Modal, main_cid: xous::CID) -> Result<(), RootkeyResult> { + pub fn test(&mut self, _rootkeys_modal: &mut Modal, _main_cid: xous::CID) -> Result<(), RootkeyResult> { Ok(()) } pub fn is_jtag_working(&self) -> bool {false} pub fn is_efuse_secured(&self) -> Option {None} - pub fn check_gateware_signature(&mut self, region_enum: GatewareRegion) -> SignatureResult { + pub fn check_gateware_signature(&mut self, _region_enum: GatewareRegion) -> SignatureResult { log::info!("faking gateware check..."); self.ticktimer.sleep_ms(4000).unwrap(); log::info!("done"); @@ -164,6 +174,7 @@ mod implementation { pub fn is_pcache_update_password_valid(&self) -> bool { false } + pub fn fetch_gw_metadata(&self, _region_enum: GatewareRegion) -> MetadataInFlash { MetadataInFlash { magic: 0x6174656d, diff --git a/services/spinor/src/api.rs b/services/spinor/src/api.rs index 93421c6d2..20b50b382 100644 --- a/services/spinor/src/api.rs +++ b/services/spinor/src/api.rs @@ -2,6 +2,7 @@ pub(crate) const SERVER_NAME_SPINOR: &str = "_SPINOR Hardware Interface Serv #[cfg(any(target_os = "none", target_os = "xous"))] pub const SPINOR_SIZE_BYTES: u32 = 128 * 1024 * 1024; // physical size of the device, used for hardware sanity checks on requests +#[cfg_attr(not(any(target_os = "none", target_os = "xous")), allow(dead_code))] pub const SPINOR_ERASE_SIZE: u32 = 0x1000; // this is the smallest sector size. 64k sectors also exist, but this implementation does not use them. // note: logical lengths of regions are in xous::definitions diff --git a/services/status/src/main.rs b/services/status/src/main.rs index 74c7b85f0..d50532f4e 100644 --- a/services/status/src/main.rs +++ b/services/status/src/main.rs @@ -16,6 +16,7 @@ use graphics_server::*; use locales::t; use std::sync::{Arc, Mutex}; +#[cfg_attr(not(any(target_os = "none", target_os = "xous")), allow(unused_imports))] use std::thread; use std::collections::HashMap; diff --git a/xous-rs/src/arch/hosted/mem.rs b/xous-rs/src/arch/hosted/mem.rs index a217eeefc..94db2b1ea 100644 --- a/xous-rs/src/arch/hosted/mem.rs +++ b/xous-rs/src/arch/hosted/mem.rs @@ -17,6 +17,7 @@ pub fn map_memory_post( _virt: Option, _size: usize, _flags: MemoryFlags, + #[cfg_attr(not(any(target_os = "none", target_os = "xous")), allow(unused_mut))] mut range: MemoryRange, ) -> core::result::Result { let layout = Layout::from_size_align(range.len(), 4096).unwrap();