Where does the bitbake get the variable "TOPDIR"
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?
Thanks,
Biao
Now i got it.
Bitbake handles the variable TOPDIR, LAYERDIR internally.
Thanks anyway,
Biao
At 2012-12-17 17:06:26,Biao <[email protected]> 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?
Thanks,
Biao
Quoted 4 lines · Biao
Greetings,
I am a newbie tying to understand how bitbake works.
There is one line as BBPATH = "${TOPDIR}" in themybuild/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.
(...)
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/
Signature · 2 lines
. 73! DE TA1AET
http://linkedin.com/in/erenturkayQuoted 10 lines · At 2012-12-17 23:37:52,"Eren Türkay" <[email protected]> wrote:
Quoted 4 lines · Biao
Greetings,
I am a newbie tying to understand how bitbake works.
There is one line as BBPATH = "${TOPDIR}" in themybuild/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.
Quoted 7 lines
(...)
def init(data):
topdir =data.getVar('TOPDIR')
if not topdir:data.setVar('TOPDIR', os.getcwd())
Quoted 7 lines
(...)
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?
Quoted 4 lines
Signature · 3 lines
-- . 73! DE TA1AET http://linkedin.com/in/erenturkay
Quoted 22 lines · Biao
Quoted 10 lines · At 2012-12-17 23:37:52,"Eren Türkay" <[email protected]> wrote:
Quoted 4 lines · Biao
Greetings,
I am a newbie tying to understand how bitbake works.
There is one line as BBPATH = "${TOPDIR}" in themybuild/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
Quoted 9 lines
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....
Have a look at the Bitbake section of the Yocto Project Reference manual (Chapter 6), as it provides a little more information.
I am trying to draw a picture like the list above,which is from the bitbake's point of view,
Quoted 38 lines
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.
Quoted 7 lines
(...)
def init(data):
topdir =data.getVar('TOPDIR')
if not topdir:data.setVar('TOPDIR', os.getcwd())Quoted 7 lines
(...)
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?
Quoted 4 lines
--
. 73! DE TA1AET
http://linkedin.com/in/erenturkay_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto
Quoted 4 lines · Biao
I will try to give some feedback after finishing the reading.
But for now, there are some silly questions:
1. There is abase_do_fetch(){}, I did not find the explanation of the keyword of 'base' in the manual, do i miss something?
I don't know the internals of bitbake on that level but as far as I understand, bitbake uses the name of the bbclass file as a prefix in the function names for the sake of abstraction. So, as in autotools.bbclass, the tasks defined in base.bbclass gets prefixes with "base_" keyword. Probably, it's related with mapping the function names when 'inherit' keyword is used.
I'm not clear on this topic either. A hand from an experienced bitbake guru would be really helpful here. The type of abstraction in bitbake should be explained in detail as well as how EXPORT_FUNCTION works.
Any volunteers?
Quoted 1 line
2. There is 'bb.note' and 'bbnote' in the code example, is it a type-mistake or something else?
No, this is not a mistake. You can use python as well as shell functions in bitbake recipes and classes. See 'python' keyword in function definitons where bb.note is used. That's why python function "bb.note()" is used to print log information. Without python keyword, the bitbake function is treated as shell.
Regards,
Eren
Signature · 2 lines
. 73! DE TA1AET
http://linkedin.com/in/erenturkayQuoted 6 lines · At 2012-12-19 00:35:13,"Eren Türkay" <[email protected]> wrote:
Quoted 4 lines · Biao
I will try to give some feedback after finishing the reading.
But for now, there are some silly questions:
1. There is abase_do_fetch(){}, I did not find the explanation of the keyword of 'base' in the manual, do i miss something?
Quoted 6 lines
I don't know the internals of bitbake on that level but as far as I understand, bitbake uses the name of the bbclass file as a prefix in the function names for the sake of abstraction. So, as in autotools.bbclass, the tasks defined in base.bbclass gets prefixes with "
base_" keyword. Probably, it's related with mapping the function names when 'inherit' keyword is used.
I agree it seems a prefix is mandatory when working with EXPORT_FUNCTIONS.
Quoted 7 lines
I'm not clear on this topic either. A hand from an experienced bitbake guru would be really helpful here. The type of abstraction in bitbake should be explained in detail as well as how
EXPORT_FUNCTIONworks.Any volunteers?
Quoted 8 lines
Quoted 1 line
2. There is 'bb.note' and 'bbnote' in the code example, is it a type-mistake or something else?
No, this is not a mistake. You can use python as well as shell functions in bitbake recipes and classes. See 'python' keyword in function definitons where bb.note is used. That's why python function "
bb.note()" is used to print log information. Without python keyword, the bitbake function is treated as shell.
Ok, so the bb.note is a python provided functions, which is missing from the docs.
Quoted 6 lines
Regards,
ErenSignature · 2 lines
. 73! DE TA1AET http://linkedin.com/in/erenturkay