Remove all remaining references to setenv.h and setenv.bat.

This commit is contained in:
Gregory Nutt 2017-04-26 10:28:37 -06:00
parent 9aac1dd44d
commit 2f9028b547
11 changed files with 26 additions and 138 deletions

2
.gitignore vendored
View file

@ -14,8 +14,6 @@ core
/.config.old
/.version
/Make.defs
/setenv.sh
/setenv.bat
/nuttx
/nuttx.*
/nuttx-*

View file

@ -742,12 +742,10 @@
| `-- <i>(board-specific source files)</i>
|-- <i>&lt;config1-dir&gt;</i>
| |-- Make.defs
| |-- defconfig
| `-- setenv.sh
| `-- defconfig
|-- <i>&lt;config2-dir&gt;</i>
| |-- Make.defs
| |-- defconfig
| `-- setenv.sh
| `-- defconfig
| ...
`-- <i>(other board-specific configuration sub-directories)</i>/
</pre></ul>
@ -780,7 +778,7 @@
The <code>configs/</code><i>&lt;board-name&gt;</i><code>/</code> sub-directory holds all of the
files that are necessary to configure NuttX for the particular board.
A board may have various different configurations using the common source files.
Each board configuration is described by three files: <code>Make.defs</code>, <code>defconfig</code>, and <code>setenv.sh</code>.
Each board configuration is described by two files: <code>Make.defs</code> and <code>defconfig</code>.
Typically, each set of configuration files is retained in a separate configuration sub-directory
(<i>&lt;config1-dir&gt;</i>, <i>&lt;config2-dir&gt;</i>, .. in the above diagram).
@ -836,15 +834,6 @@
most C files in the system.</li>
</ol>
</li>
<li>
<p>
<code>setenv.sh</code>: This is a script that can be included that will be installed at
the top level of the directory structure and can be sourced to set any
necessary environment variables.
You will most likely have to customize the default <code>setenv.sh</code> script in order
for it to work correctly in your environment.
</p>
</li>
</ul>
<h3><a name="supportedboards">2.5.3 Supported Boards</a></h3>
@ -1364,7 +1353,6 @@ tools/
</p>
<ul>
<li>Copy <code>configs/</code><i>&lt;board-name&gt;</i><code>/[</code><i>&lt;config-dir&gt;</i><code>/]Make.defs</code> to <code>${TOPDIR}/Make.defs</code>,<li>
<li>Copy <code>configs/</code><i>&lt;board-name&gt;</i><code>/[</code><i>&lt;config-dir&gt;</i><code>/]setenv.sh</code> to <code>${TOPDIR}/setenv.sh</code>, and</li>
<li>Copy <code>configs/</code><i>&lt;board-name&gt;</i><code>/[</code><i>&lt;config-dir&gt;</i><code>/]defconfig</code> to <code>${TOPDIR}/.config</code></li>
</ul>
@ -1464,7 +1452,6 @@ tools/version.h -v 6.1 .version
</p>
<ul><pre>
cd ${TOPDIR}
source ./setenv.sh
make
</pre></ul>
<p>
@ -1477,15 +1464,12 @@ make
That directory also holds:
</p>
<ul>
<li>The makefile fragment <a href="#boardconfigsubdirs"><code>.config</code></a> that describes the current configuration.</li>
<li>The makefile fragment <a href="#boardconfigsubdirs"><code>Make.defs</code></a> that provides customized build targets, and</li>
<li>The shell script <a href="#boardconfigsubdirs"><code>setenv.sh</code></a> that sets up the configuration environment for the build.</li>
<li>The makefile fragment <a href="#boardconfigsubdirs"><code>.config</code></a> that describes the current configuration, and</li>
<li>The makefile fragment <a href="#boardconfigsubdirs"><code>Make.defs</code></a> that provides customized build targets.</li>
</ul>
<p>
The <a href="#boardconfigsubdirs"><code>setenv.sh</code></a> contains Linux/Cygwin environmental settings that are needed for the build.
<b>Environment Variables</b>.
The specific environmental definitions are unique for each board but should include, as a minimum, updates to the <code>PATH</code> variable to include the full path to the architecture-specific toolchain identified in <a href="#boardconfigsubdirs"><code>Make.defs</code></a>.
The <a href="#boardconfigsubdirs"><code>setenv.sh</code></a> only needs to be source'ed at the beginning of a session.
The system can be re-made subsequently by just typing <code>make</code>.
</p>
<p>
<b>First Time Make.</b>

