From b50556655691694058e454373cb6193ab7c7bc7b Mon Sep 17 00:00:00 2001 From: patacongo Date: Thu, 7 Mar 2013 17:59:21 +0000 Subject: [PATCH] Fix network poll() issue: don't interrupt poll if socket not connected. Listen sockets are not connected and the poll() is waiting for connection events. git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5717 42af7a65-404d-4744-a932-0658087f49c3 --- configs/lm3s6965-ek/nsh/setenv.sh | 25 +++++++++++++++++++++---- configs/lm3s6965-ek/nx/setenv.sh | 25 +++++++++++++++++++++---- configs/lm3s6965-ek/ostest/setenv.sh | 25 +++++++++++++++++++++---- configs/lm3s6965-ek/tools/oocd.sh | 18 ++++++++++++------ 4 files changed, 75 insertions(+), 18 deletions(-) diff --git a/configs/lm3s6965-ek/nsh/setenv.sh b/configs/lm3s6965-ek/nsh/setenv.sh index 0636f2fed3..98ea7e573a 100755 --- a/configs/lm3s6965-ek/nsh/setenv.sh +++ b/configs/lm3s6965-ek/nsh/setenv.sh @@ -32,15 +32,32 @@ # POSSIBILITY OF SUCH DAMAGE. # -if [ "$(basename $0)" = "setenv.sh" ] ; then +if [ "$_" = "$0" ] ; then echo "You must source this script, not run it!" 1>&2 exit 1 fi -if [ -z "${PATH_ORIG}" ]; then export PATH_ORIG="${PATH}"; fi - WD=`pwd` +if [ ! -x "setenv.sh" ]; then + echo "This script must be executed from the top-level NuttX build directory" + exit 1 +fi + +if [ -z "${PATH_ORIG}" ]; then + export PATH_ORIG="${PATH}" +fi + +# This is the Cygwin path to the location where I build the buildroot +# toolchain. + export BUILDROOT_BIN="${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin" -export PATH="${BUILDROOT_BIN}:/sbin:/usr/sbin:${PATH_ORIG}" + +# This is the path to the LM3S6995-EK tools directory + +export TOOL_BIN="${WD}/configs/lm3s6965-ek/tools" + +# Update the PATH variable + +export PATH="${BUILDROOT_BIN}:${TOOL_BIN}:/sbin:/usr/sbin:${PATH_ORIG}" echo "PATH : ${PATH}" diff --git a/configs/lm3s6965-ek/nx/setenv.sh b/configs/lm3s6965-ek/nx/setenv.sh index 3edb2710ef..43bbeada95 100755 --- a/configs/lm3s6965-ek/nx/setenv.sh +++ b/configs/lm3s6965-ek/nx/setenv.sh @@ -32,15 +32,32 @@ # POSSIBILITY OF SUCH DAMAGE. # -if [ "$(basename $0)" = "setenv.sh" ] ; then +if [ "$_" = "$0" ] ; then echo "You must source this script, not run it!" 1>&2 exit 1 fi -if [ -z "${PATH_ORIG}" ]; then export PATH_ORIG="${PATH}"; fi - WD=`pwd` +if [ ! -x "setenv.sh" ]; then + echo "This script must be executed from the top-level NuttX build directory" + exit 1 +fi + +if [ -z "${PATH_ORIG}" ]; then + export PATH_ORIG="${PATH}" +fi + +# This is the Cygwin path to the location where I build the buildroot +# toolchain. + export BUILDROOT_BIN="${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin" -export PATH="${BUILDROOT_BIN}:/sbin:/usr/sbin:${PATH_ORIG}" + +# This is the path to the LM3S6995-EK tools directory + +export TOOL_BIN="${WD}/configs/lm3s6965-ek/tools" + +# Update the PATH variable + +export PATH="${BUILDROOT_BIN}:${TOOL_BIN}:/sbin:/usr/sbin:${PATH_ORIG}" echo "PATH : ${PATH}" diff --git a/configs/lm3s6965-ek/ostest/setenv.sh b/configs/lm3s6965-ek/ostest/setenv.sh index 686a617016..1ac3ec5e3b 100755 --- a/configs/lm3s6965-ek/ostest/setenv.sh +++ b/configs/lm3s6965-ek/ostest/setenv.sh @@ -32,15 +32,32 @@ # POSSIBILITY OF SUCH DAMAGE. # -if [ "$(basename $0)" = "setenv.sh" ] ; then +if [ "$_" = "$0" ] ; then echo "You must source this script, not run it!" 1>&2 exit 1 fi -if [ -z "${PATH_ORIG}" ]; then export PATH_ORIG="${PATH}"; fi - WD=`pwd` +if [ ! -x "setenv.sh" ]; then + echo "This script must be executed from the top-level NuttX build directory" + exit 1 +fi + +if [ -z "${PATH_ORIG}" ]; then + export PATH_ORIG="${PATH}" +fi + +# This is the Cygwin path to the location where I build the buildroot +# toolchain. + export BUILDROOT_BIN="${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin" -export PATH="${BUILDROOT_BIN}:/sbin:/usr/sbin:${PATH_ORIG}" + +# This is the path to the LM3S6995-EK tools directory + +export TOOL_BIN="${WD}/configs/lm3s6965-ek/tools" + +# Update the PATH variable + +export PATH="${BUILDROOT_BIN}:${TOOL_BIN}:/sbin:/usr/sbin:${PATH_ORIG}" echo "PATH : ${PATH}" diff --git a/configs/lm3s6965-ek/tools/oocd.sh b/configs/lm3s6965-ek/tools/oocd.sh index 758d114500..86eab3992b 100755 --- a/configs/lm3s6965-ek/tools/oocd.sh +++ b/configs/lm3s6965-ek/tools/oocd.sh @@ -13,15 +13,21 @@ fi # Assume that OpenOCD was installed and at /usr/local/bin. Uncomment # the following to run directly from the build directory -#OPENOCD_PATH="/home/OpenOCD/openocd/src" -#TARGET_PATH="/home/OpenOCD/openocd/tcl" -OPENOCD_PATH="/usr/bin" -TARGET_PATH="/usr/share/openocd/scripts" + +# OPENOCD_PATH="/home/OpenOCD/openocd/src" +# OPENOCD_PATH="/usr/bin" +OPENOCD_PATH="/usr/local/bin" + +# TARGET_PATH="/home/OpenOCD/openocd/tcl" +# TARGET_PATH="/usr/share/openocd/scripts" +TARGET_PATH="/usr/local/share/openocd/scripts" # Assume a Unix development environment. Uncomment to use a Windows # like environment -#OPENOCD_EXE=openocd.exe -OPENOCD_EXE=openocd + +OPENOCD_EXE=openocd.exe +# OPENOCD_EXE=openocd + OPENOCD_CFG="${TOPDIR}/configs/lm3s6965-ek/tools/lm3s6965-ek.cfg" OPENOCD_ARGS="-f ${OPENOCD_CFG} -s ${TARGET_PATH}"