[oe-commits] [openembedded-core] 41/41: image.bbclass: Add additional bb.debug to help track 12304
git at git.openembedded.org
git at git.openembedded.org
Mon Dec 18 18:05:18 UTC 2017
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master
in repository openembedded-core.
commit 978472c58629d1448399207873bbead96b27102e
Author: Saul Wold <sgw at linux.intel.com>
AuthorDate: Wed Dec 6 20:28:34 2017 -0800
image.bbclass: Add additional bb.debug to help track 12304
We actually caught the ext4 size issue in the wild with the debug
output in the oe_mkext234fs() code, but it did not help. What that
showed was that the get_rootfs_size was returning a default size of
8192, where as the actual rootfs was more like 10572, thus too large
to fit in the created sparse file.
This additional temporary debug code should help us determine where
the failure might be.
More debug for
[YOCTO #12304]
Signed-off-by: Saul Wold <sgw at linux.intel.com>
Signed-off-by: Ross Burton <ross.burton at intel.com>
---
meta/classes/image.bbclass | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index d93de02..ec940a4 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -534,21 +534,29 @@ def get_rootfs_size(d):
output = subprocess.check_output(['du', '-ks',
d.getVar('IMAGE_ROOTFS')])
size_kb = int(output.split()[0])
+
base_size = size_kb * overhead_factor
- base_size = max(base_size, rootfs_req_size) + rootfs_extra_space
+ bb.debug(1, '%f = %d * %f' % (base_size, size_kb, overhead_factor))
+ base_size2 = max(base_size, rootfs_req_size) + rootfs_extra_space
+ bb.debug(1, '%f = max(%f, %d)[%f] + %d' % (base_size2, base_size, rootfs_req_size, max(base_size, rootfs_req_size), overhead_factor))
+ base_size = base_size2
if base_size != int(base_size):
base_size = int(base_size + 1)
else:
base_size = int(base_size)
+ bb.debug(1, '%f = int(%f)' % (base_size, base_size2))
+ base_size_saved = base_size
base_size += rootfs_alignment - 1
base_size -= base_size % rootfs_alignment
+ bb.debug(1, '%d = aligned(%d)' % (base_size, base_size_saved))
# Do not check image size of the debugfs image. This is not supposed
# to be deployed, etc. so it doesn't make sense to limit the size
# of the debug.
if (d.getVar('IMAGE_BUILDING_DEBUGFS') or "") == "true":
+ bb.debug(1, 'returning debugfs size %d' % (base_size))
return base_size
# Check the rootfs size against IMAGE_ROOTFS_MAXSIZE (if set)
@@ -566,6 +574,8 @@ def get_rootfs_size(d):
(base_size, initramfs_maxsize_int))
bb.error("You can set INITRAMFS_MAXSIZE a larger value. Usually, it should")
bb.fatal("be less than 1/2 of ram size, or you may fail to boot it.\n")
+
+ bb.debug(1, 'returning %d' % (base_size))
return base_size
python set_image_size () {
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list