[oe-commits] Denys Dmytriyenko : image.bbclass: resize images (ext2/ext3) only if they are bigger then IMAGE_ROOTFS_SIZE

GIT User account git at amethyst.openembedded.net
Tue Jan 20 15:28:26 UTC 2009


Module: openembedded.git
Branch: org.openembedded.dev
Commit: 9d7586e655755f51be3f09f3da48147b0937c3e1
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=9d7586e655755f51be3f09f3da48147b0937c3e1

Author: Denys Dmytriyenko <denis at denix.org>
Date:   Fri Dec  5 12:48:06 2008 -0500

image.bbclass: resize images (ext2/ext3) only if they are bigger then IMAGE_ROOTFS_SIZE

---

 classes/image.bbclass |    2 +-
 conf/bitbake.conf     |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/classes/image.bbclass b/classes/image.bbclass
index 901ab34..c493c73 100644
--- a/classes/image.bbclass
+++ b/classes/image.bbclass
@@ -107,7 +107,7 @@ fakeroot do_rootfs () {
 
 	${IMAGE_PREPROCESS_COMMAND}
 
-	ROOTFS_SIZE=`du -ks ${IMAGE_ROOTFS}|awk '{print ${IMAGE_EXTRA_SPACE} + $1}'`
+	ROOTFS_SIZE=`du -ks ${IMAGE_ROOTFS}|awk '{size = ${IMAGE_EXTRA_SPACE} + $1; print (size > ${IMAGE_ROOTFS_SIZE} ? size : ${IMAGE_ROOTFS_SIZE}) }'`
 	${@get_imagecmds(d)}
 
 	${IMAGE_POSTPROCESS_COMMAND}
diff --git a/conf/bitbake.conf b/conf/bitbake.conf
index 2c6979a..c01da86 100644
--- a/conf/bitbake.conf
+++ b/conf/bitbake.conf
@@ -605,6 +605,7 @@ IMAGE_FSTYPES ?= "tar.gz"
 PCMCIA_MANAGER ?= "pcmcia-cs"
 DEFAULT_TASK_PROVIDER ?= "task-base"
 MACHINE_TASK_PROVIDER ?= "${DEFAULT_TASK_PROVIDER}"
+IMAGE_ROOTFS_SIZE ?= "65536"
 IMAGE_ROOTFS_SIZE_ext2 ?= "65536"
 IMAGE_ROOTFS_SIZE_ext2.gz ?= "65536"
 IMAGE_ROOTFS_SIZE_ext3 ?= "65536"





More information about the Openembedded-commits mailing list