mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 08:42:12 +02:00
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 <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
committed by
Tom Rini
parent
b8828e8ff3
commit
13246f4861
@@ -215,7 +215,10 @@ class DotConfigParser:
|
|||||||
# sanity check of '.config' file
|
# sanity check of '.config' file
|
||||||
for field in self.must_fields:
|
for field in self.must_fields:
|
||||||
if not field in 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
|
# fix-up for aarch64
|
||||||
if fields['arch'] == 'arm' and 'cpu' in fields:
|
if fields['arch'] == 'arm' and 'cpu' in fields:
|
||||||
@@ -307,7 +310,11 @@ class Slot:
|
|||||||
return True
|
return True
|
||||||
if self.ps.poll() == None:
|
if self.ps.poll() == None:
|
||||||
return False
|
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
|
self.occupied = False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user