Download BitBake User Manual
Transcript
Table of Contents 1. Overview ............................................................................................................................... 1 1.1. Introduction ................................................................................................................ 1 1.2. History and Goals ....................................................................................................... 1 1.3. Concepts .................................................................................................................... 2 1.3.1. Recipes ............................................................................................................ 2 1.3.2. Configuration Files ........................................................................................... 2 1.3.3. Classes ............................................................................................................ 3 1.3.4. Layers ............................................................................................................. 3 1.3.5. Append Files .................................................................................................... 3 1.4. Obtaining BitBake ....................................................................................................... 3 1.5. The BitBake Command ............................................................................................... 4 1.5.1. Usage and syntax ............................................................................................ 4 1.5.2. Examples ......................................................................................................... 5 2. Execution .............................................................................................................................. 8 2.1. Parsing the Base Configuration Metadata .................................................................... 8 2.2. Locating and Parsing Recipes ...................................................................................... 9 2.3. Preferences and Providers ......................................................................................... 10 2.4. Dependencies ........................................................................................................... 11 2.5. The Task List ............................................................................................................ 11 2.6. Executing Tasks ........................................................................................................ 12 2.7. Checksums (Signatures) ............................................................................................ 12 2.8. Setscene ................................................................................................................... 14 3. Syntax and Operators .......................................................................................................... 16 3.1. Basic Syntax ............................................................................................................. 16 3.1.1. Basic Variable Setting .................................................................................... 16 3.1.2. Variable Expansion ......................................................................................... 16 3.1.3. Setting a default value (?=) ........................................................................... 16 3.1.4. Setting a weak default value (??=) ................................................................. 17 3.1.5. Immediate variable expansion (:=) ................................................................. 17 3.1.6. Appending (+=) and prepending (=+) With Spaces ......................................... 17 3.1.7. Appending (.=) and Prepending (=.) Without Spaces ....................................... 17 3.1.8. Appending and Prepending (Override Style Syntax) ......................................... 18 3.1.9. Removal (Override Style Syntax) .................................................................... 18 3.1.10. Variable Flag Syntax ..................................................................................... 18 3.1.11. Inline Python Variable Expansion .................................................................. 19 3.1.12. Providing Pathnames .................................................................................... 19 3.2. Conditional Syntax (Overrides) .................................................................................. 19 3.2.1. Conditional Metadata ..................................................................................... 19 3.2.2. Key Expansion ............................................................................................... 20 3.2.3. Examples ....................................................................................................... 20 3.3. Sharing Functionality ................................................................................................. 21 3.3.1. Locating Include and Class Files ..................................................................... 21 3.3.2. inherit Directive .......................................................................................... 21 3.3.3. include Directive .......................................................................................... 21 3.3.4. require Directive .......................................................................................... 22 3.3.5. INHERIT Configuration Directive ..................................................................... 22 3.4. Functions .................................................................................................................. 22 3.4.1. Shell Functions ............................................................................................... 23 3.4.2. BitBake Style Python Functions ....................................................................... 23 3.4.3. Python Functions ............................................................................................ 23 3.4.4. Anonymous Python Functions ......................................................................... 24 3.4.5. Flexible Inheritance for Class Functions ........................................................... 24 3.5. Tasks ........................................................................................................................ 25 3.5.1. Promoting a Function to a Task ....................................................................... 25 3.5.2. Deleting a Task .............................................................................................. 25 3.5.3. Passing Information Into the Build Task Environment ....................................... 26 3.6. Variable Flags ........................................................................................................... 26 3.7. Events ...................................................................................................................... 27 3.8. Variants - Class Extension Mechanism ....................................................................... 28 3.9. Dependencies ........................................................................................................... 29 3.9.1. Dependencies Internal to the .bb File ............................................................. 29 iii