mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] common: improve CONFIG_DEFAULT_COMPRESSION_* documentation
@ 2023-03-27  6:06 Ahmad Fatoum
  2023-03-28  8:00 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2023-03-27  6:06 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

This option is only relevant to non-PBL configurations and the
description is a bit confusing, because the default environment
is the only in-barebox binary this option compressed.

Use "built-in environment" instead of "in-barebox binaries" or "default
environment" to make this clearer.

Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
---
 common/Kconfig | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/common/Kconfig b/common/Kconfig
index 57fe5f7886de..d90b5fb88682 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -863,7 +863,7 @@ config DEFAULT_ENVIRONMENT
 	  CONFIG_ENV_HANDLING is not enabled.
 
 choice
-	prompt "default compression for in-barebox binaries"
+	prompt "default compression for built-in environment"
 	default DEFAULT_COMPRESSION_NONE if PBL_IMAGE
 	default DEFAULT_COMPRESSION_LZO if LZO_DECOMPRESS
 	default DEFAULT_COMPRESSION_XZ if XZ_DECOMPRESS
@@ -872,9 +872,13 @@ choice
 	default DEFAULT_COMPRESSION_BZIP2 if BZLIB
 	help
 	  For barebox builds without a prebootloader, select here the default
-	  compression for in-barebox binary files. barebox itself can't be
-	  compressed without a prebootloader, but for example the default
-	  environment will be compressed with this compression type.
+	  compression for the built-in environment. barebox itself can't be
+	  compressed without a prebootloader, but the built-in environment,
+	  including any binary files placed in it (e.g. in /env/data)
+	  will be compressed with this compression type.
+
+	  For barebox builds _with_ a prebootloader, the environment is
+	  compressed as part of barebox proper (CONFIG_IMAGE_COMPRESSION).
 
 config DEFAULT_COMPRESSION_GZIP
 	bool "gzip"
-- 
2.38.3




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

* Re: [PATCH] common: improve CONFIG_DEFAULT_COMPRESSION_* documentation
  2023-03-27  6:06 [PATCH] common: improve CONFIG_DEFAULT_COMPRESSION_* documentation Ahmad Fatoum
@ 2023-03-28  8:00 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2023-03-28  8:00 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: barebox

On Mon, Mar 27, 2023 at 08:06:52AM +0200, Ahmad Fatoum wrote:
> This option is only relevant to non-PBL configurations and the
> description is a bit confusing, because the default environment
> is the only in-barebox binary this option compressed.
> 
> Use "built-in environment" instead of "in-barebox binaries" or "default
> environment" to make this clearer.
> 

I wonder if we should make the whole thing invisible when there
is only one choice left, like below.

I don't know if there are some places which still need a
CONFIG_DEFAULT_COMPRESSION_NONE then. From a quick compilation of
imx_v7_defconfig it doesn't seem so, but I don't really know.

----------------------------------8<------------------------------

>From 2a463e109d06f62cd6c46339a19c45d5ec7bed96 Mon Sep 17 00:00:00 2001
From: Sascha Hauer <s.hauer@pengutronix.de>
Date: Tue, 28 Mar 2023 09:56:32 +0200
Subject: [PATCH] common: Make CONFIG_DEFAULT_COMPRESSION_* invisible when not
 needed

With PBL images DEFAULT_COMPRESSION_NONE is the only option left. Make
the whole choice invisible in that case.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 common/Kconfig | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/common/Kconfig b/common/Kconfig
index 57fe5f7886..644829c595 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -862,9 +862,10 @@ config DEFAULT_ENVIRONMENT
 	  the environment found in the environment sector is invalid or when
 	  CONFIG_ENV_HANDLING is not enabled.
 
+if !PBL_IMAGE
+
 choice
 	prompt "default compression for in-barebox binaries"
-	default DEFAULT_COMPRESSION_NONE if PBL_IMAGE
 	default DEFAULT_COMPRESSION_LZO if LZO_DECOMPRESS
 	default DEFAULT_COMPRESSION_XZ if XZ_DECOMPRESS
 	default DEFAULT_COMPRESSION_GZIP if ZLIB
@@ -878,29 +879,31 @@ choice
 
 config DEFAULT_COMPRESSION_GZIP
 	bool "gzip"
-	depends on !PBL_IMAGE && ZLIB
+	depends on ZLIB
 
 config DEFAULT_COMPRESSION_BZIP2
 	bool "bzip2"
-	depends on !PBL_IMAGE && BZLIB
+	depends on BZLIB
 
 config DEFAULT_COMPRESSION_LZO
 	bool "lzo"
-	depends on !PBL_IMAGE && LZO_DECOMPRESS
+	depends on LZO_DECOMPRESS
 
 config DEFAULT_COMPRESSION_LZ4
 	bool "lz4"
-	depends on !PBL_IMAGE && LZ4_DECOMPRESS
+	depends on LZ4_DECOMPRESS
 
 config DEFAULT_COMPRESSION_XZ
 	bool "xz"
-	depends on !PBL_IMAGE && XZ_DECOMPRESS
+	depends on XZ_DECOMPRESS
 
 config DEFAULT_COMPRESSION_NONE
 	bool "no compression"
 
 endchoice
 
+endif
+
 config DEFAULT_ENVIRONMENT_GENERIC_NEW
 	bool "Generic environment template"
 	depends on DEFAULT_ENVIRONMENT
-- 
2.39.2

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



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

end of thread, other threads:[~2023-03-28  8:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-27  6:06 [PATCH] common: improve CONFIG_DEFAULT_COMPRESSION_* documentation Ahmad Fatoum
2023-03-28  8:00 ` Sascha Hauer

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