public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: "Pali Rohár" <pali@kernel.org>
Cc: Simon Glass <sjg@chromium.org>, Stefan Roese <sr@denx.de>,
	u-boot@lists.denx.de
Subject: Re: [PATCH] SPL: Do not allow enabling SPL symbols for non-SPL builds
Date: Mon, 9 May 2022 16:22:50 -0400	[thread overview]
Message-ID: <20220509202250.GD3901321@bill-the-cat> (raw)
In-Reply-To: <20220509185350.19752-1-pali@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 3281 bytes --]

On Mon, May 09, 2022 at 08:53:50PM +0200, Pali Rohár wrote:

> It does not make sense to enable SPL options when not building SPL binary.
> 
> So disallow selecting SPL options for non-SPL builds.
> 
> Signed-off-by: Pali Rohár <pali@kernel.org>

Some of this makes sense, where you add SPL as an explicit dependency.
But others:

> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index 0afec5155b1b..e4b2b76650fe 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -985,7 +985,7 @@ config ARCH_MX6
>  	imply SYS_THUMB_BUILD
>  	imply SPL_SEPARATE_BSS
>  
> -if ARCH_MX6
> +if ARCH_MX6 && SPL
>  config SPL_LDSCRIPT
>  	default "arch/arm/mach-omap2/u-boot-spl.lds"
>  endif
> @@ -2343,7 +2343,11 @@ source "arch/arm/Kconfig.debug"
>  
>  endmenu
>  
> +if SPL
> +
>  config SPL_LDSCRIPT
>  	default "arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds" if (ARCH_MX23 || ARCH_MX28) && !SPL_FRAMEWORK
>  	default "arch/arm/cpu/arm1136/u-boot-spl.lds" if CPU_ARM1136
>  	default "arch/arm/cpu/armv8/u-boot-spl.lds" if ARM64
> +
> +endif

Where it's like this and we're providing default values and the option
itself is prompt'd elsewhere don't as it's not cluttering the resulting
.config file.

> diff --git a/lib/Kconfig b/lib/Kconfig
> index acc0ac081a44..299381ac80d5 100644
> --- a/lib/Kconfig
> +++ b/lib/Kconfig
> @@ -239,6 +239,7 @@ config GENERATE_ACPI_TABLE
>  
>  config SPL_TINY_MEMSET
>  	bool "Use a very small memset() in SPL"
> +	depends on SPL
>  	help
>  	  The faster memset() is the arch-specific one (if available) enabled
>  	  by CONFIG_USE_ARCH_MEMSET. If that is not enabled, we can still get
> @@ -556,6 +557,7 @@ config MD5
>  
>  config SPL_MD5
>  	bool "Support MD5 algorithm in SPL"
> +	depends on SPL
>  	help
>  	  This option enables MD5 support in SPL. MD5 is an algorithm designed
>  	  in 1991 that produces a 16-byte digest (or checksum) from its input
> @@ -642,6 +644,7 @@ config ZSTD
>  
>  config SPL_LZ4
>  	bool "Enable LZ4 decompression support in SPL"
> +	depends on SPL
>  	help
>  	  This enables support for the LZ4 decompression algorithm in SPL. LZ4
>  	  is a lossless data compression algorithm that is focused on
> @@ -650,6 +653,7 @@ config SPL_LZ4
>  
>  config SPL_LZMA
>  	bool "Enable LZMA decompression support for SPL build"
> +	depends on SPL
>  	help
>  	  This enables support for LZMA compression algorithm for SPL boot.
>  
> @@ -661,22 +665,26 @@ config VPL_LZMA
>  
>  config SPL_LZO
>  	bool "Enable LZO decompression support in SPL"
> +	depends on SPL
>  	help
>  	  This enables support for LZO compression algorithm in the SPL.
>  
>  config SPL_GZIP
>  	bool "Enable gzip decompression support for SPL build"
> +	depends on SPL
>  	select SPL_ZLIB
>  	help
>  	  This enables support for the GZIP compression algorithm for SPL boot.
>  
>  config SPL_ZLIB
>  	bool
> +	depends on SPL
>  	help
>  	  This enables compression lib for SPL boot.
>  
>  config SPL_ZSTD
>  	bool "Enable Zstandard decompression support in SPL"
> +	depends on SPL
>  	select XXHASH
>  	help
>  	  This enables Zstandard decompression library in the SPL.

Most of these should all be under one big if SPL ... endif

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

  reply	other threads:[~2022-05-09 20:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-09 18:53 [PATCH] SPL: Do not allow enabling SPL symbols for non-SPL builds Pali Rohár
2022-05-09 20:22 ` Tom Rini [this message]
2022-05-10 11:29   ` Pali Rohár
2022-05-10 12:34     ` Tom Rini
2022-05-24  9:11 ` [PATCH v2] " Pali Rohár
2022-06-08 12:51   ` Tom Rini

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=20220509202250.GD3901321@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=pali@kernel.org \
    --cc=sjg@chromium.org \
    --cc=sr@denx.de \
    --cc=u-boot@lists.denx.de \
    /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