mirror of
https://github.com/espressif/esp-idf.git
synced 2026-09-22 13:01:16 +03:00
docs(migration): document the bootloader_support image-verify split
This commit is contained in:
committed by
Mahavir Jain
parent
e7af5c69d9
commit
542d2ffc4a
@@ -13,3 +13,17 @@ A PMP entry locked by the bootloader cannot be reconfigured until the next CPU r
|
||||
Applications built with ESP-IDF are not affected, as they program and lock the full PMP configuration themselves during startup, before any application code runs.
|
||||
|
||||
Custom (non-ESP-IDF) applications launched by the ESP-IDF second stage bootloader must not assume that any PMP entries are pre-configured or locked at handoff. Previously, the bootloader configured and locked entries covering, e.g., the ROM and the peripheral address spaces; such applications must now program their own PMP configuration.
|
||||
|
||||
|
||||
Image verification split out of ``bootloader_support``
|
||||
------------------------------------------------------
|
||||
|
||||
Image verification and secure-boot signature checking moved from
|
||||
``bootloader_support`` into the new ``esp_image_verify`` component. ``bootloader_support`` no longer depends on ``mbedtls``.
|
||||
|
||||
- Components that relied on ``bootloader_support`` transitively providing ``mbedtls`` or ``app_update`` must now declare those dependencies explicitly in their ``PRIV_REQUIRES`` / ``REQUIRES``.
|
||||
- :cpp:func:`bootloader_common_get_sha256_of_partition` is deprecated. Use :cpp:func:`esp_partition_get_sha256` instead.
|
||||
- In builds that do not include the ``esp_image_verify`` component (no OTA or signed-image features), calling :cpp:func:`esp_partition_get_sha256` or the deprecated function above fails at link time with an undefined reference to ``esp_image_get_metadata`` / ``bootloader_sha256_flash_contents``. Add ``esp_image_verify`` (or ``app_update``, which includes it and provides the OTA APIs) to the calling component's ``PRIV_REQUIRES`` or to the project's ``COMPONENTS`` list.
|
||||
- Builds enabling :ref:`CONFIG_SECURE_SIGNED_ON_UPDATE_NO_SECURE_BOOT` must include the ``esp_image_verify`` component, which provides the startup check that verifies the running app's signature.
|
||||
Apps using OTA get it automatically through ``app_update``; apps that trim the component graph (e.g. ``MINIMAL_BUILD``) must add ``esp_image_verify`` (or ``app_update``) to a ``PRIV_REQUIRES`` list or the project ``COMPONENTS``. Such builds fail with a ``#error`` instead of silently skipping the configured check.
|
||||
- The Kconfig option ``CONFIG_SECURE_SIGNED_DATA_PARTITION`` was renamed to ``CONFIG_APP_UPDATE_SECURE_SIGNED_DATA_PARTITION`` (old name still accepted via ``sdkconfig.rename``).
|
||||
|
||||
@@ -13,3 +13,17 @@
|
||||
使用 ESP-IDF 构建的应用程序不受影响,因为应用程序会在启动阶段、任何应用代码运行之前,自行编程并锁定完整的 PMP 配置。
|
||||
|
||||
由 ESP-IDF 二级引导加载程序启动的自定义(非 ESP-IDF)应用程序不得假定交接时任何 PMP 表项已被预先配置或锁定。此前,引导加载程序会配置并锁定覆盖 ROM 和外设地址空间等区域的表项;此类应用程序现在必须自行完成 PMP 配置。
|
||||
|
||||
|
||||
镜像校验功能从 ``bootloader_support`` 中拆分
|
||||
--------------------------------------------
|
||||
|
||||
镜像校验与安全启动签名校验已从 ``bootloader_support`` 移至新的
|
||||
``esp_image_verify`` 组件。``bootloader_support`` 不再依赖 ``mbedtls``。
|
||||
|
||||
- 此前通过 ``bootloader_support`` 间接获得 ``mbedtls`` 或 ``app_update`` 依赖的组件,现在必须在 ``PRIV_REQUIRES`` / ``REQUIRES`` 中显式声明。
|
||||
- :cpp:func:`bootloader_common_get_sha256_of_partition` 已弃用,请改用 :cpp:func:`esp_partition_get_sha256`。
|
||||
- 在未包含 ``esp_image_verify`` 组件的工程中(未启用 OTA 或签名镜像功能),调用 :cpp:func:`esp_partition_get_sha256` 或上述弃用函数会在链接时因 ``esp_image_get_metadata`` / ``bootloader_sha256_flash_contents`` 未定义引用而失败。请将 ``esp_image_verify`` (或 ``app_update``,它包含该组件并提供 OTA API)添加到调用组件的 ``PRIV_REQUIRES`` 或工程的 ``COMPONENTS`` 列表中。
|
||||
- 启用 :ref:`CONFIG_SECURE_SIGNED_ON_UPDATE_NO_SECURE_BOOT` 的工程必须包含 ``esp_image_verify`` 组件,该组件提供启动时校验当前应用签名的检查。
|
||||
使用 OTA 的应用会通过 ``app_update`` 自动引入该组件;裁剪组件依赖图的应用(如启用 ``MINIMAL_BUILD``)必须将 ``esp_image_verify`` (或 ``app_update``)添加到 ``PRIV_REQUIRES`` 或工程的 ``COMPONENTS`` 中。否则构建将以 ``#error`` 失败,而不会静默跳过已配置的安全检查。
|
||||
- Kconfig 选项 ``CONFIG_SECURE_SIGNED_DATA_PARTITION`` 已重命名为 ``CONFIG_APP_UPDATE_SECURE_SIGNED_DATA_PARTITION`` (通过 ``sdkconfig.rename`` 兼容旧名称)。
|
||||
|
||||
Reference in New Issue
Block a user