[OE-core] [PATCH] Add new IMAGE_CLASSES variable for classes for image generation

Saul Wold saul.wold at intel.com
Wed Nov 2 00:56:24 UTC 2011


On 11/01/2011 05:50 PM, McClintock Matthew-B29882 wrote:
> On Tue, Nov 1, 2011 at 7:31 PM, Saul Wold<saul.wold at intel.com>  wrote:
>>> +# Additional image generation features
>>> +#
>>> +# The following is a list of classes to import to use in the generation
>>> of images
>>> +# currently an example class is image_types_uboot
>>> +# IMAGE_CLASSES ?= "image_types_uboot"
>>> +
>>>   #
>>>   # Runtime testing of images
>>>   #
>>> diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
>>> index 05f4331..e932879 100644
>>> --- a/meta/classes/image.bbclass
>>> +++ b/meta/classes/image.bbclass
>>> @@ -111,7 +111,8 @@ def get_devtable_list(d):
>>>           str += " %s" % bb.which(bb.data.getVar('BBPATH', d, 1), devtable)
>>>       return str
>>>
>>> -inherit image_types
>>> +IMAGE_CLASSES = "image_types"
>>> +inherit ${IMAGE_CLASSES}
>>>
>> Does this really work with =, should it not be ?= here?
>
> Ugh. No. This was an attempt to fix this:
>
> +IMAGE_CLASSES ??= ""
> +inherit image_types ${IMAGE_CLASSES}
>
> which gives the following bitbake error:
>
> ERROR: classes/.bbclass is not a BitBake file
> ERROR: Command execution failed: Exited with 1
>
> when IMAGE_CLASSES is left as "". It's trying to inherit a ".bbclass"
> file. There is no good alternative because I have to enforce
> IMAGE_CLASSES is only modified by appending to it. So the only
> solution is to modifed the local.conf.sample to say
>
Right I understood that part from before I think.  But why can't you have

IMAGE_CLASSES ?= "image_types"

and then in the local.conf override that with

IMAGE_CLASSES = "image_types_uboot"

since image_types_uboot inherits image_types.

> IMAGE_CLASSES += "image_types_uboot" and leave the other bit as is...

I have to admit I like this a little better with the possible thought of 
breaking up image_types a little more, keep more used ones in 
image_types, but move lesser used ones to their on .bbclass

Them IMAGE_CLASSES truly is a list of image_type classes.

Sau!


> -M
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>





More information about the Openembedded-core mailing list