Commit Graph

1943 Commits

Author SHA1 Message Date
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
David Brown ae35510b58 Preps for 1.8.0-rc1
Update version fields for 1.8.0-rc1 release.

Signed-off-by: David Brown <david.brown@linaro.org>
2021-08-31 09:09:22 -06:00
Marek Pieta 1b1b4f9595 zephyr: Add MCUboot configuration for Thingy:53
Change introduces default configuration of MCUboot for Thingy:53
secure cpuapp. The default configuration also disables image
revert on application core.

Signed-off-by: Marek Pieta <Marek.Pieta@nordicsemi.no>
2021-08-27 12:58:44 -06:00
Johann Fischer d2e87aa352 zephyr: rename remaining CONFIG_USB to CONFIG_USB_DEVICE_STACK
Rename remaining CONFIG_USB to CONFIG_USB_DEVICE_STACK.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-08-27 15:21:39 +02:00
Johann Fischer faf9cbe0f6 zephyr: CDC ACM UART node to specific overlays
Move CDC ACM UART node from common DTC overlay to
specific overlays, nrf52840_big.overlays and
usb_cdc_acm.overlays.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-08-27 15:21:39 +02:00
Johann Fischer a6e1e9e339 zephyr: get CDC ACM UART device from devicetree
Adapt to Zephyr OS changes to get CDC ACM UART device.
Remove RECOVERY_UART_DEV_NAME Kconfig option and
use DEVICE_DT_GET() in serial_adapter.c

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-08-27 15:21:39 +02:00
Andrzej Puzdrowski 1fceb9bdba zephyr: Added hooks for example
Example (very basic) hook implementation.
Added case description for test-build with these hooks
and multi-image feature.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2021-08-26 16:22:04 -06:00
Andrzej Puzdrowski 2a29f5dc56 zephyr/boot_serial_extension: added hooks to custom image list MGMT
Introduced boot_img_install_stat_hook() hook fuinction for fetch
the image's slot installation status.

The image's slot installation status is custom property.
It's detailed definition depends on user implementation. It is only
defined that the status will be set to 0 if this hook not provides
another value.

Inserted available hook for read image header as well.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2021-08-26 16:22:04 -06:00
Andrzej Puzdrowski 4f9c7304d0 boot_serial: added hooks for mcuboot image access operations
Added hook for: read image header, validate the image and hook
which is called after image was uploaded completely.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2021-08-26 16:22:04 -06:00
Andrzej Puzdrowski dea293ad4c bootutil_public: added hook for fetch image swap state
Added hook which allows to override boot_read_swap_state_by_id()
routine for the primary slot.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2021-08-26 16:22:04 -06:00
Andrzej Puzdrowski b8f3969f38 loader: added hooks for override mcuboot image access operation
Added hook for read image header.

Added hook which is for inject an image check implementation which can
be used instead of boot_image_check() internal implementation on a primary
slot.
This is usefully especially when primary has to be checked by other entity
on MCUboot's demand.

Added hook which allow to implement image update process
differently.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2021-08-26 16:22:04 -06:00
Andrzej Puzdrowski 914204db41 boot/zephyr: Kconfig for hooks enabling
Added global property which allows to enable hooks
implementations.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2021-08-26 16:22:04 -06:00
Roman Okhrimenko a41a850dd5 cypress: use mbedtls 3.0, do not use hw crypto by default
Signed-off-by: Roman Okhrimenko <roman.okhrimenko@infineon.com>
2021-08-26 10:18:20 -06:00
Andrzej Puzdrowski 5cf941013f zephyr/Kconfig: fix deadlock on cryptolib selectors
If user generate project and the will try to switch signature type
then it is very likely that MBETLS will be enabled simultaneously when
tinycrypt has to be force-selected, which causes kconfig warning on
impossible configuration. Such configuration won't be possible to be
fixed using menuconfig etc.

This patch moves dependency check on !MBEDTLS from kconfig to preprocessor
which makes manual fixing using menuconfig possible.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2021-08-26 15:26:16 +02:00
iysheng 506a16f085 docs: Fix some misspelling
Signed-off-by: iysheng <iyysheng@gmail.com>
2021-08-25 20:41:02 -03:00
Almir Okato d363248161 readme.md: Add references to the Espressif IDF port.
Signed-off-by: Almir Okato <almir.okato@espressif.com>
2021-08-24 07:50:45 -03:00
Almir Okato 428e2e7ca7 espressif: Add espressif's readme file to the docs
Add readme-espressif.md documentation for Espressif port.

Signed-off-by: Almir Okato <almir.okato@espressif.com>
2021-08-24 07:50:45 -03:00
Almir Okato 5ab8cfdaa3 boot/espressif: Remove toolchain libc linking
Fix unnecessary dependencies caused by toolchain's libc inclusion.

Signed-off-by: Almir Okato <almir.okato@espressif.com>
2021-08-24 07:50:35 -03:00
George Beckstein ab9f8c13e1 Fix unknown type name "size_t" error
This commit adds an include clause to "boot_record.h" to include the stddef.h header that contains the declaration of the "size_t" type.

Attempting to include "boot_record.h" in a build for Mbed-OS would throw an error complaining "size_t" was unknown, adding a note to inculde "stddef.h"

Signed-off-by: George Beckstein <george.beckstein@gmail.com>
2021-08-23 13:10:10 -06:00
Sigvart Hovland 9647c46544 boot: zephyr: Fix misaligned #else for `irq_lock`
So in PR #1089 I misaligned the `#else` used for the `irq_lock` as it
should be aligned with `CONFIG_MCUBOOT_CLEANUP_ARM_CORE`. So that
`irq_lock`is called when we don't call `__disable_irq` from arm core
clean up code.

Signed-off-by: Sigvart Hovland <sigvart.hovland@nordicsemi.no>
2021-08-23 10:52:57 -06:00