Skip to content
Commit f1efd483 authored by Thomas Altenbach's avatar Thomas Altenbach Committed by Jamie
Browse files

bootutil: loader: Expose routine to determine sector layout



For most upgrade strategies, it is currently needed to determine the
sector layout of each flash area to initialize a bootloader state. This
is made in loader.c by the internal boot_read_sectors routine. Since
doing so will also be needed in boot_serial, this commit exposes this
routine in bootutil_priv.h.

Previously boot_read_sectors was assuming the provided bootloader state
already contained buffers where to store the sectors. To avoid code
duplication, the routine is now also responsible for initializing the
state with the buffers that are provided as argument. By default, the
global static buffers defined in loader.c are used. This will avoid
allocating dedicated buffers in boot_serial.

Signed-off-by: default avatarThomas Altenbach <thomas.altenbach@legrand.com>
parent 72166868
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment