有人可以向我指出 bitbake 或 openembedded 教程吗?
我一直在使用 BeagleBoard 的 Angstrom Linux 发行版。任何人都可以向我指出 bitbake 和 OpenEmbedded 实际工作原理的教程或参考吗?例如,当我像这样调用 bitbake 时:
bitbake virtual/kernel
实际发生了什么?我已经 grep'ed Angstrom 食谱并搜索了 Angstrom 文件系统,但我似乎无法找到对虚拟或内核的引用。在没有真正理解 bitbake 工作原理的情况下,我对使用这个工具链和制作内核补丁感到有点困惑。
I've been working with the Angstrom Linux distribution for the BeagleBoard. Can anyone point me to a tutorial or reference for how bitbake and OpenEmbedded actually work? For example, when I invoke bitbake like this:
bitbake virtual/kernel
what's actually happening? I've grep'ed the Angstrom recipes and searched the Angstrom filesystem, but I don't seem to be able to find references to either virtual or kernel. I feel a bit flummoxed working with this toolchain and making kernel patches without really understanding how bitbake works.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
BitBake 是一款复杂的软件,不幸的是它没有最好的用户文档。我相信它(松散地)基于 Gentoo 中的 portage 系统,所以熟悉该系统可能会有所帮助。
我发现弄清楚当你尝试构建某些东西时发生了什么的最好方法是将 -g 选项传递给 bitbake,这将生成两个文件:depends.dot 和 task-depends.dot。前者是该包的依赖关系图,显示当您运行特定任务时会引入哪些其他包。后者显示更多细节,显示任务而不是包。这些任务比包本身的级别要低一些;构建包可能会导致系统获取源代码、修补源代码、运行配置脚本、执行编译、安装二进制文件并将生成的文件拆分为子包。
这些文件可以显示您为什么要引入不需要的软件,以便您可以编辑有问题的包以删除其依赖项。此处生成的图形可以使用 graphviz 包进行可视化,但如果您为大型任务(例如图像任务)运行 -g 选项,则生成的图形将太大而无法可视化。 grep 遍历 .dot 文件仍然有用。
BitBake is a complex piece of software that unfortunately doesn't have the best user documentation. I believe that it's (loosely) based on the portage system in Gentoo, so some familiarity with that system might be a help.
The best way that I've found to figure out what is happening when you try to build something is to pass the -g option to bitbake, which will generate two files, depends.dot and task-depends.dot. The former is a graph of the dependencies of that package, showing what other packages get pulled in when you run a specific task. The latter shows more detail, showing tasks instead of packages. These tasks are a bit lower-level than the packages themselves; building a package might cause the system to fetch the sources, patch the sources, run a configure script, perform the compilation, install the binaries, and split the resulting files into subpackages.
These files can show why you're pulling in a piece of software you don't want, so that you can edit the offending package to remove its dependency. The graphs generated here can be visualized with the graphviz package, but if you run the -g option for a large task, such as an image task, the generated graph would be too large to visualize. It can still be useful to grep through the .dot files.
供以后有同样疑问的人参考。如果在您的文件系统中,您转到 overo/org.openembedded.dev/docs/usermanual,然后运行“make”,那么将为您制作大量有关 bitbake 和 openembedded 的文档作为 html 文件。它解释了很多正在发生的事情。
For future reference to those who are wondering the same thing. If in your file system you go to overo/org.openembedded.dev/docs/usermanual and then run "make", then a lot of documentation about bitbake and openembedded will be made for you as html files. It explains a lot of what is going on.
Anthony 提到的 OpenEmbedded 用户手册可在 OE 站点上找到。第 7 章很好地介绍了 OE 及其如何使用 BitBake:
http://docs.openembedded .org/usermanual/usermanual.html#chapter_using_bitbake_and_oe
配置,工作空格和任务小节提供了有关幕后发生的情况的良好背景知识,如果您遵循 OE 入门页面:
http://www.openembedded.org/wiki/Getting_started
OpenEmbedded User Manual that Anthony refers to is available on the OE site. Chapter 7 provides a good introduction to OE and how it uses BitBake:
http://docs.openembedded.org/usermanual/usermanual.html#chapter_using_bitbake_and_oe
The Configuration, Work Space, and Tasks subsections provide good background on what happens behind the scenes if you follow the OE Getting Started page:
http://www.openembedded.org/wiki/Getting_started
尽管 BitBake 没有详细且用户友好的教程,但使用 BitBake 的 OpenEmbedded(旧版)和 YOCTO(新版)项目有几本手册或书籍,其中详细描述了 BitBake 和 BitBake 配方。 BitBake 现在由 Openembedded 和 YOCTO 项目共同维护,当您正常使用 BitBake 时,您将使用这两个项目来查找适合您的目标的基本 Linux 组件,如 bootloader、busybox 等。
参考:
http://docs.openembedded.org/usermanual/usermanual.html
http://www.yoctoproject.org /docs/1.8/ref-manual/ref-manual.html#patching-dev-environment(第3章与BitBake更相关)
Even though BitBake does not have a detailed and user-friendly tutorial, the OpenEmbedded(older) and YOCTO(newer) projects which uses BitBake has several manuals or books where the BitBake and BitBake recipes are described in detail. BitBake is now co-maintained by Openembedded and YOCTO projects and when you use BitBake normally you will use these two projects to find the fundamental linux components like bootloader, busybox , etc suitable for your target.
References:
http://docs.openembedded.org/usermanual/usermanual.html
http://www.yoctoproject.org/docs/1.8/ref-manual/ref-manual.html#patching-dev-environment (Chapter 3 is more related to BitBake)