diff options
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', |