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 35536C433EF for ; Tue, 11 Jan 2022 20:44:23 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B960681D5D; Tue, 11 Jan 2022 21:44:20 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="qPu9B9P3"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 77964811DE; Tue, 11 Jan 2022 21:44:19 +0100 (CET) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4843B82F89 for ; Tue, 11 Jan 2022 21:44:16 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8F6AB615D3; Tue, 11 Jan 2022 20:44:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A9E78C36AE3; Tue, 11 Jan 2022 20:44:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1641933854; bh=dxpMroNeVUE/wJbmPAKQQV7L3ywz7uANXZg3i4sIwng=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=qPu9B9P3klAO1oPdpR5j7bZRa57JSdA9PxKxTRVqvu1GFL25CDoWMXBOl5XkVISTq igU92AFnA1gUWEdgstN4B/klKqDcmcW7jL8bwtnaNFHg6Vb+8SfyPuxsE9pkgEgOWm nuldrTkY6OaSLYiPc4yaAsq2z8/GdpSSWrnGJqzuTvgsFHzgUbFd93UsjiPzP0hwJG abgeBLGhPEYCagzwSFcPwIlyFknk1W3o17muKB7X56KUL5bSfKMx8WJWsAq/a5eNvA WUb21U7vtGDTKwP1GnL7ihFSc5TRu9ovRfLy3Ru8s+52E0EVNz26c/Gr0RievDa37U yq4uZC03722Ow== Received: by pali.im (Postfix) id 1D4CF7B5; Tue, 11 Jan 2022 21:44:11 +0100 (CET) Date: Tue, 11 Jan 2022 21:44:10 +0100 From: Pali =?utf-8?B?Um9ow6Fy?= To: "Alex G." Cc: Tom Rini , Marek Vasut , u-boot@lists.denx.de, Heinrich Schuchardt , Marek =?utf-8?B?QmVow7pu?= , Stefan Roese Subject: Re: [PATCH] tools: Do not build kwbimage if CONFIG_TOOLS_LIBCRYPTO=n Message-ID: <20220111204410.up5mp6uv5macj5wo@pali> References: <20220111153120.1276641-1-marex@denx.de> <20220111153634.k5ajrgf2orzdhnar@pali> <20220111161647.GF2773246@bill-the-cat> <20220111190917.GM2773246@bill-the-cat> <7608c558-0d3c-19c4-083d-9b15fd3298d0@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <7608c558-0d3c-19c4-083d-9b15fd3298d0@gmail.com> User-Agent: NeoMutt/20180716 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.2 at phobos.denx.de X-Virus-Status: Clean On Tuesday 11 January 2022 14:22:43 Alex G. wrote: > On 1/11/22 13:09, Tom Rini wrote: > > On Tue, Jan 11, 2022 at 07:58:05PM +0100, Marek Vasut wrote: > > > On 1/11/22 17:16, Tom Rini wrote: > > > > On Tue, Jan 11, 2022 at 04:36:34PM +0100, Pali Rohár wrote: > > > > > On Tuesday 11 January 2022 16:31:20 Marek Vasut wrote: > > > > > > The kwbimage has hard dependency on OpenSSL, do not build it > > > > > > in case TOOLS_LIBCRYPTO is disabled. > > > > > > > > > > This patch does not work as kwbimage is required for 32-bit Armada > > > > > platforms. So kwbimage.o cannot be disabled on these platforms. > > > > > > > > > > There is already proposal for fixing this issue: > > > > > https://patchwork.ozlabs.org/project/uboot/patch/20211021093304.25399-1-pali@kernel.org/ > > > > > > > > And needs to be respun to not have Kconfig issues. To answer something > > > > noted in that thread, yes, it would be good if Kconfig did, or had an > > > > option to make WARNING like that fatal. Or is the problem really that > > > > no, it's non-optional, really, to have OpenSSL installed? > > > > > > OpenSSL should be optional, I got this bug report where someone tried to > > > build u-boot on ancient debian oldoldstable with openssl 1.1.0 (without > > > ecdsa support), for a platform which doesn't need any of this crypto stuff. > > > So, disabling TOOLS_LIBCRYPTO was a sufficient for that platform to build in > > > that setup (with this patch). And there are plenty of such platforms in the > > > U-Boot tree (all that are not marvell I think). > > > > Right. So your patch is a step in the right direction, but we also need > > to have the appropriate platforms depend'ing on TOOLS_LIBCRYPTO and > > updating the help to note that some platforms require it as well, to > > build their images. > > I did not intend for TOOLS_LIBCRYPTO to be used beyond an on/off toggle for > the user. > > My suggestion is to allow platforms to build irrespective of > TOOLS_LIBCRYPTO, and print a warning if for some reason we can't generate a > bootable image. I see quite a few ARMv8 platforms throw such warnings on > gitlab-ci. We can compile an elf, right? Any good reason why kwbimage should > be different? > > Alex For me: build = generate a bootable image or at least I do not see a reason why an end user should be able to generate e.g. cmd/common.o object file without having working full toolchain for successful generation of final executable. Some platforms (e.g. that Marvell) are not ELF-based, so compiling ELF means nothing. kwbimage for these Marvell platforms is what generates final "executable" image and it does also other checks and tests. It is possible that build process generates SPL ELF binary but kwbimage refuse it. In most cases it means that user chose .config options unusable for booting, but it could mean also other issues. And this is something which CI tests can detect... if some patch is doing to break U-Boot on Marvell platforms. On mailing list are pending other patches which extends those kwbimage checks to prevent generating broken images (e.g. chosen SPL load address cannot be set into kwbimage). So printing a warning does not solve anything because warnings are ignored. Lot of packaging tools and also CI tests pass successfully if build process throw a warning. And if some platforms are throwing warnings on CI, is not this an issue which somebody should care about?