Commit Graph

1762 Commits

Author SHA1 Message Date
Francesco Servidio 5bc983276f doc: Fix case in titles
Unified case in titles.
Fixed small grammar issues.

Signed-off-by: Francesco Servidio <francesco.servidio@nordicsemi.no>
2021-11-03 17:05:40 +01:00
Ross Burton a6df132b68 imgtool: prefer cbor2 over cbor
The cbor module is unmaintained, with the last release in 2016[1]. The
cbor2 module however is under active development and was last released
just last month[2].

As the APIs are identical, we can import cbor2 and if that fails fall
back to cbor.

[1] https://pypi.org/project/cbor/#history
[2] https://pypi.org/project/cbor2/#history

Closes #1189

Signed-off-by: Ross Burton <ross.burton@arm.com>
Change-Id: Iaf2d0df625a200a5cebf72dec4a89877a26194ea
2021-11-03 14:19:31 +01:00
Fabio Utzig 1a9c6d8495 mynewt: remove #error on ec256 with Mbed TLS
Allow building ec256 signature validation on Mynewt using Mbed TLS.
Related to https://github.com/apache/mynewt-artifact/pull/33

Signed-off-by: Fabio Utzig <utzig@apache.org>
2021-11-01 14:43:52 -03:00
Dominik Ermel 9479af0ae8 boot/bootutil: Fix probable uninitialized flash_area access
The commit fixes issue where failed flash_area_open in
boot_write_status would result in flash_area_close call on
uninitialized flash_area object.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2021-10-27 09:31:17 +02:00
Rajeev Piyare 29fc848dc2 Add Conexio Stratus board configuration for DFU button operation
Signed-off-by: Rajeev Piyare <rajeev@conexiotech.com>
2021-10-24 19:59:22 -03:00
Dominik Ermel ec6dac5010 bootutil: Fix boot_find_status leaving flash area open
The commit fixes boot_find_status leaving flash area object in open
state on success.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2021-10-24 08:04:20 -03:00
Francesco Servidio 482921f724 doc: Fixed consistency of bootloader term
Fixed the consistency of the term bootloader.

Signed-off-by: Francesco Servidio <francesco.servidio@nordicsemi.no>
2021-10-21 06:45:13 -03:00
Francesco Servidio 582367cfeb doc: Fixed consistency of Mbed term
Fixed the consistency of the case used for the Mbed term.

Signed-off-by: Francesco Servidio <francesco.servidio@nordicsemi.no>
2021-10-21 06:45:13 -03:00
Francesco Servidio 4ff0c18693 doc: Fixed consistency of MCUboot
Fixed the consistency of the case used in the term MCUboot.

Signed-off-by: Francesco Servidio <francesco.servidio@nordicsemi.no>
2021-10-21 06:45:13 -03:00
Dominik Ermel 6138b4f71a bootutil: Fix boot_read_image_header error path
The error path of boot_read_image_header could invoke
flash_area_close on uninitialized flash_area object.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2021-10-20 17:28:34 -06:00
Francesco Servidio 1848863af3 doc: Remove outdated IRC links
Removed outdated IRC links from index.md and readme.md.
Slightly reformatted the final links in index.md and readme.md.

Signed-off-by: Francesco Servidio <francesco.servidio@nordicsemi.no>
2021-10-20 11:01:16 -03:00
Dominik Ermel c9dc224942 boot_serial: Respond with rc code for all mcumgr commands
The commit replaces bs_emtpy_rsp with bs_rc_rsp that responds with
mcumgr rc code after completing command or with MGMT_ERR_ENOTSUP,
when command is not supported.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2021-10-19 06:47:37 -03:00
David Brown 29099e1d17 Preps for 1.8.0
Update version fields for 1.8.0 release.

Signed-off-by: David Brown <david.brown@linaro.org>
2021-10-13 10:03:58 -06:00
Dominik Ermel e5ecbcebfa zephyr: Fix support for single application with serial recovery
The commit fixes compilation error when attempting to build
support for single application slot with serial recovery enabled.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2021-10-08 10:54:29 -03:00
Almir Okato eb6b7bf3eb espressif: Enable signature verification (RSA, EC256 and ED25519)
MbedTLS and Tinycrypt security lib options added to Espressif's
configuration and build.

