]> code.ossystems Code Review - openembedded-core.git/commitdiff
image_types: add IMAGE_ROOTFS_EXTRA_SPACE
authorSaul Wold <sgw@linux.intel.com>
Tue, 24 May 2011 06:22:41 +0000 (23:22 -0700)
committerSaul Wold <sgw@linux.intel.com>
Wed, 25 May 2011 08:36:31 +0000 (01:36 -0700)
[YOCTO #886]

This address 2 needs after the IMAGE_ROOTFS_SIZE is cleaned up, by
removing the _ext2/3 overrides it allows for a cleaner override
using IMAGE_ROOTFS_SIZE to create a large rootfs, or by setting the
IMAGE_ROOTFS_EXTRA_SPACE, will allow for extra space allocated in Kilobytes
above the base size (determined by du of the rootfs * IMAGE_OVERHEAD_FACTOR,
default of 1.3).

Signed-off-by: Saul Wold <sgw@linux.intel.com>
meta/classes/image_types.bbclass
meta/conf/bitbake.conf

index 69f859e39b41c30338d6dbc6dd44f74c99b834ea..601a5fbb4db99d2e668526614f7705724a03a919 100644 (file)
@@ -13,7 +13,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}; print (size > ${IMAGE_ROOTFS_SIZE} ? size : ${IMAGE_ROOTFS_SIZE}) }'`
+       ROOTFS_SIZE=`du -ks ${IMAGE_ROOTFS}|awk '{size = $1 * ${IMAGE_OVERHEAD_FACTOR} + ${IMAGE_ROOTFS_EXTRA_SPACE}; print (size > ${IMAGE_ROOTFS_SIZE} ? size : ${IMAGE_ROOTFS_SIZE}) }'`
        ${cmd}
        cd ${DEPLOY_DIR_IMAGE}/
        rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.${type}
index 18028f30010cf0cf8c6efac20f7c27191ec22e71..35fd6f864f066bce36e2d76df0b3ec441587df09 100644 (file)
@@ -350,6 +350,10 @@ IMAGE_LINK_NAME = "${IMAGE_BASENAME}-${MACHINE}"
 # This option allows for a precentage overage of the actaul image size rather than a
 # fixed extra space
 IMAGE_OVERHEAD_FACTOR ?= 1.3
+# This option allow for adding addition space in K above and beyond what the 
+# IMAGE_OVERHEAD_FACTOR might add. To set a fixed size then overrideing IMAGE_ROOTFS_SIZE
+# with the max size one wants should do the trick
+IMAGE_ROOTFS_EXTRA_SPACE = "0"
 
 EXTRA_IMAGEDEPENDS = ""