Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] Add new IMAGE_CLASSES variable for classes for image generation
@ 2011-10-28  7:26 Matthew McClintock
  2011-11-02  0:31 ` Saul Wold
  0 siblings, 1 reply; 10+ messages in thread
From: Matthew McClintock @ 2011-10-28  7:26 UTC (permalink / raw)
  To: openembedded-core

Allows us to import classes only for images and not to the global
namespace

Signed-off-by: Matthew McClintock <msm@freescale.com>
---
This is a resend

 meta-yocto/conf/local.conf.sample |    6 ++++++
 meta/classes/image.bbclass        |    3 ++-
 2 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/meta-yocto/conf/local.conf.sample b/meta-yocto/conf/local.conf.sample
index da3f8df..5e59ad4 100644
--- a/meta-yocto/conf/local.conf.sample
+++ b/meta-yocto/conf/local.conf.sample
@@ -163,6 +163,12 @@ EXTRA_IMAGE_FEATURES = "debug-tweaks"
 # NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended
 USER_CLASSES ?= "image-mklibs image-prelink"
 
+# 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}
 
 IMAGE_POSTPROCESS_COMMAND ?= ""
 MACHINE_POSTPROCESS_COMMAND ?= ""
-- 
1.7.6.1





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

* Re: [PATCH] Add new IMAGE_CLASSES variable for classes for image generation
  2011-10-28  7:26 [PATCH] Add new IMAGE_CLASSES variable for classes for image generation Matthew McClintock
@ 2011-11-02  0:31 ` Saul Wold
  2011-11-02  0:50   ` McClintock Matthew-B29882
  0 siblings, 1 reply; 10+ messages in thread
From: Saul Wold @ 2011-11-02  0:31 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer; +Cc: Matthew McClintock

On 10/28/2011 12:26 AM, Matthew McClintock wrote:
> Allows us to import classes only for images and not to the global
> namespace
>
> Signed-off-by: Matthew McClintock<msm@freescale.com>
> ---
> This is a resend
>
>   meta-yocto/conf/local.conf.sample |    6 ++++++
>   meta/classes/image.bbclass        |    3 ++-
>   2 files changed, 8 insertions(+), 1 deletions(-)
>
> diff --git a/meta-yocto/conf/local.conf.sample b/meta-yocto/conf/local.conf.sample
> index da3f8df..5e59ad4 100644
> --- a/meta-yocto/conf/local.conf.sample
> +++ b/meta-yocto/conf/local.conf.sample
> @@ -163,6 +163,12 @@ EXTRA_IMAGE_FEATURES = "debug-tweaks"
>   # NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended
>   USER_CLASSES ?= "image-mklibs image-prelink"
>
> +# 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?

Sau!

>   IMAGE_POSTPROCESS_COMMAND ?= ""
>   MACHINE_POSTPROCESS_COMMAND ?= ""




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

* Re: [PATCH] Add new IMAGE_CLASSES variable for classes for image generation
  2011-11-02  0:31 ` Saul Wold
@ 2011-11-02  0:50   ` McClintock Matthew-B29882
  2011-11-02  0:54     ` McClintock Matthew-B29882
  2011-11-02  0:56     ` Saul Wold
  0 siblings, 2 replies; 10+ messages in thread
From: McClintock Matthew-B29882 @ 2011-11-02  0:50 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Tue, Nov 1, 2011 at 7:31 PM, Saul Wold <saul.wold@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

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

-M



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

* Re: [PATCH] Add new IMAGE_CLASSES variable for classes for image generation
  2011-11-02  0:50   ` McClintock Matthew-B29882
@ 2011-11-02  0:54     ` McClintock Matthew-B29882
  2011-11-02  0:56     ` Saul Wold
  1 sibling, 0 replies; 10+ messages in thread
From: McClintock Matthew-B29882 @ 2011-11-02  0:54 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Tue, Nov 1, 2011 at 7:50 PM, McClintock Matthew-B29882
<B29882@freescale.com> wrote:
> IMAGE_CLASSES += "image_types_uboot" and leave the other bit as is...

Except it seems I have to do this:

IMAGE_CLASSES_append = " image_types_uboot"

if I want the value to actually be appended.

-M



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

* Re: [PATCH] Add new IMAGE_CLASSES variable for classes for image generation
  2011-11-02  0:50   ` McClintock Matthew-B29882
  2011-11-02  0:54     ` McClintock Matthew-B29882
