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=-13.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 8C14AC4338F for ; Sun, 22 Aug 2021 04:47:38 +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 BC03961155 for ; Sun, 22 Aug 2021 04:47:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org BC03961155 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sholland.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 B580682E04; Sun, 22 Aug 2021 06:47:22 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=sholland.org 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=sholland.org header.i=@sholland.org header.b="PRrdeP6W"; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="M9GWSkH+"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2860A82E1E; Sun, 22 Aug 2021 06:47:15 +0200 (CEST) Received: from new1-smtp.messagingengine.com (new1-smtp.messagingengine.com [66.111.4.221]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id C41CC82DB2 for ; Sun, 22 Aug 2021 06:47:00 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=sholland.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=samuel@sholland.org Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.nyi.internal (Postfix) with ESMTP id BF29C580BA7; Sun, 22 Aug 2021 00:46:56 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Sun, 22 Aug 2021 00:46:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=fm3; bh=uw2DmArfj45/PZgqDVh0+I3emT /1z+pKg3RemjIZXc4=; b=PRrdeP6WrA8NNYHNOd5Bem4uV5xYjeRsD5f9yL9y9J IZFeiu0eufL2yEBGUSVF3dP91me69vfxRjJLG0Yei3dwjGPPKYZfMWS7FvX9Z3VL Bpux3KHKAgsFVGNxlDA21UU5gF59WNeV9d8XWXdwPn27vu077OKfiztIwbrW3Rux PKVMr5CNPKlszMAs5gfWUjN535NUqwNzG9jswbtPeqwFxJ28zUl0AemxzgsWpPBS 4Sb3HSdVXJKGZoRJZO2m6DGe7uZdY9iGXkllVU4Cj1Bh7ZLcK9TCprSatYU8KF0T byF1Adzo1cCQoFgqNBhPb1roYH/Le7Uvs4NTkKyF81HQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=uw2DmArfj45/PZgqD Vh0+I3emT/1z+pKg3RemjIZXc4=; b=M9GWSkH+lcfCNDpYHYuEaL+/nJ/71kzGB VIElvxKHTZ8X+ZuJpNdUM1LncdRTXBl9Pla7C4eKOcEyeFHDqO4T4YggSaDhNg47 fuyI5oxVf/6JZOjuQOS2evYXraiOJHPFumJgTEQ9pZrax9hQL610puO51tc9LYLg 3puRSvSF85ob0qwNz0WtmcxGiwH4U7tmlIIz/yvfqM4ctBjtI7jz0tfRwQOhp8U4 DHpLXKyYjtpdnhF8lwmpYZFPIlNjRJEeR88QcjFNqP/9pQfopVLTA+v/HavWXh2u UziKgm/jKQQpuYIp6GYHUeUhDTNAMuHqOpmomG7Xx5dcyqxuMPMaA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddruddtvddgkeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffoggfgsedtkeertdertddtnecuhfhrohhmpefurghmuhgvlhcu jfholhhlrghnugcuoehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhgqeenucggtffrrg htthgvrhhnpeethffhudfhueejhfeuffeihfefveetleekgeevjeeuleevteeljeeiudfh udetgeenucffohhmrghinhepohiilhgrsghsrdhorhhgnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhepshgrmhhuvghlsehshhholhhlrghnugdr ohhrgh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 22 Aug 2021 00:46:50 -0400 (EDT) From: Samuel Holland To: u-boot@lists.denx.de, Jagan Teki , Andre Przywara Cc: Samuel Holland , AKASHI Takahiro , Alexandru Gagniuc , Baruch Siach , Bharat Gooty , Chris Packham , Fabio Estevam , Frieder Schrempf , Jernej Skrabec , =?UTF-8?q?Marek=20Beh=C3=BAn?= , "NXP i.MX U-Boot Team" , Naoki Hayama , =?UTF-8?q?Pali=20Roh=C3=A1r?= , Patrick Delaunay , Priyanka Jain , Rayagonda Kokatanur , Simon Glass , Stefan Roese , Stefano Babic , Sughosh Ganu , Trevor Woerner , lauri.hintsala@silabs.com Subject: [PATCH v2 0/4] sunxi: TOC0 image type support Date: Sat, 21 Aug 2021 23:46:44 -0500 Message-Id: <20210822044649.13585-1-samuel@sholland.org> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 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 This series adds support for the TOC0 image format used by the Allwinner secure boot ROM (SBROM). This series has been tested on the following SoCs/boards, with the eFuse burnt to enable secure mode: - A50: Ainol Q88 Tablet - A64: Pine A64 Plus - H5: Orange Pi Zero Plus - H6: Pine H64 Model B - H616: Orange Pi Zero 2 Due to a small conflict in Makefile.spl, the last patch depends on: https://patchwork.ozlabs.org/project/uboot/list/?series=249757 Changes in v2: - Refactored the first patch on top of TOOLS_LIBCRYPTO - Moved certificate and key item structures out of sunxi_image.h - Renamed "main" and "item" variables for clarity - Improved error messages, and added a hint about key generation - Added a comment explaining the purpose of the various key files - Mentioned testing this code on A50 in the commit message - Moved SPL header signature checks out of sunxi_image.h - Refactored SPL header signature checks to use fewer casts - Rebase on top of Icenowy's RISC-V support series - Rename Kconfig symbols to include the full image type name Samuel Holland (4): tools: Separate image types which depend on OpenSSL tools: mkimage: Add Allwinner TOC0 support sunxi: Support SPL in both eGON and TOC0 images sunxi: Support building a SPL as a TOC0 image arch/arm/Kconfig | 1 + arch/arm/include/asm/arch-sunxi/spl.h | 2 - arch/arm/mach-imx/mxs/Kconfig | 2 + arch/arm/mach-mvebu/Kconfig | 1 + arch/arm/mach-sunxi/Kconfig | 2 + arch/arm/mach-sunxi/board.c | 50 +- board/sunxi/Kconfig | 24 + common/image.c | 1 + include/image.h | 1 + include/sunxi_image.h | 36 + scripts/Makefile.spl | 5 +- scripts/config_whitelist.txt | 1 - tools/Makefile | 20 +- tools/mxsimage.c | 3 - tools/sunxi_toc0.c | 907 ++++++++++++++++++++++++++ 15 files changed, 1028 insertions(+), 28 deletions(-) create mode 100644 board/sunxi/Kconfig create mode 100644 tools/sunxi_toc0.c -- 2.31.1