From 1b16ad1e9a91c7ec517073cb39b744e186bc52e3 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Tue, 26 Apr 2022 11:28:42 +0200 Subject: [PATCH 1/3] sys/auto_init: model auto_init_security in Kconfig --- sys/auto_init/Kconfig | 1 + sys/auto_init/security/Kconfig | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 sys/auto_init/security/Kconfig diff --git a/sys/auto_init/Kconfig b/sys/auto_init/Kconfig index 64325cfc7e..84fec8188d 100644 --- a/sys/auto_init/Kconfig +++ b/sys/auto_init/Kconfig @@ -21,6 +21,7 @@ config AUTO_INIT_ENABLE_DEBUG default n rsource "screen/Kconfig" +rsource "security/Kconfig" rsource "multimedia/Kconfig" endif # MODULE_AUTO_INIT diff --git a/sys/auto_init/security/Kconfig b/sys/auto_init/security/Kconfig new file mode 100644 index 0000000000..7a595ecbfd --- /dev/null +++ b/sys/auto_init/security/Kconfig @@ -0,0 +1,10 @@ +# Copyright (c) 2022 Inria +# +# This file is subject to the terms and conditions of the GNU Lesser +# General Public License v2.1. See the file LICENSE in the top level +# directory for more details. +# + +config MODULE_AUTO_INIT_SECURITY + bool "Security auto initialization module" + depends on TEST_KCONFIG From b78c8f695f1dc86cdfeca10aac14cc0af8608c51 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Tue, 26 Apr 2022 11:28:59 +0200 Subject: [PATCH 2/3] pkg/cryptoauthlib: model in Kconfig --- pkg/Kconfig | 1 + pkg/cryptoauthlib/Kconfig | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 pkg/cryptoauthlib/Kconfig diff --git a/pkg/Kconfig b/pkg/Kconfig index 849292da10..964e769736 100644 --- a/pkg/Kconfig +++ b/pkg/Kconfig @@ -14,6 +14,7 @@ rsource "cmsis-dsp/Kconfig" rsource "cmsis-nn/Kconfig" rsource "cn-cbor/Kconfig" rsource "corejson/Kconfig" +rsource "cryptoauthlib/Kconfig" rsource "driver_atwinc15x0/Kconfig" rsource "driver_bme680/Kconfig" rsource "driver_sx126x/Kconfig" diff --git a/pkg/cryptoauthlib/Kconfig b/pkg/cryptoauthlib/Kconfig new file mode 100644 index 0000000000..abbfdf29e8 --- /dev/null +++ b/pkg/cryptoauthlib/Kconfig @@ -0,0 +1,39 @@ +# Copyright (c) 2022 Inria +# +# This file is subject to the terms and conditions of the GNU Lesser +# General Public License v2.1. See the file LICENSE in the top level +# directory for more details. +# + +menuconfig PACKAGE_CRYPTOAUTHLIB + bool "Microchip CryptoAuthentication Library package" + depends on TEST_KCONFIG + depends on !HAS_ARCH_EFM32 + select MODULE_AUTO_INIT_SECURITY + select MODULE_CRYPTOAUTHLIB_CONTRIB + +if PACKAGE_CRYPTOAUTHLIB + +config MODULE_CRYPTOAUTHLIB_CONTRIB + bool + select ZTIMER_USEC + select MODULE_PERIPH_I2C + select MODULE_PERIPH_I2C_RECONFIGURE if HAS_PERIPH_I2C_RECONFIGURE + +config MODULE_CRYPTOAUTHLIB_TEST + bool "Module for cryptoauthlib tests" + depends on TEST_KCONFIG + select MODULE_CRYPTOAUTHLIB_TEST_JWT + select MODULE_CRYPTOAUTHLIB_TEST_TNG + select MODULE_CRYPTOAUTHLIB_TEST_ATCACERT + +config MODULE_CRYPTOAUTHLIB_TEST_JWT + bool + +config MODULE_CRYPTOAUTHLIB_TEST_TNG + bool + +config MODULE_CRYPTOAUTHLIB_TEST_ATCACERT + bool + +endif From ae530a9db22c1d7143d283222dee4263b2a322d7 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Tue, 26 Apr 2022 11:29:19 +0200 Subject: [PATCH 3/3] tests/pkg_cryptoauthlib*: add Kconfig configuration --- tests/pkg_cryptoauthlib_compare_sha256/app.config.test | 2 ++ tests/pkg_cryptoauthlib_internal-tests/app.config.test | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 tests/pkg_cryptoauthlib_compare_sha256/app.config.test create mode 100644 tests/pkg_cryptoauthlib_internal-tests/app.config.test diff --git a/tests/pkg_cryptoauthlib_compare_sha256/app.config.test b/tests/pkg_cryptoauthlib_compare_sha256/app.config.test new file mode 100644 index 0000000000..d153701432 --- /dev/null +++ b/tests/pkg_cryptoauthlib_compare_sha256/app.config.test @@ -0,0 +1,2 @@ +CONFIG_PACKAGE_CRYPTOAUTHLIB=y +CONFIG_MODULE_HASHES=y diff --git a/tests/pkg_cryptoauthlib_internal-tests/app.config.test b/tests/pkg_cryptoauthlib_internal-tests/app.config.test new file mode 100644 index 0000000000..5be197f2a9 --- /dev/null +++ b/tests/pkg_cryptoauthlib_internal-tests/app.config.test @@ -0,0 +1,2 @@ +CONFIG_PACKAGE_CRYPTOAUTHLIB=y +CONFIG_MODULE_CRYPTOAUTHLIB_TEST=y