Bitbake Problems
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. Note For the latest version of this manual associated with this Yocto Project release, see the Yocto Project Reference Manual [http://www.yoctoproject.org/docs/1.7.2/ref-manual/ref-manual.html] from the Yocto Project website. Table of Contents 1. Introduction ............................................................................................................................ 1 1.1. Introduction ................................................................................................................. 1 1.2. Documentation Overview ............................................................................................. 1 1.3. System Requirements .................................................................................................. 2 1.3.1. Supported Linux Distributions ........................................................................... 2 1.3.2. Required Packages for the Host Development System ....................................... 3 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 ......................................................................................................... 11 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 ................................................ 18 3.1. User Configuration ..................................................................................................... 19 3.2. Metadata, Machine Configuration, and Policy Configuration ........................................ 20 3.2.1. Distro Layer .................................................................................................... 22 3.2.2. BSP Layer ....................................................................................................... 22 3.2.3. Software Layer ............................................................................................... 22 3.3. Sources ..................................................................................................................... 23 3.3.1. Upstream Project Releases .............................................................................. 24 3.3.2. Local Projects ................................................................................................. 24 3.3.3. Source Control Managers (Optional) ................................................................ 25 3.3.4. Source Mirror(s) .............................................................................................. 25 3.4. Package Feeds ........................................................................................................... 25 3.5. BitBake ...................................................................................................................... 26 3.5.1. Source Fetching .............................................................................................. 27 3.5.2. Patching ......................................................................................................... 28 3.5.3. Configuration and Compilation ........................................................................ 29 3.5.4. Package Splitting ............................................................................................ 30 3.5.5. Image Generation ........................................................................................... 32 3.5.6. SDK Generation .............................................................................................. 34 3.6. Images ...................................................................................................................... 35 3.7. Application Development SDK .................................................................................... 36 4. Technical Details ................................................................................................................... 38 4.1. Yocto Project Components .......................................................................................... 38 4.1.1. BitBake ........................................................................................................... 38 4.1.2. Metadata (Recipes) ......................................................................................... 39 4.1.3. Classes ........................................................................................................... 39 4.1.4. Configuration .................................................................................................. 39 4.2. Cross-Development Toolchain Generation ................................................................... 39 4.3. Shared State Cache ................................................................................................... 42 4.3.1. Overall Architecture ........................................................................................ 42 4.3.2. Checksums (Signatures) .................................................................................. 42 4.3.3. Shared State ................................................................................................... 44 4.3.4. Tips and Tricks ................................................................................................ 45 4.4. x32 ............................................................................................................................ 46 iii Yocto Project Reference Manual 4.4.1. Support .......................................................................................................... 46 4.4.2. Completing x32 .............................................................................................. 46 4.4.3. Using x32 Right Now ...................................................................................... 47 4.5. Wayland .................................................................................................................... 47 4.5.1. Support .......................................................................................................... 47 4.5.2. Enabling Wayland in an Image ........................................................................ 47 4.5.3. Running Weston .............................................................................................. 48 4.6. Licenses .................................................................................................................... 48 4.6.1. Tracking License Changes ............................................................................... 48 4.6.2. Enabling Commercially Licensed Recipes ......................................................... 49 5. Migrating to a Newer Yocto Project Release .......................................................................... 52 5.1. General Migration Considerations ............................................................................... 52 5.2. Moving to the Yocto Project 1.3 Release ....................................................................