Commit Graph

2205 Commits

Author SHA1 Message Date
Jamie McCrae a4eda30f5b zephyr: Add estimated size of update trailer to sysbuild
Adds a new field which is set to the estimated size of the
upgrade slot data, this is used to know how much space should
be reserved in an update image to determine if an update will
fit or not

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-01-30 13:43:58 +00:00
Øyvind Rønningstad 205d7e5b41 boot_serial: Adapt to zcbor 0.8.x
Change one _term to _lit that was missed earlier.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2024-01-30 12:18:51 +00:00
Øyvind Rønningstad cf882ef3b5 zcbor: Make changes to zcbor code to satisfy mynewt compile options
bit-casting between uint and float.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2024-01-30 12:18:51 +00:00
Øyvind Rønningstad c8d213a9a1 zcbor: Copy source and header files
from zcbor 0.8.1

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2024-01-30 12:18:51 +00:00
Øyvind Rønningstad f09e205b1e zcbor: Make changes to zcbor code to satisfy mynewt compile options
printf format type and bit-casting between uint and float.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2024-01-25 08:16:49 +00:00
Øyvind Rønningstad 63ddb71d51 boot_serial: Adapt to API changes in zcbor 0.8.0
New arguments in zcbor_new_state are set to NULL/0 because they are
only needed when using the zcbor_unordered_map API.

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2024-01-25 08:16:49 +00:00
Øyvind Rønningstad a899390056 zcbor: Add copy notice to all copied files
And update script

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2024-01-25 08:16:49 +00:00
Øyvind Rønningstad ad5f0ac1b2 zcbor: Copy source and header files
from zcbor 0.8.0

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2024-01-25 08:16:49 +00:00
Mateusz Michalek c3a72e9daf boot: zephyr: moonlight watchdogs
adding WATCHDOG_FEED support for WDT30 and WDT31

Signed-off-by: Mateusz Michalek <mateusz.michalek@nordicsemi.no>
2024-01-10 12:46:35 +01:00
Jamie McCrae b994ba2ce2 docs: release: Add release notes on changes
Adds release notes on bootutil changes

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-01-08 15:35:53 +00:00
Jamie McCrae 4d75fc8e07 bootutil: Fix compatible sector checking
Fixes an issue whereby slot sizes were checked but the check was
not done properly. This also adds debug log messages to show the
sector configuration including if slot sizes are not optimal

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-01-08 15:35:53 +00:00
Jamie McCrae 35e9931c78 bootutil: Add debug logging for boot status write
Adds debug level logging which shows the offset of where a
sector swap status write is occurring at

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-01-08 15:35:53 +00:00
Jamie McCrae db9a7f5822 boot: zephyr: cmake: Fix issue with missing dts entries
Fixes an issue whereby a device might not have a write or erase
entry for the flash controller in devicetree. In the case whereby
the other slot has this information, use that instead. In the case
whereby neither slot has this information, use default values and
show a warning to the user

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-01-08 15:35:44 +00:00
Xudong Zheng 8cee355095 zephyr: kconfig: make MBEDTLS_PROMPTLESS depend on MBEDTLS
This addresses compilation error when MBEDTLS module is not present.

Signed-off-by: Xudong Zheng <7pkvm5aw@slicealias.com>
2024-01-02 10:21:59 +00:00
Jamie McCrae 12e2b6398b docs: release: Add release notes
Adds release notes for various recent changes

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-12-14 08:31:07 -07:00
Jamie McCrae e9131ee8b8 zephyr: kconfig: Make saving encrypt TLVs depending on encryption
Prevents enabling the option to save encrypted TLVs if encryption
support is not enabled, as it is required to make use of this
functionality.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-12-12 10:41:26 +00:00
Jamie McCrae 4c7942e58c zephyr: Add estimated image footer size to cache in sysbuild
Adds MCUboot's estimated overhead footer size to the application's
cache when using sysbuild, this allows that information to be
propagated to applications which can use the information to reduce
the available size for an application, preventing the MCUboot
error of image too large to swap.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-12-12 10:41:26 +00:00
YuLong Yao 26d6423b00 boot: zephyr: esp32: zephyr port
Add support for ESP32xx_luatos_core targets to build
as Zephyr application.
This target is simular to esp32 devkitm,
copy conf file from esp32xx_devkitm

