Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boot: add NuttX bootloader with update and recovery support #2809

Merged
merged 1 commit into from
Nov 1, 2024

Commits on Oct 31, 2024

  1. boot: add NuttX bootloader with update and recovery support

    This commit adds NuttX based bootloader with the support for image
    update and recovery if not confirmed. The algorithm utilizes three
    flash partitions: primary (image runs from this area), secondary
    and tertiary. Secondary and tertiary areas are used for update upload
    and recovery.
    
    The update is performed by simple copy from update area to primary
    area with recovery being created in recovery area if not already present.
    Once image is confirmed by the user, the image in update area is
    confirmed as well, update area becomes recovery area and vice versa.
    This means the recovery is always present (except for the first update)
    and subsequent updates just copy image from update to primary. This
    makes the update significantly faster and more considerable to flash
    wear while keeping the recovery/revert possibility.
    
    A header (aligned to flash's erase size) must be added to the beginning
    of the image. Python script nximage.py can be used to prepend this
    header to built binary. The algorithm also uses one erase page at the
    end of a partition (partition, not image!) to store flags used to
    indicate image confirm status and to detect update/recovery partitions.
    Any program uploading update image to the update partition has to erase
    this page for the boot to work correctly!
    
    The algorithm implementation is based on a patch initially developed
    for MCUboot project but rejected by the project's maintainers
    
    mcu-tools/mcuboot#1902
    
    Signed-off-by: Michal Lenc <michallenc@seznam.cz>
    michallenc committed Oct 31, 2024
    Configuration menu
    Copy the full SHA
    e45cec8 View commit details
    Browse the repository at this point in the history