cgpt: add non-layout specific config data to debug output.
This makes it easier to test configs are correct.
BUG=chromium:334916
TEST=Ran it with usb layout
Change-Id: I1388c95e7edff54b0e17eac8cd7d4b4ab5555723
Reviewed-on: https://chromium-review.googlesource.com/185945
Reviewed-by: Chris Sosa <sosa@chromium.org>
Commit-Queue: Chris Sosa <sosa@chromium.org>
Tested-by: Chris Sosa <sosa@chromium.org>
diff --git a/build_library/cgpt.py b/build_library/cgpt.py
index ef5a1ac..c65f3f1 100755
--- a/build_library/cgpt.py
+++ b/build_library/cgpt.py
@@ -760,12 +760,22 @@
image_type: Type of image eg base/test/dev/factory_install
layout_filename: Path to partition configuration file
"""
- partitions = GetPartitionTableFromConfig(options, layout_filename, image_type)
+ config = LoadPartitionConfig(layout_filename)
+ partitions = GetPartitionTable(options, config, image_type)
label_len = max([len(x['label']) for x in partitions if 'label' in x])
type_len = max([len(x['type']) for x in partitions if 'type' in x])
msg = 'num:%4s label:%-*s type:%-*s size:%-10s fs_size:%-10s features:%s'
+
+ # Print out non-layout options first.
+ print 'Config Data'
+ metadata_msg = 'field:%-14s value:%s'
+ for key in config.keys():
+ if key not in ('layouts', '_comment'):
+ print metadata_msg % (key, config[key])
+
+ print '\n%s Layout Data' % image_type.upper()
for partition in partitions:
if partition['bytes'] < 1024 * 1024:
size = '%d B' % partition['bytes']