From 0a5ef2a2612dffa1a3c8b3c4d618ca72ab84c0f0 Mon Sep 17 00:00:00 2001 From: Josh Lehan Date: Wed, 26 Feb 2020 12:11:33 -0800 Subject: 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 Change-Id: I37d5daf038348576c43f5c1fb9e517e6e8aa37a0 Signed-off-by: Andrew Geissler --- meta-phosphor/classes/image_types_phosphor.bbclass | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'meta-phosphor/classes') 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', -- cgit v1.2.3