4 Commits

Author SHA1 Message Date
Michal Lenc
7b42dfc53e boot/nxboot: fix compile errors caused by nxboot_progress
Function nxboot_progress is located in nxboot_main.c, but this file
is not compiled when NXboot is used as a library to an existing
application and not as a bootloader. Therefore, the declaration of
nxboot_progress function should be dependent on NXBOOT_PROGRESS
config option.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2025-06-17 21:25:22 +08:00
Tim Hardisty
bcd1b46946 apps/boot/nxboot: Enhancements to add progress messages and copy-to-RAM feature
This adds Kconfig-enabled progress messages that are output to stdout.

It also adds Kconfig-enabled option to copy the validated and bootable image to RAM

Signed-off by: Tim Hardisty <timh@jti.uk.com>
2025-06-05 20:06:51 +08:00
Alin Jerpelea
dc4bf4a5fb boot: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-19 15:25:28 +08:00
Michal Lenc
61fec07c62 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

https://github.com/mcu-tools/mcuboot/pull/1902

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2024-11-01 11:30:28 -03:00