Commit Graph

1752 Commits

Author SHA1 Message Date
Wouter Cappelle 10a877cb76 zephyr: fix compilation when no CONFIG_BOOT_ENCRYPTION_KEY_FILE
Fix compilation of zephyr builds when there is no
CONFIG_BOOT_ENCRYPTION_KEY_FILE set.
bug introduced by #1255

Signed-off-by: Wouter Cappelle <wouter.cappelle@crodeon.com>
2022-01-28 10:20:11 -03:00
Almir Okato 42e679d60a espressif:esp32s3: Add esp32s3 initial support
ESP32-S3 target and related files added to the Espressif port.

Signed-off-by: Almir Okato <almir.okato@espressif.com>
2022-01-26 20:52:04 -03:00
Almir Okato 553315c15b readme.md: remove "IDF" from Espressif reference
This change is to avoid misunderstanding as IDF is not supported
on top of MCUboot.
The Espressif port acts as a bare metal bootloader that can be
used on Espressif chips to boot supported OSes (like Zephyr or NuttX).

Signed-off-by: Almir Okato <almir.okato@espressif.com>
2022-01-26 19:43:12 -03:00
David Brown d484b827a9 Bump versioning information to 1.9.0-rc1
Signed-off-by: David Brown <david.brown@linaro.org>
2022-01-21 14:01:05 -07:00
David Brown eaa8b31917 docs: Update release notes for 1.9.0 release
Signed-off-by: David Brown <david.brown@linaro.org>
2022-01-21 14:01:05 -07:00
Wouter Cappelle 7679215d00 single_loader: zephyr: Fix compilation with VALIDATE_PRIMARY_SLOT enabled
Fixes compilation when VALIDATE_PRIMARY_SLOT & SINGLE_APPlICATION_SLOT
are enabled.

Signed-off-by: Wouter Cappelle <wouter.cappelle@crodeon.com>
2022-01-20 19:54:29 -03:00
Sebastian Bøe c8ba937ee3 zephyr: Use a smaller sha256 implementation
Reduce the size of the sha256 implementation by 1300 bytes by using a
slower implementation.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2022-01-20 16:09:37 +01:00
Francesco Domenico Servidio 4fb288af9e doc: updated release.md
Fixed spacing after periods.
Rephrased slighly unclear sentences.
Added other very minor fixes.

Signed-off-by: Francesco Domenico Servidio <francesco.servidio@nordicsemi.no>
2022-01-18 13:21:17 -07:00
Francesco Domenico Servidio 5851150146 doc: fixed ecdsa.md
Rephrased a few sentences.
Fixed a few typos.
Fixed lists.
Added additional small fixes.

Signed-off-by: Francesco Domenico Servidio <francesco.servidio@nordicsemi.no>
2022-01-17 18:14:59 +01:00
Michel Jaouen d09aa6b4f9 imgtool: Add clear image generation with encryption capability
Create an option to generate a clear image with encryption capability
that can be installed on a primary slot. Since image has encryption
capability image can be swapped encrypted in secondary slot

Signed-off-by: Michel Jaouen <michel.jaouen@st.com>
2022-01-14 09:30:57 -03:00
Andrzej Puzdrowski c9ac802a99 Readme: bump version to 1.9.0-dev
Bump version to development version of future release.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2022-01-14 11:30:54 +01:00
Wouter Cappelle 953a76180d Add support for signed images in single loader mode
Signed-off-by: Wouter Cappelle <wouter.cappelle@crodeon.com>
2022-01-13 14:05:30 -07:00
Andrzej Puzdrowski f9dbf68374 boot/bootutil: added log on swap type used
Added LOG for informing which a swap type is performed.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2022-01-11 11:35:31 -07:00
Almir Okato 39eb63df1d espressif: Update readme-espressif.md to include information about
hardware-assisted Flash Encryption and Secure Boot.

Signed-off-by: Almir Okato <almir.okato@espressif.com>
2022-01-10 18:33:45 -03:00
Andrzej Puzdrowski d16598f561 zephyr/boot_serial_extension: us BOOT_LOG instead of LOG_
Use MCUboot logging macros instead of zephyr-rtos native.
This fixes build failure on MCUBOOT_LOG_MODULE_DECLARE() when
LOG is disabled.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2022-01-10 12:38:37 +01:00
Gustavo Henrique Nihei d6e98106b6 espressif: Improve CI script for targetting multiple chips at once
This enables using "espressif_run.sh" locally for a quick validation
that the build passes for multiple Espressif targets.

Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-12-29 09:19:02 -03:00
Almir Okato 14763b1cd2 espressif: ESP32, ESP32S2 and ESP32C3 native flash encryption
Native flash encryption was added as option for Espressif chips and
added to the initialization process before MCUboot workflow.

