[yocto] Where does the bitbake get the variable "TOPDIR"

Biao huanmateme at 163.com
Tue Dec 18 04:28:32 PST 2012



At 2012-12-17 23:37:52,"Eren Türkay" <eren at hambedded.org> wrote:
>On Mon, Dec 17, 2012 at 05:06:26PM +0800, Biao wrote:
>> Greetings, 
>> 
>> I am a newbie tying to understand how bitbake works.
>> There is one line as BBPATH = "${TOPDIR}" in the mybuild/conf/bblayers.conf, i would like to know where the TOPDIR is defined? 
>
>It's defind in "lib/bb/parse/parse_py/ConfHandler.py:36". When TOPDIR is
>not defined in any of the bitbake configuration files, it's set to
>current working directory automatically.
>
The whole picture of how bitbake works is missing from the Manual of the bitbake, which typically should be(I guess) :
1. Set some environment variables like "TOPDIR, THISDIR..."
2. Looking for and parsing the conf/bblayers.conf.
3. Set the LAYERDIR and parsing each of the ONELAYER/conf/layer.conf
4. Locate and parsing the conf/bitbake.conf.
5. Go over of each of the .bb and setup all the global variables to get a dependency tree...
6. Start the build
7....
I am trying to draw a picture like the list above,which is from the bitbake's point of view,
 some of the list is not right, since lots things are still not clear to me. If someone could draw such picture, it helps a lot to understand the bitbake.
>(...)
>
>def init(data):
>    topdir = data.getVar('TOPDIR')
>    if not topdir:
>        data.setVar('TOPDIR', os.getcwd())
>
>(...)
>
>You may want to read the newly-written documentation about bitbake and
>open embedded. I tried to explain how things fit together. I would like
>to have your feedback.
>
>http://hambedded.org/blog/2012/11/24/from-bitbake-hello-world-to-an-image/
I will try to give some feedback after finishing the reading.
But for now, there are some silly questions:
1. There is a base_do_fetch() {}, I did not find the explanation of the keyword of 'base' in the manual, do i miss something?
2. There is 'bb.note' and 'bbnote' in the code example, is it a type-mistake or something else?
>
>-- 
>    . 73! DE TA1AET
>      http://linkedin.com/in/erenturkay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20121218/4949988d/attachment.html>


More information about the yocto mailing list