Signed-off-by: YuLong Yao <feilongphone@gmail.com>
2023-12-07 14:48:45 -03:00
Jamie McCrae 212997395e zephyr: firmware/single_loader: Fix compile warning
Fixes an issue of an unused function calling an undefined function

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-12-07 10:43:58 +00:00
Jamie McCrae a88e229346 zephyr: sysflash: Fix if condition for zephyr applications
Fixes an issue when sysflash is included by zephyr (non-mcuboot)
applications

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-12-07 10:43:58 +00:00
Piotr Dymacz 2a74a2b580 zephyr: io: add 'io_led_set()'
The static declaration of 'led0' was moved to 'io.c' which broke
building with the 'MCUBOOT_INDICATION_LED' enabled:

  mcuboot/boot/zephyr/main.c:380:22: error:
    'led0' undeclared (first use in this function)
      380 |     gpio_pin_set_dt(&led0, 1);
          |                      ^~~~

This adds simple function 'io_led_set()' for changing LED's value.

Fixes: 433b8480 ("zephyr: Move IO functions out of main to separate file")
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-12-06 10:33:28 +00:00
Piotr Dymacz 8c6c67016a zephyr: io: include 'bootutil_log.h' and declare log module membership
This fixes below error when building with 'MCUBOOT_INDICATION_LED' and
'LOG' enabled:

  In file included from zephyr/include/zephyr/logging/log.h:11,
                   from zephyr/include/zephyr/usb/usb_device.h:43,
                   from bootloader/mcuboot/boot/zephyr/io.c:26:
  mcuboot/boot/zephyr/io.c: In function 'io_led_init':
  zephyr/include/zephyr/logging/log_core.h:151:20: error:
    '__log_level' undeclared (first use in this function)
    151 |         (_level <= __log_level) &&                                          \
        |                    ^~~~~~~~~~~

Fixes: 433b8480 ("zephyr: Move IO functions out of main to separate file")
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-12-06 10:33:28 +00:00
Piotr Dymacz d99154f441 zephyr: rename 'led_init()' to 'io_led_init()'
This fixes below warning when building with 'MCUBOOT_INDICATION_LED'
enabled:

  mcuboot/boot/zephyr/main.c:410:5:
    warning: implicit declaration of function 'led_init';
             did you mean 'io_led_init'? [-Wimplicit-function-declaration]
      410 |     led_init();
          |     ^~~~~~~~
          |     io_led_init

