* Where does the bitbake get the variable "TOPDIR"
@ 2012-12-17 9:06 Biao
2012-12-17 9:47 ` Biao
2012-12-17 15:37 ` Eren Türkay
0 siblings, 2 replies; 7+ messages in thread
From: Biao @ 2012-12-17 9:06 UTC (permalink / raw)
To: yocto
[-- Attachment #1: Type: text/plain, Size: 219 bytes --]
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
[-- Attachment #2: Type: text/html, Size: 369 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: Where does the bitbake get the variable "TOPDIR" 2012-12-17 9:06 Where does the bitbake get the variable "TOPDIR" Biao @ 2012-12-17 9:47 ` Biao 2012-12-17 15:37 ` Eren Türkay 1 sibling, 0 replies; 7+ messages in thread From: Biao @ 2012-12-17 9:47 UTC (permalink / raw) To: Biao; +Cc: yocto [-- Attachment #1: Type: text/plain, Size: 385 bytes --] Now i got it. Bitbake handles the variable TOPDIR, LAYERDIR internally. Thanks anyway, Biao At 2012-12-17 17:06:26,Biao <huanmateme@163.com> 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 [-- Attachment #2: Type: text/html, Size: 860 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Where does the bitbake get the variable "TOPDIR" 2012-12-17 9:06 Where does the bitbake get the variable "TOPDIR" Biao 2012-12-17 9:47 ` Biao @ 2012-12-17 15:37 ` Eren Türkay 2012-12-18 12:28 ` Biao 1 sibling, 1 reply; 7+ messages in thread From: Eren Türkay @ 2012-12-17 15:37 UTC (permalink / raw) To: Biao; +Cc: yocto [-- Attachment #1: Type: text/plain, Size: 902 bytes --] 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. (...) 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/ -- . 73! DE TA1AET http://linkedin.com/in/erenturkay [-- Attachment #2: Type: application/pgp-signature, Size: 850 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Where does the bitbake get the variable "TOPDIR" 2012-12-17 15:37 ` Eren Türkay @ 2012-12-18 12:28 ` Biao 2012-12-18 13:18 ` Bill Traynor 2012-12-18 16:35 ` Eren Türkay 0 siblings, 2 replies; 7+ messages in thread From: Biao @ 2012-12-18 12:28 UTC (permalink / raw) To: Eren Türkay; +Cc: yocto [-- Attachment #1: Type: text/plain, Size: 2009 bytes --] At 2012-12-17 23:37:52,"Eren Türkay" <eren@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 [-- Attachment #2: Type: text/html, Size: 3132 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Where does the bitbake get the variable "TOPDIR" 2012-12-18 12:28 ` Biao @ 2012-12-18 13:18 ` Bill Traynor 2012-12-18 16:35 ` Eren Türkay 1 sibling, 0 replies; 7+ messages in thread From: Bill Traynor @ 2012-12-18 13:18 UTC (permalink / raw) To: Biao; +Cc: yocto@yoctoproject.org [-- Attachment #1: Type: text/plain, Size: 2548 bytes --] On Tue, Dec 18, 2012 at 7:28 AM, Biao <huanmateme@163.com> wrote: > > At 2012-12-17 23:37:52,"Eren Türkay" <eren@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.... > > 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, > > 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 > > > _______________________________________________ > yocto mailing list > yocto@yoctoproject.org > https://lists.yoctoproject.org/listinfo/yocto > > [-- Attachment #2: Type: text/html, Size: 3852 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Where does the bitbake get the variable "TOPDIR" 2012-12-18 12:28 ` Biao 2012-12-18 13:18 ` Bill Traynor @ 2012-12-18 16:35 ` Eren Türkay 2012-12-20 6:37 ` Biao 1 sibling, 1 reply; 7+ messages in thread From: Eren Türkay @ 2012-12-18 16:35 UTC (permalink / raw) To: Biao; +Cc: yocto [-- Attachment #1: Type: text/plain, Size: 1494 bytes --] On Tue, Dec 18, 2012 at 08:28:32PM +0800, Biao wrote: > >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? 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? > 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 -- . 73! DE TA1AET http://linkedin.com/in/erenturkay [-- Attachment #2: Type: application/pgp-signature, Size: 850 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Where does the bitbake get the variable "TOPDIR" 2012-12-18 16:35 ` Eren Türkay @ 2012-12-20 6:37 ` Biao 0 siblings, 0 replies; 7+ messages in thread From: Biao @ 2012-12-20 6:37 UTC (permalink / raw) To: Eren Türkay; +Cc: yocto [-- Attachment #1: Type: text/plain, Size: 1719 bytes --] At 2012-12-19 00:35:13,"Eren Türkay" <eren@hambedded.org> wrote: >On Tue, Dec 18, 2012 at 08:28:32PM +0800, Biao wrote: >> >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? > >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. > >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? > >> 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. >Regards, >Eren > >-- > . 73! DE TA1AET > http://linkedin.com/in/erenturkay [-- Attachment #2: Type: text/html, Size: 3088 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-12-20 6:37 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-12-17 9:06 Where does the bitbake get the variable "TOPDIR" Biao 2012-12-17 9:47 ` Biao 2012-12-17 15:37 ` Eren Türkay 2012-12-18 12:28 ` Biao 2012-12-18 13:18 ` Bill Traynor 2012-12-18 16:35 ` Eren Türkay 2012-12-20 6:37 ` Biao
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.