Yocto Project Reference Manual Is for the 1.6.3 Release of the Yocto Project
Total Page:16
File Type:pdf, Size:1020Kb
Richard Purdie, Linux Foundation <[email protected]> by Richard Purdie Copyright © 2010-2015 Linux Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the Creative Commons Attribution-Share Alike 2.0 UK: England & Wales [http://creativecommons.org/licenses/by-sa/2.0/uk/] as published by Creative Commons. Manual Notes • This version of the Yocto Project Reference Manual is for the 1.6.3 release of the Yocto Project. To be sure you have the latest version of the manual for this release, go to the Yocto Project documentation page [http://www.yoctoproject.org/documentation] and select the manual from that site. Manuals from the site are more up-to-date than manuals derived from the Yocto Project released TAR files. • If you located this manual through a web search, the version of the manual might not be the one you want (e.g. the search might have returned a manual much older than the Yocto Project version with which you are working). You can see all Yocto Project major releases by visiting the Releases [https://wiki.yoctoproject.org/wiki/Releases] page. If you need a version of this manual for a different Yocto Project release, visit the Yocto Project documentation page [http://www.yoctoproject.org/ documentation] and select the manual set by using the "ACTIVE RELEASES DOCUMENTATION" or "DOCUMENTS ARCHIVE" pull-down menus. • To report any inaccuracies or problems with this manual, send an email to the Yocto Project discussion group at [email protected] or log into the freenode #yocto channel. Table of Contents 1. Introduction ............................................................................................................................ 1 1.1. Introduction ................................................................................................................. 1 1.2. Documentation Overview ............................................................................................. 1 1.3. System Requirements .................................................................................................. 1 1.3.1. Supported Linux Distributions ........................................................................... 2 1.3.2. Required Packages for the Host Development System ....................................... 2 1.3.3. Required Git, tar, and Python Versions .............................................................. 5 1.4. Obtaining the Yocto Project ......................................................................................... 6 1.5. Development Checkouts .............................................................................................. 7 2. Using the Yocto Project .......................................................................................................... 8 2.1. Running a Build ........................................................................................................... 8 2.1.1. Build Overview ................................................................................................. 8 2.1.2. Building an Image Using GPL Components ........................................................ 8 2.2. Installing and Using the Result .................................................................................... 8 2.3. Debugging Build Failures ............................................................................................. 9 2.3.1. Task Failures ..................................................................................................... 9 2.3.2. Running Specific Tasks ...................................................................................... 9 2.3.3. Dependency Graphs ....................................................................................... 10 2.3.4. General BitBake Problems ............................................................................... 10 2.3.5. Development Host System Issues ................................................................... 10 2.3.6. Building with No Dependencies ....................................................................... 10 2.3.7. Variables ........................................................................................................ 10 2.3.8. Recipe Logging Mechanisms ........................................................................... 11 2.3.9. Other Tips ...................................................................................................... 12 2.4. Maintaining Build Output Quality ............................................................................... 12 2.4.1. Enabling and Disabling Build History ............................................................... 12 2.4.2. Understanding What the Build History Contains ............................................... 13 3. A Closer Look at the Yocto Project Development Environment ............................................... 17 3.1. User Configuration ..................................................................................................... 18 3.2. Metadata, Machine Configuration, and Policy Configuration ........................................ 19 3.2.1. Distro Layer .................................................................................................... 21 3.2.2. BSP Layer ....................................................................................................... 21 3.2.3. Software Layer ............................................................................................... 21 3.3. Sources ..................................................................................................................... 22 3.3.1. Upstream Project Releases .............................................................................. 23 3.3.2. Local Projects ................................................................................................. 23 3.3.3. Source Control Managers (Optional) ................................................................ 24 3.3.4. Source Mirror(s) .............................................................................................. 24 3.4. Package Feeds ........................................................................................................... 24 3.5. BitBake ...................................................................................................................... 25 3.5.1. Source Fetching .............................................................................................. 26 3.5.2. Patching ......................................................................................................... 27 3.5.3. Configuration and Compilation ........................................................................ 28 3.5.4. Package Splitting ............................................................................................ 29 3.5.5. Image Generation ........................................................................................... 31 3.5.6. SDK Generation .............................................................................................. 33 3.6. Images ...................................................................................................................... 34 3.7. Application Development SDK .................................................................................... 35 4. Technical Details .................................................................................................................. 37 4.1. Yocto Project Components ......................................................................................... 37 4.1.1. BitBake ........................................................................................................... 37 4.1.2. Metadata (Recipes) ......................................................................................... 38 4.1.3. Classes ........................................................................................................... 38 4.1.4. Configuration .................................................................................................. 38 4.2. Cross-Development Toolchain Generation ................................................................... 38 4.3. Shared State Cache ................................................................................................... 41 4.3.1. Overall Architecture ........................................................................................ 41 4.3.2. Checksums (Signatures) ................................................................................. 41 4.3.3. Shared State .................................................................................................. 43 4.3.4. Tips and Tricks ................................................................................................ 44 4.4. x32 ........................................................................................................................... 45 iii Yocto Project Reference Manual 4.4.1. Support .......................................................................................................... 45 4.4.2. Completing x32 .............................................................................................. 45 4.4.3. Using x32 Right Now ...................................................................................... 46 4.5. Wayland .................................................................................................................... 46 4.5.1. Support .........................................................................................................