Build system: Add 'make oldconfig' target. Use this option in tools/testbuild.sh. Add --silent option to tools/refresh.sh so that it can be run in batch without human interaction

This commit is contained in:
Gregory Nutt
2016-03-08 16:50:58 -06:00
parent 1c31e10397
commit fea11c002a
6 changed files with 32 additions and 10 deletions
+3
View File
@@ -486,6 +486,9 @@ config: apps_preconfig
oldconfig: apps_preconfig
$(Q) APPSDIR=${CONFIG_APPS_DIR} kconfig-conf --oldconfig Kconfig
olddefconfig: apps_preconfig
$(Q) APPSDIR=${CONFIG_APPS_DIR} kconfig-conf --olddefconfig Kconfig
menuconfig: apps_preconfig
$(Q) APPSDIR=${CONFIG_APPS_DIR} kconfig-mconf Kconfig
+3
View File
@@ -486,6 +486,9 @@ config: apps_preconfig
oldconfig: apps_preconfig
$(Q) set APPSDIR=$(patsubst "%",%,${CONFIG_APPS_DIR})& kconfig-conf --oldconfig Kconfig
olddefconfig: apps_preconfig
$(Q) set APPSDIR=$(patsubst "%",%,${CONFIG_APPS_DIR})& kconfig-conf --olddefconfig Kconfig
menuconfig: configenv apps_preconfig
$(Q) set APPSDIR=$(patsubst "%",%,${CONFIG_APPS_DIR})& kconfig-mconf Kconfig
+1 -1
Submodule arch updated: c84c4f2edc...84aade6ed5
+1 -1
Submodule configs updated: 88faa8e05c...b2be018b28
+23 -6
View File
@@ -36,12 +36,16 @@ USAGE="USAGE: $0 [--debug|--help] <board>/<config>"
ADVICE="Try '$0 --help' for more information"
unset CONFIG
silent=n
while [ ! -z "$1" ]; do
case $1 in
--debug )
set -x
;;
--silent )
silent=y
;;
--help )
echo "$0 is a tool for refreshing board configurations"
echo ""
@@ -50,6 +54,8 @@ while [ ! -z "$1" ]; do
echo "Where:"
echo " --debug"
echo " Enable script debug"
echo " --silent"
echo " Update board configuration without interaction"
echo " --help"
echo " Show this help message and exit"
echo " <board>"
@@ -157,9 +163,13 @@ fi
cp -a $DEFCONFIG .config || \
{ echo "ERROR: Failed to copy $DEFCONFIG to .config"; exit 1; }
# Then run oldconfig
# Then run oldconfig or oldefconfig
make oldconfig
if [ "X${silent}" == "Xy" ]; then
make olddefconfig
else
make oldconfig
fi
# Show differences
@@ -168,14 +178,21 @@ $CMPCONFIG $DEFCONFIG .config
# Save the refreshed configuration
read -p "Save the new configuration (y/n)?" -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
if [ "X${silent}" == "Xy" ]; then
echo "Saving the new configuration file"
mv .config $DEFCONFIG || \
{ echo "ERROR: Failed to move .config to $DEFCONFIG"; exit 1; }
chmod 644 $DEFCONFIG
else
read -p "Save the new configuration (y/n)?" -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
echo "Saving the new configuration file"
mv .config $DEFCONFIG || \
{ echo "ERROR: Failed to move .config to $DEFCONFIG"; exit 1; }
chmod 644 $DEFCONFIG
fi
fi
# Restore any previous .config file
+1 -2
View File
@@ -193,8 +193,7 @@ function configure {
echo " Refreshing..."
cd $nuttx || { echo "ERROR: failed to CD to $nuttx"; exit 1; }
make context 1>/dev/null 2>&1
kconfig-conf --olddefconfig Kconfig 1>/dev/null
make olddefconfig 1>/dev/null 2>&1
}
# Perform the next build