mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <sha@pengutronix.de>
To: Ahmad Fatoum <ahmad@a3f.at>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] common: improve CONFIG_DEFAULT_COMPRESSION_* documentation
Date: Tue, 28 Mar 2023 10:00:56 +0200	[thread overview]
Message-ID: <20230328080056.GI19113@pengutronix.de> (raw)
In-Reply-To: <20230327060652.2055761-1-ahmad@a3f.at>

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 |



      reply	other threads:[~2023-03-28  8:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-27  6:06 Ahmad Fatoum
2023-03-28  8:00 ` Sascha Hauer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230328080056.GI19113@pengutronix.de \
    --to=sha@pengutronix.de \
    --cc=ahmad@a3f.at \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox