From Gentoo Wiki
Jump to: navigation, search

The Yocto Project is a Linux Foundation workgroup whose goal is to produce tools and processes that will enable the creation of Linux distributions for embedded software that are independent of the underlying architecture of the embedded software itself. The project was announced by the Linux Foundation in 2010. Yocto Project Aligns Technology with OpenEmbedded and Gains Corporate Collaborators. In March 2011, the project aligned itself with OpenEmbedded, an existing framework with similar goals, with the result being The OpenEmbedded-Core Project.

The Yocto Project is an open source project whose focus is on improving the software development process for embedded Linux distributions. The Yocto Project provides interoperable tools, metadata, and processes that enable the rapid, repeatable development of Linux-based embedded systems.[1]

Gentoo is not officially supported by the Yocto / OpenEmbedded project, however, Gentoo works perfectly fine as a Yocto/OE build host, with one or two caveats about building on a hardened profile.

  • Some recipes and the final do_rootfs try to spin up an ARM qemu environment and will fail if qemu doesn't have the proper PaX markings. The Gentoo package should have the right PaX config, and local.conf has the right place to set qemu and sdl as "assume_provided" (meaning use Gentoo package deps instead of building its own native packages).

user $bitbake
bitbake [...]
WARNING: Host distribution "Gentoo" has not been validated with this version of the build system;  you may possibly experience unexpected failures. 
It is recommended that you use a tested distribution.



Set your default Python to 2.7 and install the following build deps:

Install QEMU and SDL

See QEMU; install qemu with ARM user targets enabled and make sure the binfmt_misc module is enabled in your kernel. Install libsdl with USE="X aalib alsa fbcon joystick opengl pulseaudio sound video" and set this in your local.conf:

FILE ~/foss-udoo-bsp/poky/build-neo/conf/local.conf
ASSUME_PROVIDED += "qemu-native libsdl-native"

Install Build Deps

You should most of these already installed, but this list should pick up anything you don't have:

root # emerge -n patch make sed dev-lang/python:2.7 m4 bison cvs openjade quilt sgmltools-lite docbook-xml-dtd docbook-dsssl-stylesheets xmlto docbook-sgml-utils libpcre boost subversion texi2html chrpath fakeroot lzop bc

Make sure Python 2.7 is set as default:

user $ eselect python list

Available Python interpreters, in order of preference:

 [1]   python2.7
 [2]   python3.4
 [3]   python3.5 (fallback)
 [4]   pypy (fallback)

Test installation

Many available BSP layers use the same basic (manual) setup in their README file which is shown below. You can build a basic machine image for the handful of machines supported by the Yocto Reference BSP, but for optimal results you will probably need at least the BSP layer specific to your board (eg, RPi) plus the Yocto reference distribution BSP data for Poky and the OE meta layers. You can clone them all manually or use a repo manifest.

An increasingly common method for obtaining the metadata layers for building a Yocto or OE image is the "repo" manifest, e.g., the Freescale/NXP community BSP.

Either follow the quickstart guide below, or use one of the available repo BSP manifests; note that the FSL/NXP community manifest repo (and those derived from it) include layers with proprietary/vendor recipes and the accompanying EULA (which you must accept). The alternative is a FOSS manifest, or custom build config and layers, that use open source packages only (mainly u-boot, kernel, graphics, and audio). There are several FOSS manifest layers for various machines (eg, BeagleBone, Nitrogen6x, and Altera socfpga) in the VCT Labs gitub repos, and a new one for Udoo and Udoo Neo nelow. For any of the manifest builds, select a build branch and follow the README file. Also when using layers with vendor recipes in a FOSS build you may need to manually exclude the vendor recipes (see BBMASK in Yocto developer docs).

Udoo Neo manifest builder

Udoo Neo Tips

Official QuickStart

Yocto Project Quick Start

user $git clone -b dora git://git.yoctoproject.org/poky.git
user $cd poky
user $source oe-init-build-env
user $bitbake -k core-image-minimal

Yocto Project Application Developer's Guide

user $git clone -b dora git://git.yoctoproject.org/poky.git
user $cd poky
user $source oe-init-build-env
user $bitbake meta-ide-support
user $bitbake -k core-image-sato-sdk
user $runqemu-extract-sdk [...]

External resources