[meta-ti] has anyone actually tested sdcard_image.bbclass?

Robert P. J. Day rpjday at crashcourse.ca
Sun Jan 13 02:04:09 PST 2013


On Sat, 12 Jan 2013, Chris Larson wrote:

>
> On Sat, Jan 12, 2013 at 3:20 AM, Robert P. J. Day <rpjday at crashcourse.ca> wrote:
>       On Fri, 11 Jan 2013, Chris Larson wrote:
>
>       >
>       > On Fri, Jan 11, 2013 at 5:02 AM, Robert P. J. Day <rpjday at crashcourse.ca> wrote:
>       >       IMAGE_CLASSES += "sdcard_image"
>       >
>       >       but after i do that:
>       >
>       >       $ bitbake-env -r core-image-minimal IMAGE_CLASSES IMAGE_FSTYPES
>       >       Parsing recipes..ERROR: Error executing a python function in <code>:
>       >       NameError: global name 'imagetypes_getdepends' is not defined
>       >       ... huge snip here ...
>       >
>       > image.bbclass defines the default IMAGE_CLASSES using ?=. Which
>       > means if your distro doesn't define its own default value, you'll
>       > end up with IMAGE_CLASSES only containing sdcard_image, not both
>       > image_types and sdcard_image, and clearly both are required.
>
>   i don't see that happening with the raspberry pi layer.  if i
> configure for that layer sitting on top of oe-core, and just
>
>   $ bitbake rpi-basic-image
>
> this setting from the rpi layer:
>
> conf/machine/include/rpi-default-settings.inc:IMAGE_CLASSES += "sdcard_image-rpi"
>
> produces this with bitbake-env:
>
> $ bitbake-env -r rpi-basic-image IMAGE_CLASSES
> Parsing recipes..done.
> IMAGE_CLASSES=" sdcard_image-rpi"
> $
>
>   the value of IMAGE_CLASSES clearly *doesn't* include "image_types",
> but the build works fine and i get the resulting SD card image in
> tmp/deploy/images:
>
> rpi-basic-image-raspberrypi-20130112091402.rootfs.rpi-sdimg
>
>   i'm sure i'm misreading what you wrote, but you can see from the
> output of bitbake-env that there is no "image_types" in IMAGE_CLASSES
> and the build works just fine.
>
> Then that class likely does an 'inherit image_types' itself, thereby
> making the implicit dependency explicit.

  so which is the *preferred* way to advise developers how to write a
new class like that?  i realize both ways work, but if one is going to
document this, what's the *recommended* way that would go into the OE
style guide?  and, yes, there should be a recommended way. :-)

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================


More information about the meta-ti mailing list