Poky-Tiny: Difference between revisions

From Yocto Project
Jump to navigationJump to search
No edit summary
Line 1: Line 1:
Poky-tiny is a variant of the poky distribution which is stripped down to minimal configuration.
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:
It is intended to be useful for a few different purposes:
* as a demonstration of techniques useful for reducing other images
* as a demonstration of techniques useful for reducing other images
Line 6: Line 7:
* as a place to experiment with whole-system optimization techniques
* as a place to experiment with whole-system optimization techniques


It was written by Darren Hart, and is available by setting
It was written by Darren Hart.
your DISTRO in conf/local.conf to DISTRO=poky-tiny.


This page is a work in progress - the following sections would be good to fill out:
=== 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 ==
== FAQ ==
Line 15: Line 27:
** 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.
* What images are supported?
* What images are supported?
* What machines (are there any restrictions)?
** As of poky-danny-8.0 (the 1.3 release of yocto), poky-tiny.conf defined the following images: IMAGE_FSTYPES = "ext2 cpio.gz"
* What machines are supported (are there any restrictions)?
* 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:09, 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.
  • 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"
  • What machines are supported (are there any restrictions)?
  • 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_

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