Reducing the root filesystem image size

By default, the core-image-minimal size for the wandboard-quad unpacked tarball is around 45 MB, and core-image-sato is around 150 MB. This recipe will explore methods to reduce their size.

How to do it...

An example of a small image, core-image-small, that does not include the packagegroup-core-boot recipe and can be used as the base for a root filesystem image with reduced size, recipes-core/images/core-image-small.bb, is shown next:

DESCRIPTION = "Minimal console image."

IMAGE_INSTALL= "\
        base-files \
        base-passwd \
        busybox \
        sysvinit \
        initscripts \
        ${ROOTFS_PKGMANAGE_BOOTSTRAP} \
        ${CORE_IMAGE_EXTRA_INSTALL} \
"

IMAGE_LINGUAS = " "

LICENSE = "MIT"

inherit core-image

IMAGE_ROOTFS_SIZE ?= "8192"

This recipe ...

Get Embedded Linux for Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.