From mboxrd@z Thu Jan 1 00:00:00 1970 From: Masahiro Yamada Date: Wed, 20 Aug 2014 20:47:45 +0900 Subject: [U-Boot] [PATCH 3/7] tools/genboardscfg.py: be tolerant of insane Kconfig In-Reply-To: <1408535269-24066-1-git-send-email-yamada.m@jp.panasonic.com> References: <1408535269-24066-1-git-send-email-yamada.m@jp.panasonic.com> Message-ID: <1408535269-24066-4-git-send-email-yamada.m@jp.panasonic.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de The tools/genboardscfg.py expects all the Kconfig and defconfig are written correctly. Imagine someone accidentally has broken a board. Error-out just for one broken board is annoying for the other developers. Let the tool skip insane boards and continue processing. Signed-off-by: Masahiro Yamada --- tools/genboardscfg.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tools/genboardscfg.py b/tools/genboardscfg.py index 03bd5b3..bdedb00 100755 --- a/tools/genboardscfg.py +++ b/tools/genboardscfg.py @@ -217,7 +217,10 @@ class DotConfigParser: # sanity check of '.config' file for field in self.must_fields: if not field in fields: - sys.exit('Error: %s is not defined in %s' % (field, defconfig)) + print >> sys.stderr, ( + "WARNING: '%s' is not defined in '%s'. Skip." % + (field, defconfig)) + return # fix-up for aarch64 and tegra if fields['arch'] == 'arm' and 'cpu' in fields: @@ -311,7 +314,11 @@ class Slot: return True if self.ps.poll() == None: return False - self.parser.parse(self.defconfig) + if self.ps.poll() == 0: + self.parser.parse(self.defconfig) + else: + print >> sys.stderr, ("WARNING: failed to process '%s'. skip." % + self.defconfig) self.occupied = False return True -- 1.9.1