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:

FAQ

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:

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

To adjust busybox features, it's necessary to have your own defconfig. Then the busybox recipe must be appended (or you need your own busybox recipe) to tell bitbake where it can find this defconfig. An example:

In this example you can see how in a new layer, the busybox_<version>.bbappend file modifies the FILESEXTRAPATHS, which enables bitbake to find the corresponding defconfig in meta-new-layer/recipes-core/busybox_1.20.2. In the example defconfig, mdev gets enabled by setting the variables CONFIG_MDEV and CONFIG_FEATURE_MDEV_LOAD_FIRMWARE. The original defconfig that would be used by poky normally is stored in meta/recipes-core/busybox/busybox-<version>/defconfig as of this writing. PACKAGES += just makes sure that busybox-mdev gets packaged because it doesn't do this by default.

In general: Set the FILESEXTRAPATHS so bitbake finds your defconfig and put whatever you like into your defconfig.

Troubleshooting the build

Invoking qemu with poky-tiny images

runqemu can be used to run a poky-tiny image. For instance, for a poky-tiny qemux86 build, try:

So... busybox is really the only executable on the system, and it is providing /bin/sh. /init is a shell script,
which will run /etc/rc.local, if one is present. There's a sample in /etc/rc.local.sample that you can use as a
starting point to customize the init process. If you turn on packages in yocto, there will be init scripts deposited
in /etc/init.d, which you can call from either /init or /etc/rc.local to invoke (none of that fancy sysV rc init scripts here!)

I booted with mem=24M (that was about as small as I could go) and saw the following memory utilization:

busybox, ldconfig and libc (and other libc-related libs) make up about 95% of the system.

If busybox were statically linked, and ldconfig and libc were omitted, I believe it would
reduce the size of the system substantially.

exiting the system

There is no 'shutdown' command, but you can use 'ctrl-a to execute a command to the qemu monitor, and 'ctrl-a b' to issue a sysrq to the Linux kernel.
You can do a sysrq-B to do a reboot. Do: ctrl-a h to see available commands, and ctrl-a x to exit qemu.