Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH v1 0/1] Add base64 as conversion type
@ 2019-02-11  6:02 Silvio Fricke
  2019-02-11  6:02 ` [PATCH v1 1/1] image_types: add base64 conversion Silvio Fricke
  0 siblings, 1 reply; 5+ messages in thread
From: Silvio Fricke @ 2019-02-11  6:02 UTC (permalink / raw)
  To: openembedded-core

Hi #oe,

please add this small patch to your openembedded-core layer. It adds
support to get base64 encoded images as output.

Cheers,
	Silvio

Silvio Fricke (1):
  image_types: add base64 conversion

 meta/classes/image_types.bbclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

-- 
2.20.1



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

* [PATCH v1 1/1] image_types: add base64 conversion
  2019-02-11  6:02 [PATCH v1 0/1] Add base64 as conversion type Silvio Fricke
@ 2019-02-11  6:02 ` Silvio Fricke
  2019-02-11 10:27   ` Burton, Ross
  0 siblings, 1 reply; 5+ messages in thread
From: Silvio Fricke @ 2019-02-11  6:02 UTC (permalink / raw)
  To: openembedded-core

Sometimes it is useful to have a base64 representation of an image.

Signed-off-by: Silvio Fricke <silvio.fricke@gmail.com>
---
 meta/classes/image_types.bbclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index 70bd315306..ddca5b624e 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -280,7 +280,7 @@ IMAGE_TYPES = " \
 # CONVERSION_CMD/DEPENDS.
 COMPRESSIONTYPES ?= ""
 
-CONVERSIONTYPES = "gz bz2 lzma xz lz4 lzo zip sum md5sum sha1sum sha224sum sha256sum sha384sum sha512sum bmap u-boot vmdk vdi qcow2 ${COMPRESSIONTYPES}"
+CONVERSIONTYPES = "gz bz2 lzma xz lz4 lzo zip sum md5sum sha1sum sha224sum sha256sum sha384sum sha512sum bmap u-boot vmdk vdi qcow2 base64 ${COMPRESSIONTYPES}"
 CONVERSION_CMD_lzma = "lzma -k -f -7 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
 CONVERSION_CMD_gz = "pigz -f -9 -n -c ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.gz"
 CONVERSION_CMD_bz2 = "pbzip2 -f -k ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
@@ -300,6 +300,7 @@ CONVERSION_CMD_u-boot = "mkimage -A ${UBOOT_ARCH} -O linux -T ramdisk -C none -n
 CONVERSION_CMD_vmdk = "qemu-img convert -O vmdk ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.vmdk"
 CONVERSION_CMD_vdi = "qemu-img convert -O vdi ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.vdi"
 CONVERSION_CMD_qcow2 = "qemu-img convert -O qcow2 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.qcow2"
+CONVERSION_CMD_base64 = "base64 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.base64"
 CONVERSION_DEPENDS_lzma = "xz-native"
 CONVERSION_DEPENDS_gz = "pigz-native"
 CONVERSION_DEPENDS_bz2 = "pbzip2-native"
@@ -313,6 +314,7 @@ CONVERSION_DEPENDS_u-boot = "u-boot-tools-native"
 CONVERSION_DEPENDS_vmdk = "qemu-native"
 CONVERSION_DEPENDS_vdi = "qemu-native"
 CONVERSION_DEPENDS_qcow2 = "qemu-native"
+CONVERSION_DEPENDS_base64 = "coreutils-native"
 
 RUNNABLE_IMAGE_TYPES ?= "ext2 ext3 ext4"
 RUNNABLE_MACHINE_PATTERNS ?= "qemu"
-- 
2.20.1



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

* Re: [PATCH v1 1/1] image_types: add base64 conversion
  2019-02-11  6:02 ` [PATCH v1 1/1] image_types: add base64 conversion Silvio Fricke
@ 2019-02-11 10:27   ` Burton, Ross
  2019-02-11 12:14     ` S. Fricke
  0 siblings, 1 reply; 5+ messages in thread
From: Burton, Ross @ 2019-02-11 10:27 UTC (permalink / raw)
  To: Silvio Fricke; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 2735 bytes --]

Is it?  I'm genuinely curious when a base64 encoded image is useful.

Ross

On Mon, 11 Feb 2019 at 06:03, Silvio Fricke <silvio.fricke@gmail.com> wrote:

