From mboxrd@z Thu Jan 1 00:00:00 1970 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4F676C433F5 for ; Fri, 8 Oct 2021 12:19:31 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 3E0D060D07 for ; Fri, 8 Oct 2021 12:19:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 3E0D060D07 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=heitbaum.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D957983598; Fri, 8 Oct 2021 14:19:27 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=heitbaum.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=heitbaum.com header.i=@heitbaum.com header.b="kHlw83sW"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 04BE6833AE; Fri, 8 Oct 2021 11:34:18 +0200 (CEST) Received: from mail-pg1-x529.google.com (mail-pg1-x529.google.com [IPv6:2607:f8b0:4864:20::529]) (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 F12398018E for ; Fri, 8 Oct 2021 11:34:09 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=heitbaum.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=rudi@heitbaum.com Received: by mail-pg1-x529.google.com with SMTP id 75so2575173pga.3 for ; Fri, 08 Oct 2021 02:34:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heitbaum.com; s=google; h=date:from:to:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=9UoUCg+Ij2i3ON1TZKqprhMo7hVVqjSCeX9nwu8rL2M=; b=kHlw83sWS9BW48txjjdziv3Oug61X57L+ZRj9qy3MvlQNh3d4xSW73OsbX9iDv7WGU tkMWwIP386IOcehTVZCp5SA7xDRNvM3Ot/On0pEJ2L0WTjZQ0hCBK4pUcyBniuS/jNVC bo15k189/w3wS540jYeJmy5WnTNljCY5jQRS0= 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:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=9UoUCg+Ij2i3ON1TZKqprhMo7hVVqjSCeX9nwu8rL2M=; b=a4sNC/fAfuCzW6MfPdcQHIFojMd16OXYswUZCiWRrSJIcN8xDK6/W+WbnMVA8ktMLn Yjkm+01vGImw3b+5il48FW8Q6bprTfiyq5/BOvOylwapNcLuQHsoUm2hCjp3pFaVG+TQ KnTsf7fm8UZna2g7Nm03yEe4RVZfbGUFTuRESgl6JRF3sGN1JOe4NLxmxNeuYj517DAx lD2wHUZvzGlZsGUTvHWoeX6WqO2aRCORyDg8EYy1TPGZs6b7uID9TsLU75NHNyiBFPsJ r6IQhwRuxRBzt7OUpnp/Be0eRqNY18yPilbqtiu4WptHuG208vnUyXin0FEjdqudLzEE rGJw== X-Gm-Message-State: AOAM532gv5c0NgDsdqFs4wcr/IqOV5qgCiUMB84Kp64w19xOSEswFCo8 eunh0tSuyRMdLAIyOrInbux6dy3zmm/kDI0B X-Google-Smtp-Source: ABdhPJzzjx8S1YBk4X10wj6xTZgruH26CVCXNer0GVWykt5+DTN9pTXp3mRLgcX8DuCMlyJQTcLrqA== X-Received: by 2002:a65:6251:: with SMTP id q17mr3842102pgv.416.1633685647452; Fri, 08 Oct 2021 02:34:07 -0700 (PDT) Received: from 6e6aa5e986a2 (194-193-55-226.tpgi.com.au. [194.193.55.226]) by smtp.gmail.com with ESMTPSA id w11sm1990259pgf.5.2021.10.08.02.34.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 08 Oct 2021 02:34:06 -0700 (PDT) Date: Fri, 8 Oct 2021 20:34:03 +1100 From: Rudi Heitbaum To: u-boot@lists.denx.de Subject: Re: Broken build with disabling OpenSSL crypto Message-ID: <20211008093358.GA378316@6e6aa5e986a2> References: <18564205.Z0HQFNUZ9R@kista> <544c0c86-ca3f-036e-2523-3f973105410a@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <544c0c86-ca3f-036e-2523-3f973105410a@gmail.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-Mailman-Approved-At: Fri, 08 Oct 2021 14:19:26 +0200 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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 Wed, Oct 06, 2021 at 05:05:24PM -0500, Alex G. wrote: > Hi Jernej, > > On 10/6/21 4:27 PM, Jernej ?krabec wrote: > > Hi everyone! > > > > Commit cb9faa6f98ae ("tools: Use a single target-independent config to enable > > OpenSSL") recently introduced option to disable usage of OpenSSL via > > CONFIG_TOOLS_LIBCRYPTO. However, just a bit later, another commit b4f3cc2c42d9 > > ("tools: kwbimage: Do not hide usage of secure header under > > CONFIG_ARMADA_38X") made U-Boot tools hard dependent on OpenSSL. That totally > > defeats the purpose of first commit. I suggest that it gets reverted. > > > > I would like disable OpenSSL for my usage, since it gives me troubles when > > cross-compiling U-Boot inside LibreELEC build system. It's not needed for our > > case anyway. > > > > Best regards, > > > > Can you please give the following diff a try, and if it works for you, submit as patch? > > Alex Hi Alex, I can confirm the patch does work as expected. https://github.com/LibreELEC/LibreELEC.tv/pull/5719/files Setting the CONFIG_TOOLS_LIBCRYPTO=n - now results in a successful build. It fixes the must have SSL regression introduced in b4f3cc2c42d9. Regards Rudi > diff --git a/tools/Makefile b/tools/Makefile > index 4a86321f64..7f72ff9645 100644 > --- a/tools/Makefile > +++ b/tools/Makefile > @@ -96,7 +96,8 @@ AES_OBJS-$(CONFIG_TOOLS_LIBCRYPTO) := $(addprefix lib/aes/, \ > > # Cryptographic helpers that depend on openssl/libcrypto > LIBCRYPTO_OBJS-$(CONFIG_TOOLS_LIBCRYPTO) := $(addprefix lib/, \ > - fdt-libcrypto.o) > + fdt-libcrypto.o) \ > + kwbimage.o > > ROCKCHIP_OBS = lib/rc4.o rkcommon.o rkimage.o rksd.o rkspi.o > > @@ -117,7 +118,6 @@ dumpimage-mkimage-objs := aisimage.o \ > imximage.o \ > imx8image.o \ > imx8mimage.o \ > - kwbimage.o \ > lib/md5.o \ > lpc32xximage.o \ > mxsimage.o \ > @@ -169,8 +169,8 @@ HOST_EXTRACFLAGS += -DCONFIG_FIT_SIGNATURE_MAX_SIZE=0xffffffff > HOST_EXTRACFLAGS += -DCONFIG_FIT_CIPHER > endif > > -# MXSImage needs LibSSL > -ifneq ($(CONFIG_MX23)$(CONFIG_MX28)$(CONFIG_ARMADA_38X)$(CONFIG_TOOLS_LIBCRYPTO),) > +# MXSImage needs LibSSL <- Nope! Read the frogging notice at the top > +ifneq ($(CONFIG_TOOLS_LIBCRYPTO),) > HOSTCFLAGS_kwbimage.o += \ > $(shell pkg-config --cflags libssl libcrypto 2> /dev/null || echo "") > HOSTLDLIBS_mkimage += \