mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/c2_skip_validate_v5.0' into 'release/v5.0'
bootloader: allow skip image validation on C2 (v5.0) See merge request espressif/esp-idf!19975
This commit is contained in:
commit
f954caecf0
@ -366,7 +366,7 @@ menu "Bootloader config"
|
||||
# only available if both Secure Boot and Check Signature on Boot are disabled
|
||||
depends on !SECURE_SIGNED_ON_BOOT
|
||||
default n
|
||||
select BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP
|
||||
select BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP if SOC_RTC_FAST_MEM_SUPPORTED
|
||||
select BOOTLOADER_SKIP_VALIDATE_ON_POWER_ON
|
||||
help
|
||||
Selecting this option prevents the bootloader from ever validating the app image before
|
||||
|
@ -126,7 +126,7 @@ In addition to the overall performance improvements shown above, the following o
|
||||
.. list::
|
||||
|
||||
- Minimizing the :ref:`CONFIG_LOG_DEFAULT_LEVEL` and :ref:`CONFIG_BOOTLOADER_LOG_LEVEL` has a large impact on startup time. To enable more logging after the app starts up, set the :ref:`CONFIG_LOG_MAXIMUM_LEVEL` as well and then call :cpp:func:`esp_log_level_set` to restore higher level logs. The :example:`system/startup_time` main function shows how to do this.
|
||||
- If using deep sleep, setting :ref:`CONFIG_BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP` allows a faster wake from sleep. Note that if using Secure Boot this represents a security compromise, as Secure Boot validation will not be performed on wake.
|
||||
:SOC_RTC_FAST_MEM_SUPPORTED: - If using deep sleep, setting :ref:`CONFIG_BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP` allows a faster wake from sleep. Note that if using Secure Boot this represents a security compromise, as Secure Boot validation will not be performed on wake.
|
||||
- Setting :ref:`CONFIG_BOOTLOADER_SKIP_VALIDATE_ON_POWER_ON` will skip verifying the binary on every boot from power-on reset. How much time this saves depends on the binary size and the flash settings. Note that this setting carries some risk if the flash becomes corrupt unexpectedly. Read the help text of the :ref:`config item <CONFIG_BOOTLOADER_SKIP_VALIDATE_ON_POWER_ON>` for an explanation and recommendations if using this option.
|
||||
- It's possible to save a small amount of time during boot by disabling RTC slow clock calibration. To do so, set :ref:`CONFIG_RTC_CLK_CAL_CYCLES` to 0. Any part of the firmware that uses RTC slow clock as a timing source will be less accurate as a result.
|
||||
|
||||
|
@ -136,12 +136,6 @@ examples/system/select:
|
||||
temporary: true
|
||||
reason: lack of runners
|
||||
|
||||
examples/system/startup_time:
|
||||
disable_test:
|
||||
- if: IDF_TARGET == "esp32s3" or IDF_TARGET == "esp32c2"
|
||||
temporary: true
|
||||
reason: lack of runners
|
||||
|
||||
examples/system/sysview_tracing:
|
||||
disable_test:
|
||||
- if: IDF_TARGET != "esp32"
|
||||
|
@ -1,22 +0,0 @@
|
||||
from __future__ import print_function
|
||||
|
||||
import re
|
||||
|
||||
import ttfw_idf
|
||||
from tiny_test_fw import TinyFW
|
||||
|
||||
|
||||
@ttfw_idf.idf_example_test(env_tag='Example_GENERIC', target=['esp32', 'esp32s2', 'esp32c3'])
|
||||
def test_startup_time_example(env, _):
|
||||
key = 'startup_time'
|
||||
dut = env.get_dut(key, 'examples/system/startup_time')
|
||||
dut.start_app()
|
||||
|
||||
res = dut.expect(re.compile(r'\((\d+)\) [^:]+: App started!'))
|
||||
time = int(res[0])
|
||||
|
||||
TinyFW.JunitReport.update_performance([(key, time)])
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
test_startup_time_example()
|
20
examples/system/startup_time/pytest_startup_time.py
Normal file
20
examples/system/startup_time/pytest_startup_time.py
Normal file
@ -0,0 +1,20 @@
|
||||
# SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
import logging
|
||||
|
||||
import pytest
|
||||
from pytest_embedded import Dut
|
||||
|
||||
|
||||
@pytest.mark.supported_targets
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize('config', [
|
||||
'defaults',
|
||||
'always_skip',
|
||||
], indirect=True)
|
||||
def test_startup_time_example(dut: Dut) -> None:
|
||||
|
||||
res = dut.expect(r'\((\d+)\) [^:]+: App started!')
|
||||
time = int(res[1])
|
||||
|
||||
logging.info(f'[Performance][startup_time]: {time}')
|
1
examples/system/startup_time/sdkconfig.ci.always_skip
Normal file
1
examples/system/startup_time/sdkconfig.ci.always_skip
Normal file
@ -0,0 +1 @@
|
||||
CONFIG_BOOTLOADER_SKIP_VALIDATE_ALWAYS=y
|
0
examples/system/startup_time/sdkconfig.ci.defaults
Normal file
0
examples/system/startup_time/sdkconfig.ci.defaults
Normal file
Loading…
Reference in New Issue
Block a user