Commit Graph

5 Commits

Author SHA1 Message Date
Øyvind Rønningstad a7d34caaa7 boot_serial: Upgrade from cddl-gen 0.1.0 to zcbor 0.4.0
cddl-gen has been renamed to zcbor.
Update regenerate_serial_recovery_cbor.sh and regenerate/recopy all
files.

Remove the submodule in ext/ since it is no longer necessary when
the zcbor package is installed (only needed for regeneration, not
for building).

Signed-off-by: Øyvind Rønningstad <oyvind.ronningstad@nordicsemi.no>
2022-04-06 17:46:15 -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
Sudarshan Sreeram 900249cc98 Add espressif directory to .mbedignore
The old mbed CLI 1 tool, currently used to compile the MCUboot port for
Mbed™ OS, compiles all files unless otherwise specified in .mbedignore.
The espressif directory in the boot folder was added to the ignore file
to prevent failed builds.

Signed-off-by: Sudarshan Sreeram <sudarshan.sreeram@arm.com>
Signed-off-by: David Brown <david.brown@linaro.org>
2021-08-13 10:22:31 -06:00
George Beckstein e42c6482e5 Temporarily disable use of TinyCrypt with Mbed-OS
TinyCrypt uses a modified version of micro-ecc that is also used by the Mbed Cordio BLE stack. When building mcuboot for a target with BLE enabled, this causes multiple-defined symbol errors during linking. Due to the nature of Mbed's current build system, it is difficult to fix this.

Mbed will soon release a more flexible cmake-based build system that will make it possible to exclude these TinyCrypt files from an application build that may also link Cordio BLE sources.

Until then, this commit temporarily disables the use of TinyCrypt with Mbed-OS and excludes its sources from the build to avoid this build error.

Signed-off-by: George Beckstein <becksteing@embeddedplanet.com>
2020-11-06 09:18:27 -03:00
George Beckstein d82afbfaa8 Mbed-OS porting layer implementation for mcuboot
This PR provides a porting layer implementation and framework for building an mcuboot-based bootloader with Mbed-OS. Some symbols are not provided by the Mbed-OS port within mcuboot, namely:

- The secondary storage device (see below)
- The signing keys
- The encryption keys, if used

Use of this port is demonstrated by the following projects:
- https://github.com/AGlass0fMilk/mbed-mcuboot-demo (a complete mcuboot/Mbed-OS-based bootloader)
- https://github.com/AGlass0fMilk/mbed-mcuboot-blinky (example showing how to make an Mbed-OS application that is bootable by mcuboot)

Memory porting implementation:

The underlying implemenation uses Mbed's BlockDevice API as the storage backend for mcuboot's memory operations. This provides a very flexible way of configuring the location and layout of the secondary flash storage area. To build an mcuboot-based bootloader with Mbed-OS, the user must implement a hook function, mbed::BlockDevice* get_secondary_bd(), to provide the secondary BlockDevice that mcuboot will use.

The signing and encryption keys must also be provided by the user. They can be generated using the existing imgtool utility in the same manner used by Zephyr. There are no automated build steps currently provided by Mbed-OS to sign/encrypt build artifacts.

Known limitations:

The update candidate encryption features have not yet been fully tested. A truly secure implementation will require integration with Mbed's TRNG API in the future to inhibit side-channel attacks on the decryption process.

The TinyCrypt backend is currently only supported for Mbed-OS builds when building with the GCC toolchain. The new cmake-based Mbed-OS build system will fix the underlying issue (file name uniqueness).

Signed-off-by: George Beckstein <becksteing@embeddedplanet.com>
Signed-off-by: Evelyne Donnaes <evelyne.donnaes@arm.com>
Signed-off-by: Lingkai Dong <lingkai.dong@arm.com>

Co-authored-by: Lingkai Dong <lingkai.dong@arm.com>
Co-authored-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
2020-11-03 19:16:46 -03:00