Signed-off-by: Almir Okato <almir.okato@espressif.com>
2021-10-07 18:30:20 -03:00
Fabio Utzig 14c785b716 ci: add encrypted image RAM load test
Signed-off-by: Fabio Utzig <utzig@apache.org>
2021-10-07 14:23:51 -03:00
Hugo L'Hostis db543e5026 boot : Adding encrypted ram-load support
This patch adds the possibility to boot using ram-load with an
encrypted image. This is enabled when both the flags MCUBOOT_RAM_LOAD
and MCUBOOT_ENC_IMAGES are defined.

Signed-off-by: Fabio Utzig <utzig@apache.org>
Signed-off-by: Hugo L'Hostis <hugo.lhostis@arm.com>
Signed-off-by: Salome Thirot <salome.thirot@arm.com>
Change-Id: I7756c2c634d90a2e726117d6cfc5650653cf1b51
2021-10-07 14:23:51 -03:00
Fabio Utzig 8fcdfc5c67 ci: bump FIH docker release
Use version 0.0.2 of the FIH docker image, which is just a rebuild with
upgraded packages. This should fix the SSL issues cloning the tf-m-tests
repo from the docker run.

Signed-off-by: Fabio Utzig <utzig@apache.org>
2021-10-07 12:40:24 -03:00
Fabio Utzig 66ed29f64c sim: update ram load to use image size comparison
When building images for testing they are aligned to a flash write size,
which works fine for flash based comparisons, but since RAM is always
reset to 0, if the flash is erased to 0xff, the final bytes of the
alignment will differ even though they are not relevant (not part of the
image itself).

This commit adds a real image size parameter to the ImageData, so it can
be used by the RAM load to compare only the relevant bits of the image
(ignore the padding), and also updates the RAM test routine to use the
correct image size.