View file

@ -558,8 +558,6 @@ ifeq ($(CONFIG_BUILD_2PASS),y)
$(Q) $(MAKE) -C $(CONFIG_PASS1_BUILDIR) TOPDIR="$(TOPDIR)" distclean
endif
$(call DELFILE, Make.defs)
$(call DELFILE, setenv.sh)
$(call DELFILE, setenv.bat)
$(call DELFILE, .config)
$(call DELFILE, .config.old)

View file

@ -536,8 +536,6 @@ ifeq ($(CONFIG_BUILD_2PASS),y)
$(Q) $(MAKE) -C $(CONFIG_PASS1_BUILDIR) TOPDIR="$(TOPDIR)" distclean
endif
$(call DELFILE, Make.defs)
$(call DELFILE, setenv.sh)
$(call DELFILE, setenv.bat)
$(call DELFILE, .config)
$(call DELFILE, .config.old)

View file

@ -550,13 +550,6 @@ Instantiating "Canned" Configurations
and link code. You may need to modify this file to match the
specific needs of your toolchain.
Copy configs/<board-name>/<config-dir>/setenv.sh to ${TOPDIR}/setenv.sh
setenv.sh is an optional convenience file that I use to set
the PATH variable to the toolchain binaries. You may chose to
use setenv.sh or not. If you use it, then it may need to be
modified to include the path to your toolchain binaries.
Copy configs/<board-name>/<config-dir>/defconfig to ${TOPDIR}/.config
The defconfig file holds the actual build configuration. This
@ -928,10 +921,8 @@ Cross-Development Toolchains
That README file contains suggestions and information about appropriate
tools and development environments for use with your board.
In any case, the script, setenv.sh that was deposited in the top-
level directory when NuttX was configured should be edited to set
the path to where you installed the toolchain. The use of setenv.sh
is optional but can save a lot of confusion in the future.
In any case, the PATH environment variable will need to be updated to
include the loction where the build can find the toolchain binaries.
NuttX Buildroot Toolchain
-------------------------
@ -1009,12 +1000,11 @@ Building
NuttX builds in-place in the source tree. You do not need to create
any special build directories. Assuming that your Make.defs is setup
properly for your tool chain and that setenv.sh contains the path to where
your cross-development tools are installed, the following steps are all that
are required to build NuttX:
properly for your tool chain and that PATH environment variable contains
the path to where your cross-development tools are installed, the
following steps are all that are required to build NuttX:
cd ${TOPDIR}
. ./setenv.sh
make
At least one configuration (eagle100) requires additional command line
@ -1186,10 +1176,6 @@ Native Windows Build
(2) it still lacks some of the creature-comforts of the more mature
environments.
There is an alternative to the setenv.sh script available for the Windows
native environment: tools/configure.bat. See tools/README.txt for additional
information.
Installing GNUWin32
-------------------

View file

