diff --git a/examples/system/.build-test-rules.yml b/examples/system/.build-test-rules.yml index 94f013d152..7d06a7b8a8 100644 --- a/examples/system/.build-test-rules.yml +++ b/examples/system/.build-test-rules.yml @@ -50,16 +50,6 @@ examples/system/deep_sleep_wake_stub: temporary: true reason: target(s) is not supported yet -examples/system/efuse: - disable_test: - - if: IDF_TARGET == "esp32s3" - temporary: true - reason: lack of runners - disable: - - if: IDF_TARGET == "esp32c6" or IDF_TARGET == "esp32h2" - temporary: true - reason: target esp32c6 is not supported yet - examples/system/esp_timer: disable: - if: IDF_TARGET == "esp32c6" or IDF_TARGET == "esp32h2" diff --git a/examples/system/efuse/README.md b/examples/system/efuse/README.md index 23a722c6d7..3d062f7397 100644 --- a/examples/system/efuse/README.md +++ b/examples/system/efuse/README.md @@ -1,5 +1,5 @@ -| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-S2 | ESP32-S3 | -| ----------------- | ----- | -------- | -------- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-S2 | ESP32-S3 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- | # eFuse Example diff --git a/examples/system/efuse/pytest_system_efuse_example.py b/examples/system/efuse/pytest_system_efuse_example.py index 55326da480..ac1a3d9b14 100644 --- a/examples/system/efuse/pytest_system_efuse_example.py +++ b/examples/system/efuse/pytest_system_efuse_example.py @@ -38,9 +38,12 @@ def test_examples_efuse(dut: Dut) -> None: @pytest.mark.generic @pytest.mark.esp32 -@pytest.mark.esp32s2 @pytest.mark.esp32c2 @pytest.mark.esp32c3 +@pytest.mark.esp32c6 +@pytest.mark.esp32h2 +@pytest.mark.esp32s2 +@pytest.mark.esp32s3 @pytest.mark.parametrize('config', ['virt_flash_enc',], indirect=True) @pytest.mark.parametrize('skip_autoflash', ['y'], indirect=True) def test_examples_efuse_with_virt_flash_enc(dut: Dut) -> None: @@ -136,7 +139,10 @@ def test_examples_efuse_with_virt_flash_enc_aes_256(dut: Dut) -> None: @pytest.mark.esp32 @pytest.mark.esp32c2 @pytest.mark.esp32c3 +@pytest.mark.esp32c6 +@pytest.mark.esp32h2 @pytest.mark.esp32s2 +@pytest.mark.esp32s3 @pytest.mark.parametrize('config', ['virt_flash_enc',], indirect=True) @pytest.mark.parametrize('skip_autoflash', ['y'], indirect=True) def test_examples_efuse_with_virt_flash_enc_pre_loaded(dut: Dut) -> None: @@ -208,7 +214,10 @@ def test_examples_efuse_with_virt_flash_enc_pre_loaded(dut: Dut) -> None: @pytest.mark.esp32 @pytest.mark.esp32c2 @pytest.mark.esp32c3 +@pytest.mark.esp32c6 +@pytest.mark.esp32h2 @pytest.mark.esp32s2 +@pytest.mark.esp32s3 @pytest.mark.parametrize('config', ['virt_flash_enc_release',], indirect=True) @pytest.mark.parametrize('skip_autoflash', ['y'], indirect=True) def test_examples_efuse_with_virt_flash_enc_release(dut: Dut) -> None: @@ -619,6 +628,22 @@ def test_examples_efuse_with_virt_secure_boot_v2_esp32c2(dut: Dut) -> None: test_examples_efuse_with_virt_secure_boot_v2_esp32xx(dut) +@pytest.mark.generic +@pytest.mark.esp32c6 +@pytest.mark.parametrize('config', ['virt_secure_boot_v2.esp32c6'], indirect=True) +@pytest.mark.parametrize('skip_autoflash', ['y'], indirect=True) +def test_examples_efuse_with_virt_secure_boot_v2_esp32c6(dut: Dut) -> None: + test_examples_efuse_with_virt_secure_boot_v2_esp32xx(dut) + + +@pytest.mark.generic +@pytest.mark.esp32h2 +@pytest.mark.parametrize('config', ['virt_secure_boot_v2.esp32h2'], indirect=True) +@pytest.mark.parametrize('skip_autoflash', ['y'], indirect=True) +def test_examples_efuse_with_virt_secure_boot_v2_esp32h2(dut: Dut) -> None: + test_examples_efuse_with_virt_secure_boot_v2_esp32xx(dut) + + @pytest.mark.generic @pytest.mark.esp32s2 @pytest.mark.parametrize('config', ['virt_secure_boot_v2.esp32s2'], indirect=True) @@ -627,6 +652,14 @@ def test_examples_efuse_with_virt_secure_boot_v2_esp32s2(dut: Dut) -> None: test_examples_efuse_with_virt_secure_boot_v2_esp32xx(dut) +@pytest.mark.generic +@pytest.mark.esp32s3 +@pytest.mark.parametrize('config', ['virt_secure_boot_v2.esp32s3'], indirect=True) +@pytest.mark.parametrize('skip_autoflash', ['y'], indirect=True) +def test_examples_efuse_with_virt_secure_boot_v2_esp32s3(dut: Dut) -> None: + test_examples_efuse_with_virt_secure_boot_v2_esp32xx(dut) + + def test_example_efuse_with_virt_secure_boot_v2_esp32xx_pre_loaded(dut: Dut) -> None: print(' - Erase flash') dut.serial.erase_flash() @@ -711,6 +744,22 @@ def test_examples_efuse_with_virt_secure_boot_v2_esp32c2_pre_loaded(dut: Dut) -> test_example_efuse_with_virt_secure_boot_v2_esp32xx_pre_loaded(dut) +@pytest.mark.generic +@pytest.mark.esp32c6 +@pytest.mark.parametrize('config', ['virt_secure_boot_v2.esp32c6'], indirect=True) +@pytest.mark.parametrize('skip_autoflash', ['y'], indirect=True) +def test_examples_efuse_with_virt_secure_boot_v2_esp32c6_pre_loaded(dut: Dut) -> None: + test_example_efuse_with_virt_secure_boot_v2_esp32xx_pre_loaded(dut) + + +@pytest.mark.generic +@pytest.mark.esp32h2 +@pytest.mark.parametrize('config', ['virt_secure_boot_v2.esp32h2'], indirect=True) +@pytest.mark.parametrize('skip_autoflash', ['y'], indirect=True) +def test_examples_efuse_with_virt_secure_boot_v2_esp32h2_pre_loaded(dut: Dut) -> None: + test_example_efuse_with_virt_secure_boot_v2_esp32xx_pre_loaded(dut) + + @pytest.mark.generic @pytest.mark.esp32s2 @pytest.mark.parametrize('config', ['virt_secure_boot_v2.esp32s2'], indirect=True) @@ -719,6 +768,14 @@ def test_examples_efuse_with_virt_secure_boot_v2_esp32s2_pre_loaded(dut: Dut) -> test_example_efuse_with_virt_secure_boot_v2_esp32xx_pre_loaded(dut) +@pytest.mark.generic +@pytest.mark.esp32s3 +@pytest.mark.parametrize('config', ['virt_secure_boot_v2.esp32s3'], indirect=True) +@pytest.mark.parametrize('skip_autoflash', ['y'], indirect=True) +def test_examples_efuse_with_virt_secure_boot_v2_esp32s3_pre_loaded(dut: Dut) -> None: + test_example_efuse_with_virt_secure_boot_v2_esp32xx_pre_loaded(dut) + + @pytest.mark.generic @pytest.mark.esp32 @pytest.mark.parametrize('config', ['virt_sb_v1_and_fe',], indirect=True) @@ -972,9 +1029,33 @@ def test_examples_efuse_with_virt_sb_v2_and_fe_esp32c2(dut: Dut) -> None: test_examples_efuse_with_virt_sb_v2_and_fe_esp32xx(dut) +@pytest.mark.generic +@pytest.mark.esp32c6 +@pytest.mark.parametrize('config', ['virt_sb_v2_and_fe.esp32c6'], indirect=True) +@pytest.mark.parametrize('skip_autoflash', ['y'], indirect=True) +def test_examples_efuse_with_virt_sb_v2_and_fe_esp32c6(dut: Dut) -> None: + test_examples_efuse_with_virt_sb_v2_and_fe_esp32xx(dut) + + +@pytest.mark.generic +@pytest.mark.esp32h2 +@pytest.mark.parametrize('config', ['virt_sb_v2_and_fe.esp32h2'], indirect=True) +@pytest.mark.parametrize('skip_autoflash', ['y'], indirect=True) +def test_examples_efuse_with_virt_sb_v2_and_fe_esp32h2(dut: Dut) -> None: + test_examples_efuse_with_virt_sb_v2_and_fe_esp32xx(dut) + + @pytest.mark.generic @pytest.mark.esp32s2 @pytest.mark.parametrize('config', ['virt_sb_v2_and_fe.esp32s2'], indirect=True) @pytest.mark.parametrize('skip_autoflash', ['y'], indirect=True) def test_examples_efuse_with_virt_sb_v2_and_fe_esp32s2(dut: Dut) -> None: test_examples_efuse_with_virt_sb_v2_and_fe_esp32xx(dut) + + +@pytest.mark.generic +@pytest.mark.esp32s3 +@pytest.mark.parametrize('config', ['virt_sb_v2_and_fe.esp32s3'], indirect=True) +@pytest.mark.parametrize('skip_autoflash', ['y'], indirect=True) +def test_examples_efuse_with_virt_sb_v2_and_fe_esp32s3(dut: Dut) -> None: + test_examples_efuse_with_virt_sb_v2_and_fe_esp32xx(dut) diff --git a/examples/system/efuse/sdkconfig.ci.virt_sb_v2_and_fe.esp32c6 b/examples/system/efuse/sdkconfig.ci.virt_sb_v2_and_fe.esp32c6 new file mode 100644 index 0000000000..f1f4b809f6 --- /dev/null +++ b/examples/system/efuse/sdkconfig.ci.virt_sb_v2_and_fe.esp32c6 @@ -0,0 +1,18 @@ +# FLASH_ENCRYPTION & SECURE_BOOT_V2 with EFUSE_VIRTUAL_KEEP_IN_FLASH + +CONFIG_IDF_TARGET="esp32c6" + +CONFIG_PARTITION_TABLE_OFFSET=0xD000 +CONFIG_PARTITION_TABLE_CUSTOM=y +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="test/partitions_efuse_emul.csv" + +CONFIG_SECURE_BOOT=y +CONFIG_SECURE_BOOT_V2_ENABLED=y +CONFIG_SECURE_BOOT_SIGNING_KEY="test/secure_boot_signing_key.pem" +CONFIG_SECURE_ENABLE_SECURE_ROM_DL_MODE=y + +CONFIG_SECURE_FLASH_ENC_ENABLED=y + +# IMPORTANT: ONLY VIRTUAL eFuse MODE! +CONFIG_EFUSE_VIRTUAL=y +CONFIG_EFUSE_VIRTUAL_KEEP_IN_FLASH=y diff --git a/examples/system/efuse/sdkconfig.ci.virt_sb_v2_and_fe.esp32h2 b/examples/system/efuse/sdkconfig.ci.virt_sb_v2_and_fe.esp32h2 new file mode 100644 index 0000000000..362195b994 --- /dev/null +++ b/examples/system/efuse/sdkconfig.ci.virt_sb_v2_and_fe.esp32h2 @@ -0,0 +1,18 @@ +# FLASH_ENCRYPTION & SECURE_BOOT_V2 with EFUSE_VIRTUAL_KEEP_IN_FLASH + +CONFIG_IDF_TARGET="esp32h2" + +CONFIG_PARTITION_TABLE_OFFSET=0xD000 +CONFIG_PARTITION_TABLE_CUSTOM=y +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="test/partitions_efuse_emul.csv" + +CONFIG_SECURE_BOOT=y +CONFIG_SECURE_BOOT_V2_ENABLED=y +CONFIG_SECURE_BOOT_SIGNING_KEY="test/secure_boot_signing_key.pem" +CONFIG_SECURE_ENABLE_SECURE_ROM_DL_MODE=y + +CONFIG_SECURE_FLASH_ENC_ENABLED=y + +# IMPORTANT: ONLY VIRTUAL eFuse MODE! +CONFIG_EFUSE_VIRTUAL=y +CONFIG_EFUSE_VIRTUAL_KEEP_IN_FLASH=y diff --git a/examples/system/efuse/sdkconfig.ci.virt_sb_v2_and_fe.esp32s3 b/examples/system/efuse/sdkconfig.ci.virt_sb_v2_and_fe.esp32s3 new file mode 100644 index 0000000000..5a9de661c4 --- /dev/null +++ b/examples/system/efuse/sdkconfig.ci.virt_sb_v2_and_fe.esp32s3 @@ -0,0 +1,18 @@ +# FLASH_ENCRYPTION & SECURE_BOOT_V2 with EFUSE_VIRTUAL_KEEP_IN_FLASH + +CONFIG_IDF_TARGET="esp32s3" + +CONFIG_PARTITION_TABLE_OFFSET=0xD000 +CONFIG_PARTITION_TABLE_CUSTOM=y +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="test/partitions_efuse_emul.csv" + +CONFIG_SECURE_BOOT=y +CONFIG_SECURE_BOOT_V2_ENABLED=y +CONFIG_SECURE_BOOT_SIGNING_KEY="test/secure_boot_signing_key.pem" +CONFIG_SECURE_ENABLE_SECURE_ROM_DL_MODE=y + +CONFIG_SECURE_FLASH_ENC_ENABLED=y + +# IMPORTANT: ONLY VIRTUAL eFuse MODE! +CONFIG_EFUSE_VIRTUAL=y +CONFIG_EFUSE_VIRTUAL_KEEP_IN_FLASH=y diff --git a/examples/system/efuse/sdkconfig.ci.virt_secure_boot_v2.esp32c6 b/examples/system/efuse/sdkconfig.ci.virt_secure_boot_v2.esp32c6 new file mode 100644 index 0000000000..6240aba74d --- /dev/null +++ b/examples/system/efuse/sdkconfig.ci.virt_secure_boot_v2.esp32c6 @@ -0,0 +1,16 @@ +# SECURE_BOOT_V2 with EFUSE_VIRTUAL_KEEP_IN_FLASH + +CONFIG_IDF_TARGET="esp32c6" + +CONFIG_PARTITION_TABLE_OFFSET=0xC000 +CONFIG_PARTITION_TABLE_CUSTOM=y +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="test/partitions_efuse_emul.csv" + +CONFIG_SECURE_BOOT=y +CONFIG_SECURE_BOOT_V2_ENABLED=y +CONFIG_SECURE_BOOT_SIGNING_KEY="test/secure_boot_signing_key.pem" +CONFIG_SECURE_INSECURE_ALLOW_DL_MODE=y + +# IMPORTANT: ONLY VIRTUAL eFuse MODE! +CONFIG_EFUSE_VIRTUAL=y +CONFIG_EFUSE_VIRTUAL_KEEP_IN_FLASH=y diff --git a/examples/system/efuse/sdkconfig.ci.virt_secure_boot_v2.esp32h2 b/examples/system/efuse/sdkconfig.ci.virt_secure_boot_v2.esp32h2 new file mode 100644 index 0000000000..cf2b2e9e75 --- /dev/null +++ b/examples/system/efuse/sdkconfig.ci.virt_secure_boot_v2.esp32h2 @@ -0,0 +1,16 @@ +# SECURE_BOOT_V2 with EFUSE_VIRTUAL_KEEP_IN_FLASH + +CONFIG_IDF_TARGET="esp32h2" + +CONFIG_PARTITION_TABLE_OFFSET=0xC000 +CONFIG_PARTITION_TABLE_CUSTOM=y +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="test/partitions_efuse_emul.csv" + +CONFIG_SECURE_BOOT=y +CONFIG_SECURE_BOOT_V2_ENABLED=y +CONFIG_SECURE_BOOT_SIGNING_KEY="test/secure_boot_signing_key.pem" +CONFIG_SECURE_INSECURE_ALLOW_DL_MODE=y + +# IMPORTANT: ONLY VIRTUAL eFuse MODE! +CONFIG_EFUSE_VIRTUAL=y +CONFIG_EFUSE_VIRTUAL_KEEP_IN_FLASH=y diff --git a/examples/system/efuse/sdkconfig.ci.virt_secure_boot_v2.esp32s3 b/examples/system/efuse/sdkconfig.ci.virt_secure_boot_v2.esp32s3 new file mode 100644 index 0000000000..f67d7e7bcb --- /dev/null +++ b/examples/system/efuse/sdkconfig.ci.virt_secure_boot_v2.esp32s3 @@ -0,0 +1,16 @@ +# SECURE_BOOT_V2 with EFUSE_VIRTUAL_KEEP_IN_FLASH + +CONFIG_IDF_TARGET="esp32s3" + +CONFIG_PARTITION_TABLE_OFFSET=0xC000 +CONFIG_PARTITION_TABLE_CUSTOM=y +CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="test/partitions_efuse_emul.csv" + +CONFIG_SECURE_BOOT=y +CONFIG_SECURE_BOOT_V2_ENABLED=y +CONFIG_SECURE_BOOT_SIGNING_KEY="test/secure_boot_signing_key.pem" +CONFIG_SECURE_INSECURE_ALLOW_DL_MODE=y + +# IMPORTANT: ONLY VIRTUAL eFuse MODE! +CONFIG_EFUSE_VIRTUAL=y +CONFIG_EFUSE_VIRTUAL_KEEP_IN_FLASH=y