diff options
author | Josh Lehan <krellan@google.com> | 2020-02-26 23:11:33 +0300 |
---|---|---|
committer | Andrew Geissler <geissonator@yahoo.com> | 2020-03-16 18:50:06 +0300 |
commit | 0a5ef2a2612dffa1a3c8b3c4d618ca72ab84c0f0 (patch) | |
tree | 5de60de8753c22a44bf9c99e4d5dd40d0cf5f191 /meta-phosphor/classes/image_types_phosphor.bbclass | |
parent | 6c2a55150fd20f016cad4fe289dd3e2d04713715 (diff) | |
download | openbmc-0a5ef2a2612dffa1a3c8b3c4d618ca72ab84c0f0.tar.xz |
image_types_phosphor: Add debug text for fs sizing
Debugging text to help with filesystem sizing
This can be useful when diagnosing sizing issues
No behavioral change intended
Tested: Output appears as expected
(From meta-phosphor rev: a68b23d5052d6650176547b6ba3a4d9ccf0dc08e)
Signed-off-by: Josh Lehan <krellan@google.com>
Change-Id: I37d5daf038348576c43f5c1fb9e517e6e8aa37a0
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Diffstat (limited to 'meta-phosphor/classes/image_types_phosphor.bbclass')
-rw-r--r-- | meta-phosphor/classes/image_types_phosphor.bbclass | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/meta-phosphor/classes/image_types_phosphor.bbclass b/meta-phosphor/classes/image_types_phosphor.bbclass index 10388d257..39534db8d 100644 --- a/meta-phosphor/classes/image_types_phosphor.bbclass +++ b/meta-phosphor/classes/image_types_phosphor.bbclass @@ -324,7 +324,11 @@ python do_generate_static() { def _append_image(imgpath, start_kb, finish_kb): imgsize = os.path.getsize(imgpath) - if imgsize > (finish_kb - start_kb) * 1024: + maxsize = (finish_kb - start_kb) * 1024 + bb.debug(1, 'Considering file size=' + str(imgsize) + ' name=' + imgpath) + bb.debug(1, 'Spanning start=' + str(start_kb) + 'K end=' + str(finish_kb) + 'K') + bb.debug(1, 'Compare needed=' + str(imgsize) + ' available=' + str(maxsize) + ' margin=' + str(maxsize - imgsize)) + if imgsize > maxsize: bb.fatal("Image '%s' is too large!" % imgpath) subprocess.check_call(['dd', 'bs=1k', 'conv=notrunc', |