From 8156a2bed16d732d2489f7d6fe410b110c29b1d5 Mon Sep 17 00:00:00 2001 From: patacongo Date: Wed, 9 Jan 2013 12:55:13 +0000 Subject: Use kconfig- prefix to avoid tool name conflicts (from Jose Pablo Carballo) git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5496 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/Makefile.unix | 6 +- nuttx/Makefile.win | 6 +- nuttx/README.txt | 20 ++--- nuttx/arch/arm/src/lm/Kconfig | 10 +-- nuttx/configs/amber/README.txt | 2 +- nuttx/configs/ea3131/README.txt | 2 +- nuttx/configs/ea3152/README.txt | 4 +- nuttx/configs/ez80f910200kitg/README.txt | 4 +- nuttx/configs/ez80f910200zco/README.txt | 4 +- nuttx/configs/fire-stm32v2/README.txt | 8 +- nuttx/configs/lm3s6965-ek/README.txt | 12 +-- nuttx/configs/mcu123-lpc214x/README.txt | 4 +- nuttx/configs/micropendous3/README.txt | 2 +- nuttx/configs/mirtoo/README.txt | 2 +- nuttx/configs/ntosd-dm320/README.txt | 4 +- nuttx/configs/olimex-lpc1766stk/README.txt | 4 +- nuttx/configs/sim/README.txt | 16 ++-- nuttx/configs/stm3220g-eval/README.txt | 8 +- nuttx/configs/stm3240g-eval/README.txt | 6 +- nuttx/configs/stm32f4discovery/README.txt | 16 ++-- nuttx/configs/teensy/README.txt | 2 +- nuttx/configs/xtrs/README.txt | 2 +- nuttx/configs/z16f2800100zcog/README.txt | 8 +- nuttx/configs/z80sim/README.txt | 2 +- nuttx/configs/z8encore000zco/README.txt | 4 +- nuttx/configs/z8f64200100kit/README.txt | 4 +- nuttx/configs/zp214xpa/README.txt | 8 +- nuttx/include/spawn.h | 137 +++++++++++++++++++++++++++++ nuttx/libc/Kconfig | 28 +++--- nuttx/libc/Makefile | 1 + nuttx/libc/spawn/Make.defs | 46 ++++++++++ nuttx/tools/README.txt | 8 +- nuttx/tools/kconfig.bat | 6 +- 33 files changed, 292 insertions(+), 104 deletions(-) create mode 100644 nuttx/include/spawn.h create mode 100644 nuttx/libc/spawn/Make.defs (limited to 'nuttx') diff --git a/nuttx/Makefile.unix b/nuttx/Makefile.unix index d66c06bd8..47debcccf 100644 --- a/nuttx/Makefile.unix +++ b/nuttx/Makefile.unix @@ -642,13 +642,13 @@ pass2dep: context tools/mkdeps$(HOSTEXEEXT) # misc/tools/README.txt for additional information. config: - $(Q) APPSDIR=${CONFIG_APPS_DIR} conf Kconfig + $(Q) APPSDIR=${CONFIG_APPS_DIR} kconfig-conf Kconfig oldconfig: - $(Q) APPSDIR=${CONFIG_APPS_DIR} conf --oldconfig Kconfig + $(Q) APPSDIR=${CONFIG_APPS_DIR} kconfig-conf --oldconfig Kconfig menuconfig: - $(Q) APPSDIR=${CONFIG_APPS_DIR} mconf Kconfig + $(Q) APPSDIR=${CONFIG_APPS_DIR} kconfig-mconf Kconfig # export # diff --git a/nuttx/Makefile.win b/nuttx/Makefile.win index 803d073b2..5c4404f57 100644 --- a/nuttx/Makefile.win +++ b/nuttx/Makefile.win @@ -651,13 +651,13 @@ configenv: $(Q) set APPSDIR=${CONFIG_APPS_DIR} config: configenv - $(Q) conf Kconfig + $(Q) kconfig-conf Kconfig oldconfig: configenv - $(Q) conf --oldconfig Kconfig + $(Q) kconfig-conf --oldconfig Kconfig menuconfig: configenv - $(Q) mconf Kconfig + $(Q) kconfig-mconf Kconfig # export # diff --git a/nuttx/README.txt b/nuttx/README.txt index 0348f7f30..23d0e1a81 100644 --- a/nuttx/README.txt +++ b/nuttx/README.txt @@ -243,8 +243,8 @@ additional file to the directory the NuttX application package (APPSDIR)): The appconfig file describes the applications that need to be built in the appliction directory (APPSDIR). Not all configurations have an appconfig file. This file is deprecated and will not be - used with new defconfig files produced with the mconf configuration - tool. + used with new defconfig files produced with the kconfig-mconf + configuration tool. General information about configuring NuttX can be found in: @@ -439,14 +439,14 @@ NuttX Configuration Tool under DOS And of course, after you use the configuration tool you need to restore CONFIG_WINDOWS_NATIVE=y and the correct CONFIG_APPS_DIR. - 2) You can, with some effort, run the the Cygwin mconf tool directly - in the CMD.exe shell. In this case, you do not have to modify the - .config file, but there are other complexities: + 2) You can, with some effort, run the the Cygwin kconfig-mconf tool + directly in the CMD.exe shell. In this case, you do not have to + modify the .config file, but there are other complexities: a. You need to temporarily set the Cgywin directories in the PATH - variable then run mconf manually like: + variable then run kconfig-mconf manually like: - mconf Kconfig + kconfig-mconf Kconfig There is a Windows bacht file at tools/kconfig.bat that automates these steps: @@ -454,9 +454,9 @@ NuttX Configuration Tool under DOS tools/kconfig menuconfig b. There is an issue with accessing DOS environment variables from - the Cygwin mconf running in the CMD.exe shell. The following - change to the top-level Kconfig file seems to work around these - problems: + the Cygwin kconfig-mconf running in the CMD.exe shell. The + following change to the top-level Kconfig file seems to work + around these problems: config APPSDIR string diff --git a/nuttx/arch/arm/src/lm/Kconfig b/nuttx/arch/arm/src/lm/Kconfig index 74d1712f3..2d2504c7e 100644 --- a/nuttx/arch/arm/src/lm/Kconfig +++ b/nuttx/arch/arm/src/lm/Kconfig @@ -60,7 +60,7 @@ config LM3S_DFU bool "DFU" default y -menu "Select LM3S Peripheral Support" +menu "Stellaris Peripheral Support" config LM3S_UART0 bool "UART0" @@ -86,10 +86,10 @@ config LM3S_UART2 default n config LM3S_ETHERNET - bool "LM3S Ethernet" + bool "Stellaris Ethernet" default n ---help--- - This must be set (along with NET) to build the LM3S Ethernet driver. + This must be set (along with NET) to build the Stellaris Ethernet driver. endmenu @@ -134,7 +134,7 @@ config LM3S_DISABLE_GPIOJ_IRQS endmenu if LM3S_ETHERNET -menu "LM3S Ethernet Configuration" +menu "Stellaris Ethernet Configuration" config LM3S_ETHLEDS bool "Ethernet LEDs" @@ -199,7 +199,7 @@ endmenu endif if !SSI0_DISABLE || !SSI1_DISABLE -menu "LM3S SSI Configuration" +menu "Stellaris SSI Configuration" config SSI_POLLWAIT bool "Poll Wait (No-Interrupt) Mode" diff --git a/nuttx/configs/amber/README.txt b/nuttx/configs/amber/README.txt index 56e31ba7f..9f40dcdd2 100644 --- a/nuttx/configs/amber/README.txt +++ b/nuttx/configs/amber/README.txt @@ -187,7 +187,7 @@ Atmel AVRISP mkII Connection Toolchains ^^^^^^^^^^ -The toolchain may be selected using the mconf tool (via 'make menuconfig'), +The toolchain may be selected using the kconfig-mconf tool (via 'make menuconfig'), by editing the existing configuration file (defconfig), or by overriding the toolchain on the make commandline with CONFIG_AVR_TOOLCHAIN=. diff --git a/nuttx/configs/ea3131/README.txt b/nuttx/configs/ea3131/README.txt index fcfc0792f..986b7778c 100644 --- a/nuttx/configs/ea3131/README.txt +++ b/nuttx/configs/ea3131/README.txt @@ -53,7 +53,7 @@ GNU Toolchain Options If you are not using CONFIG_LPC31_BUILDROOT, then you may also have to modify the PATH in the setenv.h file if your make cannot find the tools. - The toolchain may also be set using the mconf utility (make menuconfig) or by + The toolchain may also be set using the kconfig-mconf utility (make menuconfig) or by passing CONFIG_ARM_TOOLCHAIN= to make, where is one of CODESOURCERYW, CODESOURCERYL, DEVKITARM, BUILDROOT or GNU_EABI as described above. diff --git a/nuttx/configs/ea3152/README.txt b/nuttx/configs/ea3152/README.txt index da57945bd..4f507e7b0 100644 --- a/nuttx/configs/ea3152/README.txt +++ b/nuttx/configs/ea3152/README.txt @@ -52,8 +52,8 @@ GNU Toolchain Options If you are not using CONFIG_LPC31_BUILDROOT, then you may also have to modify the PATH in the setenv.h file if your make cannot find the tools. - The toolchain may also be set using the mconf utility (make menuconfig) or by - passing CONFIG_ARM_TOOLCHAIN= to make, where is one + The toolchain may also be set using the kconfig-mconf utility (make menuconfig) + or by passing CONFIG_ARM_TOOLCHAIN= to make, where is one of CODESOURCERYW, CODESOURCERYL, DEVKITARM, BUILDROOT or GNU_EABI as described above. diff --git a/nuttx/configs/ez80f910200kitg/README.txt b/nuttx/configs/ez80f910200kitg/README.txt index e314b0fe1..8d9086b4e 100644 --- a/nuttx/configs/ez80f910200kitg/README.txt +++ b/nuttx/configs/ez80f910200kitg/README.txt @@ -88,8 +88,8 @@ available: 1. This configuration uses the mconf-based configuration tool. To change this configuration using that tool, you should: - a. Build and install the mconf tool. See nuttx/README.txt and - misc/tools/ + a. Build and install the kconfig-mconf tool. See nuttx/README.txt + and misc/tools/ b. Execute 'make menuconfig' in nuttx/ in order to start the reconfiguration process. diff --git a/nuttx/configs/ez80f910200zco/README.txt b/nuttx/configs/ez80f910200zco/README.txt index 1bc9e56b8..7df503217 100644 --- a/nuttx/configs/ez80f910200zco/README.txt +++ b/nuttx/configs/ez80f910200zco/README.txt @@ -102,8 +102,8 @@ ostest 1. This configuration uses the mconf-based configuration tool. To change this configuration using that tool, you should: - a. Build and install the mconf tool. See nuttx/README.txt and - misc/tools/ + a. Build and install the kconfig-mconf tool. See nuttx/README.txt + and misc/tools/ b. Execute 'make menuconfig' in nuttx/ in order to start the reconfiguration process. diff --git a/nuttx/configs/fire-stm32v2/README.txt b/nuttx/configs/fire-stm32v2/README.txt index 88b5bf583..d12a9b27d 100644 --- a/nuttx/configs/fire-stm32v2/README.txt +++ b/nuttx/configs/fire-stm32v2/README.txt @@ -826,9 +826,9 @@ Where is one of the following: contains support for some built-in applications that can be enabled by making some additional minor change to the configuration file. - Reconfiguring: This configuration uses to the mconf configuration tool to control - the configuration. See the section entitled "NuttX Configuration Tool" - in the top-level README.txt file. + Reconfiguring: This configuration uses to the kconfig-mconf configuration tool + to control the configuration. See the section entitled "NuttX Configuration + Tool" in the top-level README.txt file. Start Delays: If no SD card is present in the slot, or if the network is not connected, then there will be long start-up delays before you get the NSH @@ -842,7 +842,7 @@ Where is one of the following: verified. The ENC28J60 network is not yet functional. Networking is enabled by default in this configuration for testing purposes. To use this configuration, the network must currently be disabled. To do this using - the mconf configuration tool: + the kconfig-mconf configuration tool: > make menuconfig diff --git a/nuttx/configs/lm3s6965-ek/README.txt b/nuttx/configs/lm3s6965-ek/README.txt index 5a9cdbf4e..e0349f5de 100644 --- a/nuttx/configs/lm3s6965-ek/README.txt +++ b/nuttx/configs/lm3s6965-ek/README.txt @@ -482,8 +482,8 @@ Where is one of the following: 1. This configuration uses the mconf-based configuration tool. To change this configuration using that tool, you should: - a. Build and install the mconf tool. See nuttx/README.txt and - misc/tools/ + a. Build and install the kconfig-mconf tool. See nuttx/README.txt + and misc/tools/ b. Execute 'make menuconfig' in nuttx/ in order to start the reconfiguration process. @@ -512,8 +512,8 @@ Where is one of the following: 1. This configuration uses the mconf-based configuration tool. To change this configuration using that tool, you should: - a. Build and install the mconf tool. See nuttx/README.txt and - misc/tools/ + a. Build and install the kconfig-mconf tool. See nuttx/README.txt + and misc/tools/ b. Execute 'make menuconfig' in nuttx/ in order to start the reconfiguration process. @@ -532,8 +532,8 @@ Where is one of the following: 1. This configuration uses the mconf-based configuration tool. To change this configuration using that tool, you should: - a. Build and install the mconf tool. See nuttx/README.txt and - misc/tools/ + a. Build and install the kconfig-mconf tool. See nuttx/README.txt + and misc/tools/ b. Execute 'make menuconfig' in nuttx/ in order to start the reconfiguration process. diff --git a/nuttx/configs/mcu123-lpc214x/README.txt b/nuttx/configs/mcu123-lpc214x/README.txt index 4c7c608b7..1c6c9bde8 100644 --- a/nuttx/configs/mcu123-lpc214x/README.txt +++ b/nuttx/configs/mcu123-lpc214x/README.txt @@ -354,8 +354,8 @@ nsh: 1. This configuration uses the mconf-based configuration tool. To change this configuration using that tool, you should: - a. Build and install the mconf tool. See nuttx/README.txt and - misc/tools/ + a. Build and install the kconfig-mconf tool. See nuttx/README.txt + and misc/tools/ b. Execute 'make menuconfig' in nuttx/ in order to start the reconfiguration process. diff --git a/nuttx/configs/micropendous3/README.txt b/nuttx/configs/micropendous3/README.txt index 1b0f2c8ce..6b586bd64 100644 --- a/nuttx/configs/micropendous3/README.txt +++ b/nuttx/configs/micropendous3/README.txt @@ -200,7 +200,7 @@ There are several toolchain options. However, testing has been performed using *only* the NuttX buildroot toolchain described below. Therefore, the NuttX buildroot toolchain is the recommended choice. -The toolchain may be selected using the mconf tool (via 'make menuconfig'), +The toolchain may be selected using the kconfig-mconf tool (via 'make menuconfig'), by editing the existing configuration file (defconfig), or by overriding the toolchain on the make commandline with CONFIG_AVR_TOOLCHAIN=. diff --git a/nuttx/configs/mirtoo/README.txt b/nuttx/configs/mirtoo/README.txt index 89c137a03..6d3ea234e 100644 --- a/nuttx/configs/mirtoo/README.txt +++ b/nuttx/configs/mirtoo/README.txt @@ -324,7 +324,7 @@ Toolchains ========== Note that in addition to the configuration options listed below, the - toolchain can be configured using the mconf utility ('make menuconfig') + toolchain can be configured using the kconfig-mconf utility ('make menuconfig') or by passing CONFIG_MIPS32_TOOLCHAIN= to make, where is one of GNU_ELF, MICROCHIPL, MICROCHIPW, MICROCHIPL_LITE, MICROCHIPW_LITE, MICROCHIPOPENL or PINGUINOW as described below. diff --git a/nuttx/configs/ntosd-dm320/README.txt b/nuttx/configs/ntosd-dm320/README.txt index d85e53525..675716154 100644 --- a/nuttx/configs/ntosd-dm320/README.txt +++ b/nuttx/configs/ntosd-dm320/README.txt @@ -72,8 +72,8 @@ GNU Toolchain Options If you are not using CONFIG_DM320_BUILDROOT, then you may also have to modify the PATH in the setenv.h file if your make cannot find the tools. - The toolchain may also be set using the mconf utility (make menuconfig) or by - passing CONFIG_ARM_TOOLCHAIN= to make, where is one + The toolchain may also be set using the kconfig-mconf utility (make menuconfig) + or by passing CONFIG_ARM_TOOLCHAIN= to make, where is one of CODESOURCERYW, CODESOURCERYL, DEVKITARM, BUILDROOT or GNU_EABI as described above. diff --git a/nuttx/configs/olimex-lpc1766stk/README.txt b/nuttx/configs/olimex-lpc1766stk/README.txt index 35f00e9f2..13c63d18b 100644 --- a/nuttx/configs/olimex-lpc1766stk/README.txt +++ b/nuttx/configs/olimex-lpc1766stk/README.txt @@ -904,8 +904,8 @@ Where is one of the following: 1. This configuration uses the mconf-based configuration tool. To change this configuration using that tool, you should: - a. Build and install the mconf tool. See nuttx/README.txt and - misc/tools/ + a. Build and install the kconfig-mconf tool. See nuttx/README.txt + and misc/tools/ b. Execute 'make menuconfig' in nuttx/ in order to start the reconfiguration process. diff --git a/nuttx/configs/sim/README.txt b/nuttx/configs/sim/README.txt index ff756fb4b..8abfd9c23 100644 --- a/nuttx/configs/sim/README.txt +++ b/nuttx/configs/sim/README.txt @@ -209,8 +209,8 @@ cxxtest 2. This configuration uses the mconf-based configuration tool. To change this configuration using that tool, you should: - a. Build and install the mconf tool. See nuttx/README.txt and - misc/tools/ + a. Build and install the kconfig-mconf tool. See nuttx/README.txt + and misc/tools/ b. Execute 'make menuconfig' in nuttx/ in order to start the reconfiguration process. @@ -455,8 +455,8 @@ nxlines 1. This configuration uses the mconf-based configuration tool. To change this configuration using that tool, you should: - a. Build and install the mconf tool. See nuttx/README.txt and - misc/tools/ + a. Build and install the kconfig-mconf tool. See nuttx/README.txt + and misc/tools/ b. Execute 'make menuconfig' in nuttx/ in order to start the reconfiguration process. @@ -481,8 +481,8 @@ nxwm 1. This configuration uses the mconf-based configuration tool. To change this configuration using that tool, you should: - a. Build and install the mconf tool. See nuttx/README.txt and - misc/tools/ + a. Build and install the kconfig-mconf tool. See nuttx/README.txt + and misc/tools/ b. Execute 'make menuconfig' in nuttx/ in order to start the reconfiguration process. @@ -543,8 +543,8 @@ ostest 1. This configuration uses the mconf-based configuration tool. To change this configuration using that tool, you should: - a. Build and install the mconf tool. See nuttx/README.txt and - misc/tools/ + a. Build and install the kconfig mconf tool. See nuttx/README.txt + and misc/tools/ b. Execute 'make menuconfig' in nuttx/ in order to start the reconfiguration process. diff --git a/nuttx/configs/stm3220g-eval/README.txt b/nuttx/configs/stm3220g-eval/README.txt index e7bdd4de0..40c918582 100644 --- a/nuttx/configs/stm3220g-eval/README.txt +++ b/nuttx/configs/stm3220g-eval/README.txt @@ -65,8 +65,8 @@ GNU Toolchain Options If you change the default toolchain, then you may also have to modify the PATH in the setenv.h file if your make cannot find the tools. - The toolchain may also be set using the mconf utility (make menuconfig) or by - passing CONFIG_ARMV7M_TOOLCHAIN= to make, where is one + The toolchain may also be set using the kconfig-mconf utility (make menuconfig) + or by passing CONFIG_ARMV7M_TOOLCHAIN= to make, where is one of CODESOURCERYW, CODESOURCERYL, ATOLLOC, DEVKITARM, RAISONANCE, BUILDROOT or GNU_EABI as described above. @@ -1082,8 +1082,8 @@ Where is one of the following: 1. This configuration uses the mconf-based configuration tool. To change this configuration using that tool, you should: - a. Build and install the mconf tool. See nuttx/README.txt and - misc/tools/ + a. Build and install the kconfig-mconf tool. See nuttx/README.txt + and misc/tools/ b. Execute 'make menuconfig' in nuttx/ in order to start the reconfiguration process. diff --git a/nuttx/configs/stm3240g-eval/README.txt b/nuttx/configs/stm3240g-eval/README.txt index 829f3a777..e8a3c4b25 100644 --- a/nuttx/configs/stm3240g-eval/README.txt +++ b/nuttx/configs/stm3240g-eval/README.txt @@ -951,9 +951,9 @@ Where is one of the following: CONFIG_EXAMPLES_DISCOVER_IPADDR - (not defined) CONFIG_EXAMPLES_DISCOVER_DRIPADDR - Router IP address - NOTE: This configuration uses to the mconf configuration tool to control - the configuration. See the section entitled "NuttX Configuration Tool" - in the top-level README.txt file. + NOTE: This configuration uses to the kconfig-mconf configuration tool to + control the configuration. See the section entitled "NuttX Configuration + Tool" in the top-level README.txt file. nettest: ------- diff --git a/nuttx/configs/stm32f4discovery/README.txt b/nuttx/configs/stm32f4discovery/README.txt index 28072f44b..ef61b05e6 100644 --- a/nuttx/configs/stm32f4discovery/README.txt +++ b/nuttx/configs/stm32f4discovery/README.txt @@ -1038,8 +1038,8 @@ Where is one of the following: 2. This configuration uses the mconf-based configuration tool. To change this configuration using that tool, you should: - a. Build and install the mconf tool. See nuttx/README.txt and - misc/tools/ + a. Build and install the kconfig-mconf tool. See nuttx/README.txt + and misc/tools/ b. Execute 'make menuconfig' in nuttx/ in order to start the reconfiguration process. @@ -1087,8 +1087,8 @@ Where is one of the following: 1. This configuration uses the mconf-based configuration tool. To change this configuration using that tool, you should: - a. Build and install the mconf tool. See nuttx/README.txt and - misc/tools/ + a. Build and install the kconfig-mconf tool. See nuttx/README.txt + and misc/tools/ b. Execute 'make menuconfig' in nuttx/ in order to start the reconfiguration process. @@ -1121,8 +1121,8 @@ Where is one of the following: 1. This configuration uses the mconf-based configuration tool. To change this configuration using that tool, you should: - a. Build and install the mconf tool. See nuttx/README.txt and - misc/tools/ + a. Build and install the kconfig-mconf tool. See nuttx/README.txt + and misc/tools/ b. Execute 'make menuconfig' in nuttx/ in order to start the reconfiguration process. @@ -1350,8 +1350,8 @@ Where is one of the following: 2. This configuration uses the mconf-based configuration tool. To change this configuration using that tool, you should: - a. Build and install the mconf tool. See nuttx/README.txt and - misc/tools/ + a. Build and install the kconfig-mconf tool. See nuttx/README.txt + and misc/tools/ b. Execute 'make menuconfig' in nuttx/ in order to start the reconfiguration process. diff --git a/nuttx/configs/teensy/README.txt b/nuttx/configs/teensy/README.txt index 951f4a87e..23e7d6c98 100644 --- a/nuttx/configs/teensy/README.txt +++ b/nuttx/configs/teensy/README.txt @@ -203,7 +203,7 @@ There are several toolchain options. However, testing has been performed using *only* the NuttX buildroot toolchain described below. Therefore, the NuttX buildroot toolchain is the recommended choice. -The toolchain may be selected using the mconf tool (via 'make menuconfig'), +The toolchain may be selected using the kconfig-mconf tool (via 'make menuconfig'), by editing the existing configuration file (defconfig), or by overriding the toolchain on the make commandline with CONFIG_AVR_TOOLCHAIN=. diff --git a/nuttx/configs/xtrs/README.txt b/nuttx/configs/xtrs/README.txt index d462dcab1..f8b3d0e73 100644 --- a/nuttx/configs/xtrs/README.txt +++ b/nuttx/configs/xtrs/README.txt @@ -165,7 +165,7 @@ Reconfiguring NuttX These configurations all use the kconfig-frontends, mconf-based configuration tool. To change this configuration using that tool, you should: - a. Build and install the mconf tool. See nuttx/README.txt and + a. Build and install the kconfig-mconf tool. See nuttx/README.txt and misc/tools/README.txt b. Execute 'make menuconfig' in nuttx/ in order to start the reconfiguration diff --git a/nuttx/configs/z16f2800100zcog/README.txt b/nuttx/configs/z16f2800100zcog/README.txt index e12931df2..4d61a41da 100644 --- a/nuttx/configs/z16f2800100zcog/README.txt +++ b/nuttx/configs/z16f2800100zcog/README.txt @@ -105,8 +105,8 @@ ostest 1. This configuration uses the mconf-based configuration tool. To change this configuration using that tool, you should: - a. Build and install the mconf tool. See nuttx/README.txt and - misc/tools/ + a. Build and install the kconfig-mconf tool. See nuttx/README.txt + and misc/tools/ b. Execute 'make menuconfig' in nuttx/ in order to start the reconfiguration process. @@ -154,8 +154,8 @@ pashello 1. This configuration uses the mconf-based configuration tool. To change this configuration using that tool, you should: - a. Build and install the mconf tool. See nuttx/README.txt and - misc/tools/ + a. Build and install the kconfig-mconf tool. See nuttx/README.txt + and misc/tools/ b. Execute 'make menuconfig' in nuttx/ in order to start the reconfiguration process. diff --git a/nuttx/configs/z80sim/README.txt b/nuttx/configs/z80sim/README.txt index 595a17783..f4055207c 100644 --- a/nuttx/configs/z80sim/README.txt +++ b/nuttx/configs/z80sim/README.txt @@ -112,7 +112,7 @@ Reconfiguring NuttX These configurations all use the kconfig-frontends, mconf-based configuration tool. To change this configuration using that tool, you should: - a. Build and install the mconf tool. See nuttx/README.txt and + a. Build and install the kconfig-mconf tool. See nuttx/README.txt and misc/tools/README.txt b. Execute 'make menuconfig' in nuttx/ in order to start the reconfiguration diff --git a/nuttx/configs/z8encore000zco/README.txt b/nuttx/configs/z8encore000zco/README.txt index 7ca50db8c..70d62ea80 100644 --- a/nuttx/configs/z8encore000zco/README.txt +++ b/nuttx/configs/z8encore000zco/README.txt @@ -73,8 +73,8 @@ available: 1. This configuration uses the mconf-based configuration tool. To change this configuration using that tool, you should: - a. Build and install the mconf tool. See nuttx/README.txt and - misc/tools/ + a. Build and install the kconfig-mconf tool. See nuttx/README.txt + and misc/tools/ b. Execute 'make menuconfig' in nuttx/ in order to start the reconfiguration process. diff --git a/nuttx/configs/z8f64200100kit/README.txt b/nuttx/configs/z8f64200100kit/README.txt index b0f224ad8..e3c22d87b 100644 --- a/nuttx/configs/z8f64200100kit/README.txt +++ b/nuttx/configs/z8f64200100kit/README.txt @@ -73,8 +73,8 @@ available: 1. This configuration uses the mconf-based configuration tool. To change this configuration using that tool, you should: - a. Build and install the mconf tool. See nuttx/README.txt and - misc/tools/ + a. Build and install the kconfig-mconf tool. See nuttx/README.txt + and misc/tools/ b. Execute 'make menuconfig' in nuttx/ in order to start the reconfiguration process. diff --git a/nuttx/configs/zp214xpa/README.txt b/nuttx/configs/zp214xpa/README.txt index 58a2242d0..88d03b9de 100644 --- a/nuttx/configs/zp214xpa/README.txt +++ b/nuttx/configs/zp214xpa/README.txt @@ -303,8 +303,8 @@ Configurations: 1. This configuration uses the mconf-based configuration tool. To change this configuration using that tool, you should: - a. Build and install the mconf tool. See nuttx/README.txt and - misc/tools/ + a. Build and install the kconfig-mconf tool. See nuttx/README.txt + and misc/tools/ b. Execute 'make menuconfig' in nuttx/ in order to start the reconfiguration process. @@ -327,8 +327,8 @@ Configurations: 1. This configuration uses the mconf-based configuration tool. To change this configuration using that tool, you should: - a. Build and install the mconf tool. See nuttx/README.txt and - misc/tools/ + a. Build and install the kconfig-mconf tool. See nuttx/README.txt + and misc/tools/ b. Execute 'make menuconfig' in nuttx/ in order to start the reconfiguration process. diff --git a/nuttx/include/spawn.h b/nuttx/include/spawn.h new file mode 100644 index 000000000..3463670b5 --- /dev/null +++ b/nuttx/include/spawn.h @@ -0,0 +1,137 @@ +/**************************************************************************** + * include/spawn.h + * + * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * 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. + * + ****************************************************************************/ + +#ifndef __INCLUDE_LIBGEN_H +#define __INCLUDE_LIBGEN_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include +#include + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/* "The spawn.h header shall define the flags that may be set in a + * posix_spawnattr_t object using the posix_spawnattr_setflags() function:" + */ + +#define POSIX_SPAWN_RESETIDS (1 << 0) +#define POSIX_SPAWN_SETPGROUP (1 << 1) +#define POSIX_SPAWN_SETSCHEDPARAM (1 << 2) +#define POSIX_SPAWN_SETSCHEDULER (1 << 3) +#define POSIX_SPAWN_SETSIGDEF (1 << 4) +#define POSIX_SPAWN_SETSIGMASK (1 << 5) + +/**************************************************************************** + * Type Definitions + ****************************************************************************/ +/* "The spawn.h header shall define the posix_spawnattr_t and + * posix_spawn_file_actions_t types used in performing spawn operations. + */ + +struct posix_spawnattr_s +{ +/* To be provided */ +}; +typedef struct posix_spawnattr_s posix_spawnattr_t; + +struct posix_spawn_file_actions_s +{ +/* To be provided */ +}; +typedef struct posix_spawn_file_actions_s posix_spawn_file_actions_t; + +/**************************************************************************** + * Public Function Prototypes + ****************************************************************************/ +/* "The following shall be declared as functions and may also be defined as + * macros. Function prototypes shall be provided." + */ + +#ifdef __cplusplus +extern "C" +{ +#endif + +int posix_spawn(FAR pid_t *, FAR const char *, + FAR const posix_spawn_file_actions_t *, FAR const posix_spawnattr_t *, + FAR char *const [], FAR char *const []); +int posix_spawnp(FAR pid_t *, FAR const char *, + FAR const posix_spawn_file_actions_t *, FAR const posix_spawnattr_t *, + FAR char *const [], FAR char *const []); + +int posix_spawn_file_actions_init(FAR posix_spawn_file_actions_t *); +int posix_spawn_file_actions_destroy(FAR posix_spawn_file_actions_t *); + +int posix_spawn_file_actions_addclose(FAR posix_spawn_file_actions_t *, + int); +int posix_spawn_file_actions_adddup2(FAR posix_spawn_file_actions_t *, + int, int); +int posix_spawn_file_actions_addopen(FAR posix_spawn_file_actions_t *, + int, FAR const char *, int, mode_t); + +int posix_spawnattr_init(FAR posix_spawnattr_t *); +int posix_spawnattr_destroy(FAR posix_spawnattr_t *); + +int posix_spawnattr_getflags(FAR const posix_spawnattr_t *, FAR short *); +int posix_spawnattr_getpgroup(FAR const posix_spawnattr_t *, FAR pid_t *); +int posix_spawnattr_getschedparam(FAR const posix_spawnattr_t *, + FAR struct sched_param *); +int posix_spawnattr_getschedpolicy(FAR const posix_spawnattr_t *, + FAR int *); +int posix_spawnattr_getsigdefault(FAR const posix_spawnattr_t *, + FAR sigset_t *); +int posix_spawnattr_getsigmask(FAR const posix_spawnattr_t *, + FAR sigset_t *); + +int posix_spawnattr_setflags(FAR posix_spawnattr_t *, short); +int posix_spawnattr_setpgroup(FAR posix_spawnattr_t *, pid_t); +int posix_spawnattr_setschedparam(FAR posix_spawnattr_t *, + FAR const struct sched_param *); +int posix_spawnattr_setschedpolicy(FAR posix_spawnattr_t *, int); +int posix_spawnattr_setsigdefault(FAR posix_spawnattr_t *, + FAR const sigset_t *); +int posix_spawnattr_setsigmask(FAR posix_spawnattr_t *, + FAR const sigset_t *); + +#ifdef __cplusplus +} +#endif + +#endif /* __INCLUDE_LIBGEN_H */ diff --git a/nuttx/libc/Kconfig b/nuttx/libc/Kconfig index 699b3ebb2..d739b6351 100644 --- a/nuttx/libc/Kconfig +++ b/nuttx/libc/Kconfig @@ -72,15 +72,17 @@ config EOL_IS_EITHER_CRLF endchoice config LIBC_EXECFUNCS - bool "Enable exec[l|v] Support" + bool "Enable exec[l|v] / posix_spawn() Support" default n depends on !BINFMT_DISABLE ---help--- Enable support for the exec[l|v] family of functions that can be - used to start other programs, terminating the current program. - Typical usage is (1) first call vfork() to create a new thread, then - (2) call exec[l|v] to replace the new thread with a program from the - file system. + used to start other programs, terminating the current program and + the posix_spawn() familty of functions that can be used start other + programs without terminating the current program. The typical + usage of the exec[l|v] functions is (1) first call vfork() to create + a new thread, then (2) call exec[l|v] to replace the new thread with + a program from the file system. NOTE 1: This two step process start is completely unnecessary in NuttX and is provided only for compatibily with Unix systems. These @@ -89,9 +91,11 @@ config LIBC_EXECFUNCS the new thread will be terminated by the exec[l|v] call, it really served no purpose other than to suport Unix compatility. - NOTE 2: Support for exec[l|v] is conditional because is requires - additional support for symbol tables that will not be available in - the typical system. + The posix_spawn() functions do not have this inefficiency. + + NOTE 2: Support for exec[l|v] and posix_spawn() is conditional + because they require additional support for symbol tables that + will not be available in the typical system. if LIBC_EXECFUNCS @@ -99,8 +103,8 @@ config EXECFUNCS_SYMTAB string "Symbol table used by exec[l|v]" default "g_symtab" ---help--- - The exec[l|v] functions are wrapper functions that (1) call the non- - standard binfmt function 'exec', and then (2) exit(0). The binfmt + The exec[l|v] and posix_spawn() functions are wrapper functions that + call the non-standard binfmt function 'exec'). The binfmt function 'exec' needs to have (1) a symbol table that provides the list of symbols exported by the base code, and (2) the number of symbols in that table. This selection provides the name of that @@ -110,8 +114,8 @@ config EXECFUNCS_NSYMBOLS int "Number of Symbols in the Table" default 0 ---help--- - The exec[l|v] functions are wrapper functions that (1) call the non- - standard binfmt function 'exec', and then (2) exit(0). The binfmt + The exec[l|v] and posix_spawn() functions are wrapper functions that + call the non-standard binfmt function 'exec'). The binfmt function 'exec' needs to have (1) a symbol table that provides the list of symbols exported by the base code, and (2) the number of symbols in that table. This selection provides the number of diff --git a/nuttx/libc/Makefile b/nuttx/libc/Makefile index 22dbba1d9..a76620585 100644 --- a/nuttx/libc/Makefile +++ b/nuttx/libc/Makefile @@ -57,6 +57,7 @@ include time/Make.defs include libgen/Make.defs include dirent/Make.defs include termios/Make.defs +include spawn/Make.defs include queue/Make.defs include misc/Make.defs diff --git a/nuttx/libc/spawn/Make.defs b/nuttx/libc/spawn/Make.defs new file mode 100644 index 000000000..17d9f393a --- /dev/null +++ b/nuttx/libc/spawn/Make.defs @@ -0,0 +1,46 @@ +############################################################################ +# libc/spawn/Make.defs +# +# Copyright (C) 2013 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# 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. +# +############################################################################ + +# Add the spawn C files to the build + +ifeq ($(CONFIG_LIBC_EXECFUNCS),y) + +CSRCS += + +# Add the spawn directory to the build + +DEPPATH += --dep-path spawn +VPATH += :spawn +endif diff --git a/nuttx/tools/README.txt b/nuttx/tools/README.txt index 5651ff2f0..8df4a7783 100644 --- a/nuttx/tools/README.txt +++ b/nuttx/tools/README.txt @@ -445,11 +445,11 @@ kconfig.bat only a few options for the Windows user (see the top-level README.txt file). - You can, with some effort, run the the Cygwin mconf tool directly + You can, with some effort, run the the Cygwin kconfig-mconf tool directly in the CMD.exe shell. In this case, you do not have to modify the .config file, but there are other complexities: You need to temporarily set the Cgywin directories in the PATH variable and - then run mconf outside of the Make system. + then run kconfig-mconf outside of the Make system. kconfig.bat is a Windows batch file at tools/kconfig.bat that automates these steps. It is used from the top-level NuttX directory like: @@ -457,8 +457,8 @@ kconfig.bat tools/kconfig menuconfig NOTE: There is an currently an issue with accessing DOS environment - variables from the Cygwin mconf running in the CMD.exe shell. The - following change to the top-level Kconfig file seems to work around + variables from the Cygwin kconfig-mconf running in the CMD.exe shell. + The following change to the top-level Kconfig file seems to work around these problems: config APPSDIR diff --git a/nuttx/tools/kconfig.bat b/nuttx/tools/kconfig.bat index 65ab60506..db01e7515 100755 --- a/nuttx/tools/kconfig.bat +++ b/nuttx/tools/kconfig.bat @@ -100,15 +100,15 @@ echo ERROR: Unrecognized action: %action% goto :ShowUsage :DoConfig -conf Kconfig +kconfig-conf Kconfig goto End :DoOldConfig -conf --oldconfig Kconfig +kconfig-conf --oldconfig Kconfig goto End :DoMenuConfig -mconf Kconfig +kconfig-mconf Kconfig goto End :MissingArgument -- cgit v1.2.3