All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] support/scripts/genimage.sh: drop gzip compression
@ 2024-08-30  8:26 Peter Korsgaard
  2024-08-30  9:14 ` TIAN Yuanhao
  2024-08-30 17:09 ` Thomas Petazzoni via buildroot
  0 siblings, 2 replies; 3+ messages in thread
From: Peter Korsgaard @ 2024-08-30  8:26 UTC (permalink / raw)
  To: buildroot

Commit 6889056f1eb4 (support/scripts/genimage.sh: support creating a bmap
image) added unconditional gzip compression of the genimage outputs if
bmap-tools is enabled, which is problematic for a number of reasons:

- The gzip invocation is not reproducable (E.G. does not use -n)

- The original file is removed, dropping the sparse info

- It hardcodes policy, E.G.  bmap supports a number of different compression
  algorithms / compression may not be desired for all images / different
  compression levels may be desired

So drop the compression step.  If desired, compression can be done with a
post-image script.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 support/scripts/genimage.sh | 1 -
 1 file changed, 1 deletion(-)

diff --git a/support/scripts/genimage.sh b/support/scripts/genimage.sh
index b479ec9e0b..df224241ab 100755
--- a/support/scripts/genimage.sh
+++ b/support/scripts/genimage.sh
@@ -54,6 +54,5 @@ if grep -Eq "^BR2_PACKAGE_HOST_BMAP_TOOLS=y$" "${BR2_CONFIG}"; then
 			continue
 		fi
 		bmaptool create "${image_path}" -o "${image_path}.bmap"
-		gzip -c "${image_path}" > "${image_path}.gz"
 	done < <(grep '^image ' "${GENIMAGE_CFG}" | cut -d ' ' -f 2)
 fi
-- 
2.39.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH] support/scripts/genimage.sh: drop gzip compression
  2024-08-30  8:26 [Buildroot] [PATCH] support/scripts/genimage.sh: drop gzip compression Peter Korsgaard
@ 2024-08-30  9:14 ` TIAN Yuanhao
  2024-08-30 17:09 ` Thomas Petazzoni via buildroot
  1 sibling, 0 replies; 3+ messages in thread
From: TIAN Yuanhao @ 2024-08-30  9:14 UTC (permalink / raw)
  To: buildroot

At 2024-08-30 16:26:49, "Peter Korsgaard" <peter@korsgaard.com> wrote:
>Commit 6889056f1eb4 (support/scripts/genimage.sh: support creating a bmap
>image) added unconditional gzip compression of the genimage outputs if
>bmap-tools is enabled, which is problematic for a number of reasons:
>
>- The gzip invocation is not reproducable (E.G. does not use -n)
>
>- The original file is removed, dropping the sparse info
>
>- It hardcodes policy, E.G.  bmap supports a number of different compression
>  algorithms / compression may not be desired for all images / different
>  compression levels may be desired
>
>So drop the compression step.  If desired, compression can be done with a
>post-image script.
>
>Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
>---
> support/scripts/genimage.sh | 1 -
> 1 file changed, 1 deletion(-)
>
>diff --git a/support/scripts/genimage.sh b/support/scripts/genimage.sh
>index b479ec9e0b..df224241ab 100755
>--- a/support/scripts/genimage.sh
>+++ b/support/scripts/genimage.sh
>@@ -54,6 +54,5 @@ if grep -Eq "^BR2_PACKAGE_HOST_BMAP_TOOLS=y$" "${BR2_CONFIG}"; then
> 			continue
> 		fi
> 		bmaptool create "${image_path}" -o "${image_path}.bmap"
>-		gzip -c "${image_path}" > "${image_path}.gz"
> 	done < <(grep '^image ' "${GENIMAGE_CFG}" | cut -d ' ' -f 2)
> fi
>-- 
>2.39.2
>
>_______________________________________________
>buildroot mailing list
>buildroot@buildroot.org
>https://lists.buildroot.org/mailman/listinfo/buildroot

Acked-by: TIAN Yuanhao <tianyuanhao3@163.com>
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH] support/scripts/genimage.sh: drop gzip compression
  2024-08-30  8:26 [Buildroot] [PATCH] support/scripts/genimage.sh: drop gzip compression Peter Korsgaard
  2024-08-30  9:14 ` TIAN Yuanhao
@ 2024-08-30 17:09 ` Thomas Petazzoni via buildroot
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-08-30 17:09 UTC (permalink / raw)
  To: Peter Korsgaard; +Cc: buildroot

On Fri, 30 Aug 2024 10:26:49 +0200
Peter Korsgaard <peter@korsgaard.com> wrote:

> Commit 6889056f1eb4 (support/scripts/genimage.sh: support creating a bmap
> image) added unconditional gzip compression of the genimage outputs if
> bmap-tools is enabled, which is problematic for a number of reasons:
> 
> - The gzip invocation is not reproducable (E.G. does not use -n)
> 
> - The original file is removed, dropping the sparse info
> 
> - It hardcodes policy, E.G.  bmap supports a number of different compression
>   algorithms / compression may not be desired for all images / different
>   compression levels may be desired
> 
> So drop the compression step.  If desired, compression can be done with a
> post-image script.
> 
> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
> ---
>  support/scripts/genimage.sh | 1 -
>  1 file changed, 1 deletion(-)

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2024-08-30 17:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-30  8:26 [Buildroot] [PATCH] support/scripts/genimage.sh: drop gzip compression Peter Korsgaard
2024-08-30  9:14 ` TIAN Yuanhao
2024-08-30 17:09 ` Thomas Petazzoni via buildroot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.