@ -19,9 +19,6 @@ config AVR_WINAVR_TOOLCHAIN
For Cygwin development environment on Windows machines, you
can use WinAVR: http://sourceforge.net/projects/winavr/files/
It is assumed in some places that WinAVR is installed at
C:/WinAVR. Edit the setenv.sh file if this is not the case.
WARNING: There is an incompatible version of cygwin.dll in
the WinAVR/bin directory! Make sure that the path to the
correct cygwin.dll file precedes the path to the WinAVR
@ -49,10 +46,6 @@ config AVR_CROSSPACK_TOOLCHAIN
For OS X, the AVR CrossPack toolchain is supported:
http://www.obdev.at/products/crosspack/index.html
It is assumed that /usr/local/CrossPack-AVR/bin is on the
user's path. Edit the setenv.sh file if this is not the
case.
config AVR_BUILDROOT_TOOLCHAIN
bool "Buildroot"
---help---
@ -60,10 +53,6 @@ config AVR_BUILDROOT_TOOLCHAIN
http://sourceforge.net/projects/nuttx/files/buildroot/. See
the following section for details on building this toolchain.
It is assumed in some places that buildroot toolchain is
available at ../buildroot/build_avr. Edit the setenv.sh
file if this is not the case.
endchoice # Toolchain
menu "Atmel AVR Toolchain options"

View file

@ -173,8 +173,8 @@ Development Environment
All testing has been conducted using the GNU toolchain from ARM for Linux.
found here https://launchpad.net/gcc-arm-embedded/4.9/4.9-2015-q3-update/+download/gcc-arm-none-eabi-4_9-2015q3-20150921-linux.tar.bz2
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.
If you change the default toolchain, then you may also have to modify the
PATH environment variable to include the path to the toolchain binaries.
IDEs
====

View file

@ -140,8 +140,8 @@ GNU Toolchain Options
CONFIG_ARMV7M_TOOLCHAIN_RAISONANCE=y : Raisonance RIDE7 under Windows
CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT=n : NuttX buildroot under Linux or Cygwin (default)
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.
If you change the default toolchain, then you may also have to modify the
PATH environment variable to include the path to the toolchain binaries.
NOTE: There are several limitations to using a Windows based toolchain in a
Cygwin environment. The three biggest are:
@ -280,8 +280,8 @@ NuttX EABI "buildroot" Toolchain
7. make
8. Edit setenv.h, if necessary, so that the PATH variable includes
the path to the newly built binaries.
8. Make sure that the PATH variable includes the path to the newly built
binaries.
See the file configs/README.txt in the buildroot source tree. That has more
details PLUS some special instructions that you will need to follow if you are
@ -322,8 +322,8 @@ NXFLAT Toolchain
7. make
8. Edit setenv.h, if necessary, so that the PATH variable includes
the path to the newly builtNXFLAT binaries.
8. Make sure that the PATH variable includes the path to the newly built
NXFLAT binaries.
mbed
====

View file

@ -116,8 +116,8 @@ GNU Toolchain Options
CONFIG_ARMV7M_TOOLCHAIN_RAISONANCE=y : Raisonance RIDE7 under Windows
CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT=n : NuttX buildroot under Linux or Cygwin (default)
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.
If you change the default toolchain, then you may also have to modify the
PATH environment variable to include the path to the toolchain binaries.
NOTE: There are several limitations to using a Windows based toolchain in a
Cygwin environment. The three biggest are:
@ -262,8 +262,8 @@ NuttX EABI "buildroot" Toolchain
7. make
8. Edit setenv.h, if necessary, so that the PATH variable includes
the path to the newly built binaries.
8. Make sure that the PATH variable includes the path to the newly built
binaries.
See the file configs/README.txt in the buildroot source tree. That has more
details PLUS some special instructions that you will need to follow if you are
@ -304,8 +304,8 @@ NXFLAT Toolchain
7. make
8. Edit setenv.h, if necessary, so that the PATH variable includes
the path to the newly builtNXFLAT binaries.
8. Make sure that the PATH variable includes the path to the newly built
NXFLAT binaries.
mbed
====

View file

