Commit Graph

1632 Commits

Author SHA1 Message Date
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
George Beckstein 5609e78b6c Ignore nuttx files for Mbed-OS builds
Signed-off-by: George Beckstein <george.beckstein@gmail.com>
2021-08-20 14:10:42 -03:00
Gustavo Henrique Nihei fca1aa4764 boot/nuttx: Fix trivial compiler warnings emitted by NuttX port
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-08-20 12:25:24 -03:00
Johann Fischer 25852971db zephyr: remove Kconfig option CONFIG_USB
USB device support configuration is revised,
CONFIG_USB option is deprecated.
Only USB_DEVICE_STACK option should be used to
enable USB device support.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2021-08-19 17:15:50 -06:00
Gustavo Henrique Nihei 01184bd036 boot/nuttx: Enable crypto backend according to configuration from NuttX
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-08-19 14:50:03 -03:00
Marek Pieta 4960d12cc1 boot_serial: cbor_encode: Fix encoding data length
Change fixes encoding data length and adds support for big endian
byte ordering. According to specification, data length can be
encoded either on 1, 2, 4 or 8 bytes.

Signed-off-by: Marek Pieta <Marek.Pieta@nordicsemi.no>
2021-08-19 12:48:19 +02:00
Dominik Ermel 428d3ee78b zephyr: Make boot_serial_extension.c compilation conditional
The commit modifies CMakeLists.txt to include the file into compilation
only when CONFIG_ENABLE_MGMT_PERUSER is selected.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2021-08-19 11:12:38 +02:00
Dominik Ermel 0435d5d9b7 zephyr: Add option for enabling the storage erase command
The commit adds Kconfig option that enables the storage erase mgmt
command.
Addition of the Kconfig option fixes the problem where Zephyr spcyfic
mgmt commands support fails to compile when board does not define
a storage partition.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2021-08-19 11:12:38 +02:00
David Brown e182977199 Revert "Move Cargo.toml to top level"
This reverts commit 78e4441bd3.

Although it shouldn't, this change is provoking numerous errors in
CI.  In order to allow CI to continue, revert this change, and it can be
redone later, after fixing whatever is causing the CI build failures.

Signed-off-by: David Brown <david.brown@linaro.org>
2021-08-19 09:28:04 +02:00
Gustavo Henrique Nihei 9d67f01efc README.md: Add references to the NuttX port
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-08-18 18:37:50 -03:00
Gustavo Henrique Nihei 93c029a4c5 docs: Add documentation for NuttX port
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-08-18 18:37:50 -03:00
Gustavo Henrique Nihei 7bcf9862de boot: Add support for the Apache NuttX RTOS
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-08-18 18:37:50 -03:00