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 X-Spam-Level: X-Spam-Status: No, score=-17.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,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 19548C432BE for ; Mon, 30 Aug 2021 13:59:10 +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 30E7860ED4 for ; Mon, 30 Aug 2021 13:59:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 30E7860ED4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=konsulko.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 9237983367; Mon, 30 Aug 2021 15:59:06 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.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=konsulko.com header.i=@konsulko.com header.b="YlyOy7Wx"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0BD7683376; Mon, 30 Aug 2021 15:59:04 +0200 (CEST) Received: from mail-qk1-x72d.google.com (mail-qk1-x72d.google.com [IPv6:2607:f8b0:4864:20::72d]) (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 8E45F82DA7 for ; Mon, 30 Aug 2021 15:58:59 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qk1-x72d.google.com with SMTP id m21so15629329qkm.13 for ; Mon, 30 Aug 2021 06:58:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=HkAECstqidMej4jQ0dO4DEinJm1xPZHAJhbDi311qiw=; b=YlyOy7WxGm7carrvDU3C1FgcNXM95SjT0En6VAexXi6D+chowefNSPKVl34SIvQzrs c4LIZTuHRaOz/x45kbvIsJ66LFV/O5TP3UGFcNpspuPzMHrQ1eYMSs1Tyo3FM0+vhvnx PGBBC8ojljt4MurUJhNKCiDLzW6LcMaNAm2nM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=HkAECstqidMej4jQ0dO4DEinJm1xPZHAJhbDi311qiw=; b=ZrLj7MDPLbgJzUNsdg1tjU6aDwFVEMU9Ju7KP/5t/QkjKml0sryqy23F1+2oV9j38y P7viz/D3LSKZTFZSSBarnnIw6HCAe0/OsS4Msjb0v8aWvrp07IikyPECoJ9ScPoXQttX zbWsdI4VQNaxLDkLxKCPxjyuCfa1EelfE4y1RP9bbhTEdcxlGC7DDadmgO7vWlQ9qwV/ 0dSlzp2ZLLL7phBTKH1BE2V8lNdaCkrlEYf6zNFHMRK3ZIKsf5bibCBFxVBl0HM3E88T FLyBXrXxesGwAZVnDZP9gK6hsSIrF8/WK6WyzLVUlcZ3vP6BxuF0uCdOsNefuKGxeShh 6E5A== X-Gm-Message-State: AOAM531rragEtbhloa9onTZUYvf7kyp3BJuKSNS4RMj1IoMOasjzzxry pkhgcE7415lLyyNCBPYikEbcLA== X-Google-Smtp-Source: ABdhPJyJWiCWqZMUUzSVS+LHl+PiHnntUMeQXaf5pPFh1duPwv5MZetkdqPANu7yJOseCwqYL+cgJw== X-Received: by 2002:a37:91c3:: with SMTP id t186mr22665564qkd.307.1630331938311; Mon, 30 Aug 2021 06:58:58 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-8d75-4e9a-efec-7167.res6.spectrum.com. [2603:6081:7b01:cbda:8d75:4e9a:efec:7167]) by smtp.gmail.com with ESMTPSA id w14sm11582967qkm.81.2021.08.30.06.58.56 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 Aug 2021 06:58:57 -0700 (PDT) Date: Mon, 30 Aug 2021 09:58:55 -0400 From: Tom Rini To: Alexandru Gagniuc Cc: u-boot@lists.denx.de, sjg@chromium.org Subject: Re: [PATCH 3/5] common/spl: Drop SPL_HASH_SUPPORT in favor of SPL_HASH Message-ID: <20210830135855.GU858@bill-the-cat> References: <20210824005320.3647668-1-mr.nuke.me@gmail.com> <20210824005320.3647668-4-mr.nuke.me@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="+uY+Q0xYUTqe6eAE" Content-Disposition: inline In-Reply-To: <20210824005320.3647668-4-mr.nuke.me@gmail.com> X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.9.4 (2018-02-28) 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 --+uY+Q0xYUTqe6eAE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Aug 23, 2021 at 07:53:18PM -0500, Alexandru Gagniuc wrote: > Both these configs exist. Stick to using CONFIG_SPL_HASH, and drop all > references to CONFIG_SPL_HASH_SUPPORT. >=20 > Signed-off-by: Alexandru Gagniuc This isn't quite enough and causes a bunch of platforms like ls1043ardb_sdcard_SECURE_BOOT to blow up. I'm adding the following and will update the commit message as that fixes at least the first set of problems I've observed: diff --git a/board/freescale/common/Kconfig b/board/freescale/common/Kconfig index ab9c14ae8858..35a6115e5e43 100644 --- a/board/freescale/common/Kconfig +++ b/board/freescale/common/Kconfig @@ -4,6 +4,7 @@ config CHAIN_OF_TRUST imply CMD_HASH if ARM select FSL_CAAM select SPL_BOARD_INIT if (ARM && SPL) + select SPL_HASH if (ARM && SPL) select SHA_HW_ACCEL select SHA_PROG_HW_ACCEL select ENV_IS_NOWHERE diff --git a/common/Makefile b/common/Makefile index 592f340f1b6f..ae0430c35fe4 100644 --- a/common/Makefile +++ b/common/Makefile @@ -8,7 +8,6 @@ ifndef CONFIG_SPL_BUILD obj-y +=3D init/ obj-y +=3D main.o obj-y +=3D exports.o -obj-$(CONFIG_$(SPL_)HASH) +=3D hash.o obj-$(CONFIG_HUSH_PARSER) +=3D cli_hush.o obj-$(CONFIG_AUTOBOOT) +=3D autoboot.o =20 @@ -66,7 +65,6 @@ ifdef CONFIG_SPL_BUILD ifdef CONFIG_SPL_DFU obj-$(CONFIG_DFU_OVER_USB) +=3D dfu.o endif -obj-$(CONFIG_TPL_HASH_SUPPORT) +=3D hash.o obj-$(CONFIG_SPL_LOAD_FIT) +=3D common_fit.o obj-$(CONFIG_SPL_NET_SUPPORT) +=3D miiphyutil.o obj-$(CONFIG_$(SPL_TPL_)OF_LIBFDT) +=3D fdt_support.o @@ -104,6 +102,7 @@ endif endif =20 obj-y +=3D image.o +obj-$(CONFIG_$(SPL_TPL_)HASH) +=3D hash.o obj-$(CONFIG_ANDROID_AB) +=3D android_ab.o obj-$(CONFIG_ANDROID_BOOT_IMAGE) +=3D image-android.o image-android-dt.o obj-$(CONFIG_$(SPL_TPL_)OF_LIBFDT) +=3D image-fdt.o diff --git a/common/spl/Kconfig b/common/spl/Kconfig index c75c8aaf0884..29a46c47877a 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -477,17 +477,6 @@ config SPL_CRYPTO this option to build the drivers in drivers/crypto as part of an SPL build. =20 -config TPL_HASH_SUPPORT - bool "Support hashing drivers in TPL" - depends on TPL - select SHA1 - select SHA256 - help - Enable hashing drivers in SPL. These drivers can be used to - accelerate secure boot processing in secure applications. Enable - this option to build system-specific drivers for hash acceleration - as part of an SPL build. - config SPL_DMA bool "Support DMA drivers" help diff --git a/configs/ls1021atwr_sdcard_ifc_SECURE_BOOT_defconfig b/configs/= ls1021atwr_sdcard_ifc_SECURE_BOOT_defconfig index c5a6819a3849..f9d551c6a89b 100644 --- a/configs/ls1021atwr_sdcard_ifc_SECURE_BOOT_defconfig +++ b/configs/ls1021atwr_sdcard_ifc_SECURE_BOOT_defconfig @@ -31,7 +31,6 @@ CONFIG_SPL_FSL_PBL=3Dy CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=3Dy CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=3D0xe8 CONFIG_SPL_CRYPTO=3Dy -CONFIG_SPL_HASH=3Dy CONFIG_SPL_ENV_SUPPORT=3Dy CONFIG_SPL_I2C=3Dy CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT=3Dy diff --git a/configs/ls1043ardb_nand_SECURE_BOOT_defconfig b/configs/ls1043= ardb_nand_SECURE_BOOT_defconfig index 93f6b2a6683f..2733ca83587d 100644 --- a/configs/ls1043ardb_nand_SECURE_BOOT_defconfig +++ b/configs/ls1043ardb_nand_SECURE_BOOT_defconfig @@ -27,7 +27,6 @@ CONFIG_SPL_FSL_PBL=3Dy CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=3Dy CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=3D0xf0 CONFIG_SPL_CRYPTO=3Dy -CONFIG_SPL_HASH=3Dy CONFIG_SPL_ENV_SUPPORT=3Dy CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT=3Dy CONFIG_SPL_NAND_SUPPORT=3Dy diff --git a/configs/ls1043ardb_sdcard_SECURE_BOOT_defconfig b/configs/ls10= 43ardb_sdcard_SECURE_BOOT_defconfig index 71c33ca4634e..392ef1cbd559 100644 --- a/configs/ls1043ardb_sdcard_SECURE_BOOT_defconfig +++ b/configs/ls1043ardb_sdcard_SECURE_BOOT_defconfig @@ -27,7 +27,6 @@ CONFIG_SPL_FSL_PBL=3Dy CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=3Dy CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=3D0x110 CONFIG_SPL_CRYPTO=3Dy -CONFIG_SPL_HASH=3Dy CONFIG_SPL_ENV_SUPPORT=3Dy CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT=3Dy CONFIG_SPL_WATCHDOG=3Dy diff --git a/configs/ls1046ardb_sdcard_SECURE_BOOT_defconfig b/configs/ls10= 46ardb_sdcard_SECURE_BOOT_defconfig index 9d7ff790e0f5..3d5783aa260f 100644 --- a/configs/ls1046ardb_sdcard_SECURE_BOOT_defconfig +++ b/configs/ls1046ardb_sdcard_SECURE_BOOT_defconfig @@ -27,7 +27,6 @@ CONFIG_SPL_FSL_PBL=3Dy CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=3Dy CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=3D0x110 CONFIG_SPL_CRYPTO=3Dy -CONFIG_SPL_HASH=3Dy CONFIG_SPL_ENV_SUPPORT=3Dy CONFIG_SPL_I2C=3Dy CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT=3Dy diff --git a/configs/ls1088ardb_sdcard_qspi_SECURE_BOOT_defconfig b/configs= /ls1088ardb_sdcard_qspi_SECURE_BOOT_defconfig index 62da4ecd7173..0d94027ccb9e 100644 --- a/configs/ls1088ardb_sdcard_qspi_SECURE_BOOT_defconfig +++ b/configs/ls1088ardb_sdcard_qspi_SECURE_BOOT_defconfig @@ -33,7 +33,6 @@ CONFIG_MISC_INIT_R=3Dy CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=3Dy CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=3D0x8b0 CONFIG_SPL_CRYPTO=3Dy -CONFIG_SPL_HASH=3Dy CONFIG_SPL_ENV_SUPPORT=3Dy CONFIG_SPL_I2C=3Dy CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT=3Dy diff --git a/lib/Makefile b/lib/Makefile index 6aa48ca3d507..93be86c34a01 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -87,7 +87,7 @@ endif =20 ifdef CONFIG_SPL_BUILD obj-$(CONFIG_SPL_YMODEM_SUPPORT) +=3D crc16.o -obj-$(CONFIG_$(SPL_TPL_)HASH_SUPPORT) +=3D crc16.o +obj-$(CONFIG_$(SPL_TPL_)HASH) +=3D crc16.o obj-y +=3D net_utils.o endif obj-$(CONFIG_ADDR_MAP) +=3D addr_map.o --=20 Tom --+uY+Q0xYUTqe6eAE Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmEs5BwACgkQFHw5/5Y0 tyyWxgwAngJkJCmdYMJXpwUkaNzRDaY9nPj7LoflRKFOfTV9qq/XCg1vZc5Qrmjw a/cCN/bFe9CjL7dMn9AZu3wF9XvV7URF9tpQQ8uXez2O5EAZKl00jFqxj9mMwX8h 3zZKaJS5GFIGqv7yxWaZiU8nw54KMXEbCVpwL97HrRRq+yXU/ey9L3Wg0Z4SvoLU hiarmRroPLkalQpKILGfh4tOl7Qzqh364sC97YwjNnWu5JvB2hHPZVlDy77r98pc q/G7d+NIitxOkUb1WPNgV2Bm0y4TBwbxMlgYYpF0TUdWBDOpoS5Ycv+6QEycGoHD pZiNm+0RI1rCqmTgPS7mE/gwIiHVilMdF5vkyz1sMEADJVfy7tEUH3hT6UVar/do nfmPyy/EgrKFTqpkBmIYDxMhh8sAgkNfAdUockzv0biwjaVQbQ3zz6jGEg1QcyHk WPDUr03cmrX21EGjMSBzGKwQrqZ44Uyd4fb2EpPGd/Ke2oyLVopqVpg/1PMx2cO0 a5ef7lw1 =QGrK -----END PGP SIGNATURE----- --+uY+Q0xYUTqe6eAE--