[yocto] rootfs image size

Tian, Kevin kevin.tian at intel.com
Wed Jan 26 15:58:55 PST 2011


> From: Chris Tapp
> Sent: Wednesday, January 26, 2011 9:09 PM
> 
> I know this is probably a basic question, but I'm not having much luck !
> 
> I've built poky-image-minimal for atom-pc using the 0.9 Poky release.
> 
> This gives me an ext3 rootfs of over 80MB, which doesn't sound minimal
> to me ;-)

This is a known issue in 0.9. the switch from ipk to rpm leaves some temporary files
in the final ext3 rootfs, which results the large size.

> 
> Can I reduce the size of the image, or is it expected to be this size?
> 
> I've tried changing
> 
> IMAGE_ROOTFS_SIZE_ext3 = "500000"

This configuration option only works when it exceeds the size of generated rootfs,
or else it will be changed implicitly to the actual size plus some extra buffer

> 
>   in atom-pc.conf to another value, but this didn't make any
> difference to the image that gets created (by re-running bitbake poky-
> image-minimal after making the above change).
> 
> I've also tried using
> 
> ROOT_FLASH_SIZE = "64"
> 
> also without any luck.
> 
> Any help would be much appreciated !
> 

I'd suggest you to use the master to see whether it works for you.

The alternative is to apply below commit to your 0.9 code:

commit 5e384038cbd5035377d61a1b77ad23ab69e0cac0
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
Date:   Wed Jan 5 18:56:47 2011 +0000

    rootfs_rpm.bbclass: Remove temporary work files in install directory, saving work files in install directory, saving the manifests as logfiles into ${T}

    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

diff --git a/meta/classes/rootfs_rpm.bbclass b/meta/classes/rootfs_rpm.bbclass
index 33abe96..2f7d691 100644
--- a/meta/classes/rootfs_rpm.bbclass
+++ b/meta/classes/rootfs_rpm.bbclass
@@ -202,8 +202,11 @@ EOF
        # remove lock files
        rm -f ${IMAGE_ROOTFS}${rpmlibdir}/__db.*

-       # remove resolver files and manifests
-       rm -f ${IMAGE_ROOTFS}/install/install.manifest
+       # Move manifests into the directory with the logs
+       mv ${IMAGE_ROOTFS}/install/*.manifest ${T}/
+
+       # Remove all remaining resolver files
+       rm -f ${IMAGE_ROOTFS}/install

        log_check rootfs

Thanks
Kevin



More information about the yocto mailing list