Skip to content

Commit aca5140

Browse files
committed
Revert to hubtools 0.4.6, don't build with a default epoch value.
Don't require updating to hubtools 0.4.7. There doesn't need to be an 'EPOC' in the caboose as it is always "0" at this step in the release engineering flow. Fix complementary swapped args and corresponding swapped comparison to read correctly. Remove vestigial epoch header check. With the decision to not use ImageHeader.epoch, a TBD prep_image_update variant will contain the epoch information.
1 parent 6f5d861 commit aca5140

File tree

3 files changed

+4
-12
lines changed

3 files changed

+4
-12
lines changed

Cargo.lock

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

drv/lpc55-update-server/src/images.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,7 @@ impl From<&[u8]> for Epoch {
599599

600600
impl Epoch {
601601
pub fn can_update_to(&self, next: Epoch) -> bool {
602-
self.value >= next.value
602+
self.value <= next.value
603603
}
604604
}
605605

@@ -611,8 +611,8 @@ impl Epoch {
611611
/// so that images can be rejected early, i.e. before any flash has
612612
/// been altered.
613613
pub fn check_rollback_policy(
614-
next_image: ImageAccess<'_>,
615614
active_image: ImageAccess<'_>,
615+
next_image: ImageAccess<'_>,
616616
complete: bool,
617617
) -> Result<(), UpdateError> {
618618
let next_epoch = get_image_epoch(&next_image)?;

drv/lpc55-update-server/src/main.rs

-8
Original file line numberDiff line numberDiff line change
@@ -202,14 +202,6 @@ impl idl::InOrderUpdateImpl for ServerImpl<'_> {
202202
self.header_block = None;
203203
return Err(e.into());
204204
}
205-
let active_image =
206-
ImageAccess::new_flash(&self.flash, component, slot.other());
207-
if let Err(e) =
208-
check_rollback_policy(active_image, next_image, false)
209-
{
210-
self.header_block = None;
211-
return Err(e.into());
212-
}
213205
} else {
214206
// Block order is enforced above. If we're here then we have
215207
// seen block zero already.

0 commit comments

Comments
 (0)