Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A696DC4338F for ; Tue, 27 Jul 2021 14:35:08 +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 CFC3361AE4 for ; Tue, 27 Jul 2021 14:35:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org CFC3361AE4 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 8AFA5831BC; Tue, 27 Jul 2021 16:35:05 +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="vKKya0B7"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 330D1831BD; Tue, 27 Jul 2021 16:35:03 +0200 (CEST) Received: from mail-oi1-x235.google.com (mail-oi1-x235.google.com [IPv6:2607:f8b0:4864:20::235]) (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 269A683189 for ; Tue, 27 Jul 2021 16:34:59 +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-oi1-x235.google.com with SMTP id l126so15352654oib.2 for ; Tue, 27 Jul 2021 07:34:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=qNHb6dxMdc28vsvatkDIhwqZWzCKrgfSRQYoPyv+9Yc=; b=vKKya0B7HOb+bOFu/MrhPTpwwtH6lVx95FNh7wWaexSPuar0Wg0QY0Y7hnpjpsP/Vf XtK8fNZeiMcdJNoN0F4KcaeZwNjBzaMW1xMLp2QBKkB2POYPSKtSN2Z7QJpR9ARmqM/i iAAtDIFd+EV3pIKDJKWGPtsdHxKe+JhWRyfs/unhHuQQouNF+xvwpwxmwnXUOuHQrLHl OcypcmzLzyYmG4dJwjQjvf7jjJ2Rcpx1SCmhx7vqbeXPWpbmqYedOms/keoKLYwHQgJ6 5QF5fGQMpnhxtymPXHuBgxzBcU4XxUhq4UxOj5Gkq+s29q6Heap0d0ZNYYnlx/i/L4ER l6rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=qNHb6dxMdc28vsvatkDIhwqZWzCKrgfSRQYoPyv+9Yc=; b=HlqYxy1tD+eZrJBWdTU1Wl6VZcyJgMn+dArTFLd5J+QT+4sWtq2JZ6+bwEXDR+a1kZ qre7EtCniu8jHJqrnFu3J75rnTa/Sm/zojAr1O9E/LTIoR2Gwaf+SQlCMNjLJyHLm91h BJ5KFVIQYqPBy0OfAEteypb+uKfZ9IQC7gW0pcUIOmHLmLve81TCjpr1DDremvamKle8 TgCgN0odNcA18gQ243ib8oC0BqP4qB2BeON05u3kd4NXx57zzvIOPzMV8tMQCC2qIwS2 0wW7heX8VxPSP1jBC4XS4Bg8mp/IxLGahhp660r+mXO2Q9li2e8eyWxZXItMSJeJEuku VdNA== X-Gm-Message-State: AOAM5320AbaBmL4HWZUXgO9DDuEQBRKZyyoDsEFQeQW2QyJm9ABWCH0H A9LuN8TNn+I4aLVdOkUgPv4= X-Google-Smtp-Source: ABdhPJxNP0dOWY+GNb0nPfVLBGzUaJINoF6io0MjoLItaZpiPFcNdGuq7JP8LKD/RQoZ6jXdtldK4g== X-Received: by 2002:a05:6808:2012:: with SMTP id q18mr3099342oiw.161.1627396497475; Tue, 27 Jul 2021 07:34:57 -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 45sm555135oty.16.2021.07.27.07.34.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 27 Jul 2021 07:34:56 -0700 (PDT) Subject: Re: [PATCH v3 19/19] tools: Use a single target-independent config to enable OpenSSL To: Heiko Thiery Cc: u-boot@lists.denx.de, trini@konsulko.com References: <20210714211138.GA25256@bill-the-cat> <20210714220547.170371-20-mr.nuke.me@gmail.com> From: "Alex G." Message-ID: Date: Tue, 27 Jul 2021 09:34:55 -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: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit 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 7/27/21 4:59 AM, Heiko Thiery wrote: > Hi all, > > Am Do., 15. Juli 2021 um 00:09 Uhr schrieb Alexandru Gagniuc > : >> >> Host tool features, such as mkimage's ability to sign FIT images were >> enabled or disabled based on the target configuration. However, this >> misses the point of a target-agnostic host tool. >> >> A target's ability to verify FIT signatures is independent of >> mkimage's ability to create those signatures. In fact, u-boot's build >> system doesn't sign images. The target code can be successfully built >> without relying on any ability to sign such code. >> >> Conversely, mkimage's ability to sign images does not require that >> those images will only work on targets which support FIT verification. >> Linking mkimage cryptographic features to target support for FIT >> verification is misguided. >> >> Without loss of generality, we can say that host features are and >> should be independent of target features. >> >> While we prefer that a host tool always supports the same feature set, >> we recognize the following >> - some users prefer to build u-boot without a dependency on OpenSSL. >> - some distros prefer to ship mkimage without linking to OpenSSL >> >> To allow these use cases, introduce a host-only Kconfig which is used >> to select or deselect libcrypto support. Some mkimage features or some >> host tools might not be available, but this shouldn't affect the >> u-boot build. >> >> I also considered setting the default of this config based on >> FIT_SIGNATURE. While it would preserve the old behaviour it's also >> contrary to the goals of this change. I decided to enable it by >> default, so that the default build yields the most feature-complete >> mkimage. >> >> Signed-off-by: Alexandru Gagniuc > > Since this patch was applied to master the build target "flash.bin" > for e.g. the imx8mq_evk_defconfig fails. > > --- 8< --- > > MKIMAGE u-boot.itb > u-boot.its:7.11-15.5: Warning (unit_address_vs_reg): /images/uboot@1: > node has a unit name, but no reg property > u-boot.its:16.9-21.5: Warning (unit_address_vs_reg): /images/fdt@1: > node has a unit name, but no reg property > u-boot.its:22.9-31.5: Warning (unit_address_vs_reg): /images/atf@1: > node has a unit name, but no reg property > u-boot.its:36.12-41.5: Warning (unit_address_vs_reg): > /configurations/config@1: node has a unit name, but no reg property > ./tools/mkimage: verify_header failed for FIT Image support with exit code 1 > make: *** [Makefile:1440: u-boot.itb] Error 1 > make: *** Deleting file 'u-boot.itb' > make: *** Waiting for unfinished jobs.... > > --- 8< --- > > Does I miss here something? Are you sure it's this patch? I don't see how this change affects this issue, but I did notice invalid FIT node names [1] in your build. Alex [1] https://source.denx.de/u-boot/u-boot/-/commit/3f04db891a353f4b127ed57279279f851c6b4917