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 2B581C433EF for ; Sun, 10 Oct 2021 11:06:54 +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 2473C60F55 for ; Sun, 10 Oct 2021 11:06:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 2473C60F55 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 1A46083647; Sun, 10 Oct 2021 13:06:51 +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="AdGhg0H6"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BF5648366B; Sun, 10 Oct 2021 13:06:48 +0200 (CEST) Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) (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 B8FF9833F0 for ; Sun, 10 Oct 2021 13:06:45 +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=jernej.skrabec@gmail.com Received: by mail-wr1-x42e.google.com with SMTP id v25so45548304wra.2 for ; Sun, 10 Oct 2021 04:06:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=RnLtxmXEo60em3MvFuFdg0wKBL8R5ZBgiGlsPiM1tsw=; b=AdGhg0H6Nxezh6laZuonztbO5xsBY86E77TKEA8PJFnFzvCrXRRuCwf0v0xSc1G9vM ygAwiklADAVQvWfdk4bt5Ayf6czzRCycmGC6pZm1PQPuP3sBHhaoP15JT3xLZzAtPyZz gguOVQkMiAP0/fe2ZXS0BVjVCHyLkybIU8NMkewzjCfxlBM5Y4ZxLDXITiMk3mkqxUuK DOmebIF2/sSjEOdraAaf1eDyPeLnrq5Qw/9duOSkhHIMvCA0ijKe8yJ14veRg78pVEsq 8/ia54Qd9BRVVaPZluSbKnvnqEW4Da3yyiAGHoW7nknjafBKJ+HluVSWJsIiEVN8I6yS Pr/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=RnLtxmXEo60em3MvFuFdg0wKBL8R5ZBgiGlsPiM1tsw=; b=MlzXnNlHB6MySugRprjuBl15cJ/95RbwwLmiNfPMsR0gCYldMf4ees0cXLPdGa7wbz ecaDqcHRqmx7SfbmpRYRL0YK/TKcsXernRRF4QpGM1Ajj3uLXliqrZj22kUgmVYixCdZ NpfIsTG8azM0TsFb11b0Klv7hybcRHsZfdZSwX9B6/2h0LVYKLKTUH7a9ntWopkx4X9e +eI7ElnVuGI8bwzgOnHM2LZdGc84L9ZsyEprpfL9I8fvpli2T7nVFuTCLqYOd1oN8LoN dSG3KRgp+sj70tYMAu0AOgvD0sEMHzApWnFnAaYdscrZx7x1sdWU/KZNNi3y8sP8y2oC zAFw== X-Gm-Message-State: AOAM531t+0AbS+ZVNORCQuxqOYTPDNp1nLsl0f3d7L5xbFT6Uwg9LrI0 tdeY5d3cbL1LB9u2zpksPzhbRAkWGcd6rw== X-Google-Smtp-Source: ABdhPJyMHnejhQ2ttB0Zfcr9yg7M+56WdBfs7NVtyagrItKvxWmiMq/hp/DS7e7YJ/63ZnY7KDzzgQ== X-Received: by 2002:adf:ff91:: with SMTP id j17mr16714722wrr.132.1633864005395; Sun, 10 Oct 2021 04:06:45 -0700 (PDT) Received: from kista.localnet (cpe-86-58-29-253.static.triera.net. [86.58.29.253]) by smtp.gmail.com with ESMTPSA id z79sm4880404wmc.17.2021.10.10.04.06.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Oct 2021 04:06:45 -0700 (PDT) From: Jernej =?utf-8?B?xaBrcmFiZWM=?= To: u-boot@lists.denx.de, pali@kernel.org, "Alex G." Subject: Re: Re: Broken build with disabling OpenSSL crypto Date: Sun, 10 Oct 2021 13:06:44 +0200 Message-ID: <2212002.ElGaqSPkdT@kista> In-Reply-To: <544c0c86-ca3f-036e-2523-3f973105410a@gmail.com> References: <18564205.Z0HQFNUZ9R@kista> <544c0c86-ca3f-036e-2523-3f973105410a@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" 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 Alex! Dne =C4=8Detrtek, 07. oktober 2021 ob 00:05:24 CEST je Alex G. napisal(a): > Hi Jernej, >=20 > On 10/6/21 4:27 PM, Jernej =C5=A0krabec wrote: > > Hi everyone! > >=20 > > Commit cb9faa6f98ae ("tools: Use a single target-independent config to= =20 enable > > OpenSSL") recently introduced option to disable usage of OpenSSL via > > CONFIG_TOOLS_LIBCRYPTO. However, just a bit later, another commit=20 b4f3cc2c42d9 > > ("tools: kwbimage: Do not hide usage of secure header under > > CONFIG_ARMADA_38X") made U-Boot tools hard dependent on OpenSSL. That=20 totally > > defeats the purpose of first commit. I suggest that it gets reverted. > >=20 > > I would like disable OpenSSL for my usage, since it gives me troubles w= hen > > cross-compiling U-Boot inside LibreELEC build system. It's not needed f= or=20 our > > case anyway. > >=20 > > Best regards, > >=20 >=20 > Can you please give the following diff a try, and if it works for you, su= bmit=20 as patch? This works, I'll submit it as a patch. Should I keep you as original author= =20 and add your SoB tag? Best regards, Jernej >=20 > Alex >=20 > 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) :=3D $(addprefix lib= /aes/,=20 \ >=20 > # Cryptographic helpers that depend on openssl/libcrypto > LIBCRYPTO_OBJS-$(CONFIG_TOOLS_LIBCRYPTO) :=3D $(addprefix lib/, \ > - fdt-libcrypto.o) > + fdt-libcrypto.o) \ > + kwbimage.o >=20 > ROCKCHIP_OBS =3D lib/rc4.o rkcommon.o rkimage.o rksd.o rkspi.o >=20 > @@ -117,7 +118,6 @@ dumpimage-mkimage-objs :=3D aisimage.o \ > imximage.o \ > imx8image.o \ > imx8mimage.o \ > - kwbimage.o \ > lib/md5.o \ > lpc32xximage.o \ > mxsimage.o \ > @@ -169,8 +169,8 @@ HOST_EXTRACFLAGS +=3D - DCONFIG_FIT_SIGNATURE_MAX_SIZE=3D0xffffffff > HOST_EXTRACFLAGS +=3D -DCONFIG_FIT_CIPHER > endif >=20 > -# 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 +=3D \ > $(shell pkg-config --cflags libssl libcrypto 2> /dev/null || echo=20 "") > HOSTLDLIBS_mkimage +=3D \ >=20