@ -87,8 +87,6 @@ static char *g_verstring = "0.0"; /* Version String */
static char *g_srcdefconfig = NULL; /* Source defconfig file */
static char *g_srcmakedefs = NULL; /* Source Make.defs file */
static char *g_srcsetenvsh = NULL; /* Source setenv.sh file (optional) */
static char *g_srcsetenvbat = NULL; /* Source setenv.bat file (optional) */
static bool g_winnative = false; /* True: Windows native configuration */
static bool g_needapppath = true; /* Need to add app path to the .config file */
@ -634,29 +632,6 @@ static void check_configuration(void)
}
g_srcmakedefs = strdup(g_buffer);
/* Windows native configurations may provide setenv.bat; POSIX
* configurations may provide a setenv.sh.
*/
if (g_winnative)
{
snprintf(g_buffer, BUFFER_SIZE, "%s%csetenv.bat", g_configpath, g_delim);
debug("check_configuration: Checking %s\n", g_buffer);
if (verify_file(g_buffer))
{
g_srcsetenvbat = strdup(g_buffer);
}
}
else
{
snprintf(g_buffer, BUFFER_SIZE, "%s%csetenv.sh", g_configpath, g_delim);
debug("check_configuration: Checking %s\n", g_buffer);
if (verify_file(g_buffer))
{
g_srcsetenvsh = strdup(g_buffer);
}
}
}
static void copy_file(const char *srcpath, const char *destpath, mode_t mode)
@ -756,24 +731,6 @@ static void configure(void)
debug("configure: Copying from %s to %s\n", g_srcmakedefs, g_buffer);
copy_file(g_srcmakedefs, g_buffer, 0644);
/* Copy the setenv.sh file if have one and need one */
if (g_srcsetenvsh)
{
snprintf(g_buffer, BUFFER_SIZE, "%s%csetenv.sh", g_topdir, g_delim);
debug("configure: Copying from %s to %s\n", g_srcsetenvsh, g_buffer);
copy_file(g_srcsetenvsh, g_buffer, 0755);
}
/* Copy the setenv.bat file if have one and need one */
if (g_srcsetenvbat)
{
snprintf(g_buffer, BUFFER_SIZE, "%s%csetenv.bat", g_topdir, g_delim);
debug("configure: Copying from %s to %s\n", g_srcsetenvbat, g_buffer);
copy_file(g_srcsetenvbat, g_buffer, 0644);
}
/* If we did not use the CONFIG_APPS_DIR that was in the defconfig config file,
* then append the correct application information to the tail of the .config
* file

View file

@ -108,22 +108,6 @@ if [ ! -r "${src_makedefs}" ]; then
exit 4
fi
src_setenv="${configpath}/setenv.sh"
unset have_setenv
if [ -r "${src_setenv}" ]; then
dest_setenv=${TOPDIR}/setenv.sh
have_setenv=y
else
src_setenv="${configpath}/setenv.bat"
if [ -r "${src_setenv}" ]; then
dest_setenv=${TOPDIR}/setenv.bat
have_setenv=y
else
unset src_setenv
fi
fi
src_config="${configpath}/defconfig"
dest_config="${TOPDIR}/.config"
@ -134,8 +118,7 @@ fi
# Extract values needed from the defconfig file. We need:
# (1) The CONFIG_WINDOWS_NATIVE setting to know it this is target for a
# native Windows (meaning that we want setenv.bat vs setenv.sh and we need
# to use backslashes in the CONFIG_APPS_DIR setting).
# native Windows
# (2) The CONFIG_APPS_DIR setting to see if there is a configured location for the
# application directory. This can be overridden from the command line.
@ -191,11 +174,6 @@ fi
install -m 644 "${src_makedefs}" "${dest_makedefs}" || \
{ echo "Failed to copy \"${src_makedefs}\"" ; exit 7 ; }
if [ "X${have_setenv}" = "Xy" ]; then
install "${src_setenv}" "${dest_setenv}" || \
{ echo "Failed to copy ${src_setenv}" ; exit 8 ; }
chmod 755 "${dest_setenv}"
fi
install -m 644 "${src_config}" "${dest_config}" || \
{ echo "Failed to copy \"${src_config}\"" ; exit 9 ; }