Signed-off-by: Fabio Utzig <utzig@apache.org>
2021-10-07 12:40:24 -03:00
Dominik Ermel 4b82b20730 zephyr: Configuration check for MULTITHREADING when USB DFU enabled
The commit adds check for MULTITHREADING being enabled when USB
DFU is enabled, for Zephyr platform.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2021-09-30 14:27:24 -06:00
dependabot[bot] 17f99f05e1 build(deps): bump addressable from 2.7.0 to 2.8.0 in /docs
Bumps [addressable](https://github.com/sporkmonger/addressable) from 2.7.0 to 2.8.0.
- [Release notes](https://github.com/sporkmonger/addressable/releases)
- [Changelog](https://github.com/sporkmonger/addressable/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sporkmonger/addressable/compare/addressable-2.7.0...addressable-2.8.0)

---
updated-dependencies:
- dependency-name: addressable
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: David Brown <david.brown@linaro.org>
2021-09-30 07:00:12 -03:00
dependabot[bot] aea30ea6c8 build(deps): bump nokogiri from 1.11.4 to 1.12.5 in /docs
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.11.4 to 1.12.5.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.11.4...v1.12.5)

---
updated-dependencies:
- dependency-name: nokogiri
  dependency-type: indirect
...

Signed-off-by: Fabio Utzig <utzig@apache.org>
Signed-off-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com>
2021-09-29 16:51:59 -06:00
Fabio Utzig f859255838 ci: update signed-off-by with string comparison
Force use of string comparison to avoid issues comparing strings that
include specific characters like `[` and `]`, which are special symbols
and break the bash test.

Signed-off-by: Fabio Utzig <utzig@apache.org>
2021-09-29 16:51:59 -06:00
David Brown 0779f4f4d2 Preps for 1.8.0-rc2
Update version fields for 1.8.0-rc2 release.

Signed-off-by: David Brown <david.brown@linaro.org>
2021-09-29 15:31:32 -06:00
Maxime Vincent d96d617018 Include mcuboot_config.h from sign_key.h to fix MCUBOOT_HW_KEY compilation
Signed-off-by: Maxime Vincent <maxime@veemax.be>
2021-09-29 13:05:04 -06:00
Xabier Marquiegui 809e77d2c3 boot: zephyr: Config mimxrt1020_evk and mimxrt1050_evk_qspi
The mimxrt1020_evk and mimxrt1050_evk_qspi boards have large
slots so we need to increase CONFIG_BOOT_MAX_IMG_SECTORS from
the default.

Signed-off-by: Xabier Marquiegui <xmarquiegui@ainguraiiot.com>
2021-09-28 10:53:31 -03:00
David Brown 5f4e1484b7 sim: mcuboot-sys: Avoid duplicate C files
When building mcuboot-sys, the build script currently adds some
duplicate files.  When used as a library, this works, because the code
is linked in as a library.  However, when mcuboot-sys is tested itself,
all specified files will be brought in, which results in duplicate
symbols for these files.

Fix this by keeping track of all of the files that we've added, and
making sure to add each file once.  Additionally, instead of using the
orphaned files in mbedtls-asn1, just always use the verions in the main
mbedtls library.  There are some configurations of the code that end up
using both the extracted files and the full mbed TLS.  Avoid that
conflict by just always using the full tree.

Signed-off-by: David Brown <david.brown@linaro.org>
2021-09-27 15:22:09 -06:00
David Brown 115ce57de7 sim: Allow 'large-write' in mcuboot-sys
When collected together as a workspace, the test framework ends up
running all of the configurations on each project.  One configuration
option `large-write` doesn't really mean anything to mcuboot-sys, but
adding support for the feature allows this package to be tested along
with all of the other packages.

Signed-off-by: David Brown <david.brown@linaro.org>
2021-09-27 15:22:09 -06:00
Fabio Utzig 66aa96727a ci: disable Travis
After moving FIH tests to GH workflows, Travis can be phased out, at
least temporarily.

Signed-off-by: Fabio Utzig <utzig@apache.org>
2021-09-27 14:23:19 -03:00
Fabio Utzig 7aa1c87dd8 ci: add FIH hardening tests to workflows
Add workflows to run FIH tests using GH actions. Update scripts to add
parsing of FIH parameters from a env matrix and disable docker caching
when running on GH.

Signed-off-by: Fabio Utzig <utzig@apache.org>
2021-09-27 14:23:19 -03:00
Almir Okato 712fdb5ad0 espressif: Add ESP32-C3 initial basic support
ESP32-C3 target added to the Espressif port, CMakeLists, and
added related files to ESP32-C3 target directory as well.

Signed-off-by: Almir Okato <almir.okato@espressif.com>
2021-09-23 20:28:07 -03:00
Almir Okato d532029ca4 espressif: Add ESP32-S2 initial basic support
ESP32S2 target added to the Espressif port, modified CMakeLists,
and added the bootloader related files to esp32s2 target directory.

Signed-off-by: Almir Okato <almir.okato@espressif.com>
2021-09-23 18:39:07 -03:00
Mate Toth-Pal 056d9bc8dd ci: Change TF-M log level
Change the log level of TF-M so that the message that the CI is looking
for appears in the output.

Signed-off-by: Fabio Utzig <utzig@apache.org>
Change-Id: I763ccef4aaf6158ed578b230096f595a1e5cbfd9
Signed-off-by: Mate Toth-Pal <mate.toth-pal@arm.com>
2021-09-22 12:41:20 +02:00
Fabio Utzig 66fecebb80 ci: Fix FIH YAML result parsing
The running test was generating an YAML output with the following line:

```
last_line: '  Description: 'ECDSA signature test of attest token''
```

This string comes from the test with the single quotes, and using single
quotes twice break the YAML format, so this commit changes the string
after last_line to be enclosed in the double quotes.

Signed-off-by: Fabio Utzig <utzig@apache.org>
2021-09-22 12:41:20 +02:00
Sherry Zhang ceb9b11609 Revert "ci: Disable travis test until they can be fixed"
This reverts commit ed75dfdec4.

Signed-off-by: Sherry Zhang <sherry.zhang2@arm.com>
Change-Id: I4ff5e2ac9555d03d5b13d4a9bd687247440dbc81
2021-09-22 12:41:20 +02:00
Sherry Zhang 3c4f69cb6e ci: Update the TF-M version in fih test
Signed-off-by: Sherry Zhang <sherry.zhang2@arm.com>
Change-Id: I357ca9266629310deddf8431aa912f3fdbe9f34c
2021-09-22 12:41:20 +02:00
David Brown 65643a6a28 Revert "ci: fix wget error downloading arm-gcc-embedded"
This reverts commit 34f68ed67c.

Re-enable certificate checking when downloading the Arm toolchain.
Although, this is probably not all that great of a risk, the certificate
issue was transient, and was fixed shortly after it was noticed.

Signed-off-by: David Brown <david.brown@linaro.org>
2021-09-18 19:11:05 -03:00
Marek Pieta 9183ffc9c8 boot_serial: Increase BOOT_SERIAL_OUT_MAX
Change increases BOOT_SERIAL_OUT_MAX. This is necessary to provide
complete image list when multi-image DFU is enabled and four image
slots are occupied.

Signed-off-by: Marek Pieta <Marek.Pieta@nordicsemi.no>
2021-09-17 16:41:08 -06:00
David Brown 6d56cd8a5f sim: Move Cargo package to top level
Instead of having to cd into the 'sim' directory, create a top-level
Cargo.toml file that adds the sim as a workspace.

For the most part, this doesn't change how the simulator works.  It is
still possible to run `cargo test ...` within the `sim` directory.
However, the `target` directory will reside at the top-level of the tree
instead of within the sim directory.

One change is that running cargo commands at the top of the tree will
run those commands on all of the packages found within the tree.
Specific packages can be tested by either changing to the directory of
that package, or passing `-p <dir>` to the cargo test command (i.e.
`cargo test -p bootsim`).

The other visible change from this commit is that the 'target' directory
will always be at the top of the tree, rather than in particular
directory where the test is run.  Any scripts or tools that expect this
to be in a certainly location, will have to be modified.

Signed-off-by: David Brown <david.brown@linaro.org>
2021-09-17 10:45:53 -06:00
David Brown 7f8c0a2c4e sim: Update various package dependencies
Refresh the package dependencies, bringing in the latest versions of
many packages.

Signed-off-by: David Brown <david.brown@linaro.org>
2021-09-17 10:45:53 -06:00
David Brown 9c6322f721 sim: Dependency updates
Update the dependencies in the main sim to the latest versions.  There
are some minor changes in a few of the packages, and a fairly
significant change to the aes.  The aes_ctr crate has been merged into
the aes crate, along with some changes to how it initialized.

Signed-off-by: David Brown <david.brown@linaro.org>
2021-09-17 10:45:53 -06:00
Andrzej Puzdrowski 9d4d45c528 boot/bootutil/loader: fix comparison using fih_eq() in hook service
This commit fixes following issue:
One of parameters in comparison using fih_eq() was not of fih_int
type which caused build error when medium or higher FIH mode is enabled.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2021-09-16 14:07:42 -06:00
Fabio Utzig 34f68ed67c ci: fix wget error downloading arm-gcc-embedded
Disable certificate verification for developer.arm.com to avoid
certificate issues when installing arm embedded tools to build Mynewt.

Signed-off-by: Fabio Utzig <utzig@apache.org>
2021-09-16 08:34:38 -03:00
George Beckstein f7319e61fb Add DataShare utility class for Mbed-OS applications
This commit adds a utility class that is available when building an application booted by mcuboot with MCUBOOT_DATA_SHARING enabled.

This utility class, `DataShare`, allows the application to iterate through the shared memory region and get each entry stored there.

Signed-off-by: George Beckstein <george.beckstein@gmail.com>
2021-09-13 15:46:40 -06:00
George Beckstein cb09bd201c Add config params for shared data usage in Mbed-OS
Signed-off-by: George Beckstein <george.beckstein@gmail.com>
2021-09-13 15:46:40 -06:00
Andrzej Puzdrowski bd6dc5e9bc zephyr: support the hook file by MCUBOOT_BOOTUTIL library
This patch make possible MCUBOOT_BOOTUTIL to integrate the
hook file on their own. This is intended to support hook while
the library is just part of the application.
The hooks file for the MCUboot build is now included in the same manner.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2021-09-13 15:35:27 -06:00
Marek Pieta 43cca02938 zephyr: Enable custom settings erase cmd on Thingy:53
Change introduces custom settings erase command on Thingy:53.

Signed-off-by: Marek Pieta <Marek.Pieta@nordicsemi.no>
2021-09-13 15:34:18 -06:00
Marek Pieta 304d91ab14 zephyr: Add multi-image DFU for Thingy:53
Change enables multi-image DFU in Thingy:53 configuration.
The network core cannot access external flash directly. The flash
simulator must be used to provide a memory region that is used to
forward the new firmware to the network core.

Signed-off-by: Marek Pieta <Marek.Pieta@nordicsemi.no>
2021-09-13 15:34:18 -06:00
David Brown ed75dfdec4 ci: Disable travis test until they can be fixed
The Travis tests build MCUboot against a specific version of TF-M, which
it no longer works with.  Newer versions of TF-M seem to not support the
mps2/an521 target that the tests don't build that way either.

Until these tests can be fixed, just disable all of them.  Future
possibilities include fixing the issues between TF-M and MCUboot, or
making these tests able to run within Zephyr.

Signed-off-by: David Brown <david.brown@linaro.org>
2021-09-13 14:01:12 -06:00
Dominik Ermel d4c2d15c3e zephyr: Remove BOOT_SERIAL_UART dependency from ENABLE_MGMT_PERUSER
The dependency, in Kconfig,  blocked usage of the ENABLE_MGMT_PERUSER
with other BOOT_SERIAL_ device options.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2021-09-03 15:16:52 -06:00