本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/32610/showart_972610.html
by linuxGentoo - Linux文档专区 - 2008-06-12 11:19:22 阅读(614) 回复(0)
code base:1.8.4 再次来阅读 bitbake 的源码,有种别样的感觉,抱着别样的心态,我是一个追求"behind the code"的人,在代码面前,一切了无秘密,心胸开阔,多好 一个成功的open source project,必定背后有他的道理,如果我们能体会它,利用他,该多好 bitbake的机理,python语言之美 lynnos@tong-ji.org 乱言乱语 本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/32610/showart_718642.html
bitbake cache机制就是记忆以前parse的结果,以免重复parse,当然主要就是利用mtime,如果一旦发现新的mtime比cache mtime早,那么就重新parse,当然如果CACHE VERSION和 bitbake VERSION不匹配,就判断cache无效,重新parse,其中还有一个 __depends变量,是一些conf文件,一旦改变了,那么也是要重新parse全部的文件 本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/32610/showart_404120.html
在oe/bitbake中,有provider这一概念,意思是package提供一个东西,供别人使用,自己当然提供自身的provider,也就是说,比如一个package demo ,它默认提供的provider是 demo demo-pv demo-pv-pr 也可以多个package 提供一个provider,比如前面文章提到过的virtual,下面是源码主要解决的问题 多个package提供同一个provider,如何选择? 主要方法: 如果多个package分布在不同的分支,那么选择优先级高的分支 如果...
History/background ================== Once upon a time, we didn't do anything with the runtime variables RDEPENDS, RRECOMMENDS etc. This lead to a lot of duplication within the metadata because of the two separate namespaces - you'd have have to add BOOTSTRAP_EXTRA_DEPENDS = "virtual/kernel" and BOOTSTRAP_EXTRA_RDEPENDS = "kernel-module-uinput". I complained about this and was told by Rene to shut...
def findProvider (self, item, runtime = False, elig = False): """ find something to provide a named build requirement (takes item names from DEPENDS namespace) """ fn = None discriminated = False if runtime: all_p = bb.providers.getRuntimeProviders(self.status, item) else: if not item in self.status....
Example : bitbake demo In bitbake/bin/bitbake options+argv ---> BBCooker() [instance class object] --->call BBCooker.cook function param is options and argv instance BBConfiguration class with options param go cook(BBConfiguration object,argv) function [BBConfiguration class ]:initial a attr dict {'cmd':'value'} gointo cookfunction() { set bitbake cmd value init a data class...
Author: [email=lynnos@tong-ji.org]lynnos@tong-ji.org[/email] bitbake 这个 task execute tool的第一步就是parsing,也就是对BBFILES所定义的变量的内容,也就是bbfiles 进行读取data,然后分析,相关数据进行缓存(cache) 出发是从 conf/bitbake.conf 这个文件开始,这个文件本身的内容处理是一部分,另外一部分是这个文件会include一些其它的conf文件,比如很重要的 conf/local.conf,分析处...
这也是behind the code重要的事情,为了达到这个理解,在没有manual,资料缺乏的情况下,是很困难的,但是一旦达到了这个境界,很多事情就好办了,我也就可以安心做其它的事情了,继续研究behind the code的故事了 bitbake demo 程序是从 bitbake/bin/bitbake开始,其中会调用 lib/bb/下的相关模块 BBCooker.cook()这是开始的函数 一开始是对bitbake 的一些参数进行处理,比如: if not self.configuration.cmd: ...
BBFILES := "${OEDIR}/openembedded/packages/*/*.bb ${LOCALDIR}/packages/*/*.bb" BBFILE_COLLECTIONS = "upstream local" BBFILE_PATTERN_upstream = "^${OEDIR}/openembedded/packages/" BBFILE_PATTERN_local = "^${LOCALDIR}/packages/" BBFILE_PRIORITY_upstream = "5" BBFILE_PRIORITY_local = "10" 官方OE有一个分支,这算成third party,我们自己需要开发自己的oe package,所以我们也需要一个分支,但是又不希望更改OE的...
在bitbake 1.8.12 changlog中有这样的一节: http://svn.berlios.de/svnroot/repos/bitbake/branches/bitbake-1.8/ChangeLog Add better environmental variable handling. By default it will now only pass certain whitelisted variables into the data store. If BB_PRESERVE_ENV is set bitbake will use all variable from the environment. If BB_ENV_WHITELIST is set, that whitelist will be used instead of the ...