From 13d2fe6edf47a2da500500ac40fcc506afef49ad Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sun, 1 Oct 2017 11:49:17 -0600 Subject: [PATCH] tools/configure.sh: Add special support so that you can start with a a windows native configuration and install on a different host (and vice versa). --- configs/z80sim/ostest/defconfig | 4 ++-- tools/configure.sh | 21 +++++++++++++++++++-- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/configs/z80sim/ostest/defconfig b/configs/z80sim/ostest/defconfig index 01830d44693..471c0400ca8 100644 --- a/configs/z80sim/ostest/defconfig +++ b/configs/z80sim/ostest/defconfig @@ -31,9 +31,9 @@ CONFIG_START_MONTH=2 CONFIG_START_YEAR=2007 CONFIG_STDIO_DISABLE_BUFFERING=y CONFIG_TASK_NAME_SIZE=0 -CONFIG_UART_RXBUFSIZE=32 +CONFIG_UART_RXBUFSIZE=64 CONFIG_UART_SERIAL_CONSOLE=y -CONFIG_UART_TXBUFSIZE=32 +CONFIG_UART_TXBUFSIZE=64 CONFIG_USER_ENTRYPOINT="ostest_main" CONFIG_USERMAIN_STACKSIZE=1024 CONFIG_WDOG_INTRESERVE=0 diff --git a/tools/configure.sh b/tools/configure.sh index a4cd288e2e8..af23c7af330 100755 --- a/tools/configure.sh +++ b/tools/configure.sh @@ -169,10 +169,27 @@ fi # (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. -winnative=`grep CONFIG_WINDOWS_NATIVE= "${src_config}" | cut -d'=' -f2` +# If we are going to some host other then windows native or to a windows +# native host, then don't even check what is in the defconfig file. + +oldnative=`grep CONFIG_WINDOWS_NATIVE= "${src_config}" | cut -d'=' -f2` +if [ "X$host" != "Xwindows" -o "X$wenv" != "Xnative" ]; then + unset winnative +else + if [ "X$host" == "Xwindows" -a "X$wenv" == "Xnative" ]; then + winnative=y + else + winnative=$oldnative + fi +fi + +# If not application direction was specified on the command line and we are +# switching between a windows native host and some other host then ignore the +# path to the apps/ direction in the defconfig file. It will most certainly +# not be a usable forma. defappdir=y -if [ -z "${appdir}" ]; then +if [ -z "${appdir}" -a "X$oldnative" = "$winnative" ]; then quoted=`grep "^CONFIG_APPS_DIR=" "${src_config}" | cut -d'=' -f2` if [ ! -z "${quoted}" ]; then appdir=`echo ${quoted} | sed -e "s/\"//g"`