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 578B7C433EF for ; Mon, 27 Sep 2021 16:07:02 +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 62C5560EB6 for ; Mon, 27 Sep 2021 16:07:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 62C5560EB6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org 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 5CAE681D6C; Mon, 27 Sep 2021 18:06:58 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org 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=chromium.org header.i=@chromium.org header.b="mG0fhXoI"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id EEA1081E14; Mon, 27 Sep 2021 18:06:55 +0200 (CEST) Received: from mail-vs1-xe36.google.com (mail-vs1-xe36.google.com [IPv6:2607:f8b0:4864:20::e36]) (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 82BE4812B6 for ; Mon, 27 Sep 2021 18:06:52 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@google.com Received: by mail-vs1-xe36.google.com with SMTP id az15so18711511vsb.8 for ; Mon, 27 Sep 2021 09:06:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=IJu3e5uJt6pbN1kFF+8luPJXBI5PsLJDBYuLlmfANEE=; b=mG0fhXoINnn+CSX8U7UmTVUVLZH6GrxedZByPLmY0eA7bM8LjaCa08uO4wkoMWWFWC tPOc0mrMSFIfH1lLMy3uk0pRXw9ApzjxwA7zHMMO6H6gtUtDq/f7ZQ65znWteq2DPezq vhkK7LMZvv/RMQwS+/raOIIr9kcBB2m9XI8Mc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=IJu3e5uJt6pbN1kFF+8luPJXBI5PsLJDBYuLlmfANEE=; b=cs1kibKlXscUvemEwi+WOPraJcg4WNWXaoxY8RM7K45a3ztiZquxAid2bK4qG4Mj/y WKmNl1aTDN5sTGcaGMBS1ZgcLlEDCGtCRKJru6z6mdTvd0PdmqV6hU+2N0GewpiS6k3z L9hNrOVZ2+4xE1a+n2ec3xzOse7kHbNW946gm4P+gWlplQJSN5vcG9IV92VPpVg36Cq3 xjsM/S7UzmCU41NJx6fGGZw1Q2EP58nnfT7Jmh/JBjM1afxJ5s0F/Trc4siXATkSLeIV ucQR/K8grfPH8wVCUOMRhP2U0oFac2bhyWkoCIlUOpSi9WtuIOlI5jHcVvR+GXve8sq9 TnzQ== X-Gm-Message-State: AOAM530fMTy62iMx4x3GIDG6rd0+zEknsC3Hzs9ufiD2/lFpMQpiT6ZF D5wq/UlEiL3jHjMQCEJCg+cCcWufh4RzPQdHi05Ivg== X-Google-Smtp-Source: ABdhPJyO22uaZyC5MhhsbELd5+uz02RaJNitdCyGX2v3fCXhPjiunkvo22RFLYwSbbbagehmte+YOIrjLO+WXJNKbrw= X-Received: by 2002:a67:e30a:: with SMTP id j10mr454255vsf.58.1632758810945; Mon, 27 Sep 2021 09:06:50 -0700 (PDT) MIME-Version: 1.0 References: <20210926014342.127913-1-sjg@chromium.org> <20210925194327.v5.5.Idf4bfa823b4e1a5b357e141a8496acece5051102@changeid> In-Reply-To: From: Simon Glass Date: Mon, 27 Sep 2021 10:06:39 -0600 Message-ID: Subject: Re: [PATCH v5 05/29] hash: Use Kconfig to enable hashing in host tools and SPL To: "Alex G." Cc: U-Boot Mailing List , Andre Przywara , Rasmus Villemoes , Robert Marko , Masahiro Yamada , Tom Rini , Joe Hershberger 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, On Mon, 27 Sept 2021 at 09:53, Alex G. wrote: > > Hi Simon > > On 9/25/21 8:43 PM, Simon Glass wrote: > > At present when building host tools, we force CONFIG_SHAxxx to be enabled > > regardless of the board Kconfig setting. This is done in the image.h > > header file. > > > > For SPL we currently just assume the algorithm is desired if U-Boot proper > > enables it. > > > > Clean this up by adding new Kconfig options to enable hashing on the host, > > relying on CONFIG_IS_ENABLED() to deal with the different builds. > > > > Add new SPL Kconfigs for hardware-accelerated hashing, to maintain the > > current settings. > > > > This allows us to drop the image.h code and the I_WANT_MD5 hack. > > > > Signed-off-by: Simon Glass > > --- > > > > Changes in v5: > > - Drop I_WANT_MD5 > > - Use TOOLS_ instead of HOST_ > > > I was planning to move hash algos to a linker list for target code, and > a simple, ifdef-free list for the host, like we've done for crypto > algos, and I think padding algos. > > We'd be able to drop #define I_WANT_MD5 (which is temporary), and drop > define CONFIG_SHA_*, and by extension, drop the need for > CONFIG_TOOLS_SHA*. I think that's far more elegant. OK but can we do that after my series goes in? The series is a significant #ifdef clean-up and I think you can easily do that on top of the series. Regards, Simon