Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8D093C433EF for ; Mon, 9 May 2022 20:23:01 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4CE7483E48; Mon, 9 May 2022 22:22:59 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="JZtWoC+b"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1210B83E48; Mon, 9 May 2022 22:22:58 +0200 (CEST) Received: from mail-qv1-xf34.google.com (mail-qv1-xf34.google.com [IPv6:2607:f8b0:4864:20::f34]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id E44C980A4F for ; Mon, 9 May 2022 22:22:53 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qv1-xf34.google.com with SMTP id c8so11299238qvh.10 for ; Mon, 09 May 2022 13:22:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=K5+4w9Wk/8ZQp8UzagdWKyE+lI2QUGqbFdXWzG/vxd0=; b=JZtWoC+bYV+cssvi58O7Zy03ud5H3zVEvwV730HYt8oUTkC3uZqxfeIaRO9bT71sUw 8hvcsly4H5OekkntxlnkXwkBEmoM7CqNGaigPEbHAXOF3iFQ9rznWFnFOV6aPVDcVjru nKnOHh+xKEzUIj+FrAks61hChqczGNWUzTKzQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=K5+4w9Wk/8ZQp8UzagdWKyE+lI2QUGqbFdXWzG/vxd0=; b=ULBMnO2EQ+bir9b3h1uV9W/evotDz2b4yVkTmSjY7CGxcR5NPe3m6aIzLk7NKXZbOD favJhenj0axfAdZg9G/GEGYMtmPLpYkZI+Yipr35ThZUcLv8TfxwnxxNbjHWscLpLDIn O8YCSLmn979vUY/CNSFFTe/IFBQPS+maywUtStQKwe4Qn8yxmJb2bgaENHysJ3ULXSfz q5YumIKQ0PDUOYIauI6dHSggImg9RuIEvwi/M/W/n1EKL2Gz+zYxA5jFPXn5LC98n8Cq prKuZvH279lEz6b5l5gDd019tiYeG/+t4ipKlo3MrwFPIe/Pyzr7nW9q1zfwAo9vt/YN D7jg== X-Gm-Message-State: AOAM531wjpIPC/5d80KsTZCrXpaJLIoj5OesouiMU3QIP0hsIImi3bNb tjZ+1kuj+o/0awhnwmyU2VoYJm1oOiNDkQ== X-Google-Smtp-Source: ABdhPJypJp3hyqAQkmjs6C5yJsnRuTZ4b/k9/eUnm6xiFdDA5qMVy3UOs/fZJKXkTeO244jvJk2xqg== X-Received: by 2002:ad4:5c6c:0:b0:45a:ac0b:5980 with SMTP id i12-20020ad45c6c000000b0045aac0b5980mr15100211qvh.124.1652127772715; Mon, 09 May 2022 13:22:52 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-4500-d110-18bb-ea39-1e35.res6.spectrum.com. [2603:6081:7b01:4500:d110:18bb:ea39:1e35]) by smtp.gmail.com with ESMTPSA id i22-20020ae9ee16000000b0069fc13ce1e5sm7371426qkg.22.2022.05.09.13.22.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 13:22:51 -0700 (PDT) Date: Mon, 9 May 2022 16:22:50 -0400 From: Tom Rini To: Pali =?iso-8859-1?Q?Roh=E1r?= Cc: Simon Glass , Stefan Roese , u-boot@lists.denx.de Subject: Re: [PATCH] SPL: Do not allow enabling SPL symbols for non-SPL builds Message-ID: <20220509202250.GD3901321@bill-the-cat> References: <20220509185350.19752-1-pali@kernel.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="iRaAnoDFBoP0sW/E" Content-Disposition: inline In-Reply-To: <20220509185350.19752-1-pali@kernel.org> X-Clacks-Overhead: GNU Terry Pratchett X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean --iRaAnoDFBoP0sW/E Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, May 09, 2022 at 08:53:50PM +0200, Pali Roh=E1r wrote: > It does not make sense to enable SPL options when not building SPL binary. >=20 > So disallow selecting SPL options for non-SPL builds. >=20 > Signed-off-by: Pali Roh=E1r 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 > =20 > -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" > =20 > endmenu > =20 > +if SPL > + > config SPL_LDSCRIPT > default "arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds" if (ARCH_MX23 || AR= CH_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 =2Econfig 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 > =20 > 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 > =20 > 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 > =20 > 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 > =20 > 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. > =20 > @@ -661,22 +665,26 @@ config VPL_LZMA > =20 > config SPL_LZO > bool "Enable LZO decompression support in SPL" > + depends on SPL > help > This enables support for LZO compression algorithm in the SPL. > =20 > 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. > =20 > config SPL_ZLIB > bool > + depends on SPL > help > This enables compression lib for SPL boot. > =20 > 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 --=20 Tom --iRaAnoDFBoP0sW/E Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmJ5eBkACgkQFHw5/5Y0 tywQJAv/UvuWGS0YN6DOCpLceOJndbRUiYvC4QozYFqAM0d97cO5nDFtwtPvQ3eb g0FCARMfwPXUnEHBOkiK3RfTy8YT7HlBoxZkCoP9UEI2gooT28AMzsZLltwbbomx W9qJMPNZhOv30qd6g7qBdjWCCzHjzFL49asAcVREkR2ESsCmspHLugmon/UAnefn OAIY3BD5QcQ8J4tFCU0csyVMt3WU8b3zaUmadCxZDd8HQEMdLceDZqEC/7rBwUgQ I0vqR+rIb0tErGae0xSgN60oZ7HEYhgYhVsUaCEyQgG5by5i6zrkjAJkAP4Xn/p1 pbeP0sHpVWrIH1g4iKdRam8ilJtsbttbk+CuuuuMF+lyAOZVNJxUb0zs2AkxO5TV YQJ3UF7aMPnP7z6hvjLbxza9r4+rmXm4yeO+C+ovBQWFs82GglmwtHp1beyt0UFJ W6KzJigMWR+n28OkX2J2X96m67ACoJS+F1Zv+Nh5jgkkzokRyU2n/8A1oS2fR63A dn3wJQYe =Bxrl -----END PGP SIGNATURE----- --iRaAnoDFBoP0sW/E--