mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
fix overly restrictive version match on backup version
This commit is contained in:
parent
a0791ff092
commit
c471ca0fbb
4 changed files with 4 additions and 2 deletions
|
|
@ -257,6 +257,7 @@ impl Default for BackupHeaderIpc {
|
|||
}
|
||||
|
||||
pub const BACKUP_VERSION: u32 = 0x00_01_00_01;
|
||||
pub const BACKUP_VERSION_MASK: u32 = 0xFF_FF_00_00; // mask off bits that are cross-compatible
|
||||
|
||||
#[repr(u32)]
|
||||
#[derive(Copy, Clone, PartialEq, Eq, Debug)]
|
||||
|
|
|
|||
|
|
@ -2645,7 +2645,7 @@ impl<'a> RootKeys {
|
|||
let backup = &kernel[KERNEL_BACKUP_OFFSET as usize..KERNEL_BACKUP_OFFSET as usize + size_of::<BackupHeader>()];
|
||||
let mut header = BackupHeader::default();
|
||||
header.as_mut().copy_from_slice(backup);
|
||||
if header.version == BACKUP_VERSION {
|
||||
if (header.version & BACKUP_VERSION_MASK) == (BACKUP_VERSION & BACKUP_VERSION_MASK) {
|
||||
Some(header)
|
||||
} else {
|
||||
None
|
||||
|
|
|
|||
|
|
@ -464,7 +464,7 @@ fn wrapped_main() -> ! {
|
|||
_ => log::warn!("backup record was found, but it has an improper operation field: {:?}", header.op),
|
||||
}
|
||||
}
|
||||
_ => {}, // no backup header found, continue with boot
|
||||
_ => log::info!("No backup header found"), // no backup header found, continue with boot
|
||||
}
|
||||
|
||||
// check for gateware updates
|
||||
|
|
|
|||
|
|
@ -582,6 +582,7 @@ def main():
|
|||
# this list should visit kernels in order from newest to oldest.
|
||||
URL_LIST = [
|
||||
'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/'
|
||||
]
|
||||
|
|
|
|||
Loading…
Reference in a new issue