[yocto] How to debug a custom image creation script?

Paul Eggleton paul.eggleton at linux.intel.com
Fri May 22 02:22:05 PDT 2015


Hi Jim,

On Friday 22 May 2015 08:47:23 Spriggs, Jim wrote:
> I'd like to have my custom layer generate an sdcard image, so I've
> implemented a classes/image_types_xxxxx.bbclass. This contains, amongst
> other things, the (bash) function generate_xxxxx_sdcard(). Being a naïve
> n00b, I assumed that I could just scatter "bbnote"s, "echo"s, or even "set
> -x" around inside the function to my heart's content, and would be able to
> see the output "somewhere".
> Trouble is, I can't find it anywhere!
> 
> So what is the best/approved/obvious way to get debug traces out of a
> bbclass function?
> 
> If I am already doing the Right Thing, where should I be looking for the
> output?

You should see output printed here in log.do_rootfs for the image you are 
building. In case you're unaware, you can find this in the directory pointed to 
by the T variable for the recipe, the following command will show this to you:

bitbake -e your-imagename | grep ^T=

As an aside, we do want to change the bbwarn/bbnote/bberror etc. shell 
functions to output to the UI just like the python equivalents do, it's a 
known issue that they do not. There's a bug open for that (assigned to me as 
it happens):

  https://bugzilla.yoctoproject.org/show_bug.cgi?id=5275

I should really get that one sorted out for the next release.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre



More information about the yocto mailing list