From 6f5c82fabdf4956c6f26fa5175abafcff851bb52 Mon Sep 17 00:00:00 2001 From: sunghan Date: Fri, 22 Sep 2017 21:21:30 +0900 Subject: [PATCH] external: split Kconfig for each module Each module had better have an independent Kconfig. Putting all of configs in one Kconfig makes bad readability and maintenance. The Kconfig on external gets a functionality calling each Kconfig. --- external/Kconfig | 139 ++-------------------------------------------- external/aws/Kconfig | 11 ++++ external/iotivity/Kconfig | 91 ++++++++++++++++++++++++++++++ external/libtuv/Kconfig | 11 ++++ external/wakaama/Kconfig | 38 +++++++++++++ 5 files changed, 156 insertions(+), 134 deletions(-) create mode 100644 external/aws/Kconfig create mode 100644 external/iotivity/Kconfig create mode 100644 external/libtuv/Kconfig create mode 100644 external/wakaama/Kconfig diff --git a/external/Kconfig b/external/Kconfig index e80cdca..cc88f0d 100644 --- a/external/Kconfig +++ b/external/Kconfig @@ -3,138 +3,9 @@ # see kconfig-language at https://www.kernel.org/doc/Documentation/kbuild/kconfig-language.txt # -config LWM2M_WAKAAMA - bool "LWM2M_WAKAAMA" - default n - depends on LIBC_NETDB - ---help--- - enable LWM2M WAKAAMA external feature - -if LWM2M_WAKAAMA - -choice - prompt "LWM2M WAKAAMA modes" - default LWM2M_CLIENT_MODE - -config LWM2M_CLIENT_MODE - bool "CLIENT_MODE" - ---help--- - enable LWM2M WAKAAMA client mode - -config LWM2M_SERVER_MODE - bool "SERVER_MODE" - ---help--- - enable LWM2M WAKAAMA server mode -endchoice - -config LWM2M_LITTLE_ENDIAN - bool "LITTLE_ENDIAN" - default y - ---help--- - LWM2M supports LITTLE_ENDIAN and BIG_ENDIAN mode. - according to server configuration, LWM2M client should match it. - default value is LITTLE_ENDIAN and if you do not select as LITTLE_ENDIAN, - BIG_ENDIAN will be used instead of it -endif - -menuconfig ENABLE_IOTIVITY - bool "enable / disable iotivity stack" - default n - select LIBC_NETDB - select TIME_EXTENDED - select ARCH_STDARG_H - ---help--- - select to enable the iotivity stack in tinyara - -if ENABLE_IOTIVITY - -comment "IOTIVITY Config Parameters" - -config IOTIVITY_RELEASE_VERSION - string "iotivity stack version" - default "1.2-rel" - ---help--- - define this to iotivity stack release veriosn in use - -config IOTIVITY_ROUTING - string "Enable routing, allowed values : 'EP' / 'GW' " - default "EP" - ---help--- - define this to enable routing, allowed values : 'EP' / 'GW' - -config IOTIVITY_PTHREAD_STACKSIZE - int "Default pthread stack size for iotivity threads" - default 8192 - ---help--- - Default pthread stack size for iotivity threads - -config IOTIVITY_QUEING_PTHREAD_STACKSIZE - int "Default pthread stack size for the queing thread" - default 3072 - ---help--- - Default pthread stack size for the queing thread - -config IOTIVITY_RETRANSMIT_PTHREAD_STACKSIZE - int "Default pthread stack size for the retransmission pthread" - default 1024 - ---help--- - Default pthread stack size for the retransmission pthread - -config IOTIVITY_TCPRECEIVE_PTHREAD_STACKSIZE - int "Default pthread stack size for the TCP-receive thread" - default 8192 - ---help--- - Default pthread stack size for the TCP-receive thread - -config IOTIVITY_RECEIVEHANDLER_PTHREAD_STACKSIZE - int "Default pthread stack size for the receive-handler thread" - default 8192 - ---help--- - Default pthread stack size for the receive-handler thread - -config ENABLE_IOTIVITY_SECURED - bool "enable iotivity security" - default n - ---help--- - select to enable the security for iotivity stack in tinyara - -config ENABLE_IOTIVITY_CLOUD - bool "enable iotivity cloud" - default n - ---help--- - select to enable the cloud for iotivity stack in tinyara - -config IOTIVITY_RELEASE - bool "Set Iotivity to Release mode" - default y - ---help--- - select to build IoTivity in Release mode. Code will be optimized. - -config IOTIVITY_DEBUG - bool "enable iotivity stack logs" - default n - ---help--- - select to enable all iotivity stack logs (DEBUG / INFO etc.) - -config IOTIVITY_NS_PROVIDER - bool "enable iotivity notification service(provider only)" - default n - ---help--- - select to enable iotivity Notification Provider Service - -endif # ENABLE_IOTIVITY - -config LIBTUV - bool "libtuv" - default n - ---help--- - enable libtuv - -config AWS_SDK - bool "AWS IoT SDK" - default n - ---help--- - enable AWS IoT Device SDK - -source "$EXTERNALDIR/json/Kconfig" +source "$EXTERNALDIR/aws/Kconfig" source "$EXTERNALDIR/codecs/Kconfig" +source "$EXTERNALDIR/iotivity/Kconfig" +source "$EXTERNALDIR/json/Kconfig" +source "$EXTERNALDIR/libtuv/Kconfig" +source "$EXTERNALDIR/wakaama/Kconfig" diff --git a/external/aws/Kconfig b/external/aws/Kconfig new file mode 100644 index 0000000..3417ca0 --- /dev/null +++ b/external/aws/Kconfig @@ -0,0 +1,11 @@ +# +# For a description of the syntax of this configuration file, +# see kconfig-language at https://www.kernel.org/doc/Documentation/kbuild/kconfig-language.txt +# + +config AWS_SDK + bool "AWS IoT SDK" + default n + ---help--- + enable AWS IoT Device SDK + diff --git a/external/iotivity/Kconfig b/external/iotivity/Kconfig new file mode 100644 index 0000000..adcf35a --- /dev/null +++ b/external/iotivity/Kconfig @@ -0,0 +1,91 @@ +# +# For a description of the syntax of this configuration file, +# see kconfig-language at https://www.kernel.org/doc/Documentation/kbuild/kconfig-language.txt +# + +menuconfig ENABLE_IOTIVITY + bool "enable / disable iotivity stack" + default n + select LIBC_NETDB + select TIME_EXTENDED + select ARCH_STDARG_H + ---help--- + select to enable the iotivity stack in tinyara + +if ENABLE_IOTIVITY + +comment "IOTIVITY Config Parameters" + +config IOTIVITY_RELEASE_VERSION + string "iotivity stack version" + default "1.2-rel" + ---help--- + define this to iotivity stack release veriosn in use + +config IOTIVITY_ROUTING + string "Enable routing, allowed values : 'EP' / 'GW' " + default "EP" + ---help--- + define this to enable routing, allowed values : 'EP' / 'GW' + +config IOTIVITY_PTHREAD_STACKSIZE + int "Default pthread stack size for iotivity threads" + default 8192 + ---help--- + Default pthread stack size for iotivity threads + +config IOTIVITY_QUEING_PTHREAD_STACKSIZE + int "Default pthread stack size for the queing thread" + default 3072 + ---help--- + Default pthread stack size for the queing thread + +config IOTIVITY_RETRANSMIT_PTHREAD_STACKSIZE + int "Default pthread stack size for the retransmission pthread" + default 1024 + ---help--- + Default pthread stack size for the retransmission pthread + +config IOTIVITY_TCPRECEIVE_PTHREAD_STACKSIZE + int "Default pthread stack size for the TCP-receive thread" + default 8192 + ---help--- + Default pthread stack size for the TCP-receive thread + +config IOTIVITY_RECEIVEHANDLER_PTHREAD_STACKSIZE + int "Default pthread stack size for the receive-handler thread" + default 8192 + ---help--- + Default pthread stack size for the receive-handler thread + +config ENABLE_IOTIVITY_SECURED + bool "enable iotivity security" + default n + ---help--- + select to enable the security for iotivity stack in tinyara + +config ENABLE_IOTIVITY_CLOUD + bool "enable iotivity cloud" + default n + ---help--- + select to enable the cloud for iotivity stack in tinyara + +config IOTIVITY_RELEASE + bool "Set Iotivity to Release mode" + default y + ---help--- + select to build IoTivity in Release mode. Code will be optimized. + +config IOTIVITY_DEBUG + bool "enable iotivity stack logs" + default n + ---help--- + select to enable all iotivity stack logs (DEBUG / INFO etc.) + +config IOTIVITY_NS_PROVIDER + bool "enable iotivity notification service(provider only)" + default n + ---help--- + select to enable iotivity Notification Provider Service + +endif # ENABLE_IOTIVITY diff --git a/external/libtuv/Kconfig b/external/libtuv/Kconfig new file mode 100644 index 0000000..0779794 --- /dev/null +++ b/external/libtuv/Kconfig @@ -0,0 +1,11 @@ +# +# For a description of the syntax of this configuration file, +# see kconfig-language at https://www.kernel.org/doc/Documentation/kbuild/kconfig-language.txt +# + +config LIBTUV + bool "libtuv" + default n + ---help--- + enable libtuv + diff --git a/external/wakaama/Kconfig b/external/wakaama/Kconfig new file mode 100644 index 0000000..54509e7 --- /dev/null +++ b/external/wakaama/Kconfig @@ -0,0 +1,38 @@ +# +# For a description of the syntax of this configuration file, +# see kconfig-language at https://www.kernel.org/doc/Documentation/kbuild/kconfig-language.txt +# + +config LWM2M_WAKAAMA + bool "LWM2M_WAKAAMA" + default n + depends on LIBC_NETDB + ---help--- + enable LWM2M WAKAAMA external feature + +if LWM2M_WAKAAMA + +choice + prompt "LWM2M WAKAAMA modes" + default LWM2M_CLIENT_MODE + +config LWM2M_CLIENT_MODE + bool "CLIENT_MODE" + ---help--- + enable LWM2M WAKAAMA client mode + +config LWM2M_SERVER_MODE + bool "SERVER_MODE" + ---help--- + enable LWM2M WAKAAMA server mode +endchoice + +config LWM2M_LITTLE_ENDIAN + bool "LITTLE_ENDIAN" + default y + ---help--- + LWM2M supports LITTLE_ENDIAN and BIG_ENDIAN mode. + according to server configuration, LWM2M client should match it. + default value is LITTLE_ENDIAN and if you do not select as LITTLE_ENDIAN, + BIG_ENDIAN will be used instead of it +endif -- 2.7.4