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

Do Not Review, Do Not Merge: Prototype for single file PSA/Legacy Mbed TLS configs #289

Open
wants to merge 39 commits into
base: main
Choose a base branch
from

Commits on Oct 19, 2023

  1. [nrf noup] zephyr: Remove duplication from cmake

    Removes the `add_subdirectory`
    of nrfxlib it will still check that the nrfxlib is located outside
    the mcuboot directory.
    
    Signed-off-by: Sigvart Hovland <sigvart.m@gmail.com>
    Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
    Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
    Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
    Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
    Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
    Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
    Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
    Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
    Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
    (cherry picked from commit ac409cb)
    (cherry picked from commit 02db503)
    (cherry picked from commit 21a5327)
    sigvartmh authored and cvinayak committed Oct 19, 2023
    Configuration menu
    Copy the full SHA
    cf90d55 View commit details
    Browse the repository at this point in the history
  2. [nrf noup] boot: add 'minimal' configuration files

    Add prj_minimal.conf, a Kconfig fragment to be used for minimally
    sized image production. The minimal fragment has been simplified for
    only external crypto.
    
    Move partition sizing into Kconfig to be consistent with the method
    used by b0.
    
    Using this fragment with prj_minimal.conf makes MCUboot < 16kB for
    all nRF devices (9160 still needs 32kB partition).
    
    Ref: NCSDK-6704
    Signed-off-by: Stephen Stauts <stephen.stauts@nordicsemi.no>
    Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
    Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
    Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
    Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
    Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
    (cherry picked from commit 9199b3e)
    (cherry picked from commit 7e71bc4)
    (cherry picked from commit 8d74de2)
    mbolivar-nordic authored and cvinayak committed Oct 19, 2023
    Configuration menu
    Copy the full SHA
    5b6e0b2 View commit details
    Browse the repository at this point in the history
  3. [nrf noup] boot: zephyr: add support for Thingy:91

    Adds project configurations for the two systems on the Thingy:91
    (PCA-20035) board.
    
    The bootloader that is factory-programmed on thing91 does not support
    ECDSA signature type. Hence this commit also sets the signature type
    to RSA for applications built for Thingy:91.
    
    Signed-off-by: Bernt Johan Damslora <bernt.johan.damslora@nordicsemi.no>
    Signed-off-by: Sigvart Hovland <sigvart.hovland@nordicsemi.no>
    Signed-off-by: Jon Helge Nistad <jon.helge.nistad@nordicsemi.no>
    Signed-off-by: Balaji Srinivasan <balaji.srinivasan@nordicsemi.no>
    Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
    Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
    Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
    Signed-off-by: Marek Pieta <Marek.Pieta@nordicsemi.no>
    Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
    (cherry picked from commit 15661cf)
    (cherry picked from commit a7a0ac5)
    (cherry picked from commit 77c0e54)
    bjda authored and cvinayak committed Oct 19, 2023
    Configuration menu
    Copy the full SHA
    74bb73a View commit details
    Browse the repository at this point in the history
  4. [nrf noup] boot: zephyr: Enable zeroize ALT func

    -This enables the MBEDTLS_PLATFORM_ZEROIZE_ALT
     definition on Mbed TLS build of the MCUBOOT when
     the platform library is enabled. If not defined
     the Mbed TLS will compile the zeroize function
     and it will cause multiple definition errors.
     This is a noup because the configuration
     does not exist outside the sdk-nrf.
    
    Ref: NCSDK-13503
    
    Signed-off-by: Georgios Vasilakis <georgios.vasilakis@nordicsemi.no>
    Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
    Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
    Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
    (cherry picked from commit b9a2382)
    (cherry picked from commit ca168fe)
    (cherry picked from commit d79424c)
    Vge0rge authored and cvinayak committed Oct 19, 2023
    Configuration menu
    Copy the full SHA
    4c1d75f View commit details
    Browse the repository at this point in the history
  5. [nrf noup] Restore default RTC user channel count

    The default value of CONFIG_NRF_RTC_TIMER_USER_CHAN_COUNT
    for nRF52 SOCs has been changed from 0 to 3, but it makes
    MCUBoot get stuck on erasing flash pages when swapping two
    images. Restore the previous value until the RTC issue is
    resolved (see NCSDK-14427)
    
    Signed-off-by: Damian Krolik <damian.krolik@nordicsemi.no>
    Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
    Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
    Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
    (cherry picked from commit f5559b7)
    (cherry picked from commit 36c37c0)
    (cherry picked from commit 0e3ab1b)
    Damian-Nordic authored and cvinayak committed Oct 19, 2023
    Configuration menu
    Copy the full SHA
    8ba5c7f View commit details
    Browse the repository at this point in the history
  6. [nrf noup] ci: add downstream-only NCS customizations

    Add Jenkinsfile, .gitlint, and backport workflow files.
    
    Signed-off-by: Thomas Stilwell <Thomas.Stilwell@nordicsemi.no>
    Signed-off-by: Ulrich Myhre <ulrich.solli.myhre@nordicsemi.no>
    Signed-off-by: Chris Bittner <chris.bittner@nordicsemi.no>
    Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
    Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
    Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
    Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
    Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
    (cherry picked from commit 21fa70e)
    (cherry picked from commit 6c08812)
    (cherry picked from commit 6b763d1)
    thst-nordic authored and cvinayak committed Oct 19, 2023
    Configuration menu
    Copy the full SHA
    39f179d View commit details
    Browse the repository at this point in the history
  7. [nrf noup] bootutil: loader: work-around for multi-image builds

    Seems multi-image dependencies are not supported for multi-image in
    NCS yet. This is a workaround which reverts some lines to restore
    previous MCUboot behavior, so that Immutable bootloader + MCUBoot type
    builds will work.
    
    Ref. NCSDK-8681
    
    Signed-off-by: Sigvart Hovland <sigvart.hovland@nordicsemi.no>
    Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
    Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
    Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
    (cherry picked from commit 4ac7175)
    (cherry picked from commit 3dfae64)
    (cherry picked from commit 28e1f88)
    sigvartmh authored and cvinayak committed Oct 19, 2023
    Configuration menu
    Copy the full SHA
    e02925a View commit details
    Browse the repository at this point in the history
  8. [nrf noup] treewide: add NCS partition manager support

    Partition Manager is an nRF Connect SDK component which uses yaml
    files to resolve flash partition placement with a holistic view of the
    device.
    
    This component's MCUboot portions began life as upstream mcuboot
    PR#430. This added support for being built as a sub image from the
    downstream Nordic patch set for a zephyr multi image build
    system (mcuboot 430 was combined with effor submitted to upstream
    zephyr as PR#13672, which was ultimately reworked after being rejected
    for mainline at the ELCE 2019 conference in Lyon).
    
    It has since evolved over time. This is the version that will go into
    NCS v1.3. It features:
    
    - page size aligned partitions for all partitions used by mcuboot.
    - image swaps without scratch partitions
    
    Add support for configurations where there exists two primary slots
    but only one secondary slot, which is shared. These two primary slots
    are the regular application and B1. B1 can be either S0 or S1
    depending on the state of the device.
    
    Decide where an upgrade should be stored by looking at the vector
    table.
    
    Provide update candidates for both s0 and s1. These candidates must be
    signed with mcuboot after being signed by b0.
    
    Additional notes:
    
    - we make update.hex without trailer data
    
      This is needed for serial recovery to work using hex files.
      Prior to this the update.hex got TLV data at the end of the
      partition, which caused many blank pages to be included,
      which made it hard to use in a serial recovery scheme.
    
      Instead, make update.hex without TLV data at the end,
      and provide a new file test_update.hex which contains
      the TLV data, and can be directly flashed to test the
      upgrade procedure.
    
    - we use a function for signing the application as future-proofing
      for when other components must be signed as well
    
    - this includes an update to single image applications that enables
      support for partition manager; when single image DFU is used, a
      scratch partition is not needed.
    
    - In NCS, image 1 primary slot is the upgrade bank for mcuboot (IE S0 or
      S1 depending on the active slot). It is not required that this slot
      contains any valid data.
    
    - The nRF boards all have a single flash page size, and partition
      manager deals with the size of the update partitions and so on, so we
      must skip a boot_slots_compatible() check to avoid getting an error.
    
    - There is no need to verify the target when using partition manager.
    
    - We lock mcuboot using fprotect before jumping, to enable the secure
      boot property of the system.
    
    - Call fw_info_ext_api_provide() before booting if EXT_API_PROVIDE
      EXT_API is enabled. This is relevant only when the immutable
      bootloader has booted mcuboot.
    
    Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
    Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
    Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
    Signed-off-by: Sigvart Hovland <sigvart.m@gmail.com>
    Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
    Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
    Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
    Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
    Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
    Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
    Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
    Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
    Signed-off-by: Pawel Dunaj <pawel.dunaj@nordicsemi.no>
    Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
    Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
    Signed-off-by: Vidar Berg <vidar.berg@nordicsemi.no>
    Signed-off-by: Draus, Sebastian <sebastian.draus@nordicsemi.no>
    Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
    Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
    Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
    Signed-off-by: Georgios Vasilakis <georgios.vasilakis@nordicsemi.no>
    (cherry picked from commit ed5f069)
    (cherry picked from commit d2cac70)
    (cherry picked from commit 1630628)
    (cherry picked from commit 349361e)
    SebastianBoe authored and cvinayak committed Oct 19, 2023
    Configuration menu
    Copy the full SHA
    16fd63c View commit details
    Browse the repository at this point in the history
  9. [nrf noup] boot: bootutil: Add shared crypto for ECDSA and SHA

    * Add functions for ecdsa_verify_secp256r1 and sha256 to use the shared
    crypto API
    * Add Kconfig and CMake variables for selecting shared crypto when using
    ecdsa
    * Add custom section to project for placing the API section in the
    correct location in flash
    * Add kconfig fragment for using external crypto
    
    Signed-off-by: Sigvart Hovland <sigvart.m@gmail.com>
    Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
    Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
    Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
    Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
    Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
    Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
    Signed-off-by: Georgios Vasilakis <georgios.vasilakis@nordicsemi.no>
    Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
    Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
    Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
    Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
    (cherry picked from commit e741540)
    (cherry picked from commit 6804ab2)
    (cherry picked from commit e912bb2)
    (cherry picked from commit 90acd02)
    sigvartmh authored and cvinayak committed Oct 19, 2023
    Configuration menu
    Copy the full SHA
    5f71e80 View commit details
    Browse the repository at this point in the history
  10. [nrf noup] boot: nrf53-specific customizations

    - Add network core bootloader implementation
    
      Enables network core updates of nrf53 using MCUBoot by identifying
      images through their start addresses. Also implements the control and
      transfer using the PCD module.
    
    - Add support for multi image DFU using partition manager.
    
    - Add check for netcore addr if NSIB is enabled so netcore updates works
    
    - boot: zephyr: move thingy53_nrf5340_cpuapp.conf downstream
    
      Moved the board configuration for Thingy:53 Application Core to the
      nRF Connect SDK MCUboot downstream repository. The configuration file
      contains references to the Kconfig modules that are only available in
      the nRF Connect SDK. The current configuration is set up to work in the
      nRF Connect SDK environment and cannot be used upstream.
    
    - pm: enable ram flash partition using common flag
    
      This patch makes mcuboot_primary_1 ram-flash partition
      selectable using CONFIG_NRF53_MCUBOOT_PRIMARY_1_RAM_FLASH
      property. This is needed since CONFIG_NRF53_MULTI_IMAGE_UPDATE
      become not only configuration which requires that partition.
    
    - MCUBoot configures USB CDC by its own. There is no need for
      BOARD_SERIAL_BACKEND_CDC_ACM option to configure anything which is
      later overwritten anyway.
    
      Jira: NCSDK-18596
    
    Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
    Signed-off-by: Emil Obalski <emil.obalski@nordicsemi.no>
    Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
    Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
    Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
    Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
    Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
    Signed-off-by: Ole Sæther <ole.saether@nordicsemi.no>
    Signed-off-by: Sigvart Hovland <sigvart.hovland@nordicsemi.no>
    Signed-off-by: Simon Iversen <simon.iversen@nordicsemi.no>
    Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
    Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
    Signed-off-by: Mateusz Kapala <mateusz.kapala@nordicsemi.no>
    Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
    (cherry picked from commit b96bed8)
    (cherry picked from commit 4302a91)
    (cherry picked from commit e52481a)
    (cherry picked from commit 8642c39)
    sigvartmh authored and cvinayak committed Oct 19, 2023
    Configuration menu
    Copy the full SHA
    0030544 View commit details
    Browse the repository at this point in the history
  11. [nrf noup] do_boot: clean peripherals state before boot

    Do some cleanup of nRF peripherals. This is necessary since Zephyr
    doesn't have any driver deinitialization functionality, and we'd like
    to leave peripherals in a more predictable state before booting the
    Zephyr image. This should be re-worked when the zephyr driver model
    allows us to deinitialize devices cleanly before jumping to the
    chain-loaded image.
    
    Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
    Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
    Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
    Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
    Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
    Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
    Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
    Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
    Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
    Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
    Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
    Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
    (cherry picked from commit 0a4da3a)
    (cherry picked from commit e56136a)
    (cherry picked from commit 05405d4)
    (cherry picked from commit 0eacb35)
    nvlsianpu authored and cvinayak committed Oct 19, 2023
    Configuration menu
    Copy the full SHA
    1f14ccb View commit details
    Browse the repository at this point in the history
  12. [nrf noup] zephyr: Clean up non-secure RAM if enabled

    To ensure that MCUBoot does not leak keys or other material through
    memory to non-secure side we clear the memory before jumping to the next
    image.
    
    Signed-off-by: Sigvart Hovland <sigvart.hovland@nordicsemi.no>
    Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
    (cherry picked from commit ff95e7b)
    (cherry picked from commit d584ea0)
    (cherry picked from commit 2394b5b)
    (cherry picked from commit 3266b99)
    sigvartmh authored and cvinayak committed Oct 19, 2023
    Configuration menu
    Copy the full SHA
    a47c9c4 View commit details
    Browse the repository at this point in the history
  13. [nrf noup] zephyr: Set at least provide EXT_API

    -This sets the provide EXT_API to be at least
     optional when the external_crypto is being used.
    
    Ref: NCSDK-12021
    
    Signed-off-by: Georgios Vasilakis <georgios.vasilakis@nordicsemi.no>
    Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
    Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
    Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
    (cherry picked from commit 5e41a18)
    (cherry picked from commit 100c40c)
    (cherry picked from commit a2afb37)
    (cherry picked from commit cd5247b)
    Vge0rge authored and cvinayak committed Oct 19, 2023
    Configuration menu
    Copy the full SHA
    c8e7fbd View commit details
    Browse the repository at this point in the history
  14. [nrf noup] loader: Fix reading reset addr to support ext flash

    When mcuboot_secondary is on external flash, the image header cannot
    dircetly be accessed via secondary_fa->fa_off. Instead the provided
    function boot_img_hdr() is used now.
    Additionally a similar issue is present when trying to read the address
    of the reset handler. For this flash_area_read() is used now.
    
    With this patch is possible to have the update partiton
    mcuboot_secondary on external flash and update a updatable
    bootloader (mcuboot) in s0 and/or s1.
    
    Signed-off-by: Christian Taedcke <christian.taedcke@lemonbeat.com>
    Signed-off-by: Ole Sæther <ole.saether@nordicsemi.no>
    Signed-off-by: Sigvart Hovland <sigvart.hovland@nordicsemi.no>
    Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
    (cherry picked from commit d6c6170)
    (cherry picked from commit 4d30b55)
    (cherry picked from commit 7af56df)
    (cherry picked from commit a49b83e)
    chrta authored and cvinayak committed Oct 19, 2023
    Configuration menu
    Copy the full SHA
    48ad055 View commit details
    Browse the repository at this point in the history
  15. [nrf noup] boot: bootutil: Add required signature decoding

    The CC310 and bl_crypto require decoded signature instead of raw ASN.1
    
    Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
    (cherry picked from commit 51afa7a)
    (cherry picked from commit 9da6438)
    (cherry picked from commit ae4344b)
    de-nordic authored and cvinayak committed Oct 19, 2023
    Configuration menu
    Copy the full SHA
    685c58e View commit details
    Browse the repository at this point in the history
  16. [nrf noup] bootloader: mcuboot: Fix wrong use of if defined

    The file nrf_cleanup.c has
    "#if defined(USE_PARTITION_MANAGER)"
    Which is true even if USE_PARTITION_MANAGER=n.
    This must be changed to "#if USE_PARTITION_MANAGER" for correct
    behaviour.
    
    Ref: NCSIDB-987
    
    Signed-off-by: Ole Sæther <ole.saether@nordicsemi.no>
    (cherry picked from commit 823fd36)
    osaether authored and cvinayak committed Oct 19, 2023
    Configuration menu
    Copy the full SHA
    09bad48 View commit details
    Browse the repository at this point in the history
  17. [nrf noup] Fix path variables

    Fixes path variables to use the proper Zephyr module variables
    
    Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
    (cherry picked from commit fecfb1e)
    nordicjm authored and cvinayak committed Oct 19, 2023
    Configuration menu
    Copy the full SHA
    5777337 View commit details
    Browse the repository at this point in the history
  18. [nrf noup] bootutil: Fix missing PCD define check

    Fixes a missing PCD define check, an image might have the
    network core partition layout set but if PCD support is not
    enabled then it should not assume that PCD support is part
    of mcuboot.
    
    Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
    (cherry picked from commit 71ec266)
    nordicjm authored and cvinayak committed Oct 19, 2023
    Configuration menu
    Copy the full SHA
    815fa3a View commit details
    Browse the repository at this point in the history
  19. [nrf noup] boot: zephyr: Add ifdef protection for RAM locking

    This adds an ifdef check so that RAM is only protected if PCD is
    enabled, whereas previously this would cause a build failure.
    
    Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
    (cherry picked from commit 4ec411c)
    nordicjm authored and cvinayak committed Oct 19, 2023
    Configuration menu
    Copy the full SHA
    52997e1 View commit details
    Browse the repository at this point in the history
  20. [nrf fromtree] zephyr: Provide third image cases for direct image upload

    The commit adds missing support for direct upload of third
    image slots.
    
    (cherry picked from commit 0035c33)
    Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
    (cherry picked from commit a1fa992)
    de-nordic authored and cvinayak committed Oct 19, 2023
    Configuration menu
    Copy the full SHA
    a0c919b View commit details
    Browse the repository at this point in the history
  21. [nrf noup] booutil: loader: Add support for NSIB and multi-image

    This adds support for using both NSIB and the multi-image configuration
    in MCUboot. Before this was not possible due to upgradable bootloader
    support through NSIB was using the `UPDATEABLE_IMAGE_NUMBER`
    configuration to update the updateable bootloader.
    
    In this commit we change from using `FLASH_AREA_IMAGE_PRIMARY` to get
    the flash area ID to using the bootloader state where we set the flash
    area ID of the free updatable bootloader slot if the image is intended
    for this slot.
    
    Ref. NCSDK-19223
    
    Signed-off-by: Sigvart Hovland <sigvart.hovland@nordicsemi.no>
    (cherry picked from commit 8fe7070)
    Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
    (cherry picked from commit 037f4da)
    sigvartmh authored and cvinayak committed Oct 19, 2023
    Configuration menu
    Copy the full SHA
    b518e13 View commit details
    Browse the repository at this point in the history
  22. [nrf noup] zephyr: Move partition manager definitions to pm_sysflash.h

    Making sysflash.h and pm_sysflash.h more readable.
    
    (cherry picked from commit eafdae9)
    Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
    (cherry picked from commit 99001d0)
    de-nordic authored and cvinayak committed Oct 19, 2023
    Configuration menu
    Copy the full SHA
    0383b7c View commit details
    Browse the repository at this point in the history
  23. [nrf noup] booutil: loader: Fixup for NSIB and multi-image

    Commit 8fe7070 broke bootloader updates
    for nRF91 and non-multi image builds. This commit is fixing this by
    restoring the previous functionality and `ifdef` out the new logic
    needed for multi-image.
    
    Ref. NCSDK-23305
    
    Signed-off-by: Sigvart Hovland <sigvart.hovland@nordicsemi.no>
    (cherry picked from commit 7429a98)
    Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
    (cherry picked from commit 8c5b560)
    sigvartmh authored and cvinayak committed Oct 19, 2023
    Configuration menu
    Copy the full SHA
    745cf4e View commit details
    Browse the repository at this point in the history
  24. [nrf noup] zephyr: Add support for three images

    The commit modifies pm_sysflash.h to add support for three
    application images.
    
    (cherry picked from commit 8fba4db)
    Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
    (cherry picked from commit a7f6ccb)
    de-nordic authored and cvinayak committed Oct 19, 2023
    Configuration menu
    Copy the full SHA
    5822244 View commit details
    Browse the repository at this point in the history

