mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 3/3] common: don't allow compressing in-barebox binaries again
Date: Mon, 11 Jul 2022 15:15:56 +0200	[thread overview]
Message-ID: <20220711131556.2122028-3-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20220711131556.2122028-1-a.fatoum@pengutronix.de>

For barebox with a prebootloader, we can compress barebox proper as a
whole and it makes no sense to compress the environment on its own
again. The choice already defaulted to this, but the user could still
override it. Ensure that this double compression can't happen.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 common/Kconfig | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/common/Kconfig b/common/Kconfig
index f1f0b4fab91c..ac23fa7f4419 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -869,29 +869,30 @@ choice
 	default DEFAULT_COMPRESSION_LZ4 if LZ4_DECOMPRESS
 	default DEFAULT_COMPRESSION_BZIP2 if BZLIB
 	help
-	  Select the default compression for in-barebox binary files. Files
-	  compiled into barebox like for example the default environment will
-	  be compressed with this compression type.
+	  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.
 
 config DEFAULT_COMPRESSION_GZIP
 	bool "gzip"
-	depends on ZLIB
+	depends on !PBL_IMAGE && ZLIB
 
 config DEFAULT_COMPRESSION_BZIP2
 	bool "bzip2"
-	depends on BZLIB
+	depends on !PBL_IMAGE && BZLIB
 
 config DEFAULT_COMPRESSION_LZO
 	bool "lzo"
-	depends on LZO_DECOMPRESS
+	depends on !PBL_IMAGE && LZO_DECOMPRESS
 
 config DEFAULT_COMPRESSION_LZ4
 	bool "lz4"
-	depends on LZ4_DECOMPRESS
+	depends on !PBL_IMAGE && LZ4_DECOMPRESS
 
 config DEFAULT_COMPRESSION_XZ
 	bool "xz"
-	depends on XZ_DECOMPRESS
+	depends on !PBL_IMAGE && XZ_DECOMPRESS
 
 config DEFAULT_COMPRESSION_NONE
 	bool "no compression"
-- 
2.30.2




      parent reply	other threads:[~2022-07-11 13:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-11 13:15 [PATCH 1/3] kbuild: gen-dtb-s: refactor to allow different compression methods Ahmad Fatoum
2022-07-11 13:15 ` [PATCH 2/3] scripts: gen-dtb-s: fallback to LZ4 if lzop is unavailable Ahmad Fatoum
2022-07-11 13:15 ` Ahmad Fatoum [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=20220711131556.2122028-3-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --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