没有合适的资源?快使用搜索试试~ 我知道了~
首页OpenEmbedded User Manual .pdf
资源详情
资源评论
资源推荐

OpenEmbedded User Manual
OpenEmbedded Team

OpenEmbedded User Manual
by OpenEmbedded Team
Copyright © 2006, 2007, 2008, 2009 Holger Hans Peter FreytherKoen KooiDetlef VollmannJamie LenehanMarcin
JuszkiewiczRolf Leggewie
This work is licensed under the Creative Commons Attribution License. To view a copy of this license, visit
http://creativecommons.org/licenses/by/2.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.

Table of Contents
1. Introduction............................................................................................................................................1
1.1. Overview .....................................................................................................................................1
1.2. History.........................................................................................................................................1
2. Getting Started.......................................................................................................................................2
2.1. OpenEmbedded Directory Structure...........................................................................................2
2.2. Getting BitBake...........................................................................................................................2
2.2.1. Downloading a BitBake release .....................................................................................2
2.3. Getting OpenEmbedded..............................................................................................................3
2.3.1. Checking Out OpenEmbedded With Git ........................................................................3
2.3.2. Updating OpenEmbedded ..............................................................................................3
2.3.3. Changing Branches.........................................................................................................3
2.4. Configuring OpenEmbedded.......................................................................................................4
2.4.1. Environment Setup .........................................................................................................4
2.4.2. Local Configuration........................................................................................................5
2.5. Building Software .......................................................................................................................5
2.5.1. Useful Target Recipes.....................................................................................................7
3. Metadata...............................................................................................................................................10
3.1. File Layout ................................................................................................................................10
3.2. Syntax........................................................................................................................................10
3.3. Classes.......................................................................................................................................10
3.4. Writing Meta Data (Adding packages) .....................................................................................11
4. Special features ....................................................................................................................................13
4.1. Debian package naming ...........................................................................................................13
4.2. Shared Library handling (shlibs) ..............................................................................................13
4.3. BitBake Collections .................................................................................................................13
4.4. Task-base ..................................................................................................................................13
4.5. Overrides ..................................................................................................................................14
5. Common Use-cases/tasks.....................................................................................................................15
5.1. Creating a new Distribution ......................................................................................................15
5.2. Adding a new Machine .............................................................................................................15
5.3. Adding a new Package ..............................................................................................................16
5.3.1. building from unstable source code..............................................................................16
5.4. Creating your own image..........................................................................................................17
5.5. Using a prebuilt toolchain to create your packages ..................................................................17
5.6. Using a new package format.....................................................................................................17
5.7. Creating Software Development Kits (SDKs) ..........................................................................17
5.7.1. What is provided by a SDK..........................................................................................18
5.7.2. Creating a SDK with your libraries pre-installed.........................................................18
5.8. Creating and Using a Qt Embedded SDK.................................................................................19
5.8.1. Creating the SDK .........................................................................................................20
5.8.2. Using the Qt Embedded SDK.......................................................................................20
iii

6. Comparing............................................................................................................................................22
6.1. buildroot....................................................................................................................................22
6.2. crosstool ....................................................................................................................................22
6.3. handmade ..................................................................................................................................22
7. Using bitbake and OpenEmbedded ...................................................................................................23
7.1. Introduction...............................................................................................................................23
7.2. Configuration ............................................................................................................................24
7.3. Work space................................................................................................................................24
7.3.1. work directory (tmp/work) ...........................................................................................26
7.4. Tasks..........................................................................................................................................30
7.5. Working with a single recipe.....................................................................................................34
7.6. Interactive bitbake.....................................................................................................................37
7.7. Devshell.....................................................................................................................................38
7.7.1. devshell via inherit........................................................................................................38
7.7.2. devshell addon..............................................................................................................39
7.7.3. Working in the devshell................................................................................................40
7.8. Patching and patch management...............................................................................................40
8. Recipes ..................................................................................................................................................41
8.1. Introduction...............................................................................................................................41
8.2. Syntax of recipes.......................................................................................................................41
8.3. Recipe naming: Names, versions and releases..........................................................................45
8.4. Variables....................................................................................................................................47
8.5. Header .......................................................................................................................................48
8.6. Sources: Downloading, patching and additional files...............................................................49
8.7. Directories: What goes where...................................................................................................50
8.7.1. WORKDIR: The working directory.............................................................................51
8.7.2. S: The unpacked source code directory........................................................................52
8.7.3. D: The destination directory.........................................................................................52
8.7.4. Staging directories........................................................................................................53
8.7.5. FILESPATH/FILESDIR: Finding local files ................................................................54
8.8. Basic examples..........................................................................................................................56
8.8.1. Hello world...................................................................................................................56
8.8.2. An autotools package ...................................................................................................60
8.9. Dependencies: What’s needed to build and/or run the package?..............................................61
8.10. Methods: Built-in methods to make your life easier...............................................................62
8.11. Packaging: Defining packages and their contents...................................................................65
8.11.1. Philosophy ..................................................................................................................66
8.11.2. Default packages and files..........................................................................................67
8.11.3. Wildcards....................................................................................................................69
8.11.4. Checking the packages ...............................................................................................70
8.11.5. Excluding files............................................................................................................71
8.11.6. Debian naming............................................................................................................72
8.11.7. Empty packages..........................................................................................................73
8.12. Tasks: Playing with tasks ........................................................................................................73
8.13. Classes: The separation of common functionality ..................................................................75
8.14. Staging: Making includes and libraries available for building................................................76
8.15. Autoconf: All about autotools.................................................................................................78
iv

