Giter Site home page Giter Site logo

The value of State about rustboot HOT 1 CLOSED

vietle77 avatar vietle77 commented on May 30, 2024
The value of State

from rustboot.

Comments (1)

nihalpasham avatar nihalpasham commented on May 30, 2024

So, rustBoot uses (its own) state-ids to represent the state of a (boot/update) partition. The state-id is actually a single-byte identifier that lives at the end of boot/update partition. It looks something like this - on flash-memory

[...header...][...padding...][....firmware image....][.... free space....][...partition sector flags...][single byte partition status][4-byte trailer magic]
  1. StateNew or (0xFF) means the image was never staged for boot, or triggered for an update.
  2. StateUpdating or (0x70): This is only valid in the update partition. This basically means that the OS/firmware has marked an image as ready for update and should replace the current image in the boot partition on the next reboot.
  3. StateTesting or (0x10): This is only valid in the boot partition. It means the image has just been updated, and is pending a reboot. If we see the same state after a reboot, it means that the updated image failed to boot, despite being correctly verified. This particular situation triggers a rollback.
  4. StateSuccess (0x00): This is only valid in the boot partition. It means the new image is stored in boot has been successfully staged at least once, and the update is now complete.

from rustboot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.