Skip to content

Commit

Permalink
build: move CC3XX disable to sample Kconfig
Browse files Browse the repository at this point in the history
When Kconfigs are evaluated, the placement is critical.
If value is disabled in the sample Kconfig, It takes precedence
If on the other hand it is disabled in Sidewalk Kconfig
it is eveluated last, and any unconditional default before
takes precedence ( and in definition of those configs
the default value is set unconditionaly)

Signed-off-by: Robert Gałat <[email protected]>
  • Loading branch information
RobertGalatNordic committed Feb 7, 2025
1 parent b38f839 commit acff549
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 42 deletions.
42 changes: 0 additions & 42 deletions Kconfig.dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -152,48 +152,6 @@ config SIDEWALK_SECURE_KEY
help
Sidewalk persistent keys storage module

if SIDEWALK_CRYPTO

choice CC3XX_LOCK_VARIANT
default CC3XX_ATOMIC_LOCK if SOC_NRF52840
default CC3XX_HW_MUTEX_LOCK if SOC_NRF5340_CPUAPP
endchoice

config PSA_WANT_ALG_SHA_512
default y if SOC_SERIES_NRF54LX

config PSA_WANT_ALG_CHACHA20_POLY1305
default n

config PSA_WANT_ALG_SHA_224
default n

config PSA_WANT_ALG_SHA_384
default n

config PSA_WANT_ALG_CBC_NO_PADDING
default n

config PSA_WANT_ALG_CBC_PKCS7
default n

config PSA_WANT_ALG_HKDF
default n

config PSA_USE_CC3XX_KEY_AGREEMENT_DRIVER
default n if SOC_NRF52840 || SOC_NRF5340_CPUAPP

config PSA_USE_CC3XX_ASYMMETRIC_SIGNATURE_DRIVER
default n if SOC_NRF52840 || SOC_NRF5340_CPUAPP

config PSA_USE_CC3XX_ASYMMETRIC_ENCRYPTION_DRIVER
default n if SOC_NRF52840 || SOC_NRF5340_CPUAPP

config PSA_USE_CC3XX_KEY_MANAGEMENT_DRIVER
default n if SOC_NRF52840 || SOC_NRF5340_CPUAPP

endif #SIDEWALK_CRYPTO

config SIDEWALK_LOG
bool
default SIDEWALK
Expand Down
43 changes: 43 additions & 0 deletions samples/sid_end_device/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -130,4 +130,47 @@ config SBDT_MAX_PARALEL_TRANSFERS

endif # SIDEWALK_FILE_TRANSFER


if SIDEWALK_CRYPTO

choice CC3XX_LOCK_VARIANT
default CC3XX_ATOMIC_LOCK if SOC_NRF52840
default CC3XX_HW_MUTEX_LOCK if SOC_NRF5340_CPUAPP
endchoice

config PSA_WANT_ALG_SHA_512
default y if SOC_SERIES_NRF54LX

config PSA_WANT_ALG_CHACHA20_POLY1305
default n

config PSA_WANT_ALG_SHA_224
default n

config PSA_WANT_ALG_SHA_384
default n

config PSA_WANT_ALG_CBC_NO_PADDING
default n

config PSA_WANT_ALG_CBC_PKCS7
default n

config PSA_WANT_ALG_HKDF
default n

config PSA_USE_CC3XX_KEY_AGREEMENT_DRIVER
default n if SOC_NRF52840 || SOC_NRF5340_CPUAPP

config PSA_USE_CC3XX_ASYMMETRIC_SIGNATURE_DRIVER
default n if SOC_NRF52840 || SOC_NRF5340_CPUAPP

config PSA_USE_CC3XX_ASYMMETRIC_ENCRYPTION_DRIVER
default n if SOC_NRF52840 || SOC_NRF5340_CPUAPP

config PSA_USE_CC3XX_KEY_MANAGEMENT_DRIVER
default n if SOC_NRF52840 || SOC_NRF5340_CPUAPP

endif #SIDEWALK_CRYPTO

source "Kconfig.zephyr"

0 comments on commit acff549

Please sign in to comment.