Download Yocto Project Development Manual

Transcript
Table of Contents
1. The Yocto Project Development Manual .................................................................................. 1
1.1. Introduction ................................................................................................................ 1
1.2. What This Manual Provides ......................................................................................... 1
1.3. What this Manual Does Not Provide ............................................................................ 1
1.4. Other Information ....................................................................................................... 2
2. Getting Started with the Yocto Project .................................................................................... 4
2.1. Introducing the Yocto Project ....................................................................................... 4
2.2. Getting Set Up ........................................................................................................... 4
2.3. Building Images .......................................................................................................... 7
2.4. Using Pre-Built Binaries and QEMU .............................................................................. 7
3. The Yocto Project Open Source Development Environment ...................................................... 9
3.1. Open Source Philosophy ............................................................................................. 9
3.2. Using the Yocto Project in a Team Environment ............................................................ 9
3.2.1. System Configurations ..................................................................................... 9
3.2.2. Source Control Management (SCM) ................................................................. 10
3.2.3. Autobuilders ................................................................................................... 11
3.2.4. Policies and Change Flow ............................................................................... 11
3.2.5. Summary ....................................................................................................... 12
3.3. Yocto Project Source Repositories .............................................................................. 12
3.4. Yocto Project Terms ................................................................................................... 14
3.5. Licensing .................................................................................................................. 17
3.6. Git ............................................................................................................................ 18
3.6.1. Repositories, Tags, and Branches .................................................................... 18
3.6.2. Basic Commands ........................................................................................... 19
3.7. Workflows ................................................................................................................. 20
3.8. Tracking Bugs ........................................................................................................... 22
3.9. How to Submit a Change .......................................................................................... 23
3.9.1. Using Scripts to Push a Change Upstream and Request a Pull .......................... 24
3.9.2. Using Email to Submit a Patch ....................................................................... 25
4. Common Development Models ............................................................................................. 27
4.1. System Development Workflow ................................................................................. 27
4.1.1. Developing a Board Support Package (BSP) .................................................... 27
4.1.2. Modifying the Kernel ...................................................................................... 30
4.2. Application Development Workflow ............................................................................ 34
4.2.1. Workflow Using the ADT and Eclipse™ ............................................................ 34
4.2.2. Working Within Eclipse ................................................................................... 37
4.2.3. Workflow Using Stand-Alone Cross-Development Toolchains ............................. 45
4.3. Modifying Temporary Source Code ............................................................................. 46
4.3.1. Finding the Temporary Source Code ................................................................ 46
4.3.2. Using a Quilt Workflow ................................................................................... 47
4.3.3. Using a Git Workflow ...................................................................................... 48
4.4. Image Development Using Hob ................................................................................. 50
4.5. Using a Development Shell ....................................................................................... 50
5. Common Tasks .................................................................................................................... 52
5.1. Understanding and Creating Layers ........................................................................... 52
5.1.1. Layers ............................................................................................................ 52
5.1.2. Creating Your Own Layer ................................................................................ 52
5.1.3. Best Practices to Follow When Creating Layers ................................................ 54
5.1.4. Enabling Your Layer ....................................................................................... 55
5.1.5. Using .bbappend Files ..................................................................................... 56
5.1.6. Prioritizing Your Layer ..................................................................................... 57
5.1.7. Managing Layers ............................................................................................ 58
5.1.8. Creating a General Layer Using the yocto-layer Script ..................................... 59
5.2. Customizing Images .................................................................................................. 60
5.2.1. Customizing Images Using local.conf ........................................................... 60
5.2.2. Customizing Images Using Custom IMAGE_FEATURES and
EXTRA_IMAGE_FEATURES ........................................................................................... 61
5.2.3. Customizing Images Using Custom .bb Files .................................................... 61
5.2.4. Customizing Images Using Custom Package Groups ........................................ 62
5.3. Writing a New Recipe ................................................................................................ 62
5.3.1. Overview ....................................................................................................... 63
iii