@ 2011-11-02  0:56     ` Saul Wold
  2011-11-02 15:03       ` McClintock Matthew-B29882
  1 sibling, 1 reply; 10+ messages in thread
From: Saul Wold @ 2011-11-02  0:56 UTC (permalink / raw)
  To: McClintock Matthew-B29882,
	Patches and discussions about the oe-core layer

On 11/01/2011 05:50 PM, McClintock Matthew-B29882 wrote:
> On Tue, Nov 1, 2011 at 7:31 PM, Saul Wold<saul.wold@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@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>




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

* Re: [PATCH] Add new IMAGE_CLASSES variable for classes for image generation
  2011-11-02  0:56     ` Saul Wold
@ 2011-11-02 15:03       ` McClintock Matthew-B29882
  2011-11-02 16:25         ` [PATCH v2] " Matthew McClintock
  0 siblings, 1 reply; 10+ messages in thread
From: McClintock Matthew-B29882 @ 2011-11-02 15:03 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Tue, Nov 1, 2011 at 7:56 PM, Saul Wold <saul.wold@intel.com> wrote:
> 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.

I think this is best, let the user override IMAGE_CLASSES to
(eventually) be able to add individual image_types_XYZ. Will send new
patch.

-M



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

* [PATCH v2] Add new IMAGE_CLASSES variable for classes for image generation
  2011-11-02 15:03       ` McClintock Matthew-B29882
@ 2011-11-02 16:25         ` Matthew McClintock
  2011-11-07 19:07           ` Saul Wold
  0 siblings, 1 reply; 10+ messages in thread
From: Matthew McClintock @ 2011-11-02 16:25 UTC (permalink / raw)
  To: openembedded-core

Allows us to import classes only for images and not to the global
namespace

Signed-off-by: Matthew McClintock <msm@freescale.com>
---
Change IMAGE_CLASSES definition to use ?= instead of =
so it's clear we want to override this variable. This worked
before because the value in my distro.conf file overwrote
this value regardless of the fact it was set with =

 meta-yocto/conf/local.conf.sample |    6 ++++++
 meta/classes/image.bbclass        |    3 ++-
 2 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/meta-yocto/conf/local.conf.sample b/meta-yocto/conf/local.conf.sample
index da3f8df..8177713 100644
--- a/meta-yocto/conf/local.conf.sample
+++ b/meta-yocto/conf/local.conf.sample
@@ -163,6 +163,12 @@ EXTRA_IMAGE_FEATURES = "debug-tweaks"
 # NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended
 USER_CLASSES ?= "image-mklibs image-prelink"
 
+# 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..a2770a4 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}
 
 IMAGE_POSTPROCESS_COMMAND ?= ""
 MACHINE_POSTPROCESS_COMMAND ?= ""
-- 
1.7.6.1





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

* Re: [PATCH v2] Add new IMAGE_CLASSES variable for classes for image generation
  2011-11-02 16:25         ` [PATCH v2] " Matthew McClintock
@ 2011-11-07 19:07           ` Saul Wold
  2011-11-07 19:20             ` [PATCH v3] " Matthew McClintock
  0 siblings, 1 reply; 10+ messages in thread
From: Saul Wold @ 2011-11-07 19:07 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer; +Cc: Matthew McClintock

On 11/02/2011 09:25 AM, Matthew McClintock wrote:
> Allows us to import classes only for images and not to the global
> namespace
>
> Signed-off-by: Matthew McClintock<msm@freescale.com>
> ---
> Change IMAGE_CLASSES definition to use ?= instead of =
> so it's clear we want to override this variable. This worked
> before because the value in my distro.conf file overwrote
> this value regardless of the fact it was set with =
>
>   meta-yocto/conf/local.conf.sample |    6 ++++++
>   meta/classes/image.bbclass        |    3 ++-
>   2 files changed, 8 insertions(+), 1 deletions(-)
>
> diff --git a/meta-yocto/conf/local.conf.sample b/meta-yocto/conf/local.conf.sample
> index da3f8df..8177713 100644
> --- a/meta-yocto/conf/local.conf.sample
> +++ b/meta-yocto/conf/local.conf.sample
> @@ -163,6 +163,12 @@ EXTRA_IMAGE_FEATURES = "debug-tweaks"
>   # NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended
>   USER_CLASSES ?= "image-mklibs image-prelink"
>
> +# 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
>   #

The preferred location for this advanced functionality should be the 
local.conf.sample.extended as Richard points out, please resubmit.

Thanks
	Sau!

> diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
> index 05f4331..a2770a4 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}
>
>   IMAGE_POSTPROCESS_COMMAND ?= ""
>   MACHINE_POSTPROCESS_COMMAND ?= ""



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

* [PATCH v3] Add new IMAGE_CLASSES variable for classes for image generation
  2011-11-07 19:07           ` Saul Wold
