1
0
Fork 0
forked from nuttx/nuttx-update

tools/refresh.sh: Add a --prompt option that will let you use --silent but will prompt before overwriting the original defconfig. arch/arm/src/stm32/Kconfig: Fix a HRTIM configuration error found in build testing.

This commit is contained in:
Gregory Nutt 2018-06-28 17:12:30 -06:00
parent 67810d70d9
commit f159f1089a
2 changed files with 18 additions and 9 deletions

View file

@ -2367,14 +2367,14 @@ config STM32_HASH
depends on STM32_STM32F207 || STM32_STM32F4XXX depends on STM32_STM32F207 || STM32_STM32F4XXX
config STM32_HRTIM config STM32_HRTIM
bool "HRTIM" bool
default n default n
config STM32_HRTIM1 config STM32_HRTIM1
bool "HRTIM1" bool "HRTIM1"
default n default n
depends on STM32_HAVE_HRTIM1 depends on STM32_HAVE_HRTIM1
select HRTIM select STM32_HRTIM
if STM32_HRTIM1 if STM32_HRTIM1

View file

@ -38,6 +38,7 @@ ADVICE="Try '$0 --help' for more information"
unset CONFIG unset CONFIG
silent=n silent=n
defaults=n defaults=n
prompt=y
while [ ! -z "$1" ]; do while [ ! -z "$1" ]; do
case $1 in case $1 in
@ -47,6 +48,10 @@ while [ ! -z "$1" ]; do
--silent ) --silent )
silent=y silent=y
defaults=y defaults=y
prompt=n
;;
--prompt )
prompt=y
;; ;;
--defaults ) --defaults )
defaults=y defaults=y
@ -60,7 +65,11 @@ while [ ! -z "$1" ]; do
echo " --debug" echo " --debug"
echo " Enable script debug" echo " Enable script debug"
echo " --silent" echo " --silent"
echo " Update board configuration without interaction" echo " Update board configuration without interaction. Implies --defaults."
echo " Assumes no prompt for save. Use --silent --prompt to prompt before saving."
echo " --prompt"
echo " Prompt before updating and overwriting the defconfig file. Default is to"
echo " prompt unless --silent"
echo " --defaults" echo " --defaults"
echo " Do not prompt for new default selections; accept all recommended default values" echo " Do not prompt for new default selections; accept all recommended default values"
echo " --help" echo " --help"
@ -213,12 +222,7 @@ $CMPCONFIG $DEFCONFIG defconfig
# Save the refreshed configuration # Save the refreshed configuration
if [ "X${silent}" == "Xy" ]; then if [ "X${prompt}" == "Xy" ]; then
echo "Saving the new configuration file"
mv defconfig $DEFCONFIG || \
{ echo "ERROR: Failed to move defconfig to $DEFCONFIG"; exit 1; }
chmod 644 $DEFCONFIG
else
read -p "Save the new configuration (y/n)?" -n 1 -r read -p "Save the new configuration (y/n)?" -n 1 -r
echo echo
if [[ $REPLY =~ ^[Yy]$ ]] if [[ $REPLY =~ ^[Yy]$ ]]
@ -228,6 +232,11 @@ else
{ echo "ERROR: Failed to move defconfig to $DEFCONFIG"; exit 1; } { echo "ERROR: Failed to move defconfig to $DEFCONFIG"; exit 1; }
chmod 644 $DEFCONFIG chmod 644 $DEFCONFIG
fi fi
else
echo "Saving the new configuration file"
mv defconfig $DEFCONFIG || \
{ echo "ERROR: Failed to move defconfig to $DEFCONFIG"; exit 1; }
chmod 644 $DEFCONFIG
fi fi
# Restore any previous .config and Make.defs files # Restore any previous .config and Make.defs files