diff options
author | Saul Wold <sgw@linux.intel.com> | 2012-01-04 16:46:25 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-01-05 11:24:45 +0000 |
commit | 4de7aafbed1d3d6885b188f3bc61d6da5b0659a4 (patch) | |
tree | 872fb53b7824d6d262c4f206c972ab0c34528119 /meta/classes | |
parent | c5996fd1729d1ff5b25668f9052d35d356af3d42 (diff) | |
download | poky-4de7aafbed1d3d6885b188f3bc61d6da5b0659a4.tar.gz |
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
(From OE-Core rev: 73db21a65fbdaf0886a01bcd98ee66e73a7465b8)
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.bbclass | 2 |
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): | |||
23 | 23 | ||
24 | runimagecmd () { | 24 | runimagecmd () { |
25 | # Image generation code for image type ${type} | 25 | # Image generation code for image type ${type} |
26 | 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}) }'` | 26 | 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}) }'` |
27 | ${cmd} | 27 | ${cmd} |
28 | cd ${DEPLOY_DIR_IMAGE}/ | 28 | cd ${DEPLOY_DIR_IMAGE}/ |
29 | rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.${type} | 29 | rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.${type} |