remove flash_device_get_binding as we can utilizes DEVICE_DT_GET to
get the flash_dev pointer set at build time. This removes usage of
device_get_binding and handles the lack of 'label' properties in
the devicetree better.
Signed-off-by: Kumar Gala <galak@kernel.org>
The legacy logging subsystem was removed in below commit:
https://github.com/zephyrproject-rtos/zephyr/commit/c5f2cde
This commit maintains compatibility with Zephyr upstream before
and after the change by using the now removed CONFIG_LOG1 and
CONFIG_LOG2 defines.
Signed-off-by: Martin Jäger <martin@libre.solar>
Add relevant "zephyr/" prefixes to allow building with the Zephyr
option CONFIG_LEGACY_INCLUDE_PATH=n.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Sine https://github.com/zephyrproject-rtos/zephyr/pull/47629 was
merged the qspi nod driver is enabled by default. This cause unwanted
flash footprint rise for configurations which are not using the qspi.
This patch disables it back.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Add the serial adapter for ESP32 for boot recovery and MCUMGR
communication.
Signed-off-by: Almir Okato <almir.okato@espressif.com>
espressif: Configure console via bootloader_support functions
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
add support for RT1170 and RT1160 CM7 cores, which have large flash
sizes and require an increase to the value of BOOT_MAX_IMG_SECTORS
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Update some of the dependencies to newer versions, and run `cargo
update`. This will resolve some potential security warnings about
issues found in older versions of dependencies. I don't believe any of
these affect this code.
Signed-off-by: David Brown <david.brown@linaro.org>
repos/mcuboot/boot/boot_serial/test/src/testcases/
boot_serial_upload_bigger_image.c: In function
‘TEST_CASE_boot_serial_upload_bigger_image’:
repos/mcuboot/boot/boot_serial/test/src/testcases/
boot_serial_upload_bigger_image.c:91:42: error:
‘Value8Bit’ undeclared (first use in this function)
91 | buf[payload_off + len - 2] = Value8Bit;
| ^~~~~~~~~
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
Since #1383 the configuration translation header and
the logging translation header are not used by the simiulator.
Thanks to that __BOOTSIM__ dependence might be removed - what is done
in this patch.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
The progressive erase and non-progressive erase code has been
refactored; some additional comments have been added to logic.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Types of a few variables have been changed to more align with
what they represent; variables have been renamed to make their
purpose more clear.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
<zephyr/zephyr.h> is just a shim to the <zephyr/kernel.h> header, better
use it directly as it is explicit that Kernel APIs are being included.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Zephyr has prefixed all of its includes with <zephyr/...>. While the
_old_ mode can still be used (CONFIG_LEGACY_INCLUDE_PATH) and is still
enabled by default, it's better to be prepared for its removal in the
future.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
According to mbedTLS' Changelog "Mbed TLS 3.0.0 branch released
2021-07-07" -> "Removals":
MBEDTLS_ECP_MAX_BITS is no longer a configuration option because it
is now determined automatically based on supported curves.
Hence remove MBEDTLS_ECP_MAX_BITS from configuration files to fix build
issues with Zephyr when there is unfortunate order of include
statements, like:
/__w/zephyr/zephyr/modules/mbedtls/zephyr_init.c
In file included from /__w/zephyr/modules/crypto/mbedtls/include/mbedtls/ssl.h:30,
from /__w/zephyr/modules/crypto/mbedtls/include/mbedtls/debug.h:27,
from /__w/zephyr/zephyr/modules/mbedtls/zephyr_init.c:16:
/__w/zephyr/modules/crypto/mbedtls/include/mbedtls/ecp.h:314: error: "MBEDTLS_ECP_MAX_BITS" redefined [-Werror]
314 | #define MBEDTLS_ECP_MAX_BITS 1
|
In file included from /__w/zephyr/bootloader/mcuboot/boot/zephyr/include/mcuboot-mbedtls-cfg.h:25,
from /__w/zephyr/modules/crypto/mbedtls/include/mbedtls/build_info.h:59,
from /__w/zephyr/modules/crypto/mbedtls/include/mbedtls/debug.h:25,
from /__w/zephyr/zephyr/modules/mbedtls/zephyr_init.c:16:
/__w/zephyr/bootloader/mcuboot/boot/zephyr/include/config-rsa.h:72: note: this is the location of the previous definition
72 | #define MBEDTLS_ECP_MAX_BITS 2048
|
cc1: all warnings being treated as errors
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
The sim platform was sharing a few header
files with the zephyr-rtos port. This patch provides
sim own headers.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
There is code for sharing data between booloader and application.
So far only zephyr had config flags to enable this.
This adds configuration that allows to turn on data sharing code
in mynewt version.
Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
BOOT_CUSTOM_START is defined by APP package (here).
This changes default value from 0 to empty
to allow for constructing packege that provides function
boot_custom_start() and automatically sets BOOT_CUSTOM_START to 1
for easy setup.
Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
Move formatting of version string to use snprintf, which Zephyr
provides, instead defining utility function for that purpose.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
Added note of deprecation of hardware properties of
the gpio-pin used for triggering the recovery DFU modes.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Added support for configure GPIO-pin used for triggering the
recovery DFU using DTS. That pin is assigned thanks to
`mcuboot-button0` pin-allias.
DTS configuration takes precedence over the Kconfig pin configurations.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
MCUboot allows one recovery protocol at build-time.
Therefore detection procedure can use the build-time pin
configuration instead of run-time parameters.
This patch prepares detec_value() function for switching to
DTS pin configuration.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Add a check for the size of the TLV entry for the boot record.
Although, this is in the protected area, and should be protected by a
signature, check that we don't induce an integer underflow if that entry
is somehow too short.
Signed-off-by: David Brown <david.brown@linaro.org>
Adds an optional callback when the MCUboot status changes which can
allow components to react.
Signed-off-by: Jamie McCrae <jamie.mccrae@lairdconnect.com>
RT1050 and 1060 have large flash chips, so tools like MCUMgr will time
out if the entire flash bank is erased before writing data. Enable
progressive erase for these boards to prevent timeouts.
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
LED usage code were simplified thanks to `struct gpio_dt_spec`
and related methods.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
bootloader-led0 alias will be deprecated and replaced by dedicated
mcuboot-led0 alias.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
The RAM loading mode wasn't wrapped in Zephyr configs like the other boot modes.
Added a config to enable RAM loading as well as two configs to set
IMAGE_EXECUTABLE_RAM_START and IMAGE_EXECUTABLE_RAM_SIZE, respectively. These
two values default to the values from the chosen node sram in the dts.
Signed-off-by: Johan Öhman <johan.ohman@softube.com>
This fixes a build issue when building mcuboot for zephyr with RSA
image encryption support enabled using mbedtls.
Signed-off-by: Jamie McCrae <jamie.mccrae@lairdconnect.com>
The Cache is an optional configuration of both the ARM Cortex-M7 and
Cortex-M55. Previously, it was just checking that it was just an M7
rather than knowing that the CPU actually was built with the cache.
Signed-off-by: Ryan McClelland <ryanmcclelland@fb.com>
This fixes a build issue when building mcuboot for zephyr with image
encryption support enabled using tinycrypt.
Signed-off-by: Jamie McCrae <jamie.mccrae@lairdconnect.com>
The fix adds a condition that checks if either key or fixed_sig are
`not None` before payload signing and TLV addition.
Signed-off-by: Almir Okato <almir.okato@espressif.com>
Entry point call was moved back from main to esp_loader, so it is
called from iram_loader_seg memory region
Signed-off-by: Almir Okato <almir.okato@espressif.com>
Added checking and warning for ESP32, ESP32-S2, ESP32-C3, ESP32-S3
unsupported chip revisions on their initialization.
Made respectively changes for build system and documentation.
Signed-off-by: Almir Okato <almir.okato@espressif.com>
Grouped common bootloader init functions among esp32, esp32s2,
esp32c3 and esp32s3 into common files.
Signed-off-by: Almir Okato <almir.okato@espressif.com>