Signed-off-by: Almir Okato <almir.okato@espressif.com>
2021-12-28 10:51:54 -03:00
Gustavo Henrique Nihei 818964d513 espressif: Use "TAG" field from SOC_LOG* macros from IDF libraries
This also removes the need for passing "-Wno-unused-variable" compiler
flag, since now TAG is being used as part of the log message.

Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-12-22 10:54:52 -03:00
Gerson Fernando Budke d9307312f7 boot/nuttx: Switch from printf to syslog
Use syslog in favor of printf function for print messages. The syslog
ensure that all characters are corrected flushed. Syslog is already
used when log is enabled and this only switch to same log interface.

Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
2021-12-22 09:34:38 -03:00
Gustavo Henrique Nihei e571855f58 ci: Define concurrency groups for cancelling duplicate jobs
This commit will force running jobs of a given PR to be cancelled once
the same branch is updated, avoiding the CI wasting time testing
outdated content.

Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-12-20 09:20:30 -03:00
Gustavo Henrique Nihei 67b73d3c79 espressif: Add CI jobs for Secure boot enabled images
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-12-20 09:20:14 -03:00
Gustavo Henrique Nihei a3495105af espressif: Fix support for signing algorithms
The build system previously restricted the usage of some signing
algorithms due to build issues.

Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-12-20 09:20:14 -03:00
David Brown 1bc106e44c sim: Homogenize max-align-32 feature check
This feature check was done statically instead of dynamically in the
build.rs file.  Change this to match the rest.  Perhaps we might want to
change all of them to be done at compile time, but that should be done
with all of the features.

Signed-off-by: David Brown <david.brown@linaro.org>
2021-12-17 08:54:09 -03:00
Gustavo Henrique Nihei 41f123c24a docs: Update Image Trailer documentation according to latest changes
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-12-16 13:19:12 -07:00
Gustavo Henrique Nihei 7bfd14bbc5 sim: Fit unit tests to larger write align values
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-12-16 13:19:12 -07:00
Gustavo Henrique Nihei 4aa286d2db flash_map: Increase minimum supported write align via flash_area_align
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-12-16 13:19:12 -07:00
Gustavo Henrique Nihei ffe4ec9cdb bootutil: Support trailers larger than sector size for swap scratch
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-12-16 13:19:12 -07:00
Gustavo Henrique Nihei cf120baa65 bootutil: Define new magic for the updated image trailer layout
The magic value applies to images built with maximum write alignment
values other than 8 bytes, whose trailer region is generated in a
different layout.

Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-12-16 13:19:12 -07:00
Kristine Jassmann 7df909ee2d bootutil: Remove arbitrary limit on BOOT_MAX_IMG_SECTORS
Count is initialized before it is passed to flash_area_get_sectors. The
flash driver should use count to ensure an overrun does not occur.

Signed-off-by: Kristine Jassmann <kristine.jassmann@renesas.com>

Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-12-16 13:19:12 -07:00
Kristine Jassmann 73c38c6fde bootutil: Allow larger minimum flash write
[kristine.jassmann@renesas.com: Allow larger minimum flash write]
[michael.thomas@renesas.com: Add changes for 1.8]
[michael.thomas@renesas.com: Add magic alignment fix]
[gustavo.nihei@espressif.com: bootutil: Address issues from PR 949]

Co-authored-by: Kristine Jassmann <kristine.jassmann@renesas.com>
Co-authored-by: Michael Thomas <michael.thomas@renesas.com>
Co-authored-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
Signed-off-by: Kristine Jassmann <kristine.jassmann@renesas.com>
Signed-off-by: Michael Thomas <michael.thomas@renesas.com>
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-12-16 13:19:12 -07:00
Dominik Ermel 1eedec3e79 boot_serial: Fix Zephyr include path for reboot.h
It is sys/reboot.h now.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2021-12-16 14:51:02 +01:00
Fabio Utzig 152cca0767 bootutil: fix scratch status offset calculation
Update `boot_status_off` to take into consideration that scratch only
has to store status for one swap of sectors, thus requiring much less
flash space than what is required in the primary slot.

This commits does a bit of refactoring on the functions that return
parts of trailer size to make the code clearer.

Signed-off-by: Fabio Utzig <utzig@apache.org>
2021-12-16 08:08:36 -03:00
Fabio Utzig b3039fd659 sim: Remove unused variables
Fix warning running the simulator due to variables that are not being
used anymore.

Signed-off-by: Fabio Utzig <utzig@apache.org>
2021-12-16 07:34:50 -03:00
David Brown 53e6f5b8a5 samples: zephyr: Use move swap for Zephyr tests
Change the configs for the Zephyr tests to use move swap, as this is the
code intended for future use.

