diff --git a/Documentation/NuttxPortingGuide.html b/Documentation/NuttxPortingGuide.html
index 4eca560235c..7ca8c851a40 100644
--- a/Documentation/NuttxPortingGuide.html
+++ b/Documentation/NuttxPortingGuide.html
@@ -1578,7 +1578,7 @@ tools/
accomplish the same configuration:
- tools/configure.sh [OPTIONS] <board-name>:<config-dir>
+ tools/configure.sh [OPTIONS] <board-name>[:<config-dir>]
@@ -1587,6 +1587,13 @@ tools/
tools\configure.bat <board-name>:<config-dir>
+
+ And, to make sure that other platforms are supported, there is also a C program at tools/configure.c that can be compiled to establish the board configuration on all platforms.
+
+
+ NOTE (2019-08-6): As of this writing, changes to the boards/ directly have made configure.bat unusable.
+ For the native Windows environment, configure.c is recommended until that batch file can be repaired.
+
See tools/README.txt for more information about these scripts.
Or use the -h option with configure.sh>
@@ -1594,7 +1601,7 @@ tools/
$ tools/configure.sh -h
-USAGE: tools/configure.sh [-d] [-l|m|c|u|g|n] [-a <app-dir>] <board-name>:<config-name>
+USAGE: tools/configure.sh [-d] [-l|m|c|u|g|n] [-a <app-dir>] <board-name>[:<config-name>]
Where:
-l selects the Linux (l) host environment.
@@ -1616,7 +1623,7 @@ Where:
then you should also specify the location of the application directory on the command line like:
- tools/configure.sh -a <app-dir> <board-name>:<config-dir>
+ tools/configure.sh -a <app-dir> <board-name>[:<config-dir>]
diff --git a/tools/configure.sh b/tools/configure.sh
index c1e43452e5c..49e8567fd2e 100755
--- a/tools/configure.sh
+++ b/tools/configure.sh
@@ -37,7 +37,7 @@ WD=`test -d ${0%/*} && cd ${0%/*}; pwd`
TOPDIR="${WD}/.."
USAGE="
-USAGE: ${0} [-d] [-l|m|c|u|g|n] [-a ] :
+USAGE: ${0} [-d] [-l|m|c|u|g|n] [-a ] [:]
Where:
-l selects the Linux (l) host environment.
@@ -129,15 +129,8 @@ fi
configdir=`echo ${boardconfig} | cut -s -d':' -f2`
if [ -z "${configdir}" ]; then
- configdir=`echo ${boardconfig} | cut -s -d'/' -f2`
- if [ -z "${configdir}" ]; then
- echo ""
- echo "Unrecognizable argument: ${boardconfig}"
- echo "$USAGE"
- exit 3
- else
- boarddir=`echo ${boardconfig} | cut -d'/' -f1`
- fi
+ boarddir=`echo ${boardconfig} | cut -d'/' -f1`
+ configdir=`echo ${boardconfig} | cut -d'/' -f2`
else
boarddir=`echo ${boardconfig} | cut -d':' -f1`
fi
@@ -148,17 +141,17 @@ if [ ! -d "${configpath}" ]; then
configpath=${TOPDIR}/${boardconfig}
if [ ! -d "${configpath}" ]; then
- echo "Directory ${configpath} does not exist. Options are:"
+ echo "Directory for ${boardconfig} does not exist. Options are:"
echo ""
echo "Select one of the following options for :"
configlist=`find ${TOPDIR}/boards -name defconfig`
for defconfig in ${configlist}; do
- config=`dirname ${defconfig} | sed -e "s,${TOPDIR}/boards/,,g" | sed -e "s,configs/,,g" | sed -e "s,/,:,g"`
+ config=`dirname ${defconfig} | sed -e "s,${TOPDIR}/boards/,,g" | sed -e "s,/configs/,:,g"`
echo " ${config}"
done
echo ""
echo "$USAGE"
- exit 4
+ exit 3
fi
fi
@@ -169,8 +162,11 @@ if [ ! -r "${src_makedefs}" ]; then
src_makedefs="${TOPDIR}/boards/${boarddir}/scripts/Make.defs"
if [ ! -r "${src_makedefs}" ]; then
- echo "File Make.defs could not be found"
- exit 5
+ src_makedefs="${TOPDIR}/${boardconfig}/Make.defs"
+ if [ ! -r "${src_makedefs}" ]; then
+ echo "File Make.defs could not be found"
+ exit 4
+ fi
fi
fi
@@ -179,13 +175,13 @@ dest_config="${TOPDIR}/.config"
if [ ! -r "${src_config}" ]; then
echo "File \"${src_config}\" does not exist"
- exit 6
+ exit 5
fi
if [ -r ${dest_config} ]; then
echo "Already configured!"
echo "Do 'make distclean' and try again."
- exit 7
+ exit 6
fi
# Extract values needed from the defconfig file. We need:
@@ -256,16 +252,16 @@ winappdir=`echo "${appdir}" | sed -e 's/\\//\\\\\\\/g'`
if [ ! -z "${appdir}" -a ! -d "${TOPDIR}/${posappdir}" ]; then
echo "Directory \"${TOPDIR}/${posappdir}\" does not exist"
- exit 8
+ exit 7
fi
# Okay... Everything looks good. Setup the configuration
echo " Copy files"
install -m 644 "${src_makedefs}" "${dest_makedefs}" || \
- { echo "Failed to copy \"${src_makedefs}\"" ; exit 9 ; }
+ { echo "Failed to copy \"${src_makedefs}\"" ; exit 8 ; }
install -m 644 "${src_config}" "${dest_config}" || \
- { echo "Failed to copy \"${src_config}\"" ; exit 10 ; }
+ { echo "Failed to copy \"${src_config}\"" ; exit 9 ; }
# Install any optional files
@@ -349,7 +345,7 @@ fi
# reconstitued before they can be used.
echo " Refreshing..."
-cd ${TOPDIR} || { echo "Failed to cd to ${TOPDIR}"; exit 11; }
+cd ${TOPDIR} || { echo "Failed to cd to ${TOPDIR}"; exit 10; }
MAKE_BIN=make
if [ ! -z `which gmake 2>/dev/null` ]; then
diff --git a/tools/refresh.sh b/tools/refresh.sh
index db33cd962b2..cc65fbf5182 100755
--- a/tools/refresh.sh
+++ b/tools/refresh.sh
@@ -1,7 +1,7 @@
#!/bin/bash
# refresh.sh
#
-# Copyright (C) 2014, 2016-2017 Gregory Nutt. All rights reserved.
+# Copyright (C) 2014, 2016-2017, 2019 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt
#
# Redistribution and use in source and binary forms, with or without
@@ -112,7 +112,6 @@ else
BOARDSUBDIR=`echo ${CONFIG} | cut -d':' -f1`
fi
-
# Where are we
MYNAME=`basename $0`