From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joe Hershberger Date: Tue, 19 May 2015 13:21:18 -0500 Subject: [U-Boot] [PATCH v5 2/9] moveconfig: Ignore duplicate configs when moving In-Reply-To: <1432059685-3018-1-git-send-email-joe.hershberger@ni.com> References: <1431726052-6519-1-git-send-email-joe.hershberger@ni.com> <1432059685-3018-1-git-send-email-joe.hershberger@ni.com> Message-ID: <1432059685-3018-2-git-send-email-joe.hershberger@ni.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de When moving configs, it is important to know what was defined in the config header even if it duplicates the configs coming from Kconfig. This is specifically needed for the case where a config is set to default 'y' in the Kconfig. This would previously cause the actual value from the include config to be filtered out, and moveconfig.py would think that it was 'n'... This means that the value that should be 'y' is now (in every defconfig) set to 'not set'. tools/moveconfig.py now defines KCONFIG_IGNORE_DUPLICATES to prevent the filtering from happening and selecting wrong values for the defconfig. Signed-off-by: Joe Hershberger Acked-by: Masahiro Yamada --- Changes in v5: None Changes in v4: None Changes in v3: -New for version 3 Changes in v2: None scripts/Makefile.autoconf | 3 ++- tools/moveconfig.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/Makefile.autoconf b/scripts/Makefile.autoconf index f054081..36bfa17 100644 --- a/scripts/Makefile.autoconf +++ b/scripts/Makefile.autoconf @@ -58,7 +58,8 @@ quiet_cmd_autoconf = GEN $@ $(CPP) $(c_flags) $2 -DDO_DEPS_ONLY -dM $(srctree)/include/common.h > $@.tmp && { \ sed -n -f $(srctree)/tools/scripts/define2mk.sed $@.tmp | \ while read line; do \ - if ! grep -q "$${line%=*}=" include/config/auto.conf; then \ + if [ -n "${KCONFIG_IGNORE_DUPLICATES}" ] || \ + ! grep -q "$${line%=*}=" include/config/auto.conf; then \ echo "$$line"; \ fi \ done > $@; \ diff --git a/tools/moveconfig.py b/tools/moveconfig.py index c9984b4..dd9434d 100755 --- a/tools/moveconfig.py +++ b/tools/moveconfig.py @@ -627,6 +627,7 @@ class Slot: cmd = list(self.make_cmd) if cross_compile: cmd.append('CROSS_COMPILE=%s' % cross_compile) + cmd.append('KCONFIG_IGNORE_DUPLICATES=1') cmd.append('include/config/auto.conf') self.ps = subprocess.Popen(cmd, stdout=self.devnull) self.state = STATE_AUTOCONF -- 1.7.11.5