From 99c6e005ad6129e2ce778267d87749e97c0105da Mon Sep 17 00:00:00 2001 From: bunnie Date: Sun, 9 Oct 2022 02:46:24 +0800 Subject: [PATCH] fix hosted mode --- services/root-keys/src/api.rs | 1 + services/root-keys/src/main.rs | 3 ++- tools/restore.py | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/services/root-keys/src/api.rs b/services/root-keys/src/api.rs index 8077ed879..bdd98c150 100644 --- a/services/root-keys/src/api.rs +++ b/services/root-keys/src/api.rs @@ -262,6 +262,7 @@ impl Default for BackupHeaderIpc { } pub const BACKUP_VERSION: u32 = 0x00_01_00_01; +#[cfg(any(feature="precursor", feature="renode"))] pub const BACKUP_VERSION_MASK: u32 = 0xFF_FF_00_00; // mask off bits that are cross-compatible #[repr(u32)] diff --git a/services/root-keys/src/main.rs b/services/root-keys/src/main.rs index 3071d19d5..0df3ad7ac 100644 --- a/services/root-keys/src/main.rs +++ b/services/root-keys/src/main.rs @@ -369,10 +369,11 @@ mod implementation { } pub fn should_prompt_for_update(&self) -> bool {true} pub fn set_prompt_for_update(&self, _state: bool) {} - pub fn write_backup(&mut self, mut header: BackupHeader, backup_ct: backups::BackupDataCt) -> Result<(), xous::Error> { + pub fn write_backup(&mut self, mut header: BackupHeader, backup_ct: backups::BackupDataCt, checksums: Option::) -> Result<(), xous::Error> { header.op = BackupOp::Backup; log::info!("backup header: {:?}", header); log::info!("backup ciphertext: {:x?}", backup_ct.as_ref()); + log::info!("backup checksums: {:x?}", checksums); Ok(()) } pub fn write_restore_dna(&mut self, mut header: BackupHeader, backup_ct: backups::BackupDataCt) -> Result<(), xous::Error> { diff --git a/tools/restore.py b/tools/restore.py index 97ef86e1b..f86b6b113 100644 --- a/tools/restore.py +++ b/tools/restore.py @@ -638,8 +638,8 @@ def main(): # now try to download all the artifacts and check their versions # this list should visit kernels in order from newest to oldest. URL_LIST = [ - 'https://ci.betrusted.io/latest-ci/', # prefer stable, but fallback to latest-ci if the kernels are too old 'https://ci.betrusted.io/releases/v0.9.9/', + 'https://ci.betrusted.io/latest-ci/', # prefer stable, but fallback to latest-ci if the kernels are too old 'https://ci.betrusted.io/releases/v0.9.8/', 'https://ci.betrusted.io/releases/v0.9.7/' ]