Patchwork [bitbake-devel,3/3] bitbake.conf: add variable IMAGE_TYPES_MAP

login
register
mail settings
Submitter Kang Kai
Date Aug. 24, 2012, 9:15 a.m.
Message ID <b081443c18a09548804fe39eb718355e0f067ff5.1345799414.git.kai.kang@windriver.com>
Download mbox | patch
Permalink /patch/35283/
State New
Headers show

Comments

Kang Kai - Aug. 24, 2012, 9:15 a.m.
Add variable IMAGE_TYPES_MAP to replace the hob2 hard-coded image types
map.

The format of IMAGE_TYPES_MAP is:
"image_type1:realname_extend1 image_type2:realname_extend2,extend3 ..."

Signed-off-by: Kang Kai <kai.kang@windriver.com>
---
 meta/conf/bitbake.conf |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
Richard Purdie - Aug. 25, 2012, 7:45 a.m.
On Fri, 2012-08-24 at 17:15 +0800, Kang Kai wrote:
> Add variable IMAGE_TYPES_MAP to replace the hob2 hard-coded image types
> map.
> 
> The format of IMAGE_TYPES_MAP is:
> "image_type1:realname_extend1 image_type2:realname_extend2,extend3 ..."
> 
> Signed-off-by: Kang Kai <kai.kang@windriver.com>
> ---
>  meta/conf/bitbake.conf |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
> index ad98756..7d2a9b9 100644
> --- a/meta/conf/bitbake.conf
> +++ b/meta/conf/bitbake.conf
> @@ -770,3 +770,6 @@ BB_SIGNATURE_EXCLUDE_FLAGS ?= "doc defaultval _append _prepend deps depends lock
>  
>  MLPREFIX ??= ""
>  MULTILIB_VARIANTS ??= ""
> +
> +# Used by to Hob to filter image files
> +IMAGE_TYPES_MAP = "btrfs:btrfs cpio.gz:cpio.gz cpio.lzma:cpio.lzma cpio.xz:cpio.xz cpio:cpio cramfs:cramfs elf:elf ext2.bz2:ext2.bz2 ext2.gz:ext2.gz ext2.lzma:ext2.lzma ext2:ext2 ext3.gz:ext3.gz ext3:ext3 jffs2:jffs2 live:hddimg,iso squashfs-lzma:squashfs-lzma squashfs:squashfs sum.jffs2:sum.jffs2 tar.bz2:tar.bz2 tar.gz:tar.gz tar.xz:tar.xz tar:tar ubi:ubi vmdk:vmdk"

I think this still overcomplicates things. Firstly, can't we assume the
names map 1:1 with some exceptions.

For the exceptions, lets just add something like:

IMAGE_EXTENSION_live = "hddimg iso"

to image_types.bbclass (or image-live.bbclass)

and then the UI can query that variable name and assume a 1:1 mapping if
its not present.

Cheers,

Richard
Kang Kai - Aug. 27, 2012, 2:06 a.m.
On 2012?08?25? 15:45, Richard Purdie wrote:
> On Fri, 2012-08-24 at 17:15 +0800, Kang Kai wrote:
>> Add variable IMAGE_TYPES_MAP to replace the hob2 hard-coded image types
>> map.
>>
>> The format of IMAGE_TYPES_MAP is:
>> "image_type1:realname_extend1 image_type2:realname_extend2,extend3 ..."
>>
>> Signed-off-by: Kang Kai<kai.kang@windriver.com>
>> ---
>>   meta/conf/bitbake.conf |    3 +++
>>   1 files changed, 3 insertions(+), 0 deletions(-)
>>
>> diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
>> index ad98756..7d2a9b9 100644
>> --- a/meta/conf/bitbake.conf
>> +++ b/meta/conf/bitbake.conf
>> @@ -770,3 +770,6 @@ BB_SIGNATURE_EXCLUDE_FLAGS ?= "doc defaultval _append _prepend deps depends lock
>>
>>   MLPREFIX ??= ""
>>   MULTILIB_VARIANTS ??= ""
>> +
>> +# Used by to Hob to filter image files
>> +IMAGE_TYPES_MAP = "btrfs:btrfs cpio.gz:cpio.gz cpio.lzma:cpio.lzma cpio.xz:cpio.xz cpio:cpio cramfs:cramfs elf:elf ext2.bz2:ext2.bz2 ext2.gz:ext2.gz ext2.lzma:ext2.lzma ext2:ext2 ext3.gz:ext3.gz ext3:ext3 jffs2:jffs2 live:hddimg,iso squashfs-lzma:squashfs-lzma squashfs:squashfs sum.jffs2:sum.jffs2 tar.bz2:tar.bz2 tar.gz:tar.gz tar.xz:tar.xz tar:tar ubi:ubi vmdk:vmdk"

Hi Richard,

> I think this still overcomplicates things. Firstly, can't we assume the
> names map 1:1 with some exceptions.
>
> For the exceptions, lets just add something like:
>
> IMAGE_EXTENSION_live = "hddimg iso"
>
> to image_types.bbclass (or image-live.bbclass)
>
> and then the UI can query that variable name and assume a 1:1 mapping if
> its not present.
Thanks a lot.
I'll update it.

Regards,
Kai

>
> Cheers,
>
> Richard
>
>

Patch

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index ad98756..7d2a9b9 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -770,3 +770,6 @@  BB_SIGNATURE_EXCLUDE_FLAGS ?= "doc defaultval _append _prepend deps depends lock
 
 MLPREFIX ??= ""
 MULTILIB_VARIANTS ??= ""
+
+# Used by to Hob to filter image files
+IMAGE_TYPES_MAP = "btrfs:btrfs cpio.gz:cpio.gz cpio.lzma:cpio.lzma cpio.xz:cpio.xz cpio:cpio cramfs:cramfs elf:elf ext2.bz2:ext2.bz2 ext2.gz:ext2.gz ext2.lzma:ext2.lzma ext2:ext2 ext3.gz:ext3.gz ext3:ext3 jffs2:jffs2 live:hddimg,iso squashfs-lzma:squashfs-lzma squashfs:squashfs sum.jffs2:sum.jffs2 tar.bz2:tar.bz2 tar.gz:tar.gz tar.xz:tar.xz tar:tar ubi:ubi vmdk:vmdk"