> Sometimes it is useful to have a base64 representation of an image.
>
> Signed-off-by: Silvio Fricke <silvio.fricke@gmail.com>
> ---
>  meta/classes/image_types.bbclass | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/meta/classes/image_types.bbclass
> b/meta/classes/image_types.bbclass
> index 70bd315306..ddca5b624e 100644
> --- a/meta/classes/image_types.bbclass
> +++ b/meta/classes/image_types.bbclass
> @@ -280,7 +280,7 @@ IMAGE_TYPES = " \
>  # CONVERSION_CMD/DEPENDS.
>  COMPRESSIONTYPES ?= ""
>
> -CONVERSIONTYPES = "gz bz2 lzma xz lz4 lzo zip sum md5sum sha1sum
> sha224sum sha256sum sha384sum sha512sum bmap u-boot vmdk vdi qcow2
> ${COMPRESSIONTYPES}"
> +CONVERSIONTYPES = "gz bz2 lzma xz lz4 lzo zip sum md5sum sha1sum
> sha224sum sha256sum sha384sum sha512sum bmap u-boot vmdk vdi qcow2 base64
> ${COMPRESSIONTYPES}"
>  CONVERSION_CMD_lzma = "lzma -k -f -7
> ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
>  CONVERSION_CMD_gz = "pigz -f -9 -n -c
> ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} >
> ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.gz"
>  CONVERSION_CMD_bz2 = "pbzip2 -f -k
> ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
> @@ -300,6 +300,7 @@ CONVERSION_CMD_u-boot = "mkimage -A ${UBOOT_ARCH} -O
> linux -T ramdisk -C none -n
>  CONVERSION_CMD_vmdk = "qemu-img convert -O vmdk
> ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}
> ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.vmdk"
>  CONVERSION_CMD_vdi = "qemu-img convert -O vdi
> ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}
> ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.vdi"
>  CONVERSION_CMD_qcow2 = "qemu-img convert -O qcow2
> ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}
> ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.qcow2"
> +CONVERSION_CMD_base64 = "base64 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}
> > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.base64"
>  CONVERSION_DEPENDS_lzma = "xz-native"
>  CONVERSION_DEPENDS_gz = "pigz-native"
>  CONVERSION_DEPENDS_bz2 = "pbzip2-native"
> @@ -313,6 +314,7 @@ CONVERSION_DEPENDS_u-boot = "u-boot-tools-native"
>  CONVERSION_DEPENDS_vmdk = "qemu-native"
>  CONVERSION_DEPENDS_vdi = "qemu-native"
>  CONVERSION_DEPENDS_qcow2 = "qemu-native"
> +CONVERSION_DEPENDS_base64 = "coreutils-native"
>
>  RUNNABLE_IMAGE_TYPES ?= "ext2 ext3 ext4"
>  RUNNABLE_MACHINE_PATTERNS ?= "qemu"
> --
> 2.20.1
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>