Signed-off-by: David Brown <david.brown@linaro.org>
2021-12-15 17:15:56 -07:00
Andrzej Puzdrowski e9c6b4d7af zephyr/main: always call sys_clock_disable()
Build-time conditional call is not needed anymore since the empty
sys_clock_disable() callback is provided if the platform
doesn't support system clock disable capability.

Reference:
78dc8ce338

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2021-12-15 16:23:51 +01:00
Andrzej Puzdrowski 03ed502ad7 zephyr: removed CONFIG_SYSTEM_CLOCK_DISABLE=y
CONFIG_SYSTEM_CLOCK_DISABLE property was removed from
zephyr codebase. It is not needed anymore since the empty
sys_clock_disable() callback is provided if the platform
doesn't support system clock disable capability.

Reference:
78dc8ce338

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2021-12-15 16:23:51 +01:00
Gustavo Henrique Nihei bc65d2b10a bootutil: Close flash_area after failure to read swap information
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-12-14 09:30:00 -03:00
Fabio Utzig 5577cbd833 sim: define stm32f4 with non-linear sectors slots
Change the flash layout of the stm32f4 simulated device to include
sectors of different sizes inside both slots; both slots have been
updated to still share the same layout. This layout changes allow for
testing and validation that a swap with scratch is possible even if not
all sectors inside a slot are the same size, as long as they all fit in
scratch.

Signed-off-by: Fabio Utzig <utzig@apache.org>
2021-12-13 23:16:20 -03:00
Gustavo Henrique Nihei 3ee626f36e espressif: Fix ESP32-C3 support for booting signed apps
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-12-09 13:15:45 -03:00
Gustavo Henrique Nihei 523ef3fc2f espressif: Add support for hardware Secure Boot
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-12-09 13:15:45 -03:00
Gustavo Henrique Nihei ce3668fd60 espressif: Use "TAG" field from ESP_LOG* macros from IDF libraries
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-12-09 13:15:45 -03:00
Gustavo Henrique Nihei 6a6b8915a8 espressif: Bump IDF version to v4.4
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-12-09 13:15:45 -03:00
Petro Karashchenko bb927ac014 nuttx: extend configuration options
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2021-12-09 13:06:35 -03:00
Martí Bolívar caa1f6bbd9 assemble.py: don't read BOARD.dts.pre.tmp
This file has been removed from upstream Zephyr in commit 2b7c61e306a
("cmake: re-work devicetree preprocessing steps").

Get the board name from .config instead; this is a stable place for it
to be found. Load the EDT itself from the pickle file in the build
directory; this has the advantage of fixing the script when out of
tree devicetree bindings are used.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-12-08 14:18:18 -07:00
Francesco Domenico Servidio 50f1101231 doc: Updated index.md and readme.md
Updated index.md and readme.md:
- Removed outdated info
- Added info about newly added ports
- Fixed a few style issues.
- Rephrased a few sections.

Signed-off-by: Francesco Domenico Servidio <francesco.servidio@nordicsemi.no>
2021-12-08 13:50:43 -07:00
Maureen Helm 05143ce236 boot: zephyr: Configure mimxrt685_evk board
The mimxrt685_evk board has large slots so we need to increase
CONFIG_BOOT_MAX_IMG_SECTORS from the default.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2021-12-07 15:20:52 -07:00
Radoslaw Koppel 7200669330 zephyr: Fix serial recovery skipping on nrf53
The nRF53 mcu has moved RESETREAS register
(from POWER to RESET peripheral).
This fix uses nrfx helper to select the proper register.

Signed-off-by: Radoslaw Koppel <radoslaw.koppel@nordicsemi.no>
2021-12-07 10:57:23 -03:00
Andrzej Puzdrowski dacc7d606e boot: zephyr: Remove CONFIG_USB from Thingy53 configuration
This was ommited before when this config was droped from
otheres configurations.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2021-12-02 14:08:00 +01:00
Andrzej Puzdrowski 6daf9539ee zephyr: Removed old external flash configs for Thingy53.
Removed old external flash configs for Thingy53.

Signed-off-by: Ole Sæther <ole.saether@nordicsemi.no>
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2021-12-02 14:08:00 +01:00
Andrzej Puzdrowski a1c43cbea9 zephyr: fix typo in CONFIG_ERASE_PROGRESSIVELY conversion
Kconfig macro was converted with typo to not a MCUboot's
internal macro switch. It was MCBOOT_ERASE_PROGRESSIVELY instead
of MCUBOOT_ERASE_PROGRESSIVELY.
Bug was introduced in
42c985cead

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2021-12-01 18:14:35 +01:00