Openembedded Devel Discussions
 help / color / mirror / Atom feed
* Debugging OpenEmbedded Builds
@ 2011-09-27 11:18 Christian Keck
  2011-09-27 15:04 ` Holger Freyther
  2011-10-07  9:42 ` Alex J Lennon
  0 siblings, 2 replies; 3+ messages in thread
From: Christian Keck @ 2011-09-27 11:18 UTC (permalink / raw)
  To: openembedded-devel

How can debug an OpenEmbedded build? I have made some changes to a board 
file, but it seems that my changes have no effect. Is there a 
opportunity to look into source code just before they are compiled?

Thanks, Christian

-- 
Dipl.-Ing. Christian Keck
Institut für Produktionsmesstechnik
Technische Universität Braunschweig
Schleinitzstraße 20
D-38106 Braunschweig
Telefon: (0531) 391-7026
Telefax: (0531) 391-5837

Mail: mailto://c.keck@tu-braunschweig.de
Internet: http://www.iprom.tu-bs.de



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Debugging OpenEmbedded Builds
  2011-09-27 11:18 Debugging OpenEmbedded Builds Christian Keck
@ 2011-09-27 15:04 ` Holger Freyther
  2011-10-07  9:42 ` Alex J Lennon
  1 sibling, 0 replies; 3+ messages in thread
From: Holger Freyther @ 2011-09-27 15:04 UTC (permalink / raw)
  To: openembedded-devel

On 09/27/2011 01:18 PM, Christian Keck wrote:
> How can debug an OpenEmbedded build? I have made some changes to a board file,
> but it seems that my changes have no effect. Is there a opportunity to look
> into source code just before they are compiled?

you can use bitbake -e recipe, to see how variables and scripts that will be
executed look like. also it generates scripts in the temp/ dir in WORKDIR that
can be inspected, also bitbake -c devshell NAME gets you into such an environment.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Debugging OpenEmbedded Builds
  2011-09-27 11:18 Debugging OpenEmbedded Builds Christian Keck
  2011-09-27 15:04 ` Holger Freyther
@ 2011-10-07  9:42 ` Alex J Lennon
  1 sibling, 0 replies; 3+ messages in thread
From: Alex J Lennon @ 2011-10-07  9:42 UTC (permalink / raw)
  To: openembedded-devel

Hi Christian,

What I often do to check out the recipe building is something like this...

bitbake -D -f -c clean foobarrecipe

The -D gives you lots of debugging output so you can see things happening

The -f forces bitbake to do what you say

(otherwise it's likely to check its internal state for a recipe, decide 
the recipe has already been built, and ignore you. You can often tell if 
you've been ignored as it'll say XXX tasks, of which XXX didn't need to 
be executed, where XXX is the same number meaning nothing happened)

The -c specifies a command. The clean command wipes out the working 
directory in your tree. The working directory will depend on what you're 
building but will probably be somewhere in 
./openembedded/build/tmp_XXX/work/. You can use find or similar on the 
name of your recipe to figure out where it is.

So clean wipes things out, then you can try

bitbake -D -c compile foobarrecipe

Note that we're not forcing things here, and we already have that recipe 
in a "clean" state which means bitbake
will go through the intermediary stages to get a compilation done, 
unpacking, patching and so forth.

After that's finished you can go to the working directory for the recipe 
and see what happened - you should see
output files and so forth, and you can look in the temp folder in there 
to see the logs and scripts that are used.

Also, you probably want to make sure RM_WORK is commented out of your 
configuration file (local.conf I think)
as otherwise bitbake will clean up the working directories after itself. 
I still think the compile command I suggest
will work ok but if you do a full build of a recipe then at the end the 
work files will be cleaned. Note that removing
RM_WORK will likely make your build tree MUCH bigger!

There are better ways I'm sure, such as using devshell, but this is the 
mechanism that works for me.

Cheers,

Alex Lennon

Dynamic Devices Ltd
http://www.dynamicdevices.co.uk

On 27/09/2011 12:18, Christian Keck wrote:
> How can debug an OpenEmbedded build? I have made some changes to a 
> board file, but it seems that my changes have no effect. Is there a 
> opportunity to look into source code just before they are compiled?
>
> Thanks, Christian
>



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-10-07  9:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-27 11:18 Debugging OpenEmbedded Builds Christian Keck
2011-09-27 15:04 ` Holger Freyther
2011-10-07  9:42 ` Alex J Lennon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox