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 C96DDC433EF for ; Wed, 6 Oct 2021 22:05:36 +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 0B452610A8 for ; Wed, 6 Oct 2021 22:05:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 0B452610A8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.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 0C72183323; Thu, 7 Oct 2021 00:05:33 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com 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=gmail.com header.i=@gmail.com header.b="F+wyib5J"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 815AE8331D; Thu, 7 Oct 2021 00:05:30 +0200 (CEST) Received: from mail-ot1-x32a.google.com (mail-ot1-x32a.google.com [IPv6:2607:f8b0:4864:20::32a]) (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 5C5C08020E for ; Thu, 7 Oct 2021 00:05:27 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=mr.nuke.me@gmail.com Received: by mail-ot1-x32a.google.com with SMTP id v2-20020a05683018c200b0054e3acddd91so488045ote.8 for ; Wed, 06 Oct 2021 15:05:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:subject:to:references:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=SNgBnmu65+OynBSiUjIsdRhUzouNuh/saC/G9+FiCUU=; b=F+wyib5JawzgoAMZZw66mtHmYJbvaGczb53DJ53LJezdGdyfmNhvHBVyM/hyFNHndd Vq6Z5Chl/M2rQIHktf8AqJPeiM9iUZ1PfFI5TQHwm4ZHscXHznM8XqFMR062FLGPTIfL MRGrHpORYV/dT1tNxwz/PwH6aTCUxedskMgRoOUhWpyNK4mvOM9r9L4ghU+vShKPyqLh eOwzfzk3loRYoBMctiNnQaBQ/SlWOTwPyvF3c+1ej3mg9xPVJOww/gEhSsipSmPgC/4O W+yHfHMAcCFeZdDzgCvBzxzbdziJ3otVTtf3TNxRw6wFSg9PS0SEMhLg/Cj4GnsP3wAm sBag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:subject:to:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=SNgBnmu65+OynBSiUjIsdRhUzouNuh/saC/G9+FiCUU=; b=anc/feaFt9VJLOcJYHOO4cSXJMe5jzqO7YXyU9+puFGcYsyMCCFQaSI587TrC7InpZ 9BcJhGuUrSAEmqmXRV7Snx7zWBK3v0t5aDKKClYphlM6Jezpkb4pJH2N4GV+3y+TvGm2 mF9Txj+zw0zIuK2VXXBYNxVlDiZSeHAmQdkivLXLR+B3tbNbF79VVHmiWLkh1TisKVog Ade2UE4k0n23XT3/IGjZjjrnGyDkNlFp7kH9lU1HXaKFDK0+mMFjkKb6lOQ/xMB98ECf 4F0Ri5bnzZJk/Y+QKbnA98Age4AyEi8v+NmsrPZ6up7e0IVJr5QKxx33eqK79Nx7Q3qp JbBw== X-Gm-Message-State: AOAM532pfFk6Cy8E5ihBIpgKnJfJAAyrlLS/HTqaNGQdhzBWf+ymY4DU PVXcdeFTcmYI3kulLSaEUuc= X-Google-Smtp-Source: ABdhPJyuDAh3wHkR7/xJnTz8Ao+WL050N1pJnat4RDpj8XlS8WCGn33XzYTpjtxDPa9i+ZO5PCp25Q== X-Received: by 2002:a05:6830:34a3:: with SMTP id c35mr603120otu.201.1633557925871; Wed, 06 Oct 2021 15:05:25 -0700 (PDT) Received: from nuclearis3.gtech (c-98-195-139-126.hsd1.tx.comcast.net. [98.195.139.126]) by smtp.gmail.com with ESMTPSA id y8sm1230253oiv.35.2021.10.06.15.05.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 06 Oct 2021 15:05:25 -0700 (PDT) From: "Alex G." Subject: Re: Broken build with disabling OpenSSL crypto To: =?UTF-8?Q?Jernej_=c5=a0krabec?= , u-boot@lists.denx.de, pali@kernel.org References: <18564205.Z0HQFNUZ9R@kista> Message-ID: <544c0c86-ca3f-036e-2523-3f973105410a@gmail.com> Date: Wed, 6 Oct 2021 17:05:24 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <18564205.Z0HQFNUZ9R@kista> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit 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 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 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 += \