summaryrefslogtreecommitdiff
path: root/meta/classes
diff options
context:
space:
mode:
authorSaul Wold <sgw@linux.intel.com>2012-01-04 16:46:25 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-01-05 11:14:39 +0000
commit73db21a65fbdaf0886a01bcd98ee66e73a7465b8 (patch)
tree7918cc8a2a21a56786f1fcf14cdc7c90bc78376e /meta/classes
parentf4bed494ab3b3047aad45ff31efcfd59b90e3822 (diff)
downloadopenembedded-core-73db21a65fbdaf0886a01bcd98ee66e73a7465b8.tar.gz
openembedded-core-73db21a65fbdaf0886a01bcd98ee66e73a7465b8.tar.bz2
openembedded-core-73db21a65fbdaf0886a01bcd98ee66e73a7465b8.zip
image_types: Fix rootfs size calcuation
The ROOTFS_SIZE calculation was not correctly taking into account the IMAGE_ROOTFS_EXTRA_SPACE variable, it would only be applied if the size as determined by the ((du * overhead) + extra space) was greater than the IMAGE_ROOTFS_SIZE, so if the du * overhead was smaller Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/image_types.bbclass2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index ebff0ba60a..3010549807 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -23,7 +23,7 @@ def get_imagecmds(d):
runimagecmd () {
# Image generation code for image type ${type}
- ROOTFS_SIZE=`du -ks ${IMAGE_ROOTFS}|awk '{size = $1 * ${IMAGE_OVERHEAD_FACTOR} + ${IMAGE_ROOTFS_EXTRA_SPACE}; OFMT = "%.0f" ; print (size > ${IMAGE_ROOTFS_SIZE} ? size : ${IMAGE_ROOTFS_SIZE}) }'`
+ ROOTFS_SIZE=`du -ks ${IMAGE_ROOTFS}|awk '{base_size = ($1 * ${IMAGE_OVERHEAD_FACTOR}); OFMT = "%.0f" ; print ((base_size > ${IMAGE_ROOTFS_SIZE} ? base_size : ${IMAGE_ROOTFS_SIZE}) + ${IMAGE_ROOTFS_EXTRA_SPACE}) }'`
${cmd}
cd ${DEPLOY_DIR_IMAGE}/
rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.${type}