[1/2] classes/image_types: add IMAGE_TUNE2FS_ext3

Submitted by Paul Eggleton on April 4, 2012, 3:32 p.m.

Details

Message ID 0d5a88036c74a354a62e13cf83d05f99fca8175b.1333553396.git.paul.eggleton@linux.intel.com
State New
Headers show

Commit Message

Paul Eggleton April 4, 2012, 3:32 p.m.
Add a variable that allows additional options to be passed to tune2fs,
such as -m to control the amount of space reserved for root.

This could potentially be added for other filesystems, but right now we
need it only for ext3 for self-hosted-image.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 meta/classes/image_types.bbclass |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

Patch hide | download patch | download mbox

diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index b590ae1..152e5b4 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -132,9 +132,11 @@  IMAGE_CMD_ext2 () {
 	rmdir ${DEPLOY_DIR_IMAGE}/tmp.gz-${PN}
 }
 
+IMAGE_TUNE2FS_ext3 ?= ""
+
 IMAGE_CMD_ext3 () {
 	genext2fs -b $ROOTFS_SIZE -d ${IMAGE_ROOTFS} ${EXTRA_IMAGECMD} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext3
-	tune2fs -j ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext3
+	tune2fs -j ${IMAGE_TUNE2FS_ext3} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext3
 }
 
 oe_mkext4fs () {

Comments

Otavio Salvador April 4, 2012, 4:57 p.m.
On Wed, Apr 4, 2012 at 12:32, Paul Eggleton
<paul.eggleton@linux.intel.com> wrote:
> Add a variable that allows additional options to be passed to tune2fs,
> such as -m to control the amount of space reserved for root.

I'd prefer something like

IMG_POSTCMD_<fstype>

So it is generic enough to not be confusing for other filesystems.
Paul Eggleton April 4, 2012, 5:12 p.m.
On Wednesday 04 April 2012 13:57:04 Otavio Salvador wrote:
> On Wed, Apr 4, 2012 at 12:32, Paul Eggleton
> 
> <paul.eggleton@linux.intel.com> wrote:
> > Add a variable that allows additional options to be passed to tune2fs,
> > such as -m to control the amount of space reserved for root.
> 
> I'd prefer something like
> 
> IMG_POSTCMD_<fstype>
> 
> So it is generic enough to not be confusing for other filesystems.

Are you suggesting this would hold the entire post-command to be run? If not, 
what other post command could we be referring to in the case of other 
filesystems? (tune2fs being valid for ext2, ext3 and ext4).

Cheers,
Paul
Otavio Salvador April 4, 2012, 5:26 p.m.
On Wed, Apr 4, 2012 at 14:12, Paul Eggleton
<paul.eggleton@linux.intel.com> wrote:
> Are you suggesting this would hold the entire post-command to be run? If not,
> what other post command could we be referring to in the case of other
> filesystems? (tune2fs being valid for ext2, ext3 and ext4).

Yes; it is more generic and for someone using it, it makes no
difference in complexity et all.
Paul Eggleton April 4, 2012, 7:30 p.m.
On Wednesday 04 April 2012 14:26:26 Otavio Salvador wrote:
> On Wed, Apr 4, 2012 at 14:12, Paul Eggleton
> 
> <paul.eggleton@linux.intel.com> wrote:
> > Are you suggesting this would hold the entire post-command to be run? If
> > not, what other post command could we be referring to in the case of
> > other filesystems? (tune2fs being valid for ext2, ext3 and ext4).
> 
> Yes; it is more generic and for someone using it, it makes no
> difference in complexity et all.

Actually it does, but I can see some value in it. v2 on the way.

Cheers,
Paul