From: Masahiro Yamada Date: Mon, 25 Aug 2014 03:39:44 +0000 (+0900) Subject: tools/genboardscfg.py: be tolerant of insane Kconfig X-Git-Tag: v2014.10-rc2~61 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=13246f48610757d1e5d7f4d92f35378e749235ec;p=u-boot tools/genboardscfg.py: be tolerant of insane Kconfig 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 Acked-by: Simon Glass --- diff --git a/tools/genboardscfg.py b/tools/genboardscfg.py index 18720a279b..1406acd46f 100755 --- a/tools/genboardscfg.py +++ b/tools/genboardscfg.py @@ -215,7 +215,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 if fields['arch'] == 'arm' and 'cpu' in fields: @@ -307,7 +310,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