2008-03-04 01:40:49 +01:00
|
|
|
#!/bin/bash
|
2018-06-02 19:05:54 +02:00
|
|
|
# tools/configure.sh
|
2007-02-18 00:21:28 +01:00
|
|
|
#
|
2019-08-05 17:03:12 +02:00
|
|
|
# Copyright (C) 2007, 2008, 2011, 2015, 2017-2019 Gregory Nutt. All rights
|
2018-04-25 16:28:49 +02:00
|
|
|
# reserved.
|
2012-09-01 17:33:33 +02:00
|
|
|
# Author: Gregory Nutt <gnutt@nuttx.org>
|
2007-02-18 00:21:28 +01:00
|
|
|
#
|
|
|
|
# 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.
|
2008-08-29 17:36:02 +02:00
|
|
|
# 3. Neither the name NuttX nor the names of its contributors may be
|
2007-02-18 00:21:28 +01:00
|
|
|
# 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.
|
|
|
|
#
|
|
|
|
|
2017-06-15 14:12:56 +02:00
|
|
|
WD=`test -d ${0%/*} && cd ${0%/*}; pwd`
|
2008-01-08 00:13:12 +01:00
|
|
|
TOPDIR="${WD}/.."
|
2011-03-19 14:28:07 +01:00
|
|
|
USAGE="
|
|
|
|
|
2019-08-06 16:36:40 +02:00
|
|
|
USAGE: ${0} [-d] [-l|m|c|u|g|n] [-a <app-dir>] <board-name>[:<config-name>]
|
2011-03-19 14:28:07 +01:00
|
|
|
|
|
|
|
Where:
|
2017-11-10 00:11:59 +01:00
|
|
|
-l selects the Linux (l) host environment.
|
|
|
|
-m selects the macOS (m) host environment.
|
|
|
|
-c selects the Windows host and Cygwin (c) environment.
|
|
|
|
-u selects the Windows host and Ubuntu under Windows 10 (u) environment.
|
2018-05-31 19:53:09 +02:00
|
|
|
-g selects the Windows host and MinGW/MSYS environment.
|
2017-11-10 00:11:59 +01:00
|
|
|
-n selects the Windows host and Windows native (n) environment.
|
|
|
|
Default: Use host setup in the defconfig file
|
|
|
|
Default Windows: Cygwin
|
2019-08-05 14:04:14 +02:00
|
|
|
<board-name> is the name of the board in the boards directory
|
2019-08-05 16:30:34 +02:00
|
|
|
configs/<config-name> is the name of the board configuration sub-directory
|
2017-07-10 17:38:45 +02:00
|
|
|
<app-dir> is the path to the apps/ directory, relative to the nuttx
|
|
|
|
directory
|
2011-03-19 14:28:07 +01:00
|
|
|
|
|
|
|
"
|
2007-02-18 00:21:28 +01:00
|
|
|
|
2017-06-15 16:24:28 +02:00
|
|
|
# A list of optional files that may be installed
|
|
|
|
|
|
|
|
OPTFILES="\
|
2017-06-15 17:59:32 +02:00
|
|
|
.gdbinit\
|
|
|
|
.cproject\
|
|
|
|
.project\
|
2017-06-15 16:24:28 +02:00
|
|
|
"
|
|
|
|
|
2011-03-18 18:22:50 +01:00
|
|
|
# Parse command arguments
|
2007-02-18 00:21:28 +01:00
|
|
|
|
2011-03-18 18:22:50 +01:00
|
|
|
unset boardconfig
|
|
|
|
unset appdir
|
2017-07-10 17:38:45 +02:00
|
|
|
unset host
|
|
|
|
unset wenv
|
2011-03-18 18:22:50 +01:00
|
|
|
|
|
|
|
while [ ! -z "$1" ]; do
|
|
|
|
case "$1" in
|
2017-07-10 17:38:45 +02:00
|
|
|
-a )
|
|
|
|
shift
|
|
|
|
appdir=$1
|
|
|
|
;;
|
|
|
|
-c )
|
|
|
|
host=windows
|
|
|
|
wenv=cygwin
|
|
|
|
;;
|
2011-03-18 18:22:50 +01:00
|
|
|
-d )
|
|
|
|
set -x
|
|
|
|
;;
|
2018-05-31 19:53:09 +02:00
|
|
|
-g )
|
|
|
|
host=windows
|
|
|
|
wenv=msys
|
|
|
|
;;
|
2011-03-18 18:22:50 +01:00
|
|
|
-h )
|
2011-03-19 14:28:07 +01:00
|
|
|
echo "$USAGE"
|
2011-03-18 18:22:50 +01:00
|
|
|
exit 0
|
|
|
|
;;
|
2017-07-10 17:38:45 +02:00
|
|
|
-l )
|
|
|
|
host=linux
|
|
|
|
;;
|
2017-11-10 00:11:59 +01:00
|
|
|
-m )
|
|
|
|
host=macos
|
|
|
|
;;
|
2017-07-10 17:38:45 +02:00
|
|
|
-n )
|
|
|
|
host=windows
|
|
|
|
wenv=native
|
|
|
|
;;
|
|
|
|
-u )
|
|
|
|
host=windows
|
|
|
|
wenv=ubuntu
|
2011-03-18 18:22:50 +01:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
if [ ! -z "${boardconfig}" ]; then
|
|
|
|
echo ""
|
2019-08-05 17:03:12 +02:00
|
|
|
echo "<board/config> defined twice"
|
2011-03-18 18:22:50 +01:00
|
|
|
echo "$USAGE"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
boardconfig=$1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
shift
|
|
|
|
done
|
|
|
|
|
|
|
|
# Sanity checking
|
|
|
|
|
|
|
|
if [ -z "${boardconfig}" ]; then
|
|
|
|
echo ""
|
2019-08-05 17:03:12 +02:00
|
|
|
echo "Missing <board/config> argument"
|
2011-03-18 18:22:50 +01:00
|
|
|
echo "$USAGE"
|
|
|
|
exit 2
|
2007-02-18 00:21:28 +01:00
|
|
|
fi
|
|
|
|
|
2019-08-06 00:53:39 +02:00
|
|
|
configdir=`echo ${boardconfig} | cut -s -d':' -f2`
|
|
|
|
if [ -z "${configdir}" ]; then
|
2019-08-06 16:36:40 +02:00
|
|
|
boarddir=`echo ${boardconfig} | cut -d'/' -f1`
|
|
|
|
configdir=`echo ${boardconfig} | cut -d'/' -f2`
|
2019-08-06 00:53:39 +02:00
|
|
|
else
|
|
|
|
boarddir=`echo ${boardconfig} | cut -d':' -f1`
|
|
|
|
fi
|
2019-08-05 17:03:12 +02:00
|
|
|
|
2019-08-06 18:39:12 +02:00
|
|
|
# Try to detect architecture for convenience.
|
|
|
|
|
2019-08-06 16:37:27 +02:00
|
|
|
archs="arm avr hc mips misoc or1k renesas risc-v sim x86 xtensa z16 z80"
|
|
|
|
|
|
|
|
for arc in ${archs}; do
|
2019-08-06 18:51:39 +02:00
|
|
|
if [ -f ${TOPDIR}/boards/${arc}/${boarddir}/Kconfig ]; then
|
2019-08-06 18:39:12 +02:00
|
|
|
archdir=${arc}
|
|
|
|
echo " Detected ${archdir} Architecture"
|
2019-08-06 16:37:27 +02:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
configpath=${TOPDIR}/boards/${archdir}/${boarddir}/configs/${configdir}
|
2011-03-18 18:22:50 +01:00
|
|
|
if [ ! -d "${configpath}" ]; then
|
2019-08-06 18:39:12 +02:00
|
|
|
# Try direct path used with custom configurations.
|
2017-06-15 16:24:28 +02:00
|
|
|
|
2017-06-15 14:12:56 +02:00
|
|
|
configpath=${TOPDIR}/${boardconfig}
|
|
|
|
if [ ! -d "${configpath}" ]; then
|
2019-08-06 16:36:40 +02:00
|
|
|
echo "Directory for ${boardconfig} does not exist. Options are:"
|
2017-06-15 14:12:56 +02:00
|
|
|
echo ""
|
|
|
|
echo "Select one of the following options for <board-name>:"
|
2019-08-05 14:04:14 +02:00
|
|
|
configlist=`find ${TOPDIR}/boards -name defconfig`
|
2017-06-15 14:12:56 +02:00
|
|
|
for defconfig in ${configlist}; do
|
2019-08-06 18:39:12 +02:00
|
|
|
config=`dirname ${defconfig} | sed -e "s,${TOPDIR}/boards/,,g"`
|
|
|
|
boardname=`echo ${config} | cut -d'/' -f2`
|
|
|
|
configname=`echo ${config} | cut -d'/' -f4`
|
|
|
|
echo " ${boardname}:${configname}"
|
2017-06-15 14:12:56 +02:00
|
|
|
done
|
|
|
|
echo ""
|
|
|
|
echo "$USAGE"
|
2019-08-06 16:36:40 +02:00
|
|
|
exit 3
|
2017-06-15 14:12:56 +02:00
|
|
|
fi
|
2011-03-18 18:22:50 +01:00
|
|
|
fi
|
|
|
|
|
2019-08-06 16:37:27 +02:00
|
|
|
src_makedefs="${TOPDIR}/boards/${archdir}/${boarddir}/configs/${configdir}/Make.defs"
|
2012-11-09 23:37:52 +01:00
|
|
|
dest_makedefs="${TOPDIR}/Make.defs"
|
|
|
|
|
|
|
|
if [ ! -r "${src_makedefs}" ]; then
|
2019-08-06 16:37:27 +02:00
|
|
|
src_makedefs="${TOPDIR}/boards/${archdir}/${boarddir}/scripts/Make.defs"
|
2017-07-11 01:00:54 +02:00
|
|
|
|
|
|
|
if [ ! -r "${src_makedefs}" ]; then
|
2019-08-06 16:36:40 +02:00
|
|
|
src_makedefs="${TOPDIR}/${boardconfig}/Make.defs"
|
|
|
|
if [ ! -r "${src_makedefs}" ]; then
|
|
|
|
echo "File Make.defs could not be found"
|
|
|
|
exit 4
|
|
|
|
fi
|
2017-07-11 01:00:54 +02:00
|
|
|
fi
|
2007-02-18 00:21:28 +01:00
|
|
|
fi
|
|
|
|
|
2012-11-09 23:37:52 +01:00
|
|
|
src_config="${configpath}/defconfig"
|
|
|
|
dest_config="${TOPDIR}/.config"
|
|
|
|
|
|
|
|
if [ ! -r "${src_config}" ]; then
|
|
|
|
echo "File \"${src_config}\" does not exist"
|
2019-08-06 16:36:40 +02:00
|
|
|
exit 5
|
2007-02-18 00:21:28 +01:00
|
|
|
fi
|
|
|
|
|
2017-07-10 17:38:45 +02:00
|
|
|
if [ -r ${dest_config} ]; then
|
|
|
|
echo "Already configured!"
|
|
|
|
echo "Do 'make distclean' and try again."
|
2019-08-06 16:36:40 +02:00
|
|
|
exit 6
|
2017-07-10 17:38:45 +02:00
|
|
|
fi
|
|
|
|
|
2012-09-03 17:16:32 +02:00
|
|
|
# Extract values needed from the defconfig file. We need:
|
2014-03-06 20:00:50 +01:00
|
|
|
# (1) The CONFIG_WINDOWS_NATIVE setting to know it this is target for a
|
2017-04-26 18:28:37 +02:00
|
|
|
# native Windows
|
2014-03-06 20:00:50 +01:00
|
|
|
# (2) The CONFIG_APPS_DIR setting to see if there is a configured location for the
|
2012-11-21 18:44:14 +01:00
|
|
|
# application directory. This can be overridden from the command line.
|
2012-09-03 17:16:32 +02:00
|
|
|
|
2017-10-01 19:49:17 +02:00
|
|
|
# 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
|
|
|
|
|
2017-10-01 20:45:29 +02:00
|
|
|
# If no application directory was provided on the command line and we are
|
2017-10-01 19:49:17 +02:00
|
|
|
# switching between a windows native host and some other host then ignore the
|
2017-10-01 20:45:29 +02:00
|
|
|
# path to the apps/ directory in the defconfig file. It will most certainly
|
|
|
|
# not be in a usable form.
|
2012-09-03 17:16:32 +02:00
|
|
|
|
2012-09-06 03:19:05 +02:00
|
|
|
defappdir=y
|
2017-10-01 19:49:17 +02:00
|
|
|
if [ -z "${appdir}" -a "X$oldnative" = "$winnative" ]; then
|
2012-11-09 23:37:52 +01:00
|
|
|
quoted=`grep "^CONFIG_APPS_DIR=" "${src_config}" | cut -d'=' -f2`
|
2015-08-11 16:33:14 +02:00
|
|
|
if [ ! -z "${quoted}" ]; then
|
2012-09-08 18:40:12 +02:00
|
|
|
appdir=`echo ${quoted} | sed -e "s/\"//g"`
|
2012-09-06 03:19:05 +02:00
|
|
|
defappdir=n
|
|
|
|
fi
|
2012-09-03 17:16:32 +02:00
|
|
|
fi
|
|
|
|
|
2012-09-04 02:54:09 +02:00
|
|
|
# Check for the apps/ directory in the usual place if appdir was not provided
|
2011-03-18 18:22:50 +01:00
|
|
|
|
|
|
|
if [ -z "${appdir}" ]; then
|
2011-03-20 23:07:56 +01:00
|
|
|
|
|
|
|
# Check for a version file
|
|
|
|
|
2011-04-14 19:28:21 +02:00
|
|
|
unset CONFIG_VERSION_STRING
|
2011-03-20 23:07:56 +01:00
|
|
|
if [ -x "${TOPDIR}/.version" ]; then
|
2011-08-28 14:32:14 +02:00
|
|
|
. "${TOPDIR}/.version"
|
2011-03-20 23:07:56 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
# Check for an unversioned apps/ directory
|
2014-04-14 00:22:22 +02:00
|
|
|
|
2011-03-18 18:22:50 +01:00
|
|
|
if [ -d "${TOPDIR}/../apps" ]; then
|
2011-03-19 14:28:07 +01:00
|
|
|
appdir="../apps"
|
2011-03-20 23:07:56 +01:00
|
|
|
else
|
|
|
|
# Check for a versioned apps/ directory
|
|
|
|
|
2011-04-14 19:28:21 +02:00
|
|
|
if [ -d "${TOPDIR}/../apps-${CONFIG_VERSION_STRING}" ]; then
|
|
|
|
appdir="../apps-${CONFIG_VERSION_STRING}"
|
2014-04-14 00:22:22 +02:00
|
|
|
fi
|
2011-03-18 18:22:50 +01:00
|
|
|
fi
|
2007-02-18 00:21:28 +01:00
|
|
|
fi
|
|
|
|
|
2012-11-21 18:44:14 +01:00
|
|
|
# For checking the apps dir path, we need a POSIX version of the relative path.
|
|
|
|
|
2012-11-21 20:54:44 +01:00
|
|
|
posappdir=`echo "${appdir}" | sed -e 's/\\\\/\\//g'`
|
2018-11-05 23:35:28 +01:00
|
|
|
winappdir=`echo "${appdir}" | sed -e 's/\\//\\\\\\\/g'`
|
2012-11-21 18:44:14 +01:00
|
|
|
|
2012-09-04 02:54:09 +02:00
|
|
|
# If appsdir was provided (or discovered) then make sure that the apps/
|
|
|
|
# directory exists
|
|
|
|
|
2012-11-21 18:44:14 +01:00
|
|
|
if [ ! -z "${appdir}" -a ! -d "${TOPDIR}/${posappdir}" ]; then
|
|
|
|
echo "Directory \"${TOPDIR}/${posappdir}\" does not exist"
|
2019-08-06 16:36:40 +02:00
|
|
|
exit 7
|
2012-09-04 02:54:09 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
# Okay... Everything looks good. Setup the configuration
|
2011-03-18 18:22:50 +01:00
|
|
|
|
2017-07-10 17:38:45 +02:00
|
|
|
echo " Copy files"
|
2014-02-24 14:48:35 +01:00
|
|
|
install -m 644 "${src_makedefs}" "${dest_makedefs}" || \
|
2019-08-06 16:36:40 +02:00
|
|
|
{ echo "Failed to copy \"${src_makedefs}\"" ; exit 8 ; }
|
2014-02-24 14:48:35 +01:00
|
|
|
install -m 644 "${src_config}" "${dest_config}" || \
|
2019-08-06 16:36:40 +02:00
|
|
|
{ echo "Failed to copy \"${src_config}\"" ; exit 9 ; }
|
2017-06-15 16:24:28 +02:00
|
|
|
|
|
|
|
# Install any optional files
|
|
|
|
|
|
|
|
for opt in ${OPTFILES}; do
|
|
|
|
test -f "${configpath}/${opt}" && install "${configpath}/${opt}" "${TOPDIR}/"
|
|
|
|
done
|
2011-03-18 18:22:50 +01:00
|
|
|
|
2012-09-08 18:40:12 +02:00
|
|
|
# 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
|
|
|
|
|
|
|
|
if [ "X${defappdir}" = "Xy" ]; then
|
2014-05-25 15:38:32 +02:00
|
|
|
# In-place edit can mess up permissions on Windows
|
|
|
|
# sed -i -e "/^CONFIG_APPS_DIR/d" "${dest_config}"
|
|
|
|
sed -e "/^CONFIG_APPS_DIR/d" "${dest_config}" > "${dest_config}-temp"
|
|
|
|
mv "${dest_config}-temp" "${dest_config}"
|
|
|
|
|
2012-11-21 20:54:44 +01:00
|
|
|
if [ "X${winnative}" = "Xy" ]; then
|
2013-01-05 14:19:53 +01:00
|
|
|
echo "CONFIG_APPS_DIR=\"$winappdir\"" >> "${dest_config}"
|
2012-11-21 18:44:14 +01:00
|
|
|
else
|
2013-01-05 14:19:53 +01:00
|
|
|
echo "CONFIG_APPS_DIR=\"$posappdir\"" >> "${dest_config}"
|
2012-11-21 18:44:14 +01:00
|
|
|
fi
|
2014-04-14 00:22:22 +02:00
|
|
|
fi
|
2017-07-10 17:38:45 +02:00
|
|
|
|
|
|
|
if [ ! -z "$host" ]; then
|
2017-10-01 22:24:57 +02:00
|
|
|
sed -i -e "/CONFIG_HOST_LINUX/d" ${dest_config}
|
|
|
|
sed -i -e "/CONFIG_HOST_WINDOWS/d" ${dest_config}
|
2018-06-01 21:25:50 +02:00
|
|
|
sed -i -e "/CONFIG_HOST_MACOS/d" ${dest_config}
|
2017-07-10 17:38:45 +02:00
|
|
|
sed -i -e "/CONFIG_HOST_OTHER/d" ${dest_config}
|
2017-10-01 22:24:57 +02:00
|
|
|
sed -i -e "/CONFIG_WINDOWS_NATIVE/d" ${dest_config}
|
|
|
|
sed -i -e "/CONFIG_WINDOWS_CYGWIN/d" ${dest_config}
|
|
|
|
sed -i -e "/CONFIG_WINDOWS_MSYS/d" ${dest_config}
|
|
|
|
sed -i -e "/CONFIG_WINDOWS_UBUNTU/d" ${dest_config}
|
|
|
|
sed -i -e "/CONFIG_WINDOWS_OTHER/d" ${dest_config}
|
|
|
|
sed -i -e "/CONFIG_SIM_X8664_MICROSOFT/d" ${dest_config}
|
|
|
|
sed -i -e "/CONFIG_SIM_X8664_SYSTEMV/d" ${dest_config}
|
|
|
|
sed -i -e "/CONFIG_SIM_M32/d" ${dest_config}
|
2017-07-10 17:38:45 +02:00
|
|
|
|
2017-11-10 00:11:59 +01:00
|
|
|
case "$host" in
|
|
|
|
"linux")
|
|
|
|
echo " Select CONFIG_HOST_LINUX=y"
|
|
|
|
echo "CONFIG_HOST_LINUX=y" >> "${dest_config}"
|
|
|
|
echo "CONFIG_SIM_X8664_SYSTEMV=y" >> "${dest_config}"
|
|
|
|
;;
|
2017-07-10 17:38:45 +02:00
|
|
|
|
2017-11-10 00:11:59 +01:00
|
|
|
"macos")
|
2018-06-01 21:25:50 +02:00
|
|
|
echo " Select CONFIG_HOST_MACOS=y"
|
|
|
|
echo "CONFIG_HOST_MACOS=y" >> "${dest_config}"
|
2017-11-10 00:11:59 +01:00
|
|
|
;;
|
|
|
|
|
|
|
|
"windows")
|
|
|
|
echo " Select CONFIG_HOST_WINDOWS=y"
|
|
|
|
echo "CONFIG_HOST_WINDOWS=y" >> "${dest_config}"
|
|
|
|
echo "CONFIG_SIM_X8664_MICROSOFT=y" >> "${dest_config}"
|
|
|
|
|
|
|
|
case "$wenv" in
|
|
|
|
"cygwin")
|
|
|
|
echo " Select CONFIG_WINDOWS_CYGWIN=y"
|
|
|
|
echo "CONFIG_WINDOWS_CYGWIN=y" >> "${dest_config}"
|
|
|
|
;;
|
|
|
|
|
2018-05-31 19:53:09 +02:00
|
|
|
"msys")
|
|
|
|
echo " Select CONFIG_WINDOWS_MSYS=y"
|
|
|
|
echo "CONFIG_WINDOWS_MSYS=y" >> "${dest_config}"
|
|
|
|
;;
|
|
|
|
|
2017-11-10 00:11:59 +01:00
|
|
|
"ubuntu")
|
|
|
|
echo " Select CONFIG_WINDOWS_UBUNTU=y"
|
|
|
|
echo "CONFIG_WINDOWS_UBUNTU=y" >> "${dest_config}"
|
|
|
|
;;
|
|
|
|
|
|
|
|
*)
|
|
|
|
echo " Select CONFIG_WINDOWS_NATIVE=y"
|
|
|
|
echo "CONFIG_WINDOWS_NATIVE=y" >> "${dest_config}"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
esac
|
2017-07-10 17:38:45 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
# The saved defconfig files are all in compressed format and must be
|
|
|
|
# reconstitued before they can be used.
|
|
|
|
|
|
|
|
echo " Refreshing..."
|
2019-08-06 16:36:40 +02:00
|
|
|
cd ${TOPDIR} || { echo "Failed to cd to ${TOPDIR}"; exit 10; }
|
2018-04-25 16:28:49 +02:00
|
|
|
|
2018-04-25 00:46:03 +02:00
|
|
|
MAKE_BIN=make
|
2018-04-25 16:28:49 +02:00
|
|
|
if [ ! -z `which gmake 2>/dev/null` ]; then
|
2018-04-25 00:46:03 +02:00
|
|
|
MAKE_BIN=gmake
|
|
|
|
fi
|
|
|
|
|
|
|
|
${MAKE_BIN} olddefconfig 1>/dev/null
|
2018-07-13 18:34:33 +02:00
|
|
|
|