@ 2011-11-07 19:20             ` Matthew McClintock
  2011-11-08 23:01               ` Saul Wold
  0 siblings, 1 reply; 10+ messages in thread
From: Matthew McClintock @ 2011-11-07 19:20 UTC (permalink / raw)
  To: openembedded-core

Allows us to import classes only for images and not to the global
namespace

Signed-off-by: Matthew McClintock <msm@freescale.com>
---

v2: Change IMAGE_CLASSES definition to use ?= instead of =
so it's clear we want to override this variable. This worked
before because the value in my distro.conf file overwrote
this value regardless of the fact it was set with =

v3: Move documentation to local.conf.sample.extended

 meta-yocto/conf/local.conf.sample.extended |    6 ++++++
 meta/classes/image.bbclass                 |    3 ++-
 2 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/meta-yocto/conf/local.conf.sample.extended b/meta-yocto/conf/local.conf.sample.extended
index 0c3197d..e9935ce 100644
--- a/meta-yocto/conf/local.conf.sample.extended
+++ b/meta-yocto/conf/local.conf.sample.extended
@@ -114,3 +114,9 @@
 # The network based PR service host and port
 #PRSERV_HOST = "localhost"
 #PRSERV_PORT = "8585"
+
+# 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"
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 05f4331..a2770a4 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}
 
 IMAGE_POSTPROCESS_COMMAND ?= ""
 MACHINE_POSTPROCESS_COMMAND ?= ""
-- 
1.7.6.1





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

* Re: [PATCH v3] Add new IMAGE_CLASSES variable for classes for image generation
  2011-11-07 19:20             ` [PATCH v3] " Matthew McClintock
@ 2011-11-08 23:01               ` Saul Wold
  0 siblings, 0 replies; 10+ messages in thread
From: Saul Wold @ 2011-11-08 23:01 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer; +Cc: Matthew McClintock

On 11/07/2011 11:20 AM, Matthew McClintock wrote:
> Allows us to import classes only for images and not to the global
> namespace
>
> Signed-off-by: Matthew McClintock<msm@freescale.com>
> ---
>
> v2: Change IMAGE_CLASSES definition to use ?= instead of =
> so it's clear we want to override this variable. This worked
> before because the value in my distro.conf file overwrote
> this value regardless of the fact it was set with =
>
> v3: Move documentation to local.conf.sample.extended
>
>   meta-yocto/conf/local.conf.sample.extended |    6 ++++++
>   meta/classes/image.bbclass                 |    3 ++-
>   2 files changed, 8 insertions(+), 1 deletions(-)
>
> diff --git a/meta-yocto/conf/local.conf.sample.extended b/meta-yocto/conf/local.conf.sample.extended
> index 0c3197d..e9935ce 100644
> --- a/meta-yocto/conf/local.conf.sample.extended
> +++ b/meta-yocto/conf/local.conf.sample.extended
> @@ -114,3 +114,9 @@
>   # The network based PR service host and port
>   #PRSERV_HOST = "localhost"
>   #PRSERV_PORT = "8585"
> +
> +# 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"
> diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
> index 05f4331..a2770a4 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}
>
>   IMAGE_POSTPROCESS_COMMAND ?= ""
>   MACHINE_POSTPROCESS_COMMAND ?= ""

Merged to OE-Core

Thanks
	Sau!



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

end of thread, other threads:[~2011-11-08 23:08 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-28  7:26 [PATCH] Add new IMAGE_CLASSES variable for classes for image generation Matthew McClintock
2011-11-02  0:31 ` Saul Wold
2011-11-02  0:50   ` McClintock Matthew-B29882
2011-11-02  0:54     ` McClintock Matthew-B29882
2011-11-02  0:56     ` Saul Wold
2011-11-02 15:03       ` McClintock Matthew-B29882
2011-11-02 16:25         ` [PATCH v2] " Matthew McClintock
2011-11-07 19:07           ` Saul Wold
2011-11-07 19:20             ` [PATCH v3] " Matthew McClintock
2011-11-08 23:01               ` Saul Wold

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