Skip to content

Commit fdac9bb

Browse files
fix(examples): Fix SB and FE tests for C5 and C61
1 parent 637ee54 commit fdac9bb

File tree

5 files changed

+14
-8
lines changed

5 files changed

+14
-8
lines changed

examples/system/efuse/pytest_system_efuse_example.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,10 @@ def test_examples_efuse_with_virt_flash_enc_pre_loaded(dut: Dut) -> None:
185185
else:
186186
# offset of this eFuse is taken from components/efuse/{target}/esp_efuse_table.csv
187187
print(' - Flash emul_efuse with pre-loaded efuses (SPI_BOOT_CRYPT_CNT 1 -> 0)')
188-
SPI_BOOT_CRYPT_CNT = 82
188+
if dut.app.target == 'esp32c61':
189+
SPI_BOOT_CRYPT_CNT = 55
190+
else:
191+
SPI_BOOT_CRYPT_CNT = 82
189192
# Resets eFuse, which enables Flash encryption feature
190193
dut.serial.erase_field_on_emul_efuse([SPI_BOOT_CRYPT_CNT])
191194

@@ -594,7 +597,7 @@ def test_examples_efuse_with_virt_secure_boot_v2_esp32xx(dut: Dut) -> None:
594597

595598
dut.expect('Verifying image signature...')
596599
dut.expect('secure_boot_v2: Secure boot V2 is not enabled yet and eFuse digest keys are not set')
597-
if dut.app.target == 'esp32c2':
600+
if dut.app.sdkconfig.get('SECURE_SIGNED_APPS_ECDSA_V2_SCHEME'):
598601
signed_scheme = 'ECDSA'
599602
else:
600603
signed_scheme = 'RSA-PSS'
@@ -687,7 +690,7 @@ def test_example_efuse_with_virt_secure_boot_v2_esp32xx_pre_loaded(dut: Dut) ->
687690
dut.expect('Loading virtual efuse blocks from flash')
688691

689692
dut.expect('Verifying image signature...')
690-
if dut.app.target == 'esp32c2':
693+
if dut.app.sdkconfig.get('SECURE_SIGNED_APPS_ECDSA_V2_SCHEME'):
691694
signed_scheme = 'ECDSA'
692695
else:
693696
signed_scheme = 'RSA-PSS'
@@ -981,7 +984,10 @@ def test_examples_efuse_with_virt_sb_v2_and_fe_esp32xx(dut: Dut) -> None:
981984

982985
dut.expect('Verifying image signature...')
983986
dut.expect('secure_boot_v2: Secure boot V2 is not enabled yet and eFuse digest keys are not set')
984-
signed_scheme = 'ECDSA' if dut.app.target == 'esp32c2' else 'RSA-PSS'
987+
if dut.app.sdkconfig.get('SECURE_SIGNED_APPS_ECDSA_V2_SCHEME'):
988+
signed_scheme = 'ECDSA'
989+
else:
990+
signed_scheme = 'RSA-PSS'
985991
dut.expect('secure_boot_v2: Verifying with %s...' % signed_scheme)
986992
dut.expect('secure_boot_v2: Signature verified successfully!')
987993

examples/system/efuse/sdkconfig.ci.virt_sb_v2_and_fe.esp32c5

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="test/partitions_efuse_emul.csv"
88

99
CONFIG_SECURE_BOOT=y
1010
CONFIG_SECURE_BOOT_V2_ENABLED=y
11-
CONFIG_SECURE_BOOT_SIGNING_KEY="test/secure_boot_signing_key.pem"
11+
CONFIG_SECURE_BOOT_SIGNING_KEY="test/secure_boot_signing_key_ecdsa_nistp256.pem"
1212
CONFIG_SECURE_ENABLE_SECURE_ROM_DL_MODE=y
1313

1414
CONFIG_SECURE_FLASH_ENC_ENABLED=y

examples/system/efuse/sdkconfig.ci.virt_sb_v2_and_fe.esp32c61

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="test/partitions_efuse_emul.csv"
88

99
CONFIG_SECURE_BOOT=y
1010
CONFIG_SECURE_BOOT_V2_ENABLED=y
11-
CONFIG_SECURE_BOOT_SIGNING_KEY="test/secure_boot_signing_key.pem"
11+
CONFIG_SECURE_BOOT_SIGNING_KEY="test/secure_boot_signing_key_ecdsa_nistp256.pem"
1212
CONFIG_SECURE_ENABLE_SECURE_ROM_DL_MODE=y
1313

1414
CONFIG_SECURE_FLASH_ENC_ENABLED=y

examples/system/efuse/sdkconfig.ci.virt_secure_boot_v2.esp32c5

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="test/partitions_efuse_emul.csv"
88

99
CONFIG_SECURE_BOOT=y
1010
CONFIG_SECURE_BOOT_V2_ENABLED=y
11-
CONFIG_SECURE_BOOT_SIGNING_KEY="test/secure_boot_signing_key.pem"
11+
CONFIG_SECURE_BOOT_SIGNING_KEY="test/secure_boot_signing_key_ecdsa_nistp256.pem"
1212
CONFIG_SECURE_INSECURE_ALLOW_DL_MODE=y
1313

1414
# IMPORTANT: ONLY VIRTUAL eFuse MODE!

examples/system/efuse/sdkconfig.ci.virt_secure_boot_v2.esp32c61

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="test/partitions_efuse_emul.csv"
88

99
CONFIG_SECURE_BOOT=y
1010
CONFIG_SECURE_BOOT_V2_ENABLED=y
11-
CONFIG_SECURE_BOOT_SIGNING_KEY="test/secure_boot_signing_key.pem"
11+
CONFIG_SECURE_BOOT_SIGNING_KEY="test/secure_boot_signing_key_ecdsa_nistp256.pem"
1212
CONFIG_SECURE_INSECURE_ALLOW_DL_MODE=y
1313

1414
# IMPORTANT: ONLY VIRTUAL eFuse MODE!

0 commit comments

Comments
 (0)