Commits on Oct 20, 2023

  1. [nrf noup] booutil: loader: Do not check reset vector for XIP image

    The XIP image, 2, does not have reset vector.
    
    Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
    (cherry picked from commit 568d62c)
    Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
    (cherry picked from commit c6349b9)
    de-nordic authored and cvinayak committed Oct 20, 2023
    Configuration menu
    Copy the full SHA
    4fe70b6 View commit details
    Browse the repository at this point in the history
  2. [nrf fromtree] zephyr: Fix boot serial extensions

    Fixes building the bootloader with serial recovery mode and boot
    serial extensions enabled due to changes in Zephyr's MCUmgr file
    and naming changes.
    
    Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
    (cherry picked from commit e188dbb)
    Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
    (cherry picked from commit 6ae6741)
    nordicjm authored and cvinayak committed Oct 20, 2023
    Configuration menu
    Copy the full SHA
    100ea3d View commit details
    Browse the repository at this point in the history
  3. [nrf fromtree] zephyr: Fall back to minimal C library

    Changes back to the minimal C library instead of picolibc to
    reduce flash usage
    
    Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
    (cherry picked from commit 8f8fbf9)
    Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
    (cherry picked from commit 9bdcf44)
    nordicjm authored and cvinayak committed Oct 20, 2023
    Configuration menu
    Copy the full SHA
    1e6532a View commit details
    Browse the repository at this point in the history
  4. [nrf fromtree] boot_serial: Fix include

    Fixes an include which is needed for multiple options by just
    always including it, and fixing the path so it can be included.
    
    Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
    (cherry picked from commit 5c5222f)
    Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
    (cherry picked from commit 6b106c1)
    nordicjm authored and cvinayak committed Oct 20, 2023
    Configuration menu
    Copy the full SHA
    ec0aa5f View commit details
    Browse the repository at this point in the history
  5. [nrf fromtree] bootutil: Add mode for XIP with revert

    Adds a new define if bootloader in built in direct-XIP with revert
    mode
    
    Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
    (cherry picked from commit 8d0b35a)
    Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
    (cherry picked from commit 70061f3)
    nordicjm authored and cvinayak committed Oct 20, 2023
    Configuration menu
    Copy the full SHA
    c15589e View commit details
    Browse the repository at this point in the history
  6. [nrf fromtree] bootutil: Add shared data support for XIP with revert …

    …mode
    
    Adds support for sharing the direct-XIP MCUboot mode with revert
    to applications using shared data
    
    Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
    (cherry picked from commit 50f8b5f)
    Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
    (cherry picked from commit e768dd2)
    nordicjm authored and cvinayak committed Oct 20, 2023
    Configuration menu
    Copy the full SHA
    eb1ff87 View commit details
    Browse the repository at this point in the history
  7. [nrf noup] github: Add a commit tags check workflow

    Use the generic commit-tags action to provide sauce tag checks.
    
    Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
    (cherry picked from commit afa0d67)
    carlescufi authored and cvinayak committed Oct 20, 2023
    Configuration menu
    Copy the full SHA
    d9ed9a6 View commit details
    Browse the repository at this point in the history
  8. [nrf noup] zephyr: Add RAM flash configuration to cache for sysbuild

    Puts the flash simulation configurtion into cache variables that can
    be used by other applications and CMake code to know specifics on
    the simulated flash details
    
    Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
    (cherry picked from commit c28768e)
    nordicjm authored and cvinayak committed Oct 20, 2023
    Configuration menu
    Copy the full SHA
    9cd1de1 View commit details
    Browse the repository at this point in the history
  9. [nrf noup] sysflash: pm_sysflash: Fix incorrect define exclude for NSIB

    A mismatch in defines was made for `_image_1_primary_slot_id` resulting
    in some configurations not working. This fixes that the linker variable
    is exposed for mcuboot so that it knows which slot is running an which
    slot a bootloader upgrade is to be put into.
    
    Ref. NCSDK-19223
    
    Signed-off-by: Sigvart Hovland <sigvart.hovland@nordicsemi.no>
    (cherry picked from commit 1f38eb8)
    sigvartmh authored and cvinayak committed Oct 20, 2023
    Configuration menu
    Copy the full SHA
    862bca5 View commit details
    Browse the repository at this point in the history
  10. [nrf noup] boot: zephyr: Boot even if EXT_ABI is not provided

    This removes the `return;` to ensure that the application is booted even
    if EXT_ABI is not provided to the application because it does not
    include `FW_INFO`.
    
    Added a bit more description to the error messages when FW_INFO is not
    found and EXT_ABI is not able to be provided to the next image.
    
    Ref. NCSDK-24132
    
    Signed-off-by: Sigvart Hovland <sigvart.hovland@nordicsemi.no>
    (cherry picked from commit b80046d)
    sigvartmh authored and cvinayak committed Oct 20, 2023
    Configuration menu
    Copy the full SHA
    01f17eb View commit details
    Browse the repository at this point in the history
  11. [nrf noup] loader: Add firmware version check downgrade prevention

    For nRF53, the only existing version number metadata is stored in the
    `firmware_info` structure in the network core. This utilizes PCD to read
    out the version number and compares it against the version number found
    in the secondary slot for the network core.
    
    Ref. NCSDK-21379
    
    Signed-off-by: Sigvart Hovland <sigvart.hovland@nordicsemi.no>
    (cherry picked from commit 1b6571d)
    sigvartmh authored and cvinayak committed Oct 20, 2023
    Configuration menu
    Copy the full SHA
    4d9859a View commit details
    Browse the repository at this point in the history
  12. [nrf noup] crypto: ecdsa: Fix shared crypto MCUBoot EXT_ABI

    After the upmerge using external crypto from NSIB in MCUBoot resulted in
    build failures. This commit fixes the build failures but also fixes a
    change in the API call which resulted in `-102` error when calling the
    verify function.
    
    Ref. NCSDK-23994
    
    Signed-off-by: Sigvart Hovland <sigvart.hovland@nordicsemi.no>
    (cherry picked from commit dc0b692)
    sigvartmh authored and cvinayak committed Oct 20, 2023
    Configuration menu
    Copy the full SHA
    2891664 View commit details
    Browse the repository at this point in the history