8.16. Installation scripts: Running scripts during package installation and/or removal ..................78
8.17. Configuration files...................................................................................................................81
8.18. Package relationships..............................................................................................................82
8.19. Fakeroot: Dealing with the need for "root".............................................................................83
8.20. Native: Packages for the build host.........................................................................................83
8.21. Development: Strategies for developing recipes.....................................................................83
8.22. Advanced versioning: How to deal with rc and pre versions..................................................84
8.23. Require/include: Reusing recipe contents...............................................................................84
8.24. Python: Advanced functionality with python..........................................................................86
8.25. Preferences: How to disable packages....................................................................................89
8.26. Initscripts: How to handle daemons........................................................................................90
8.27. Alternatives: How to handle the same command in multiple packages..................................90
8.27.1. Example of alternative commands .............................................................................91
8.27.2. Using update-alternatives ...........................................................................................91
8.28. Volatiles: How to handle the /var directory.............................................................................92
8.28.1. Declaring volatiles......................................................................................................92
8.28.2. Logging and log files..................................................................................................92
8.28.3. Summary.....................................................................................................................93
8.29. Miscellaneous..........................................................................................................................93
9. Reference ..............................................................................................................................................95
9.1. autotools class ...........................................................................................................................95
9.1.1. oe_runconf / autotools_do_configure...........................................................................95
9.1.2. Presetting autoconf variables (the site file)...................................................................96
9.2. binconfig class...........................................................................................................................97
9.3. Directories: Installation variables .............................................................................................98
9.4. Directories: Staging variables ...................................................................................................99
9.5. distutils class ...........................................................................................................................101
9.6. fakeroot (device node handling)..............................................................................................102
9.6.1. How fakeroot works ...................................................................................................102
9.6.2. Root filesystem, images and fakeroot.........................................................................104
9.6.3. Recipes and fakeroot ..................................................................................................104
9.7. image class ..............................................................................................................................105
9.7.1. Special node handling (fakeroot)................................................................................108
9.7.2. Device (/dev) nodes ....................................................................................................108
9.7.3. Image types.................................................................................................................109
9.7.4. Package feeds .............................................................................................................109
9.8. Image types .............................................................................................................................110
9.8.1. Defining images..........................................................................................................110
9.8.2. Available image types.................................................................................................111
9.8.3. Custom image types ...................................................................................................116
9.9. pkgconfig class........................................................................................................................116
9.10. rootfs_ipkg class ...................................................................................................................117
9.11. SECTION variable: Package category..................................................................................119
9.12. siteinfo class..........................................................................................................................123
9.12.1. CONFIG_SITE: The autoconf site files ...................................................................124
9.13. SRC_URI variable: Source code and patches.......................................................................125
9.13.1. http/https/ftp (wget)..................................................................................................127
v
剩余146页未读,继续阅读















windtakers
- 粉丝: 85
- 资源: 9
上传资源 快速赚钱
我的内容管理 收起
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助

会员权益专享
最新资源
- Xilinx SRIO详解.pptx
- Informatica PowerCenter 10.2 for Centos7.6安装配置说明.pdf
- 现代无线系统射频电路实用设计卷II 英文版.pdf
- 电子产品可靠性设计 自己讲课用的PPT,包括设计方案的可靠性选择,元器件的选择与使用,降额设计,热设计,余度设计,参数优化设计 和 失效分析等
- MPC5744P-DEV-KIT-REVE-QSG.pdf
- 通信原理课程设计报告(ASK FSK PSK Matlab仿真--数字调制技术的仿真实现及性能研究)
- ORIGIN7.0使用说明
- 在VMware Player 3.1.3下安装Redhat Linux详尽步骤
- python学生信息管理系统实现代码
- 西门子MES手册 13 OpcenterEXCR_PortalStudio1_81RB1.pdf
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈



安全验证
文档复制为VIP权益,开通VIP直接复制

评论0