]> git.sur5r.net Git - u-boot/blobdiff - scripts/multiconfig.sh
sunxi: Use PG3 - PG8 as io-pins for mmc1
[u-boot] / scripts / multiconfig.sh
index b5185a84cf62c4ccc224c270b77ef66ce87f3348..3e3040b2e2ab9210ebef73859b93e158d2875ecc 100644 (file)
@@ -69,8 +69,8 @@ get_enabled_subimages() {
 
        # CONFIG_SPL=y -> spl
        # CONFIG_TPL=y -> tpl
-       sed -n -e 's/^CONFIG_\(SPL\|TPL\)=y$/\1/p' $KCONFIG_CONFIG | \
-                                                       tr '[A-Z]' '[a-z]'
+       sed -n -e 's/^CONFIG_SPL=y$/spl/p' -e 's/^CONFIG_TPL=y$/tpl/p' \
+                                                        $KCONFIG_CONFIG
 }
 
 do_silentoldconfig () {
@@ -120,7 +120,7 @@ do_board_defconfig () {
 
        if [ ! -r $defconfig_path ]; then
                echo >&2 "***"
-               echo >&2 "*** Can't find default configuration \"confis/$1\"!"
+               echo >&2 "*** Can't find default configuration \"configs/$1\"!"
                echo >&2 "***"
                exit 1
        fi
@@ -297,9 +297,24 @@ do_others () {
        else
                objdir=${1%/*}
                check_enabled_subimage $1 $objdir
+
+               if [ -f "$objdir/$KCONFIG_CONFIG" ]; then
+                       timestamp_before=$(stat --printf="%Y" \
+                                               $objdir/$KCONFIG_CONFIG)
+               fi
        fi
 
        run_make_config $target $objdir
+
+       if [ "$timestamp_before" -a -f "$objdir/$KCONFIG_CONFIG" ]; then
+               timestamp_after=$(stat --printf="%Y" $objdir/$KCONFIG_CONFIG)
+
+               if [ "$timestamp_after" -gt "$timestamp_before" ]; then
+                       # $objdir/.config has been updated.
+                       # touch .config to invoke "make silentoldconfig"
+                       touch $KCONFIG_CONFIG
+               fi
+       fi
 }
 
 progname=$(basename $0)