[-- Attachment #2: Type: text/html, Size: 3617 bytes --]

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

* Re: [PATCH v1 1/1] image_types: add base64 conversion
  2019-02-11 10:27   ` Burton, Ross
@ 2019-02-11 12:14     ` S. Fricke
  2019-02-11 12:28       ` Burton, Ross
  0 siblings, 1 reply; 5+ messages in thread
From: S. Fricke @ 2019-02-11 12:14 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core

Hi,

>    Is it?  I'm genuinely curious when a base64 encoded image is useful. 

It is! :-)
We are using a softwarestack which use base64 (I am delighted thats no one is
using uuencode ^^) encoded images to transfer them via wire. I can not change
this stack.

If this isn't useful, maybe you can help me to get a own conversion cmd into
my own bbclasses? I have tried it in several ways, but nothing worked. The
last approach was to change the image_type.bbclass.


TIA,
Silvio


>    Ross
>    On Mon, 11 Feb 2019 at 06:03, Silvio Fricke <[1]silvio.fricke@gmail.com>
>    wrote:
> 
>      Sometimes it is useful to have a base64 representation of an image.
> 
>      Signed-off-by: Silvio Fricke <[2]silvio.fricke@gmail.com>
>      ---
>       meta/classes/image_types.bbclass | 4 +++-
>       1 file changed, 3 insertions(+), 1 deletion(-)
> 
>      diff --git a/meta/classes/image_types.bbclass
>      b/meta/classes/image_types.bbclass
>      index 70bd315306..ddca5b624e 100644
>      --- a/meta/classes/image_types.bbclass
>      +++ b/meta/classes/image_types.bbclass
>      @@ -280,7 +280,7 @@ IMAGE_TYPES = " \
>       # CONVERSION_CMD/DEPENDS.
>       COMPRESSIONTYPES ?= ""
> 
>      -CONVERSIONTYPES = "gz bz2 lzma xz lz4 lzo zip sum md5sum sha1sum
>      sha224sum sha256sum sha384sum sha512sum bmap u-boot vmdk vdi qcow2
>      ${COMPRESSIONTYPES}"
>      +CONVERSIONTYPES = "gz bz2 lzma xz lz4 lzo zip sum md5sum sha1sum
>      sha224sum sha256sum sha384sum sha512sum bmap u-boot vmdk vdi qcow2
>      base64 ${COMPRESSIONTYPES}"
>       CONVERSION_CMD_lzma = "lzma -k -f -7
>      ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
>       CONVERSION_CMD_gz = "pigz -f -9 -n -c
>      ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} >
>      ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.gz"
>       CONVERSION_CMD_bz2 = "pbzip2 -f -k
>      ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
>      @@ -300,6 +300,7 @@ CONVERSION_CMD_u-boot = "mkimage -A ${UBOOT_ARCH} -O
>      linux -T ramdisk -C none -n
>       CONVERSION_CMD_vmdk = "qemu-img convert -O vmdk
>      ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}
>      ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.vmdk"
>       CONVERSION_CMD_vdi = "qemu-img convert -O vdi
>      ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}
>      ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.vdi"
>       CONVERSION_CMD_qcow2 = "qemu-img convert -O qcow2
>      ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}
>      ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.qcow2"
>      +CONVERSION_CMD_base64 = "base64
>      ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} >
>      ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.base64"
>       CONVERSION_DEPENDS_lzma = "xz-native"
>       CONVERSION_DEPENDS_gz = "pigz-native"
>       CONVERSION_DEPENDS_bz2 = "pbzip2-native"
>      @@ -313,6 +314,7 @@ CONVERSION_DEPENDS_u-boot = "u-boot-tools-native"
>       CONVERSION_DEPENDS_vmdk = "qemu-native"
>       CONVERSION_DEPENDS_vdi = "qemu-native"
>       CONVERSION_DEPENDS_qcow2 = "qemu-native"
>      +CONVERSION_DEPENDS_base64 = "coreutils-native"
> 
>       RUNNABLE_IMAGE_TYPES ?= "ext2 ext3 ext4"
>       RUNNABLE_MACHINE_PATTERNS ?= "qemu"
>      --
>      2.20.1
> 
>      --
>      _______________________________________________
>      Openembedded-core mailing list
>      [3]Openembedded-core@lists.openembedded.org
>      [4]http://lists.openembedded.org/mailman/listinfo/openembedded-core
> 
> References
> 
>    Visible links
>    1. mailto:silvio.fricke@gmail.com
>    2. mailto:silvio.fricke@gmail.com
>    3. mailto:Openembedded-core@lists.openembedded.org
>    4. http://lists.openembedded.org/mailman/listinfo/openembedded-core
> /usr/bin/xdg-open: line 881: www-browser: command not found
> /usr/bin/xdg-open: line 881: links2: command not found

-- 
-- S. Fricke ---------------------------------------- silvio@port1024.net --
   Diplom-Informatiker (FH)
   Linux-Development                         Matrix: @silvio:port1024.net   
----------------------------------------------------------------------------


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

* Re: [PATCH v1 1/1] image_types: add base64 conversion
  2019-02-11 12:14     ` S. Fricke
@ 2019-02-11 12:28       ` Burton, Ross
  0 siblings, 0 replies; 5+ messages in thread
From: Burton, Ross @ 2019-02-11 12:28 UTC (permalink / raw)
  To: S. Fricke; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 732 bytes --]

On Mon, 11 Feb 2019 at 12:14, S. Fricke <silvio.fricke@gmail.com> wrote:

> Hi,
>
> >    Is it?  I'm genuinely curious when a base64 encoded image is useful.
>
> It is! :-)
> We are using a softwarestack which use base64 (I am delighted thats no one
> is
> using uuencode ^^) encoded images to transfer them via wire. I can not
> change
> this stack.
>

Ah, fair enough.  Yes in that case I guess that it's not uu is good :)


> If this isn't useful, maybe you can help me to get a own conversion cmd
> into
> my own bbclasses? I have tried it in several ways, but nothing worked. The
> last approach was to change the image_type.bbclass.


It's very low-impact so I don't object to this in oe-core.

Ross

[-- Attachment #2: Type: text/html, Size: 1318 bytes --]

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

end of thread, other threads:[~2019-02-11 12:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-11  6:02 [PATCH v1 0/1] Add base64 as conversion type Silvio Fricke
2019-02-11  6:02 ` [PATCH v1 1/1] image_types: add base64 conversion Silvio Fricke
2019-02-11 10:27   ` Burton, Ross
2019-02-11 12:14     ` S. Fricke
2019-02-11 12:28       ` Burton, Ross

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