[yocto] per-image ROOTFS sizes

Trevor Woerner twoerner at gmail.com
Wed Dec 12 14:55:13 PST 2012


Hi Robert,

(we met at OLS last summer, I came and chatted with you briefly after
your presentation)

On Wed, Dec 12, 2012 at 5:03 PM, Robert P. J. Day <rpjday at crashcourse.ca> wrote:
>   now i'm interested, so ... what are your config steps?  i wouldn't
> mind trying to reproduce this on my system.


My doodle layer can be found here:
    https://github.com/twoerner/meta-trevor

My conf/bblayers.conf adds this and meta-openembedded/meta-oe.
My conf/local.conf currently looks like:

    BB_NUMBER_THREADS = "4"
    PARALLEL_MAKE = "-j 4"
    MACHINE = "qemux86"
    DL_DIR = "/home/trevor/devel/Downloads"
    DISTRO = "poky"
    PACKAGE_CLASSES = "package_ipk"
    EXTRA_IMAGE_FEATURES = "debug-tweaks ssh-server-openssh"
    USER_CLASSES = "buildstats image-mklibs image-prelink"
    PATCHRESOLVE = "noop"

    #
    # Disk Space Monitoring during the build
    #
    # Monitor the disk space during the build. If there is less that
1GB of space or less
    # than 100K inodes in any key build location (TMPDIR, DL_DIR,
SSTATE_DIR), gracefully
    # shutdown the build. If there is less that 100MB or 1K inodes,
perform a hard abort
    # of the build. The reason for this is that running completely out
of space can corrupt
    # files and damages the build in ways which may not be easily recoverable.
    BB_DISKMON_DIRS = "\
        STOPTASKS,${TMPDIR},1G,100K \
        STOPTASKS,${DL_DIR},1G,100K \
        STOPTASKS,${SSTATE_DIR},1G,100K \
        ABORT,${TMPDIR},100M,1K \
        ABORT,${DL_DIR},100M,1K \
        ABORT,${SSTATE_DIR},100M,1K"

    CONF_VERSION = "1"
    BB_DANGLINGAPPENDS_WARNONLY = "yes"
    IMAGE_FSTYPES = "vmdk"
    IMAGE_ROOTFS_SIZE = "500000"

You can then either "bitbake bboverride" or "bitbake core-image-minimal".

To easily boot the resulting VMDK with qemu, you'll have to patch your
poky/scripts/runqemu and poky/scripts/runqemu-internal with my patch
here (unless by the time you read this, it has already been included):
    https://lists.yoctoproject.org/pipermail/yocto/2012-December/013279.html

and then run:
    $ runqemu tmp/deploy/images/<image>.vmdk

Currently I can't think of any nice/easy way to _flexibly_ specify the
eth0 IP address of the vmdk image, but the runqemu script does setup
your local tap interface for 192.168.7.1/24 as expected. You can then
manually configure eth0 once the VM boots and/or setup
'/etc/network/interfaces'.



More information about the yocto mailing list