Commits on Oct 27, 2023

  1. [nrf noup] boards: thingy53: disable GPIO ISR support

    Change disables GPIO interrupt support in Zephyr GPIO driver,
    which is not obligatory for MCUboot.
    This is needed to reduce memory footprint.
    
    Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
    nika-nordic authored and de-nordic committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    adab597 View commit details
    Browse the repository at this point in the history

Commits on Nov 29, 2023

  1. [nrf noup] bootutil: Add usage of nrf_security

    -This single commit adds support of nrf_security for both nrf_cc310_bl
     and Mbed TlS use cases
    -Enable NRF_SECURITY and MBEDTLS when BOOT_USE_MBEDTLS is enabled
    -Link mbedcrypto_common for MCUBOOT_BOOTUTIL_INTERFACE
    -Link mbedcrypto_target for MCUboot
    -Remove mcuboot-mbedtls-cfg.h set manually as MbedTLS config
    -Remove comment about Mbed TLS being used for RSA signatures
     as we are using nrf_security
    -Only enable heap when MBEDTLS_ENABLE_HEAP is configured
    
    ref: <fill in>
    
    Signed-off-by: Frank Audun Kvamtrø <frank.kvamtro@nordicsemi.no>
    frkv committed Nov 29, 2023
    Configuration menu
    Copy the full SHA
    ab8db16 View commit details
    Browse the repository at this point in the history

Commits on Dec 1, 2023

  1. Configuration menu
    Copy the full SHA
    0d6f667 View commit details
    Browse the repository at this point in the history