Re: [LEDE-DEV] [PATCH 1/5] build: append metadata for supported images.gz

2017-11-30 Thread Christian Lamparter
On Tuesday, November 28, 2017 11:20:23 PM CET Christian Lamparter wrote:
> On Tuesday, November 28, 2017 11:07:54 PM CET Matthias Schiffer wrote:
> > On 11/28/2017 10:51 PM, Christian Lamparter wrote:
> > > Targets that either directly or indirectly set
> > > CONFIG_TARGET_IMAGES_GZIP currently have no way
> > > to append the metadata at the end of new image
> > > creation process. And this is going to be
> > > necessary in order to convert the targets to use
> > > the new fwtool assisted platform check.
> > > 
> > > These will include for example x86(_64), RPI, and
> > > MyBook Live images.
> > > 
> > > Note: append-metadata does internally check if
> > > SUPPORTED_DEVICES is set, before adding the
> > > metadata. Hence, it will not interfere with
> > > existing targets that have not been converted.
> > > 
> > > Cc: Felix Fietkau 
> > > Signed-off-by: Christian Lamparter 
> > > ---
> > 
> > It should not matter if the images are gzipped or not; the metadata should
> > be appended before gzipping. All image checks are done after zcat; if this
> > is not the case for the fwtool checks, IMO the checks need to be adjusted,
> > not the image generation.
> 
> Hm, why is then the raw metadata appended to the sysupgrade.tar files
> in the first place? Shouldn't it be a inside a file in the .tar as well?
> Or what's your solution supposed to look like otherwise? Add gzip handling
> to the fwtool?
> 
Mathias Kresin had a great idea and it solved the problem in a better way.
This patch is therefore obsolete. \o/

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH 1/5] build: append metadata for supported images.gz

2017-11-28 Thread Christian Lamparter
On Tuesday, November 28, 2017 11:07:54 PM CET Matthias Schiffer wrote:
> On 11/28/2017 10:51 PM, Christian Lamparter wrote:
> > Targets that either directly or indirectly set
> > CONFIG_TARGET_IMAGES_GZIP currently have no way
> > to append the metadata at the end of new image
> > creation process. And this is going to be
> > necessary in order to convert the targets to use
> > the new fwtool assisted platform check.
> > 
> > These will include for example x86(_64), RPI, and
> > MyBook Live images.
> > 
> > Note: append-metadata does internally check if
> > SUPPORTED_DEVICES is set, before adding the
> > metadata. Hence, it will not interfere with
> > existing targets that have not been converted.
> > 
> > Cc: Felix Fietkau 
> > Signed-off-by: Christian Lamparter 
> > ---
> 
> It should not matter if the images are gzipped or not; the metadata should
> be appended before gzipping. All image checks are done after zcat; if this
> is not the case for the fwtool checks, IMO the checks need to be adjusted,
> not the image generation.

Hm, why is then the raw metadata appended to the sysupgrade.tar files
in the first place? Shouldn't it be a inside a file in the .tar as well?
Or what's your solution supposed to look like otherwise? Add gzip handling
to the fwtool?

Christian
 
> >  include/image.mk | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/include/image.mk b/include/image.mk
> > index f4d0a157cd..a7342c9d53 100644
> > --- a/include/image.mk
> > +++ b/include/image.mk
> > @@ -494,6 +494,7 @@ define Device/Build/image
> >  
> >$(BIN_DIR)/$(call IMAGE_NAME,$(1),$(2)).gz: $(KDIR)/tmp/$(call 
> > IMAGE_NAME,$(1),$(2))
> > gzip -c -9n $$^ > $$@
> > +   $$(call Build/append-metadata)
> >  
> >$(BIN_DIR)/$(call IMAGE_NAME,$(1),$(2)): $(KDIR)/tmp/$(call 
> > IMAGE_NAME,$(1),$(2))
> > cp $$^ $$@
> > 
> 
> 
> 



___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH 1/5] build: append metadata for supported images.gz

2017-11-28 Thread Matthias Schiffer
On 11/28/2017 10:51 PM, Christian Lamparter wrote:
> Targets that either directly or indirectly set
> CONFIG_TARGET_IMAGES_GZIP currently have no way
> to append the metadata at the end of new image
> creation process. And this is going to be
> necessary in order to convert the targets to use
> the new fwtool assisted platform check.
> 
> These will include for example x86(_64), RPI, and
> MyBook Live images.
> 
> Note: append-metadata does internally check if
> SUPPORTED_DEVICES is set, before adding the
> metadata. Hence, it will not interfere with
> existing targets that have not been converted.
> 
> Cc: Felix Fietkau 
> Signed-off-by: Christian Lamparter 
> ---

It should not matter if the images are gzipped or not; the metadata should
be appended before gzipping. All image checks are done after zcat; if this
is not the case for the fwtool checks, IMO the checks need to be adjusted,
not the image generation.

Matthias


>  include/image.mk | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/include/image.mk b/include/image.mk
> index f4d0a157cd..a7342c9d53 100644
> --- a/include/image.mk
> +++ b/include/image.mk
> @@ -494,6 +494,7 @@ define Device/Build/image
>  
>$(BIN_DIR)/$(call IMAGE_NAME,$(1),$(2)).gz: $(KDIR)/tmp/$(call 
> IMAGE_NAME,$(1),$(2))
>   gzip -c -9n $$^ > $$@
> + $$(call Build/append-metadata)
>  
>$(BIN_DIR)/$(call IMAGE_NAME,$(1),$(2)): $(KDIR)/tmp/$(call 
> IMAGE_NAME,$(1),$(2))
>   cp $$^ $$@
> 




signature.asc
Description: OpenPGP digital signature
___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH 1/5] build: append metadata for supported images.gz

2017-11-28 Thread Christian Lamparter
Targets that either directly or indirectly set
CONFIG_TARGET_IMAGES_GZIP currently have no way
to append the metadata at the end of new image
creation process. And this is going to be
necessary in order to convert the targets to use
the new fwtool assisted platform check.

These will include for example x86(_64), RPI, and
MyBook Live images.

Note: append-metadata does internally check if
SUPPORTED_DEVICES is set, before adding the
metadata. Hence, it will not interfere with
existing targets that have not been converted.

Cc: Felix Fietkau 
Signed-off-by: Christian Lamparter 
---
 include/image.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/image.mk b/include/image.mk
index f4d0a157cd..a7342c9d53 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -494,6 +494,7 @@ define Device/Build/image
 
   $(BIN_DIR)/$(call IMAGE_NAME,$(1),$(2)).gz: $(KDIR)/tmp/$(call 
IMAGE_NAME,$(1),$(2))
gzip -c -9n $$^ > $$@
+   $$(call Build/append-metadata)
 
   $(BIN_DIR)/$(call IMAGE_NAME,$(1),$(2)): $(KDIR)/tmp/$(call 
IMAGE_NAME,$(1),$(2))
cp $$^ $$@
-- 
2.15.0


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev