Poky-Tiny: Difference between revisions

From Yocto Project
Jump to navigationJump to search
No edit summary
Line 26: Line 26:
* where is poky-tiny defined?
* where is poky-tiny defined?
** poky-tiny is defined in <yocto-dir>/meta-yocto/conf/distro/poky-tiny.conf.  Some other recipes and images have been modified to support the features in poky-tiny.
** poky-tiny is defined in <yocto-dir>/meta-yocto/conf/distro/poky-tiny.conf.  Some other recipes and images have been modified to support the features in poky-tiny.
** The kernel recipe for poky-tiny is in <yocto-dir>/meta/recipes-kernel/linux/linux-yocto-tiny_x.x.bb
* What images are supported?
* What images are supported?
** As of poky-danny-8.0 (the 1.3 release of yocto), poky-tiny.conf defined the following images: IMAGE_FSTYPES = "ext2 cpio.gz"  This means it will build both an ext2 filesystem image, and a cpio.gz image (suitable for use as an initramfs).
** As of poky-danny-8.0 (the 1.3 release of yocto), poky-tiny.conf defined the following images: IMAGE_FSTYPES = "ext2 cpio.gz"  This means it will build both an ext2 filesystem image, and a cpio.gz image (suitable for use as an initramfs).
* What machines are supported (are there any restrictions)?
* What machines are supported (are there any restrictions)?
** in the kernel recipe file, it has COMPATIBLE_MACHINE="(qemux86)"
* What features have been eliminated?
* What features have been eliminated?
* What is the size difference between poky-tiny and poky (core-image-minimal)?
* What is the size difference between poky-tiny and poky (core-image-minimal)?

Revision as of 20:55, 14 November 2012

Poky-tiny is a variant of the poky distribution which is stripped down to minimal configuration.

Introduction

It is intended to be useful for a few different purposes:

  • as a demonstration of techniques useful for reducing other images
  • as a springboard for very low-end distributions and images
  • as a place to experiment with whole-system optimization techniques

It was written by Darren Hart.

Basic use

To use the poky-tiny distro, adjust the DISTRO setting in your conf/local.conf file. That is, set it to: "DISTRO=poky-tiny"

poky-tiny does not include a target-side package manager, so it is useful, to avoid extra dependencies, to use it with the IPKG package management scheme. This is the lightest-weight package management scheme. Set this in your conf/local.conf file:

PACKAGE_CLASSES ?= "package_ipk"

Then do a basic build of the system:

$ bitbake core-image-minimal

Resulting images should appear in your <build-dir>/deploy/images directory.

FAQ

  • where is poky-tiny defined?
    • poky-tiny is defined in <yocto-dir>/meta-yocto/conf/distro/poky-tiny.conf. Some other recipes and images have been modified to support the features in poky-tiny.
    • The kernel recipe for poky-tiny is in <yocto-dir>/meta/recipes-kernel/linux/linux-yocto-tiny_x.x.bb
  • What images are supported?
    • As of poky-danny-8.0 (the 1.3 release of yocto), poky-tiny.conf defined the following images: IMAGE_FSTYPES = "ext2 cpio.gz" This means it will build both an ext2 filesystem image, and a cpio.gz image (suitable for use as an initramfs).
  • What machines are supported (are there any restrictions)?
    • in the kernel recipe file, it has COMPATIBLE_MACHINE="(qemux86)"
  • What features have been eliminated?
  • What is the size difference between poky-tiny and poky (core-image-minimal)?
  • Are there differences in the way poky-tiny is customized, from the way default 'poky' is customized? (eg. gotchas for adding to IMAGE_INSTALL or IMAGE_FEATURES)?

Creating your own tiny-based distro

You can create your own distro, based on the tiny work, by copying the poky-tiny.conf file to your own layer, and editing it from there.

Assuming you are calling your layer 'meta-foo', you could do the following:

  • create your meta-foo layer (see other docs for this)
  • copy the poky-tiny distro configuration file to your own layer
$ install -p meta-foo/conf/distro
$ cp meta-yocto/conf/distro/poky-tiny.conf meta-foo/conf/distro/foo-tiny.conf
  • edit your conf/local.conf to use your foo-tiny.conf distro
$ vi <build-dir>/conf/local.conf
[change it so "DISTRO?=foo-tiny"]

Adjusting poky-tiny

Controlling LIBC features

Inside foo-tiny.conf (derived from poky-tiny.conf), you can specify what LIBC features to support by modifying the DISTRO_FEATURES_LIBC variable.

This variable is declared to be a space-separated list of other DISTRO_FEATURES_LIBC_xxx variables. To turn on or off features in libc, edit the values of these variables.

eglibc

To see different options that are available, see the file: <yocto-dir>/meta/recipes-core/eglibc/eglibc-options.inc

Listed in that file are the routines: distro_features_check_deps() and features_to_eglibc_settings(), which map items listed in DISTRO_FEATURES_LIBC into specific eglibc settings.

uclibc

To see different options that are available, see the file: <yocto-dir>/meta/recipes-core/uclibc/uclibc-config.inc

Listed in that file is the routine: features_to_uclibc_settings(), which maps items listed in DISTRO_FEATURES_LIBC into specific uclibc settings.

Controlling kernel features

Controlling busybox features

Troubleshooting the build

Invoking qemu with poky-tiny images

Runqemu doesn't understand poky-tiny (or initramfs?). Try executing qemu directly instead:

$ qemu-system-i386 -kernel path/to/kernel -initrd path/to/image.cpio.gz -nographic -append "console=ttyS0 root=/dev/ram0"

Resources