Fixes: 433b8480 ("zephyr: Move IO functions out of main to separate file")
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2023-12-06 10:33:28 +00:00
Andrej Butok c43a20fd19 boot: zephyr: add support for mimxrt1040_evk
Add default configuration for mimxrt1040_evk.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2023-12-05 15:41:56 +00:00
Samuel Tardieu ab99fe2812 scripts: add missing pyyaml dependency
`pyyaml` is a dependency introduced in `imgtool dumpinfo`

Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
2023-12-05 15:41:19 +00:00
Jamie McCrae 05d1194277 docs: release: Add note on firmware loader mode
Adds a note on the new firmware loader operation type

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-11-28 13:59:00 +00:00
Jamie McCrae 215345f76a zephyr: Add firmware loader MCUboot operation style
Adds a new operation style in which the secondary slot has an
image which is used to update the primary image only.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-11-28 13:59:00 +00:00
Jamie McCrae 433b8480f7 zephyr: Move IO functions out of main to separate file
Moves IO functions into a separate file to allow reuse

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-11-28 13:59:00 +00:00
Jamie McCrae 5e6cffbf4a boot: boot_serial: Fix single slot encrypted image list
Fixes an issue whereby MCUboot is configured in single application
slot mode with serial recovery with encryption and an encrypted
image has been loaded, if valid this will have been decrypted, so
should not be treated as encrypted

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-11-28 09:26:28 +00:00
Andrej Butok 3f0b89d680 boot: zephyr: add support for mimxrt101x_evk
Add default configuration for mimxrt1010_evk and mimxrt1015_evk.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2023-11-28 09:26:11 +00:00
Jamie McCrae 47b3436255 zephyr: kconfig: Prevent MBEDTLS selection when tinycrypt is used
Prevents an issue which occurs when the MCUboot configuration is
changed which then selects multiple conflicting symbols

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-11-21 13:30:10 +00:00
Andrej Butok cd82f8bf7a boot: zephyr: add support for lpcxpresso55s28
Add default configuration for lpcxpresso55s28.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2023-11-21 13:29:34 +00:00
Jamie McCrae 0c0470e294 docs: release: Add notes on Zephyr USB fixes and boot serial echo
Adds 3 notes, 2 for zephyr USB CDC ACM fixes and 1 for a boot
serial echo fix

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-11-07 10:25:14 +00:00
Andrej Butok 6c4f7b4c63 doc: imgtool: update align description
Update the --align option values.
Add its description.
Delete [required], as it is optional now.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2023-11-07 10:22:14 +00:00
Jamie McCrae e9fccef5dd boot_serial: Fix missing response if echo command disabled
Fixes an issue whereby when an echo command is sent in serial
recovery mode, if it is disabled, there would just be no response
at all, which is invalid operation

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-11-07 10:22:02 +00:00
Jamie McCrae 013c9e7654 boot: zephyr: board: various: Remove size optimisation
This value is now the default, remove explicitly setting it for
some boards

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-11-07 09:08:27 +00:00
Jamie McCrae 0a8bbbf4b7 boot: zephyr: Fix USB configs
Fixes USB configurations so that they build out of the box, this
previously falsely built successfully but would not run

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-11-07 07:44:00 +00:00
Jamie McCrae d5c963c549 boot: zephyr: serial_adapter: Add error if main thread not preemptible
Adds a build failure if the main thread priority is not preemptible
and USB CDC ACM serial recovery is used, this is because if this is
the case, USB events will never be able to be processed and serial
recovery cannot ever enumerate

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-11-07 07:44:00 +00:00
Jamie McCrae 822b6cb710 boot: zephyr: serial_adapter: Fail if USB CDC enabled with console
This prevents MCUboot from successfully building if console and
serial recovery (USB CDC) are both enabled and they both point to
the same device

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-11-07 07:44:00 +00:00
Jamie McCrae 4a1effbc30 zephyr: Remove deprecated ZEPHYR_TRY_MASS_ERASE option
This option was deprecated 8 months ago, remove it.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-11-01 15:55:46 +00:00
Andrej Butok 2b924da464 samples: zephyr: Use the default MCUBoot PEM key file.
Use the default MCUBoot PEM key file in hello-world project settings.
Without it the application is not verified by MCUBoot.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2023-11-01 09:53:10 -06:00
Andrej Butok 25b7c7a8e7 imgtool: make "align" command line parameter optional
Align parameter should be optional:
- it has a default value.
- it is not used for non-swap update modes.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2023-11-01 09:52:55 -06:00
David Brown 301d565560 readme: update for next dev release
Bump version described in README to a development version of the next release.

Signed-off-by: David Brown <david.brown@linaro.org>
2023-11-01 09:51:15 -06:00
Fabio Utzig 304fd41980 mynewt: update to release 2.0.0
Update Mynewt metadata for v2.0.0 release.

Signed-off-by: Fabio Utzig <utzig@apache.org>
Signed-off-by: David Brown <david.brown@linaro.org>
2023-10-23 17:36:54 -06:00
David Brown e0bdcdecec Update version files for 2.0.0
Update documentation and version tags for final 2.0.0 release.

Signed-off-by: David Brown <david.brown@linaro.org>
2023-10-23 17:36:54 -06:00
Almir Okato d3819c90b4 espressif: allow the use of a different toolchain for building
TOOLCHAIN_BIN_DIR can be defined for a different toolchain use.

Signed-off-by: Almir Okato <almir.okato@espressif.com>
2023-10-17 04:41:37 -03:00
Andrej Butok 9b92ee918f boot: zephyr: add support for LPC55Sxx
Add configuration for LPC55Sxx to MCUBoot.
It supports the upgrade only mode.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2023-10-10 11:10:18 +01:00
Andrej Butok 13767d0b72 bootutil: Disable MCUBOOT_BOOT_MAX_ALIGN assert for non-swap modes
- Assert should be checked only for SWAP update modes.
- Allow platforms with page size >32 Bytes (e.g. LPC) to use
  MCUBoot, at least for non-SWAP update modes.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2023-10-05 10:25:10 +01:00
David Brown 4fe28b3cf6 Update zephyr version files for 2.0.0-rc1
Update for the rc1 release.

Signed-off-by: David Brown <david.brown@linaro.org>
2023-09-29 08:19:05 -06:00
David Brown 6a6de4b26a scripts: imgtool: update to 2.0.0-rc1 release
Update the version of imgtool.  This should auto-publish when
released.

Signed-off-by: David Brown <david.brown@linaro.org>
2023-09-29 08:19:05 -06:00