+/Kconfig
/bin
/external
/.context
+++ /dev/null
-#
-# For a description of the syntax of this configuration file,
-# see kconfig-language at https://www.kernel.org/doc/Documentation/kbuild/kconfig-language.txt
-#
-
-menu "Examples"
-source "$APPSDIR/examples/Kconfig"
-endmenu
-
-menu "Network Utilities"
-source "$APPSDIR/netutils/Kconfig"
-endmenu
-
-menu "Platform-specific Support"
-source "$APPSDIR/platform/Kconfig"
-endmenu
-
-menu "Enable Shell"
-source "$APPSDIR/shell/Kconfig"
-endmenu
-
-menu "System Libraries"
-source "$APPSDIR/system/Kconfig"
-endmenu
###########################################################################
#
-# Copyright 2016 Samsung Electronics All Rights Reserved.
+# Copyright 2016-2017 Samsung Electronics All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# apps/Make.defs
# Common make definitions provided to all applications
#
-# Copyright (C) 2011, 2014 Gregory Nutt. All rights reserved.
+# Copyright (C) 2011, 2014, 2016 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
#
############################################################################
+# Tools
+ifeq ($(CONFIG_WINDOWS_NATIVE),y)
+ MKKCONFIG = $(APPDIR)\tools\mkkconfig.bat
+else
+ MKKCONFIG = $(APPDIR)/tools/mkkconfig.sh
+endif
TOPDIR ?= $(APPDIR)/import
-include $(TOPDIR)/Make.defs
+-include $(APPDIR)/Make.defs
# Application Directories
context: context_serialize
+Kconfig:
+ $(foreach SDIR, $(BUILDIRS), $(call MAKE_template,$(SDIR),preconfig))
+ $(Q) $(MKKCONFIG)
+
+preconfig: Kconfig
+
.depdirs: $(foreach SDIR, $(CONFIGURED_APPS), $(SDIR)_depend)
.depend: context Makefile .depdirs
clean: $(foreach SDIR, $(CLEANDIRS), $(SDIR)_clean)
$(call DELFILE, $(BIN))
+ $(call DELFILE, Kconfig)
$(call DELDIR, $(BIN_DIR))
$(call CLEAN)
)
endif
$(call DELFILE, .depend)
+ $(call DELFILE, $(BIN))
+ $(call DELFILE, Kconfig)
$(call DELDIR, $(BIN_DIR))
-
-
+ $(call CLEAN)
# see kconfig-language at https://www.kernel.org/doc/Documentation/kbuild/kconfig-language.txt
#
+menu "Examples"
if INIT_ENTRYPOINT
choice
prompt "Application entry point"
source "$APPSDIR/examples/websocket/Kconfig"
source "$APPSDIR/examples/workqueue/Kconfig"
source "$APPSDIR/examples/artik_demo/Kconfig"
+endmenu
# For a description of the syntax of this configuration file,
# see kconfig-language at https://www.kernel.org/doc/Documentation/kbuild/kconfig-language.txt
#
+
+menu "Network Utilities"
source "$APPSDIR/netutils/codecs/Kconfig"
source "$APPSDIR/netutils/dhcpc/Kconfig"
source "$APPSDIR/netutils/dhcpd/Kconfig"
source "$APPSDIR/netutils/ntpclient/Kconfig"
source "$APPSDIR/netutils/xmlrpc/Kconfig"
source "$APPSDIR/netutils/mdns/Kconfig"
-
+endmenu
# see kconfig-language at https://www.kernel.org/doc/Documentation/kbuild/kconfig-language.txt
#
+menu "Platform-specific Support"
config PLATFORM_CONFIGDATA
bool "Platform configuration data"
default n
storage mechanism is not visible to applications so underlying non-
volatile storage can be used: A file, EEPROM, hardcoded values in
FLASH, etc.
+endmenu
-
+menu "Enable Shell"
config TASH
bool "Enable shell"
default y
---help---
The priority set for TASH command task
endif
+endmenu
# see kconfig-language at https://www.kernel.org/doc/Documentation/kbuild/kconfig-language.txt
#
+menu "System Libraries"
menu "EMACS-like Command Line Editor"
source "$APPSDIR/system/cle/Kconfig"
endmenu
menu "VI Work-Alike Editor"
source "$APPSDIR/system/vi/Kconfig"
endmenu
+endmenu
--- /dev/null
+@Echo off
+REM
+REM
+REM Copyright 2017 Samsung Electronics All Rights Reserved.
+REM
+REM Licensed under the Apache License, Version 2.0 (the "License");
+REM you may not use this file except in compliance with the License.
+REM You may obtain a copy of the License at
+REM
+REM http://www.apache.org/licenses/LICENSE-2.0
+REM
+REM Unless required by applicable law or agreed to in writing,
+REM software distributed under the License is distributed on an
+REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+REM either express or implied. See the License for the specific
+REM language governing permissions and limitations under the License.
+REM
+REM
+REM apps/tools/mkkconfig.bat
+REM
+REM Copyright (C) 2015-2016 Gregory Nutt. All rights reserved.
+REM Author: Gregory Nutt <gnutt@nuttx.org>
+REM
+REM Redistribution and use in source and binary forms, with or without
+REM modification, are permitted provided that the following conditions
+REM are met:
+REM
+REM 1. Redistributions of source code must retain the above copyright
+REM notice, this list of conditions and the following disclaimer.
+REM 2. Redistributions in binary form must reproduce the above copyright
+REM notice, this list of conditions and the following disclaimer in
+REM the documentation and/or other materials provided with the
+REM distribution.
+REM 3. Neither the name NuttX nor the names of its contributors may be
+REM used to endorse or promote products derived from this software
+REM without specific prior written permission.
+REM
+REM THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+REM "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+REM LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+REM FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+REM COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+REM INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+REM BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+REM OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+REM AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+REM LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+REM ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+REM POSSIBILITY OF SUCH DAMAGE.
+REM
+
+REM Parse command line arguments
+
+SET menu=""
+SET kconfig=Kconfig
+
+:ArgLoop
+IF "%1"=="" GOTO :EndOfLoop
+IF "%1"=="-m" GOTO :SetMenu
+IF "%1"=="-o" GOTO :SetKconfig
+IF "%1"=="-h" GOTO :ShowUsage
+
+Echo ERROR: Unrecogized option %1
+GOTO :ShowUsage
+
+:SetDebug
+SET debug=-d
+GOTO :NextArg
+
+:SetMenu
+SHIFT
+SET menu=%1
+GOTO :NextArg
+
+:SetKconfig
+SHIFT
+SET kconfig=%1
+
+:NextArg
+SHIFT
+GOTO :ArgLoop
+
+REM Check input Parameters
+
+:EndOfLoop
+IF EXIST %kconfig% (
+ Del /f /q %kconfig%
+REM IF %ERRORLEVEL% GTR 0 (
+REM Echo ERROR: failed to remove %kconfig%
+REM GOTO :End
+REM )
+)
+
+Echo # > %kconfig%
+Echo # For a description of the syntax of this configuration file, >> %kconfig%
+Echo # see kconfig-language at https://www.kernel.org/doc/Documentation/kbuild/kconfig-language.txt >> %kconfig%
+Echo # >> %kconfig%
+Echo # This file is autogenerated, do not edit. >> %kconfig%
+Echo # >> %kconfig%
+Echo[ >> %kconfig%
+
+IF %menu% NEQ "" (
+ Echo menu "%menu%" >> %kconfig%
+)
+
+DIR /B /A:D >_tmp_.dat
+
+FOR /F "tokens=*" %%s IN (_tmp_.dat) do (
+ IF EXIST %%s\Kconfig (
+ Echo source "$APPSDIR/%%s/Kconfig" >> %kconfig%
+ )
+)
+DEL _tmp_.dat
+
+IF %menu% NEQ "" (
+ Echo endmenu # %menu% >> %kconfig%
+)
+
+GOTO :End
+
+REM Exit showing usage
+
+:ShowUsage
+Echo USAGE: %0 [-d] [-m ^<menu^>] [-o ^<kconfig-file^>]
+Echo %0 [-h]
+Echo Where:
+Echo ^<-d^>:
+Echo Enables debug output
+Echo -m ^<menu^>:
+Echo Menu description
+Echo -o ^<kconfig-file^>:
+Echo Identifies the specific configuratin for the selected ^<board-name^>.
+Echo This must correspond to a sub-directory under the board directory at
+Echo under build/configs/^<board-name^>/.
+Echo ^<-h^>:
+Echo Prints this message and exits.
+
+REM Exit
+
+:End
+
--- /dev/null
+#!/bin/bash
+###########################################################################
+#
+# Copyright 2017 Samsung Electronics All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+# either express or implied. See the License for the specific
+# language governing permissions and limitations under the License.
+#
+###########################################################################
+# apps/tools/mkkconfig.sh
+#
+# Copyright (C) 2015 Gregory Nutt. All rights reserved.
+# Author: Gregory Nutt <gnutt@nuttx.org>
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# 3. Neither the name NuttX nor the names of its contributors may be
+# used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+
+# Get the input parameter list
+
+USAGE () {
+ echo "USAGE: mkkconfig.sh [-d] [-h] [-m <menu>] [-o <kconfig-file>]"
+ echo "Where:"
+ echo " <-d>:"
+ echo " Enables debug output"
+ echo " -m <menu>:"
+ echo " Menu description"
+ echo " -o <kconfig-file>:"
+ echo " Identifies the specific configuratin for the selected <board-name>."
+ echo " This must correspond to a sub-directory under the board directory at"
+ echo " under build/configs/<board-name>/."
+ echo " <-h>:"
+ echo " Prints this message and exits."
+}
+
+KCONFIG=Kconfig
+unset MENU
+
+while [ ! -z "$1" ]; do
+ case $1 in
+ -d )
+ set -x
+ ;;
+ -m )
+ shift
+ MENU=$1
+ ;;
+ -o )
+ shift
+ KCONFIG=$1
+ ;;
+ -h )
+ USAGE
+ exit 0
+ ;;
+ * )
+ echo "ERROR: Unrecognized argument: $1"
+ USAGE
+ exit 1
+ ;;
+ esac
+ shift
+done
+
+
+if [ -f ${KCONFIG} ]; then
+ rm ${KCONFIG} || { echo "ERROR: Failed to remove $PWD/${KCONFIG}"; exit 1; }
+fi
+
+echo mkkconfig in $PWD
+
+KCONFIG_LIST=`ls -1 $PWD/*/Kconfig`
+
+echo "#" > ${KCONFIG}
+echo "# For a description of the syntax of this configuration file," >> ${KCONFIG}
+echo "# see kconfig-language at https://www.kernel.org/doc/Documentation/kbuild/kconfig-language.txt" >> ${KCONFIG}
+echo "#" >> ${KCONFIG}
+echo "# This file is autogenerated, do not edit." >> ${KCONFIG}
+echo "#" >> ${KCONFIG}
+echo "" >> ${KCONFIG}
+
+if [ ! -z "${MENU}" ]; then
+ echo "menu \"${MENU}\"" >> ${KCONFIG}
+fi
+
+for FILE in ${KCONFIG_LIST}; do
+ echo "source \"${FILE}\"" >> ${KCONFIG}
+done
+
+if [ ! -z "${MENU}" ]; then
+ echo "endmenu # ${MENU}" >> ${KCONFIG}
+fi
+
###########################################################################
#
-# Copyright 2016 Samsung Electronics All Rights Reserved.
+# Copyright 2016-2017 Samsung Electronics All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
############################################################################
# Makefile.unix
#
-# Copyright (C) 2007-2012, 2014 Gregory Nutt. All rights reserved.
+# Copyright (C) 2007-2012, 2014-2015 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
# must first download and install the kconfig-frontends package from this
# location: http://ymorin.is-a-geek.org/projects/kconfig-frontends.
-config:
+config: apps_preconfig
$(Q) APPSDIR=${CONFIG_APPS_DIR} CONFIGSDIR=${CONFIGS_DIR} EXTERNALDIR=${CONFIG_EXTERNAL_DIR} LIBDIR=${LIB_DIR} kconfig-conf Kconfig
-oldconfig:
+oldconfig: apps_preconfig
$(Q) APPSDIR=${CONFIG_APPS_DIR} CONFIGSDIR=${CONFIGS_DIR} EXTERNALDIR=${CONFIG_EXTERNAL_DIR} LIBDIR=${LIB_DIR} kconfig-conf --oldconfig Kconfig
-menuconfig:
+menuconfig: apps_preconfig
$(Q) APPSDIR=${CONFIG_APPS_DIR} CONFIGSDIR=${CONFIGS_DIR} EXTERNALDIR=${CONFIG_EXTERNAL_DIR} LIBDIR=${LIB_DIR} kconfig-mconf Kconfig
-qconfig:
+qconfig: apps_preconfig
$(Q) APPSDIR=${CONFIG_APPS_DIR} CONFIGSDIR=${CONFIGS_DIR} EXTERNALDIR=${CONFIG_EXTERNAL_DIR} LIBDIR=${LIB_DIR} kconfig-qconf Kconfig
-gconfig:
+gconfig: apps_preconfig
$(Q) APPSDIR=${CONFIG_APPS_DIR} CONFIGSDIR=${CONFIGS_DIR} EXTERNALDIR=${CONFIG_EXTERNAL_DIR} LIBDIR=${LIB_DIR} kconfig-gconf Kconfig
# export
# as a convenience, the following targets are included to support housekeeping
# functions in the user application directory from the TinyAra build directory.
#
+# apps_preconfig: Prepare applications to be configured
# apps_clean: Perform the clean operation only in the user application
# directory
# apps_distclean: Perform the distclean operation only in the user application
# directory.
+apps_preconfig:
+ifneq ($(APPDIR),)
+ $(Q) $(MAKE) -C "$(TOPDIR)/$(APPDIR)" TOPDIR="$(TOPDIR)" preconfig
+endif
+
apps_clean:
ifneq ($(APPDIR),)
$(Q) $(MAKE) -C "$(TOPDIR)/$(APPDIR)" TOPDIR="$(TOPDIR)" clean