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>
diff --git a/meta-phosphor/classes/image_types_phosphor.bbclass b/meta-phosphor/classes/image_types_phosphor.bbclass
index 10388d2..39534db 100644
--- a/meta-phosphor/classes/image_types_phosphor.bbclass
+++ b/meta-phosphor/classes/image_types_phosphor.bbclass
@@ -324,7 +324,11 @@
 
     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',