Chapter5 Common Use-cases/tasks

Table of Contents

Creating a new Distribution
Adding a new Machine
Adding a new Package
building from unstable source code
Creating your own image
Using a prebuilt toolchain to create your packages
The toolchain
The prebuilt libraries
Setting up OpenEmbedded
Useful hints
Issues with this approach
Using a new package format

Creating a new Distribution

Creating a new distribution is not complicated, however we urge you to try existing distributions first, because it's also very easy to do wrong. The config need to be created in /conf/distro directory. So what has to be inside?

  • DISTRO_VERSION so users will know which version of distribution they use.

  • DISTRO_TYPE (release/debug) variable is used in some recipes to enable/disable some features - for example kernel output on screen for "debug" builds.

  • Type of libc used: will it be glibc (TARGET_OS = "linux") or uclibc (TARGET_OS = "linux-uclibc")?

  • Toolchain versions - for example gcc 3.4.4 based distro will have:

    PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}gcc-initial:gcc-cross-initial"
    PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}gcc:gcc-cross"
    PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}g++:gcc-cross"
    PREFERRED_VERSION_binutils = "2.16"
    PREFERRED_VERSION_binutils-cross = "2.16"
    PREFERRED_VERSION_gcc = "3.4.4"
    PREFERRED_VERSION_gcc-cross = "3.4.4"
    PREFERRED_VERSION_gcc-initial-cross = "3.4.4"
  • DISTRO_FEATURES which describe which features distro has. More about it in task-base section.

  • Versions of kernels used for supported devices:

    PREFERRED_VERSION_linux-omap1_omap5912osk ?= "2.6.18+git"
    PREFERRED_VERSION_linux-openzaurus ?= "2.6.17"
  • To get more stable build it is good to make use of file which contain working SRCDATE for many of floating recipes.

    require conf/distro/include/

    It also should have global SRCDATE value set (format is ISO date: YYYYMMDD):

    SRCDATE = "20061014"