From patchwork Wed Jun 26 15:59:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1952701 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=Zr8TL46M; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W8RHT2qL2z20Xf for ; Thu, 27 Jun 2024 02:00:21 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C672F884F4; Wed, 26 Jun 2024 18:00:09 +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="Zr8TL46M"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6A804884DB; Wed, 26 Jun 2024 18:00:08 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) (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 8C2D687F33 for ; Wed, 26 Jun 2024 18:00:05 +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@chromium.org Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-42562e4b5d1so889155e9.1 for ; Wed, 26 Jun 2024 09:00:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1719417605; x=1720022405; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=1DwbEmlb7j97i9Q+0Gkqlcn3kq0fvAKIR9SwwmRHzEg=; b=Zr8TL46M+6cT32nHd/zKCfpSSfJ0xcAGXl8AIrJCJ+UvlQgE9kxKCQpOgR1cfU+Ult oQW8D8V4rGKXoIbu0Czo0tZeuzyWhO+WMXqYLwO9T4pdjjAMqs0HpNee7E50bQp3vNRX AuCb6GmtSGke7qDypBwjHV+lgZMp3Z9+awvhA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719417605; x=1720022405; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1DwbEmlb7j97i9Q+0Gkqlcn3kq0fvAKIR9SwwmRHzEg=; b=l4FZmEFSdUlmwaCNxpuYeXT39Wnji3FoEk+yVFgWCG+d8Y4ak8yQjhvPU91kiCjGbf ueN3zC2eY0nj7Pfp2omWvGoFs70H043r/I3ZIvcOxC8lFU1QhVJ5t/ub/Ao3KU0ZWBU0 9Ta4O/CAh5jMEkFTaa2Fs9rT8pU0czJZhF+wv0bIwsCk8pNZshyq3HEjQbkGY0yOdNN8 AzEmLjwaHYRpVULT+M+Hna0xUDSyOuyJ3+jKhnT22vXJ6sfMxsYHHdM6XZEoYrSwA5aS 4IH7gDtlnnIt5/zYn3sNB+csM2E1SokfVMoj/kHl3f6ET+uJ5NKiqyTBOd31WBGP591I 4UAQ== X-Gm-Message-State: AOJu0YyvPDXqmqf8vg3Jj/cYFvf2xBJgCcG2mZApBFYm8n/42X/lgZde +OzZG2GhyEfeGpfF0wP7DFSL+ozrsAvPUZt9oacseLXkz484Ira76yUfVixdp9xv4XoYcYQAwOK yjA== X-Google-Smtp-Source: AGHT+IEWCw/vogDWQsQ7Rs+emt+SjWWb3ca9mOEDQFA0BnS+6zOX46MQ9LbFf8MJ/b0ezUK92wVz0w== X-Received: by 2002:a05:600c:2e49:b0:424:a48d:976c with SMTP id 5b1f17b1804b1-424a48d98a7mr33520525e9.30.1719417604640; Wed, 26 Jun 2024 09:00:04 -0700 (PDT) Received: from tasman.. (host-92-15-194-143.as13285.net. [92.15.194.143]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-424c827507bsm30753715e9.22.2024.06.26.09.00.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jun 2024 09:00:03 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass Subject: [PATCH v5 01/16] mkeficapsule: Add a --version argument Date: Wed, 26 Jun 2024 16:59:30 +0100 Message-Id: <20240626155945.278640-2-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240626155945.278640-1-sjg@chromium.org> References: <20240626155945.278640-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.8 at phobos.denx.de X-Virus-Status: Clean Tools should have an option to obtain the version, so add this to the mkeficapsule tool. Signed-off-by: Simon Glass --- (no changes since v1) doc/mkeficapsule.1 | 4 ++++ tools/mkeficapsule.c | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/doc/mkeficapsule.1 b/doc/mkeficapsule.1 index c4c2057d5c7..c3d0f21488a 100644 --- a/doc/mkeficapsule.1 +++ b/doc/mkeficapsule.1 @@ -87,6 +87,10 @@ Generate a firmware revert empty capsule .BI "-o\fR,\fB --capoemflag " Capsule OEM flag, value between 0x0000 to 0xffff +.TP +.BR -V ", " --version +Print version information and exit. + .TP .BR -h ", " --help Print a help message diff --git a/tools/mkeficapsule.c b/tools/mkeficapsule.c index 6a261ff549d..c112ae2de8d 100644 --- a/tools/mkeficapsule.c +++ b/tools/mkeficapsule.c @@ -21,6 +21,8 @@ #include #include +#include + #include "eficapsule.h" static const char *tool_name = "mkeficapsule"; @@ -28,7 +30,7 @@ static const char *tool_name = "mkeficapsule"; efi_guid_t efi_guid_fm_capsule = EFI_FIRMWARE_MANAGEMENT_CAPSULE_ID_GUID; efi_guid_t efi_guid_cert_type_pkcs7 = EFI_CERT_TYPE_PKCS7_GUID; -static const char *opts_short = "g:i:I:v:p:c:m:o:dhARD"; +static const char *opts_short = "g:i:I:v:p:c:m:o:dhARDV"; enum { CAPSULE_NORMAL_BLOB = 0, @@ -70,6 +72,7 @@ static void print_usage(void) "\t-R, --fw-revert firmware revert capsule, takes no GUID, no image blob\n" "\t-o, --capoemflag Capsule OEM Flag, an integer between 0x0000 and 0xffff\n" "\t-D, --dump-capsule dump the contents of the capsule headers\n" + "\t-V, --version show version number\n" "\t-h, --help print a help message\n", tool_name); } @@ -969,6 +972,9 @@ int main(int argc, char **argv) case 'D': capsule_dump = true; break; + case 'V': + printf("mkeficapsule version %s\n", PLAIN_VERSION); + exit(EXIT_SUCCESS); default: print_usage(); exit(EXIT_SUCCESS); From patchwork Wed Jun 26 15:59:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1952705 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=kG3EsuP2; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W8RHw1tP6z20Z9 for ; Thu, 27 Jun 2024 02:00:44 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C924F884FD; Wed, 26 Jun 2024 18:00:12 +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="kG3EsuP2"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4D1888850A; Wed, 26 Jun 2024 18:00:10 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) (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 3ED20884C8 for ; Wed, 26 Jun 2024 18:00:07 +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@chromium.org Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-42249a4f9e4so51048795e9.2 for ; Wed, 26 Jun 2024 09:00:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1719417606; x=1720022406; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=9w+sUR2AVGoO5kGbs1GbQb9CzRrIlLYGbu0jwVoLkS8=; b=kG3EsuP2GSiFUYkAx3raqhRfcittKP/C6B4lz/KRX3odCymPRbbLPNLY3B/9TG3bWR eNPn6e9NlF6wrxjdS5aETgpJG6ugYutxiCeYpDSsX6zvpEm7zd45oPWpe43zMzrT+w8x V3VK1RhxJFqvbPDzWFk/L25irm8ubL6tiPqTY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719417606; x=1720022406; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9w+sUR2AVGoO5kGbs1GbQb9CzRrIlLYGbu0jwVoLkS8=; b=KMNpnuQAYK3mM34nlPe3wGUKom3ZB2/YngUBGqv6V82HYpGZCens2y6xzpdciqEkE6 z7m8lbbUrVeW9twfxriksLrdnuCSc11Q9GCHry69DHlKzcq0sXTZqEbOxzQOtn0Kl7UB mBta9cSnvB93sccKTWX+upwGEY1G3ooJUjJStO/zvB/MdTzeHP/Y5/JR3/lUyhsrni7M OlgW9eCThMq4u1wFHoGyKDaTZgzx8pdqixZ/X6hg+2xCDVtoGqnDEHZ8LyFs4ZTMQi0D kdXwsena6+KKAYso1fysa0Ngf6arao1ui+/l/8h7WYxSGuIMU7j3vhY5WMSq8xhVgIW/ fapQ== X-Gm-Message-State: AOJu0Yx2xTcv1KqYEOzgfKK+dons8nDPBeux8PZDi8LSDnNMcIl8AjHf QEb2Cdg1jNCbv5cyeIJTy5F11+NTUgPH5Kk02VvVpF7P59rV9+AuzbhQZVSpCuJ+O11bealKGsL ryw== X-Google-Smtp-Source: AGHT+IE5RcRE9V0YQegnKvt9Sa2L93PQj89jgckDCRPjtMX2nXi0HU7UJe54n61nx6HXNEiXUq0GAg== X-Received: by 2002:a05:600c:4893:b0:424:a5b4:1bc0 with SMTP id 5b1f17b1804b1-424a5b41caamr33146445e9.19.1719417605616; Wed, 26 Jun 2024 09:00:05 -0700 (PDT) Received: from tasman.. (host-92-15-194-143.as13285.net. [92.15.194.143]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-424c827507bsm30753715e9.22.2024.06.26.09.00.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jun 2024 09:00:05 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Alper Nebi Yasak , Neha Malcom Francis , Peng Fan , Philippe Reynes , Stefan Herbrechtsmeier Subject: [PATCH v5 02/16] binman: Collect the version number for mkeficapsule Date: Wed, 26 Jun 2024 16:59:31 +0100 Message-Id: <20240626155945.278640-3-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240626155945.278640-1-sjg@chromium.org> References: <20240626155945.278640-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.8 at phobos.denx.de X-Virus-Status: Clean Now that this tool has a version number, collect it. Signed-off-by: Simon Glass --- (no changes since v1) tools/binman/btool/mkeficapsule.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/binman/btool/mkeficapsule.py b/tools/binman/btool/mkeficapsule.py index ef1da638df1..f7e5a886849 100644 --- a/tools/binman/btool/mkeficapsule.py +++ b/tools/binman/btool/mkeficapsule.py @@ -33,7 +33,8 @@ class Bintoolmkeficapsule(bintool.Bintool): commandline, or through a config file. """ def __init__(self, name): - super().__init__(name, 'mkeficapsule tool for generating capsules') + super().__init__(name, 'mkeficapsule tool for generating capsules', + r'mkeficapsule version (.*)') def generate_capsule(self, image_index, image_guid, hardware_instance, payload, output_fname, priv_key, pub_key, From patchwork Wed Jun 26 15:59:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1952702 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=GGH4tXNU; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W8RHh3MjHz20Xf for ; Thu, 27 Jun 2024 02:00:32 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 46022884FF; Wed, 26 Jun 2024 18:00:10 +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="GGH4tXNU"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1DEC1884F1; Wed, 26 Jun 2024 18:00:09 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) (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 230E8884C6 for ; Wed, 26 Jun 2024 18:00:07 +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@chromium.org Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-42562a984d3so1462205e9.3 for ; Wed, 26 Jun 2024 09:00:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1719417606; x=1720022406; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=I7f7BP+opKLFa9/ciieR5UyH6P8YpaRYZrb5EZwJ4oQ=; b=GGH4tXNUYuZz9dlHij6F7z3Lsgh67GN4vWpeqcGhbAoX+a6dO3td/tye1dxqFsWd85 H/781a23oIKzlBgs2aJg4D8x54n2m82v0EJxQkt+nmafuw+q6b8najIK14hAKpZPffvC tYM6VrPRUhtfmEKjBJBFM8CjZBOIKtAhW9pfg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719417606; x=1720022406; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=I7f7BP+opKLFa9/ciieR5UyH6P8YpaRYZrb5EZwJ4oQ=; b=Zp01Zw9QZ6Cq/FRw3dyzTgMn8DfmkWhGOiEqQe22Sxps8kvYV7Lu1ksYCKza2x5vgK 1v0BDcrl1gNzEgiENVECNbk/J5jIpRSO3vJsXZJO70iZUk3P9+hTmmE/CcFwaiv7z3W0 OQxEPQI7MV/0WGKlpScV1KRzvr/MjMEQhLJ3pf3rpVMQbUGVs6bJ+p5Ua8znjVqanfpq 1kIAg5Q2vt1lNh+tKT9WFG6L0fPEws/LFvbL7mMcHenWUUvwqOWxHKrW0SjupuOy0wqW JNXrbHY7l3SsLGDLHOJgrEWhfpzKCHSNA0TwbIoZzySJJcXAzcmDMVz6Z6axZqMkZggm ff/w== X-Gm-Message-State: AOJu0YzC1dcL2SiOWoph0SijPzCfwgFGhqQUZdQ3usGs20BUaN6TIE30 WtAHtjqMDVFyFSyx+E2N3ywFDCfnypRFtD+sFKxBw9XumFrdC6/gGVVuwR+sCQyqzUU3R5cNfq/ zcw== X-Google-Smtp-Source: AGHT+IFiCBfavSNUmN4a3wpU9fGwNvHue3t4+xtCR/RGELAWsTKR5YQurWMNkqBNCAZ7CuHvJwwRIA== X-Received: by 2002:a7b:cbd0:0:b0:424:ac14:ddc8 with SMTP id 5b1f17b1804b1-424ac14deddmr19796295e9.17.1719417606386; Wed, 26 Jun 2024 09:00:06 -0700 (PDT) Received: from tasman.. (host-92-15-194-143.as13285.net. [92.15.194.143]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-424c827507bsm30753715e9.22.2024.06.26.09.00.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jun 2024 09:00:06 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Alper Nebi Yasak , Neha Malcom Francis , Peng Fan , Philippe Reynes , Stefan Herbrechtsmeier Subject: [PATCH v5 03/16] binman: Deal with mkeficapsule being missing Date: Wed, 26 Jun 2024 16:59:32 +0100 Message-Id: <20240626155945.278640-4-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240626155945.278640-1-sjg@chromium.org> References: <20240626155945.278640-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.8 at phobos.denx.de X-Virus-Status: Clean Tools cannot be assumed to be present. Add a check for this with the mkeficpasule tool. Signed-off-by: Simon Glass Fixes: b617611b27a ("binman: capsule: Add support for generating...") --- (no changes since v1) tools/binman/etype/efi_capsule.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/binman/etype/efi_capsule.py b/tools/binman/etype/efi_capsule.py index e3203717822..47da5da324b 100644 --- a/tools/binman/etype/efi_capsule.py +++ b/tools/binman/etype/efi_capsule.py @@ -150,6 +150,10 @@ class Entry_efi_capsule(Entry_section): if ret is not None: os.remove(payload) return tools.read_file(capsule_fname) + else: + # Bintool is missing; just use the input data as the output + self.record_missing_bintool(self.mkeficapsule) + return data def AddBintools(self, btools): self.mkeficapsule = self.AddBintool(btools, 'mkeficapsule') From patchwork Wed Jun 26 15:59:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1952707 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=hfNpJg06; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W8RJ756Vrz20Z9 for ; Thu, 27 Jun 2024 02:00:55 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 37A4388548; Wed, 26 Jun 2024 18:00:13 +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="hfNpJg06"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5B059884C8; Wed, 26 Jun 2024 18:00:10 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) (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 655A3884CD for ; Wed, 26 Jun 2024 18:00:08 +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@chromium.org Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-4248e28de9eso31807415e9.2 for ; Wed, 26 Jun 2024 09:00:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1719417608; x=1720022408; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=8WYab1vLvZBJbf0Xi3jX9RE96p1eZZ7nMT1fkj99CFg=; b=hfNpJg06UV18mv20S4CFtAd8dx12Pcim1BmaX/H5ndz4M76maMiybkSEP/M632L69C lN3n03VyVnKgpFuCyPk0KvLkyeHIyBcL5r/SgmBVPaxs4fLrYzmIY/ux4wxJ/mKHoTvS 9L2Qf6iv4/W6637fwKRbugheE3KzxbUhsT2rs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719417608; x=1720022408; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8WYab1vLvZBJbf0Xi3jX9RE96p1eZZ7nMT1fkj99CFg=; b=jVt7UaSG9OA3OFhxKhMenx9R94DRDOh7V6iAwG5m64CGaMzrZlDV3Sy1rBsWN0zbSx f2tBR63SF/9No9wERQsftaFXBrpJiucrbo62qJjrV5Dk9u11QP9WiBr9/UK1bdtG5JHn I3EHO9zfpYA6pRyL9/6piXChMkEAtDzOLbgzeUrCNjjQkMksl0NcQg0Oxis36twdWq0P 4/T2cP8qnByzUfoN0FGYEJFdaDTsMLyRj79ofpbCv8BiU8ohOuCeeNEMSR4PvBEZVhJP RtpkoBEeqxNxL6GR7CNu2GvDKULGaHHz3yfAOVKtFzR/oZifdfKl0ag6kMdzDE8upVCq 2sew== X-Gm-Message-State: AOJu0YzXRS8KM336uXMD02HKtQA9bsOKgXHpFnleIWQNSgMIIv3cxuMp l4io19jObOIHtwQFnrjVE6G322KzDFoS/Sdnhl7cPVvZiMMq7ptvTzGVy/7wvIm6KGKRTxDl0R9 Dhg== X-Google-Smtp-Source: AGHT+IESB5s41QTISMWZWZoPuRXzf/EhWAylx0ClGkrT1vzqGI//yujQKnZXhNS8Mz6KrPvQH3iRWA== X-Received: by 2002:a05:600c:4204:b0:424:a5b2:4460 with SMTP id 5b1f17b1804b1-424a5b24569mr29300485e9.33.1719417607753; Wed, 26 Jun 2024 09:00:07 -0700 (PDT) Received: from tasman.. (host-92-15-194-143.as13285.net. [92.15.194.143]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-424c827507bsm30753715e9.22.2024.06.26.09.00.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jun 2024 09:00:07 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Alper Nebi Yasak , Neha Malcom Francis , Peng Fan , Philippe Reynes , Stefan Herbrechtsmeier Subject: [PATCH v5 04/16] binman: Return failure when a usage() message is generated Date: Wed, 26 Jun 2024 16:59:33 +0100 Message-Id: <20240626155945.278640-5-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240626155945.278640-1-sjg@chromium.org> References: <20240626155945.278640-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.8 at phobos.denx.de X-Virus-Status: Clean The tool must return an error code when invalid arguments are provided, otherwise binman has no way of knowing that anything went wrong. Correct this. Signed-off-by: Simon Glass Fixes: fab430be2f4 ("tools: add mkeficapsule command for UEFI...") --- (no changes since v1) tools/mkeficapsule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/mkeficapsule.c b/tools/mkeficapsule.c index c112ae2de8d..f28008a0829 100644 --- a/tools/mkeficapsule.c +++ b/tools/mkeficapsule.c @@ -977,7 +977,7 @@ int main(int argc, char **argv) exit(EXIT_SUCCESS); default: print_usage(); - exit(EXIT_SUCCESS); + exit(EXIT_FAILURE); } } From patchwork Wed Jun 26 15:59:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1952708 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=YQFli4b5; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W8RJM3tqrz20Xf for ; Thu, 27 Jun 2024 02:01:07 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9F43E88563; Wed, 26 Jun 2024 18:00:13 +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="YQFli4b5"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 720A9884DD; Wed, 26 Jun 2024 18:00:11 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) (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 70E1B884C6 for ; Wed, 26 Jun 2024 18:00:09 +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@chromium.org Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-42249a4f9e4so51049245e9.2 for ; Wed, 26 Jun 2024 09:00:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1719417609; x=1720022409; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=q7dZ7EgYr0k6vuGV4Zq+HOmn5La1Qr8GHhYneKXIm/g=; b=YQFli4b5wUIvUC8RPnAy185KongUuMZS1AhClTYiIX+XXFEhHE+qsxUC4ZJWxEW3Ur ecvn0eZJvaNrtJi2adVD/+3uvUPd2826N6J7e8hlX3PyWb1gamJ/70H5uCd1urG3YPBD 7rcZjO5Ync5zAmrSFl8qFbL6WDAH1fppeID84= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719417609; x=1720022409; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=q7dZ7EgYr0k6vuGV4Zq+HOmn5La1Qr8GHhYneKXIm/g=; b=I/JOIRzgl9uVQUNk7khGu17HPusyyZZ6EHeCDXp1zrSkl/7NeUbiAQI/SK1C2nN15D LYg/Gbjr93iTwxycc7qNzOZi+1L1l4qsLi1oT4VeZbIvqmUzMBxoHq0hNNZuZucVWGDJ 6dP57K67Ug9V4fN89JCnCvtW1tS7x/Jg23uwaNy88AbSRbBw/QE5cUk71UgPAbeg9tym NQYl1corq5Xq1vX6yjm28xzj3V2x7mCpEMx6BNFE7HieIZ97QNeHsxnJZR7fhwRhHMiR Ou4LcR2H/9dIaKM9YN2wB8RrP8aK669MOEcfPkli8OWyB0ZrQ6jJ7aYF+L6CCiP7XsOf CKtg== X-Gm-Message-State: AOJu0YymgrYWP2uoKZcpfhF1WdQSzlRztrDo6JZy1U+j088+rTIgGU3v CQIwJ8746/90TELzqsDgJgWfqaVrVZtdDr+HVVhUNY3SdrD8eeom7sgO6l8SnXgSpa/zVzO+FgK jiA== X-Google-Smtp-Source: AGHT+IF7Sgwu+f17dUcXBRb3gab8IDzxH7hCIhJtnHOegJOaeI4g16hmHcez3Y7FMKnfaIfpGmLA9g== X-Received: by 2002:a05:600c:1c1f:b0:424:8e3a:d02e with SMTP id 5b1f17b1804b1-4248e3ad244mr80865365e9.3.1719417608797; Wed, 26 Jun 2024 09:00:08 -0700 (PDT) Received: from tasman.. (host-92-15-194-143.as13285.net. [92.15.194.143]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-424c827507bsm30753715e9.22.2024.06.26.09.00.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jun 2024 09:00:08 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Sughosh Ganu , Alper Nebi Yasak , Neha Malcom Francis , Peng Fan , Philippe Reynes , Stefan Herbrechtsmeier Subject: [PATCH v5 05/16] binman: Keep the efi_capsule input file Date: Wed, 26 Jun 2024 16:59:34 +0100 Message-Id: <20240626155945.278640-6-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240626155945.278640-1-sjg@chromium.org> References: <20240626155945.278640-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.8 at phobos.denx.de X-Virus-Status: Clean There is no need to remove input files. It makes it harder to diagnose failures. Keep the payload file. There is no test for this condition, but one could be added. Signed-off-by: Simon Glass Acked-by: Sughosh Ganu --- (no changes since v4) Changes in v4: - Drop Fixes tag tools/binman/etype/efi_capsule.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/binman/etype/efi_capsule.py b/tools/binman/etype/efi_capsule.py index 47da5da324b..03e55cbc4d9 100644 --- a/tools/binman/etype/efi_capsule.py +++ b/tools/binman/etype/efi_capsule.py @@ -148,7 +148,6 @@ class Entry_efi_capsule(Entry_section): self.fw_version, self.oem_flags) if ret is not None: - os.remove(payload) return tools.read_file(capsule_fname) else: # Bintool is missing; just use the input data as the output From patchwork Wed Jun 26 15:59:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1952709 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=TIGct8rI; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W8RJb3Ctvz20Xf for ; Thu, 27 Jun 2024 02:01:19 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0D80C884DB; Wed, 26 Jun 2024 18:00:16 +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="TIGct8rI"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2F40B884C7; Wed, 26 Jun 2024 18:00:12 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) (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 2D32A884FC for ; Wed, 26 Jun 2024 18:00:10 +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@chromium.org Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-421eab59723so50656145e9.3 for ; Wed, 26 Jun 2024 09:00:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1719417609; x=1720022409; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=XeXW3Qkj/z7FbBVWiNsQkea6rMAPAsdsziJNKVVIk2Y=; b=TIGct8rI45gNGIB/8VFEgduTdnX0cCksGc2/6lfobmFV2gukcoRObG5wKN9zFh9udS zlqP+JFkowtFSD1zq4cMocV2ixWAlEv+bVhBguV+e6WXGqfL/ifbpYGN8DKCiBUC1z7Z AICBNWtTyJxOT/1PffXGZ6XdUVCJrt2qOo6Ag= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719417609; x=1720022409; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XeXW3Qkj/z7FbBVWiNsQkea6rMAPAsdsziJNKVVIk2Y=; b=HdZx2h/mdJSJ/FoY1+S3TlqO47QCc/HXfdbECPJ1dJqtD022BkJPiX7A+HudSeN/wV kzV8N04sRdEgWv/gz1Q4EN2DQvsPqmJX3Uus61v5tDTMom8B/A87IBfOBF7Pj0tlXxMG biP13E0Aqd7x7qU3O/TF6sAPsWrMwsC+wAiY/XJp7dutpeFSPuVQJZ+wi1B+hsPeyjKP leH9i3WHcdEZ/DxRJ5+90FJxFHzlY3WLluDr624OJ228f8DssTVGrSULWBvLhNPNkvN9 GnGE0bXjmPlKd3FH5uauAmpBQ2BJCxhfX5SJUN3TQqfXmp0hw/cs/RsFJuwsajtjiiCb kepA== X-Gm-Message-State: AOJu0Yxzj6pEyaG2gkDjJxoEKg4xfkTW+ntNWVazEX5OKjqX0l8k11oy zPmqNqh/bEgiqpFV5zQDoO6JCNdxp8legWJAXKBNPMWlS/rSA6M+k4mLh6peD4b9PHvzip4hBqJ m2g== X-Google-Smtp-Source: AGHT+IHPx0vvGCLnGsEm4a0ERb3KcfbRvQFYpwKSaMKXER3YknNPYT6g0Q1U0BYeD1F2UyN2Iyr/yw== X-Received: by 2002:a05:600c:3b11:b0:422:fa63:33ff with SMTP id 5b1f17b1804b1-42489e37068mr76747155e9.1.1719417609530; Wed, 26 Jun 2024 09:00:09 -0700 (PDT) Received: from tasman.. (host-92-15-194-143.as13285.net. [92.15.194.143]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-424c827507bsm30753715e9.22.2024.06.26.09.00.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jun 2024 09:00:09 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass Subject: [PATCH v5 06/16] nvidia: nyan-big: Disable debug UART Date: Wed, 26 Jun 2024 16:59:35 +0100 Message-Id: <20240626155945.278640-7-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240626155945.278640-1-sjg@chromium.org> References: <20240626155945.278640-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.8 at phobos.denx.de X-Virus-Status: Clean This cannot be enabled early in boot since some other init is needed. At this point it is unclear exactly what init is needed, so disable the debug UART to avoid a hang. Signed-off-by: Simon Glass --- (no changes since v1) configs/nyan-big_defconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/configs/nyan-big_defconfig b/configs/nyan-big_defconfig index 1483d17d975..4dec710cf8d 100644 --- a/configs/nyan-big_defconfig +++ b/configs/nyan-big_defconfig @@ -17,7 +17,6 @@ CONFIG_TEGRA124=y CONFIG_TARGET_NYAN_BIG=y CONFIG_TEGRA_GPU=y CONFIG_SYS_LOAD_ADDR=0x82408000 -CONFIG_DEBUG_UART=y CONFIG_FIT=y CONFIG_FIT_BEST_MATCH=y CONFIG_BOOTSTAGE=y From patchwork Wed Jun 26 15:59:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1952710 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=XZzzfan8; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W8RJs3MxWz20Xf for ; Thu, 27 Jun 2024 02:01:33 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5E8F288528; Wed, 26 Jun 2024 18:00:16 +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="XZzzfan8"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DECEA8852D; Wed, 26 Jun 2024 18:00:12 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) (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 E7B1C884DB for ; Wed, 26 Jun 2024 18:00:10 +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@chromium.org Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-42561715d41so3038285e9.0 for ; Wed, 26 Jun 2024 09:00:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1719417610; x=1720022410; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=4AgDkU3kc+gE9cH9KGK92Fgrg6aAJ0qflIR6mzpaVBA=; b=XZzzfan8XlKuMYfyZNUeD5IFx/c/HqESWUXhBG1oKprUGSshkCEJgWQXm+yGzM/2uZ K9R8z+3TuMVxXRXt56uV9emTOuYwHfDq3pTcWq4dXfpYNq5gGFxCwa/BtI8K5cVdZnRa sq8XvlCa5Z8UA5HtyVP2VWTwWBUEWuuyKj/vU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719417610; x=1720022410; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4AgDkU3kc+gE9cH9KGK92Fgrg6aAJ0qflIR6mzpaVBA=; b=nSrhhNe/x2o6Xp8ystBU9nuukqowlai2dfKJmUcM+xYYTfT8gPL1Z7F4DCVHrLIXF/ 6/ErjTKqc4bniO4i24sjurBIW2HXDveVF6wG2fhJeHdcE/y2FSXYDazG8biD9PSv+skG oXW3lSmIzCytPQUHAq7R8To8MRz/NPC2qh23Ol3jj7CbtyGP1iv8dHGyLbMjsf8prtjs hra2fpdp2s8j8YjrxiihRSz+mLqEAOsrV8FVxhN0cxvc5Iu0PbKA/gq3fIGCRiLtRMDL 37NSTWZFijx7abDjUea6Tpriphw9Rlc+wFx3DVwHp1Dk84ICxUBSG9U2BSYcQ909LRzB +2cw== X-Gm-Message-State: AOJu0YzzSqS3dHrt0l7ms3DKQH7qYV0lkpC7HdPIdkThxejNdYOLq2ww yj5Ggy+BVTi4t80UtikqnDqyflzZ2z197y/nET3gCjKe+0pJjypSCMYqcbVfa/7MSjo2ZwJyupo BOw== X-Google-Smtp-Source: AGHT+IEV8bM0FPDvE8P/gkwpAvSvOvY8BRBSKmkpblGtHPwEfwSshrEiUdHGR7HmlYbUx9Q6g2JEQg== X-Received: by 2002:a05:600c:3096:b0:424:8acb:7d53 with SMTP id 5b1f17b1804b1-425630daf25mr895775e9.1.1719417610268; Wed, 26 Jun 2024 09:00:10 -0700 (PDT) Received: from tasman.. (host-92-15-194-143.as13285.net. [92.15.194.143]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-424c827507bsm30753715e9.22.2024.06.26.09.00.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jun 2024 09:00:09 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Heinrich Schuchardt Subject: [PATCH v5 07/16] tpm: Avoid code bloat when not using EFI_TCG2_PROTOCOL Date: Wed, 26 Jun 2024 16:59:36 +0100 Message-Id: <20240626155945.278640-8-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240626155945.278640-1-sjg@chromium.org> References: <20240626155945.278640-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.8 at phobos.denx.de X-Virus-Status: Clean It does not make sense to enable all SHA algorithms unless they are needed. It bloats the code and in this case, causes chromebook_link to fail to build. That board does use the TPM, but not with measured boot, nor EFI. Since EFI_TCG2_PROTOCOL already selects these options, we just need to add them to MEASURED_BOOT as well. Note that the original commit combines refactoring and new features, which makes it hard to see what is going on. Fixes: 97707f12fda tpm: Support boot measurements Reviewed-by: Heinrich Schuchardt Signed-off-by: Simon Glass --- (no changes since v2) Changes in v2: - Put the conditions under EFI_TCG2_PROTOCOL - Consider MEASURED_BOOT too boot/Kconfig | 4 ++++ lib/Kconfig | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/boot/Kconfig b/boot/Kconfig index 36bdc83b957..4c9d2c0f79a 100644 --- a/boot/Kconfig +++ b/boot/Kconfig @@ -734,6 +734,10 @@ config LEGACY_IMAGE_FORMAT config MEASURED_BOOT bool "Measure boot images and configuration when booting without EFI" depends on HASH && TPM_V2 + select SHA1 + select SHA256 + select SHA384 + select SHA512 help This option enables measurement of the boot process when booting without UEFI . Measurement involves creating cryptographic hashes diff --git a/lib/Kconfig b/lib/Kconfig index 189e6eb31aa..568892fce44 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -438,10 +438,6 @@ config TPM bool "Trusted Platform Module (TPM) Support" depends on DM imply DM_RNG - select SHA1 - select SHA256 - select SHA384 - select SHA512 help This enables support for TPMs which can be used to provide security features for your board. The TPM can be connected via LPC or I2C From patchwork Wed Jun 26 15:59:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1952711 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=Fm6qKhtf; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W8RK44TDSz20Xf for ; Thu, 27 Jun 2024 02:01:44 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id BA8FD8855B; Wed, 26 Jun 2024 18:00:16 +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="Fm6qKhtf"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 072F1884DD; Wed, 26 Jun 2024 18:00:14 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) (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 C20C3884F1 for ; Wed, 26 Jun 2024 18:00:11 +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@chromium.org Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-424acf3226fso8632935e9.1 for ; Wed, 26 Jun 2024 09:00:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1719417611; x=1720022411; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=JfQhvNgKcrCfr+fuDoJ/yQIZ0hGftxiA34nh3+CI+jY=; b=Fm6qKhtfz8OismkO23MBYcX8NEjJ7rGQWynx2NGGHXdHA0bFl7uEvA0lS2zWfp9UmC ShJW6Yq3pshahYQ6oM6/S9Kr2OtIfC/5tFLBn3prlndH8UE7jg81KfQEzRQPvH6LeGwg gakJx6AODXjMpz7cDkGqGqKB80EE3zFOEOJLM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719417611; x=1720022411; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JfQhvNgKcrCfr+fuDoJ/yQIZ0hGftxiA34nh3+CI+jY=; b=nnX548FcQK3KgAWgPvoO6yDe2c3PtdF1Ej13sXAnV29koF0JmgAKu/CY9xZ6faeLT6 4gepIIBzRR4l/v749HlI68yEGOuPVjLM7zYxe9W48l/j3+jnCEH1u63468BWLrco/Ygt gWImJSQbYXEwnTMiXs5d8A1A6hIm2ZjNB/yh8xU+J2UIhmlkr/D3jsRmnoT1M/OuLNMA 37FSaBKQXKpZKagViUW0R8RGTaNf1cqDOqebgV9CvNSBPZL70QcwNfv+2zV7yby4cbJd a5/IVmLzuJoNmQkbO8WqNj8Bp1s4Xx1c61hqtNZU31jrfBn2o1kJZwvmGWdnx/KOdcLt mBLw== X-Gm-Message-State: AOJu0YzKF5NeqFIIdADvFL2nc5TXsJzSLH8QdeqqF8QDCs35R8v8JgUZ 3hUKAckr2vpqdtedH/I8OBkTK9UQKFLLjwHyZ8+3C8iZp/5QTDLdnxiJ7o/rIjiLv3YgrmxISb+ +vw== X-Google-Smtp-Source: AGHT+IFvp/1tZMc8CN0d9uxkAn10nNhMOY0BAmYSaUReeac2+RmcPjjOpySQUKnbnvkBSBoNxsXvXw== X-Received: by 2002:a05:600c:3b9c:b0:424:8e97:5feb with SMTP id 5b1f17b1804b1-4248e9763femr66249195e9.3.1719417611093; Wed, 26 Jun 2024 09:00:11 -0700 (PDT) Received: from tasman.. (host-92-15-194-143.as13285.net. [92.15.194.143]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-424c827507bsm30753715e9.22.2024.06.26.09.00.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jun 2024 09:00:10 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Bin Meng Subject: [PATCH v5 08/16] x86: Set a board-size limit for chromebook_link Date: Wed, 26 Jun 2024 16:59:37 +0100 Message-Id: <20240626155945.278640-9-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240626155945.278640-1-sjg@chromium.org> References: <20240626155945.278640-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.8 at phobos.denx.de X-Virus-Status: Clean Set a size limit for this board so that we get a build error if it grows too much. Note that the limit is approximately, since it does not include the FDT, microcode and fdtmap, which can change in size. However this board is fairly stable, so overflowing this limit will likely result in the image not fitting in the ROM space available for U-Boot. Signed-off-by: Simon Glass --- (no changes since v4) Changes in v4: - Add new patch to set a board-size limit for chromebook_link configs/chromebook_link_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/chromebook_link_defconfig b/configs/chromebook_link_defconfig index a9f91dd9b26..1a72fd178a8 100644 --- a/configs/chromebook_link_defconfig +++ b/configs/chromebook_link_defconfig @@ -15,6 +15,8 @@ CONFIG_DEBUG_UART=y CONFIG_HAVE_MRC=y CONFIG_SMP=y CONFIG_HAVE_VGA_BIOS=y +CONFIG_HAS_BOARD_SIZE_LIMIT=y +CONFIG_BOARD_SIZE_LIMIT=630000 CONFIG_FIT=y CONFIG_BOOTSTAGE=y CONFIG_BOOTSTAGE_REPORT=y From patchwork Wed Jun 26 15:59:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1952713 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=P27chEEv; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W8RKX4M20z20Xf for ; Thu, 27 Jun 2024 02:02:08 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8014E8857F; Wed, 26 Jun 2024 18:00:21 +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="P27chEEv"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E4EA1884C7; Wed, 26 Jun 2024 18:00:15 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-lf1-x144.google.com (mail-lf1-x144.google.com [IPv6:2a00:1450:4864:20::144]) (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 BAAB288566 for ; Wed, 26 Jun 2024 18:00:13 +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@chromium.org Received: by mail-lf1-x144.google.com with SMTP id 2adb3069b0e04-52cdea1387eso4618716e87.0 for ; Wed, 26 Jun 2024 09:00:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1719417612; x=1720022412; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=A6d6Au1EjTcFyCj48QfjSy1CLH2vHtoyvSNInjPJf5g=; b=P27chEEvlEx/KwpRCjlj+QoEoYI+LzUBQiJE/FtGR1yfgfgeDu1mm73MUK5lJZYK7A YFo1fruY7a1KgcG3FCCknJux9LQyglDeWoJnYQp7fby3CWwfMCFE5++JBt2800Sk0pRC cUDm10MBCBhQ5VGadrY6RiIZS26r7f8ce1AGo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719417612; x=1720022412; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=A6d6Au1EjTcFyCj48QfjSy1CLH2vHtoyvSNInjPJf5g=; b=cSW8cTrqBZuwxs1WMYc8ACZde/DnnSMWertFjLMwElhW3yC3M83Fu/+4jtCgXxBZGG 2s0mc7xxg4vU287zE3BUiOTPPNlXcHT5vA2MtmjqRfpk0VfmluAE4VMS/kcBmbThHVpg RtBK36FfQkzrNfN3U3cYYWXZUnBLgQdwzzbK2GoCK7V2U6BL215J4zfgbSECpL9jqjkc fh2fvnVI/X3VzCtM6jIll9TT2oKEZANPHHzmNQckz6zeclw5BYdN7CHpxf3G8LLNB2EQ 3QJguwD7VApPx002wCyjOb2o60n38vwkP/P4P78DC3gzkS3zmoW1MPcATlL9Z4MWYd3g jVVg== X-Gm-Message-State: AOJu0YwvW6XqXsEMkN3xnqbvNS1oEb8xrKI+86DD6X+m5oHxMIPkmshf 3m4CSHViqrrkwgole0UVlhY8oaQQZVGaUcfLi8pkZy9USiCM1tjp7SI3DS21B2vTmjQQ0e9zSs3 sQvo4 X-Google-Smtp-Source: AGHT+IEKhV77uOqtHqRllFWFvxvqeYepdW6CpeM+Xx1zTz6n0HN9gzJ0pFnWAYqCrrcLmSpRDZ7M3Q== X-Received: by 2002:ac2:5299:0:b0:52c:c9ce:be8d with SMTP id 2adb3069b0e04-52ce186482cmr7048305e87.57.1719417611970; Wed, 26 Jun 2024 09:00:11 -0700 (PDT) Received: from tasman.. (host-92-15-194-143.as13285.net. [92.15.194.143]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-424c827507bsm30753715e9.22.2024.06.26.09.00.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jun 2024 09:00:11 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Quentin Schulz , Jeffy Chen , huang lin Subject: [PATCH v5 09/16] rockchip: veyron: Add logging for power init Date: Wed, 26 Jun 2024 16:59:38 +0100 Message-Id: <20240626155945.278640-10-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240626155945.278640-1-sjg@chromium.org> References: <20240626155945.278640-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.8 at phobos.denx.de X-Virus-Status: Clean Add better logging for power init so that CONFIG_LOG_ERROR_RETURN can be enabled. Signed-off-by: Simon Glass Reviewed-by: Quentin Schulz --- (no changes since v2) Changes in v2: - Remove the superfluous if() and drop the debug() as well board/google/veyron/veyron.c | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/board/google/veyron/veyron.c b/board/google/veyron/veyron.c index 32dbcdc4d10..6d4c9debdee 100644 --- a/board/google/veyron/veyron.c +++ b/board/google/veyron/veyron.c @@ -29,44 +29,38 @@ static int veyron_init(void) int ret; ret = regulator_get_by_platname("vdd_arm", &dev); - if (ret) { - debug("Cannot set regulator name\n"); - return ret; - } + if (ret) + return log_msg_ret("vdd", ret); /* Slowly raise to max CPU voltage to prevent overshoot */ ret = regulator_set_value(dev, 1200000); if (ret) - return ret; + return log_msg_ret("s12", ret); udelay(175); /* Must wait for voltage to stabilize, 2mV/us */ ret = regulator_set_value(dev, 1400000); if (ret) - return ret; + return log_msg_ret("s14", ret); udelay(100); /* Must wait for voltage to stabilize, 2mV/us */ ret = rockchip_get_clk(&clk.dev); if (ret) - return ret; + return log_msg_ret("clk", ret); clk.id = PLL_APLL; ret = clk_set_rate(&clk, 1800000000); if (IS_ERR_VALUE(ret)) - return ret; + return log_msg_ret("s18", ret); ret = regulator_get_by_platname("vcc33_sd", &dev); - if (ret) { - debug("Cannot get regulator name\n"); - return ret; - } + if (ret) + return log_msg_ret("vcc", ret); ret = regulator_set_value(dev, 3300000); if (ret) - return ret; + return log_msg_ret("s33", ret); ret = regulators_enable_boot_on(false); - if (ret) { - debug("%s: Cannot enable boot on regulators\n", __func__); - return ret; - } + if (ret) + return log_msg_ret("boo", ret); return 0; } @@ -81,7 +75,7 @@ int board_early_init_r(void) if (!fdt_node_check_compatible(gd->fdt_blob, 0, "google,veyron")) { ret = veyron_init(); if (ret) - return ret; + return log_msg_ret("vey", ret); } #endif /* From patchwork Wed Jun 26 15:59:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1952712 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=aQL5FTsp; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W8RKJ62SFz20Xf for ; Thu, 27 Jun 2024 02:01:56 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2050688574; Wed, 26 Jun 2024 18:00:17 +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="aQL5FTsp"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9371C884C7; Wed, 26 Jun 2024 18:00:15 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) (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 6E8018855B for ; Wed, 26 Jun 2024 18:00:13 +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@chromium.org Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-4248ea53493so27310475e9.3 for ; Wed, 26 Jun 2024 09:00:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1719417612; x=1720022412; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=bJXFsCW6LCl1bXkmZ8sKbXEiUPqgjCbPoT+lGmHDHLY=; b=aQL5FTspN9pL0chNoKbFJHRtOUvm/nWdZFvnJvfwGyxGFU3BaR+7Pb4zvrGr4cH85n SYzmLbh/V79yBbtf3JtaiwyPd930EAwvv3vZ90CjLu/JeSE3mTN/sK+5P72cDvcIg+He conjdkKRCiYimSvVosv4XT1wMb9fFzQA9j0vw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719417612; x=1720022412; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bJXFsCW6LCl1bXkmZ8sKbXEiUPqgjCbPoT+lGmHDHLY=; b=cy//eESnK4e0hDClKilaZ/S5gWjH08ICy5mWXIMkWI0igYqden+1uoL0EkP5ZiZL4r +fbYuyKNMJsn0jOlVn9nbJ+mxwW/CoVY5RgXN1gxP+QVxVCTfW1NjniVv4JN592+Lwqw dTJE5iGv2tXyTT8WBOn5nkmVxbpihrl6Ln20z74Cwhl6ZUQDCuSlzuyYkwgbno0IKCEA +80tNLXAjOprLojLBkheeAYVfegaubW1SqUvb2hWQ4rNN2tzs2OS2KuI9dMvZqwzInv9 BWVKHa//Hy6KDCzkQBpm834Oxmy74GfC1Ox9/vE0DOnxZz1FzhXkM3pGHL+vIAN5Dm5q YsQw== X-Gm-Message-State: AOJu0YxMKdvbUqfqSqENBJ2ylMPWDr+6I2TQKcM4mx1Foytcr4HdodA9 dEeOpswj5yoYXR9rihp+E8pb5yG04/wu7fLWcVJXfHv8fN3GbyVWodEIx7lzMyXBZRph/SjKEe+ Jbg== X-Google-Smtp-Source: AGHT+IG3mYUR/H3ckbcSlWSpABLSiE68kn81Lp07psRTVQx1aqtDCBJEVPHn71ZlWuimzIoXsjl/oQ== X-Received: by 2002:a05:600c:1d24:b0:424:917e:f394 with SMTP id 5b1f17b1804b1-424917ef3dbmr75354985e9.31.1719417612713; Wed, 26 Jun 2024 09:00:12 -0700 (PDT) Received: from tasman.. (host-92-15-194-143.as13285.net. [92.15.194.143]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-424c827507bsm30753715e9.22.2024.06.26.09.00.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jun 2024 09:00:12 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Jonas Karlman , Quentin Schulz , Lukasz Majewski Subject: [PATCH v5 10/16] power: regulator: Handle autoset in regulators_enable_boot_on() Date: Wed, 26 Jun 2024 16:59:39 +0100 Message-Id: <20240626155945.278640-11-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240626155945.278640-1-sjg@chromium.org> References: <20240626155945.278640-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.8 at phobos.denx.de X-Virus-Status: Clean With a recent change, regulators_enable_boot_on() returns an error if a regulator is already set. Check for and handle this situation. Fixes: d99fb64a98a power: regulator: Only run autoset once for each regulator Reviewed-by: Jonas Karlman Reviewed-by: Quentin Schulz Signed-off-by: Simon Glass --- (no changes since v1) drivers/power/regulator/regulator-uclass.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/power/regulator/regulator-uclass.c b/drivers/power/regulator/regulator-uclass.c index 77d101f262e..d9e1fb68295 100644 --- a/drivers/power/regulator/regulator-uclass.c +++ b/drivers/power/regulator/regulator-uclass.c @@ -518,7 +518,7 @@ int regulators_enable_boot_on(bool verbose) dev; uclass_next_device(&dev)) { ret = regulator_autoset(dev); - if (ret == -EMEDIUMTYPE) { + if (ret == -EMEDIUMTYPE || ret == -EALREADY) { ret = 0; continue; } From patchwork Wed Jun 26 15:59:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1952714 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=RP6JL89b; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W8RKm2Zc9z20Xf for ; Thu, 27 Jun 2024 02:02:20 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E9F1B8858C; Wed, 26 Jun 2024 18:00:21 +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="RP6JL89b"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E5F2688521; Wed, 26 Jun 2024 18:00:18 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) (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 EDB2488566 for ; Wed, 26 Jun 2024 18:00:16 +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@chromium.org Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-52cdd03d6aaso4895442e87.0 for ; Wed, 26 Jun 2024 09:00:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1719417616; x=1720022416; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=AOduDstwRx9JFHQGUTamaoAoIgSOooUTdQ8x/X0aOHc=; b=RP6JL89brhAKEaA8+T8Ez35S/gj3f2SZfQS9Mi5CRBmcKmVs40K0dRsFxD4gMIOFu1 UCkfcIlH4lSfAWcFHixTo+dL9i65xClbXQ+hzo0cw97815jsyM2ZtmVDebsVfQyw0XSh CJpxIaJLmv6ackwOKTInFc4pbQs6suCckjUdI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719417616; x=1720022416; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AOduDstwRx9JFHQGUTamaoAoIgSOooUTdQ8x/X0aOHc=; b=TCbxX3yTxMRGFXb4OYoQ/XX+5htUo+VryUqceO9yaRVlrEN8eJvUQXA4cyumu/mQ3K Wtgsl2XUWJgd9gJyDArxCrZowIKcPrXI3MymY0gvzHLJPuduQUAHFCd5fXH2Ysf05zDb wbFFz09oZXhPfh+PuRQ9Q4+9JpOFqckVFYWLQIPpTA8/biTIszAc9InWN2oQXrjEJmAQ dXA/X91ilXCPHzkivl0MWKTOrTObNByUgNZ6CO0XaPoSbQ6nlS1Bon0HqJl9WcHW/0ra SbYTyRWKJ0ARqpH0FIQFV/spwAMBdKA1fHatUHm8UD5Fd+VEZh2+zDM5UUr/QYOEAvbE rSsQ== X-Gm-Message-State: AOJu0YzKcgT6bIju8Cdc2B/nUUgFYRcpOfh2oH2Kle03EV/qnRPbXnjN Br8RnfUKsC9gqjhIrNLcsOkwyoqtExSvYW83llvJ8H+3wN0M0j4MVxqaEVR4tleZF4XWFrBOGzL h0g== X-Google-Smtp-Source: AGHT+IHBiJLPEBpn5xI6dw57Nn4Bj74NjmnQetF4BQsi1+kkGigd2vvNZBY1UEISsHZM1BbvLUkuaw== X-Received: by 2002:a05:6512:3290:b0:52b:82d5:8fd2 with SMTP id 2adb3069b0e04-52ce0673533mr7034573e87.47.1719417615069; Wed, 26 Jun 2024 09:00:15 -0700 (PDT) Received: from tasman.. (host-92-15-194-143.as13285.net. [92.15.194.143]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-424c827507bsm30753715e9.22.2024.06.26.09.00.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jun 2024 09:00:13 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Jerry Van Baren Subject: [PATCH v5 11/16] fdt: Correct condition for bloblist existing Date: Wed, 26 Jun 2024 16:59:40 +0100 Message-Id: <20240626155945.278640-12-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240626155945.278640-1-sjg@chromium.org> References: <20240626155945.278640-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.8 at phobos.denx.de X-Virus-Status: Clean On some boards, the bloblist is created in SPL once SDRAM is ready. It cannot be accessed until that point, so is not available early in SPL. Add a condition to avoid a hang in this case. This fixes a hang in chromebook_coral Fixes: 70fe2385943 ("fdt: Allow the devicetree to come from a bloblist") Signed-off-by: Simon Glass --- (no changes since v3) Changes in v3: - Use BLOBLIST instead of OF_BLOBLIST Changes in v2: - Use 'phase' instead of 'stage' lib/fdtdec.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/fdtdec.c b/lib/fdtdec.c index b2c59ab3818..e16d1819449 100644 --- a/lib/fdtdec.c +++ b/lib/fdtdec.c @@ -1669,8 +1669,16 @@ int fdtdec_setup(void) { int ret = -ENOENT; - /* If allowing a bloblist, check that first */ - if (CONFIG_IS_ENABLED(BLOBLIST)) { + /* + * If allowing a bloblist, check that first. This would be better + * handled with an OF_BLOBLIST Kconfig, but that caused far too much + * argument, so add a hack here, used e.g. by chromebook_coral + * The necessary test is whether the previous phase passed a bloblist, + * not whether this phase creates one. + */ + if (CONFIG_IS_ENABLED(BLOBLIST) && + (spl_prev_phase() != PHASE_TPL || + !IS_ENABLED(CONFIG_TPL_BLOBLIST))) { ret = bloblist_maybe_init(); if (!ret) { gd->fdt_blob = bloblist_find(BLOBLISTT_CONTROL_FDT, 0); From patchwork Wed Jun 26 15:59:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1952715 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=EvH1i322; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W8RKz6dBKz20Xf for ; Thu, 27 Jun 2024 02:02:31 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6614B88578; Wed, 26 Jun 2024 18:00:22 +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="EvH1i322"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 84A42884DD; Wed, 26 Jun 2024 18:00:19 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) (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 A565488578 for ; Wed, 26 Jun 2024 18:00:17 +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@chromium.org Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-424798859dfso55924435e9.0 for ; Wed, 26 Jun 2024 09:00:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1719417617; x=1720022417; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=JPDTBpVZuVkaqULrtYe8FXz9i1e5MJHdje88Wa78OmY=; b=EvH1i322eU47SyXtl77jItWpXeSqEvTBJ1EpA4waR1x0IXbndlaSEwdQuieVUiLaY8 pd9TbUOWTpcaRrkkOeonLYW7wZnEfQiNakroMqAoejCpTQGRQ6jkBFicFBtvR+z3tkz1 Hli4Xr7hOu50CzNOtxOjj6oee4TjKIkWLtlCY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719417617; x=1720022417; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JPDTBpVZuVkaqULrtYe8FXz9i1e5MJHdje88Wa78OmY=; b=PhHZhsSEhX5pBP/iCtrAXTIUnpPzgtw+ht8jD8NjhvqZ3Sm2xkevQGgDVmPyyJbYCY jbniiGwkm6FaTYXNspa7qeEk3SYq4VXfrEoVstUvR7f9PDRCIMGY0kyW8IIiJuTiCBY4 /4WTQmPk1DK4/ib1p6+AVSVfv1i7rMcknCtka87wjHRbJdcrlF70j6kmQ3d5JCo7pf/J G++pipp/jkjCmyHtzSN1rKqq5mQSKyVYtO9lTwG5fHyJI4i4dg9b820bsAPa982kz/PW Ay3BWaFz6zHYrc5XyIRkw3cY8x1qgdByiL/5BY6Ot7rmxwLczIWjTaP6SA2MgauZ6PSi eJwg== X-Gm-Message-State: AOJu0YyNqj/RavpEh1WKTiTRE3bVWXnItZqVesbGapRZfGNvW4C2yFBW yZSZKZG0d+dOVpAyjCZ42UymhUY6onGcV/3kBg3lg0RR76c9pnV2DuKFDD8piUizqA14Mxpx9C8 JpQ== X-Google-Smtp-Source: AGHT+IF2nSMaMz6m0uC+QQD34RT/iSA0RGp4Mda0/f3h5N8mt6kBn9EjSIx0/CcCAg0Psd0c1vtYiA== X-Received: by 2002:a05:600c:35c6:b0:421:eed3:5991 with SMTP id 5b1f17b1804b1-4248cc593f5mr81936795e9.32.1719417617013; Wed, 26 Jun 2024 09:00:17 -0700 (PDT) Received: from tasman.. (host-92-15-194-143.as13285.net. [92.15.194.143]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-424c827507bsm30753715e9.22.2024.06.26.09.00.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jun 2024 09:00:16 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass Subject: [PATCH v5 12/16] spl: Allow ATF to work when dcache is disabled Date: Wed, 26 Jun 2024 16:59:41 +0100 Message-Id: <20240626155945.278640-13-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240626155945.278640-1-sjg@chromium.org> References: <20240626155945.278640-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.8 at phobos.denx.de X-Virus-Status: Clean The dcache may not be enabled in SPL. Add a check to avoid trying to use an undefined function. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- (no changes since v1) common/spl/spl_atf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/spl/spl_atf.c b/common/spl/spl_atf.c index 3bdd013a35f..9afe6456bc4 100644 --- a/common/spl/spl_atf.c +++ b/common/spl/spl_atf.c @@ -204,7 +204,8 @@ static void __noreturn bl31_entry(uintptr_t bl31_entry, uintptr_t bl32_entry, fdt_addr); raw_write_daif(SPSR_EXCEPTION_MASK); - dcache_disable(); + if (!CONFIG_IS_ENABLED(SYS_DCACHE_OFF)) + dcache_disable(); atf_entry(bl31_params, (void *)fdt_addr); } From patchwork Wed Jun 26 15:59:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1952716 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=ZBF0IJIL; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W8RLR6yRBz20Xf for ; Thu, 27 Jun 2024 02:02:55 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id BBB308857C; Wed, 26 Jun 2024 18:00:27 +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="ZBF0IJIL"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CC758884FC; Wed, 26 Jun 2024 18:00:20 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) (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 6F5F9884C7 for ; Wed, 26 Jun 2024 18:00:18 +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@chromium.org Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-424ad289949so8688545e9.2 for ; Wed, 26 Jun 2024 09:00:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1719417618; x=1720022418; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=zZnXyn6Jzq77UX2P2PeQLgXugpfuE0Zwk119HlDUNrM=; b=ZBF0IJILBbYYXlGC2wxoIRPGRiWZFYl5HtGABeV8zKbJlUPyLIyD6AjUNKu8gd9mnU dEDKTvMnlu+ZneeKuA8yLZIxYkatT6TplpUoPr4tGqmnyv5SkyuPImi6ZwAQ10k+MZS3 smdO/b+i2uyvj5OVcFPBaJ60uJy+bZW8zpoyI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719417618; x=1720022418; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zZnXyn6Jzq77UX2P2PeQLgXugpfuE0Zwk119HlDUNrM=; b=PIYLfXpxDFHbQVFo0w6JBEpV6Gt6hd24s7FSDzvk8AFu01MkBpgCtDyOIJG33VevWK VImAsWFaaBnndqPxHF3M2rXFa8snXZXSVuHuRN7zxRX3AgoA/1RfjEI1mg3DvE8q115T xKGEHdp8esy44Oibifd5S9NwFXuP7GZTyOf2ai5I8X4FYyHq2R/x+P9U7cGKLk4IhGy0 6N1ZFDuo8ro2Dm6dFWec9iw9il+E7UKqU6QAecQz6WZ9AuQxN/00sEpS3fZQTX/0tnEW T1LdHOJ1eDYSo3Svq2tMz+vNmJHCO5UVP606mZ3Fdb2NC4VsbhIf6mTq+SVCpfckCGiM woJg== X-Gm-Message-State: AOJu0YxK0XGasNd3Wagz0KrpZl1nX9BtrKg3VGxlumK19ZkYH9jQFL72 804GxbQzdQE4RuSGeV0/EW+FS6GdOkqtqDGPYTjq6KhKcPOPU7/4kgtDsvlDx8F6m+d10Mcg3TE FyQ== X-Google-Smtp-Source: AGHT+IGSCEiFmNX76OZmN5vGzY3YCSrraqxMG6OJvL21Le/0vlfTb+i//TxAugatoFHIrOPg/dC2LA== X-Received: by 2002:a05:600c:464f:b0:424:a312:908 with SMTP id 5b1f17b1804b1-424a312098emr31382525e9.6.1719417617827; Wed, 26 Jun 2024 09:00:17 -0700 (PDT) Received: from tasman.. (host-92-15-194-143.as13285.net. [92.15.194.143]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-424c827507bsm30753715e9.22.2024.06.26.09.00.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jun 2024 09:00:17 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Quentin Schulz , Jeffy Chen , Jonas Karlman , huang lin Subject: [PATCH v5 13/16] rockchip: Ensure memory size is available in RK3399 SPL Date: Wed, 26 Jun 2024 16:59:42 +0100 Message-Id: <20240626155945.278640-14-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240626155945.278640-1-sjg@chromium.org> References: <20240626155945.278640-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.8 at phobos.denx.de X-Virus-Status: Clean At present gd->ram_size is 0 in SPL, meaning that it is not possible to enable the cache. Correct this by always populating the RAM size correctly. This increases code size by about 500 bytes in SPL, since it must call the rather large rockchip_sdram_size() function. Signed-off-by: Simon Glass Reviewed-by: Quentin Schulz --- (no changes since v3) Changes in v3: - Cut the patch down to bare bones Changes in v2: - Add new patch to correct memory size in SPL drivers/ram/rockchip/sdram_rk3399.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 02cc4a38cf0..3c4e20f4e80 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -3142,19 +3142,19 @@ static int rk3399_dmc_init(struct udevice *dev) static int rk3399_dmc_probe(struct udevice *dev) { + struct dram_info *priv = dev_get_priv(dev); + #if defined(CONFIG_TPL_BUILD) || \ (!defined(CONFIG_TPL) && defined(CONFIG_SPL_BUILD)) if (rk3399_dmc_init(dev)) return 0; -#else - struct dram_info *priv = dev_get_priv(dev); - +#endif priv->pmugrf = syscon_get_first_range(ROCKCHIP_SYSCON_PMUGRF); debug("%s: pmugrf = %p\n", __func__, priv->pmugrf); priv->info.base = CFG_SYS_SDRAM_BASE; priv->info.size = rockchip_sdram_size((phys_addr_t)&priv->pmugrf->os_reg2); -#endif + return 0; } From patchwork Wed Jun 26 15:59:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1952717 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=OZqktyNS; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W8RLg1rN6z20Xf for ; Thu, 27 Jun 2024 02:03:07 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1E4DD8859B; Wed, 26 Jun 2024 18:00:28 +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="OZqktyNS"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CC2B58858C; Wed, 26 Jun 2024 18:00:21 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) (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 CA5D4884DD for ; Wed, 26 Jun 2024 18:00:19 +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@chromium.org Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-52cdea1387eso4618860e87.0 for ; Wed, 26 Jun 2024 09:00:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1719417619; x=1720022419; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=54JRYRRPMnAAwAEXk624r//Ll7gMUzolnLcZK8CaBZw=; b=OZqktyNSF7PIKMP20a5KDCvyx0a546h4vSSNEhI2FnUqq9Isr59RXDPBZ6Rcp7UbrS hYZmTlYPtAr84qIpEtGJJ5vmGYSMAVhVv41mXyloMd3R7oJOLCfQ8/TvzivcxlAuRK2+ 3n+nZQplzZUEDqyderSxWCPOS7QvL9I3Ndh54= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719417619; x=1720022419; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=54JRYRRPMnAAwAEXk624r//Ll7gMUzolnLcZK8CaBZw=; b=u6PoKh+6vRmr0Y4rMXvXIvpfEXNYmrG2qXIjJ7bG3xn/BGWPjgwzrnuNF5TY22i5ce xQu5SPgO6oB78W/8qpN5tT7/ebEn4r2vZ0pTDZ0sWbkUSrfcRSOwwLPwcbz43ztsr/9N VjXyTyst0my457gFrS9oBQphdy75LUGvMaFwI1Zd9+t0MB/fTuw6jmOEOxhVYgv+zm/t 7RQ2HOf2e5rpfwOuCJG515WSaoVJryRIg8v0mJJXb8Qo9u7fS6Oi3qIATeb8nIPCfY5O iXAsI+FA/JZnwE0bKMq1mSBDlydF11IAY0pkqq4ZOz714NbeAoE2vg7gyKyZ0EwNHaVq QPAQ== X-Gm-Message-State: AOJu0Yz7xb43W6fQ1EYsXnnFqpvgv2siUXeLk+SzSLuNYhaYN17i20bV ICUP6D+D0r6kyDsZMu8VBNzmlFkaZ5IrwtAhDM+5zDPOCK491O40KksI4baTSEND4FSBLI+gGez V8Q== X-Google-Smtp-Source: AGHT+IHckSVOgFjyw5E1XRAL4sd1B0ZE+bq7pjqe46P70djGLRbu93MkiS0SySougzBP/tLd1oQGgA== X-Received: by 2002:a05:6512:2004:b0:516:d692:5e0b with SMTP id 2adb3069b0e04-52ce185f9d6mr6160515e87.54.1719417618951; Wed, 26 Jun 2024 09:00:18 -0700 (PDT) Received: from tasman.. (host-92-15-194-143.as13285.net. [92.15.194.143]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-424c827507bsm30753715e9.22.2024.06.26.09.00.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jun 2024 09:00:18 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Jeffy Chen , Jonas Karlman , Quentin Schulz , huang lin Subject: [PATCH v5 14/16] rockchip: Avoid #ifdefs in RK3399 SPL Date: Wed, 26 Jun 2024 16:59:43 +0100 Message-Id: <20240626155945.278640-15-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240626155945.278640-1-sjg@chromium.org> References: <20240626155945.278640-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.8 at phobos.denx.de X-Virus-Status: Clean The code here is confusing due to large blocks which are #ifdefed out. Add a function phase_sdram_init() which returns whether SDRAM init should happen in the current phase, using that as needed to control the code flow. This increases code size by about 500 bytes in SPL when the cache is on, since it must call the rather large rockchip_sdram_size() function. - Drop the non-dcache optimisation, since the cache should normally be on Signed-off-by: Simon Glass --- Changes in v5: - Move setting of pmugrf into the probe() function Changes in v3: - Split out the refactoring into a separate patch drivers/ram/rockchip/sdram_rk3399.c | 33 ++++++++++++++--------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 3c4e20f4e80..b259e8e3dd6 100644 --- a/drivers/ram/rockchip/sdram_rk3399.c +++ b/drivers/ram/rockchip/sdram_rk3399.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -63,8 +64,6 @@ struct chan_info { }; struct dram_info { -#if defined(CONFIG_TPL_BUILD) || \ - (!defined(CONFIG_TPL) && defined(CONFIG_SPL_BUILD)) u32 pwrup_srefresh_exit[2]; struct chan_info chan[2]; struct clk ddr_clk; @@ -75,7 +74,6 @@ struct dram_info { struct rk3399_pmusgrf_regs *pmusgrf; struct rk3399_ddr_cic_regs *cic; const struct sdram_rk3399_ops *ops; -#endif struct ram_info info; struct rk3399_pmugrf_regs *pmugrf; }; @@ -92,9 +90,6 @@ struct sdram_rk3399_ops { struct rk3399_sdram_params *params); }; -#if defined(CONFIG_TPL_BUILD) || \ - (!defined(CONFIG_TPL) && defined(CONFIG_SPL_BUILD)) - struct rockchip_dmc_plat { #if CONFIG_IS_ENABLED(OF_PLATDATA) struct dtd_rockchip_rk3399_dmc dtplat; @@ -191,6 +186,17 @@ struct io_setting { }, }; +/** + * phase_sdram_init() - Check if this is the phase where SDRAM init happens + * + * Returns: true to do SDRAM init in this phase, false to not + */ +static bool phase_sdram_init(void) +{ + return spl_phase() == PHASE_TPL || + (!IS_ENABLED(CONFIG_TPL) && !spl_in_proper()); +} + static struct io_setting * lpddr4_get_io_settings(const struct rk3399_sdram_params *params, u32 mr5) { @@ -3024,7 +3030,7 @@ static int rk3399_dmc_of_to_plat(struct udevice *dev) struct rockchip_dmc_plat *plat = dev_get_plat(dev); int ret; - if (!CONFIG_IS_ENABLED(OF_REAL)) + if (!CONFIG_IS_ENABLED(OF_REAL) || !phase_sdram_init()) return 0; ret = dev_read_u32_array(dev, "rockchip,sdram-params", @@ -3093,7 +3099,6 @@ static int rk3399_dmc_init(struct udevice *dev) priv->cic = syscon_get_first_range(ROCKCHIP_SYSCON_CIC); priv->grf = syscon_get_first_range(ROCKCHIP_SYSCON_GRF); priv->pmu = syscon_get_first_range(ROCKCHIP_SYSCON_PMU); - priv->pmugrf = syscon_get_first_range(ROCKCHIP_SYSCON_PMUGRF); priv->pmusgrf = syscon_get_first_range(ROCKCHIP_SYSCON_PMUSGRF); priv->pmucru = rockchip_get_pmucru(); priv->cru = rockchip_get_cru(); @@ -3138,19 +3143,16 @@ static int rk3399_dmc_init(struct udevice *dev) return 0; } -#endif static int rk3399_dmc_probe(struct udevice *dev) { struct dram_info *priv = dev_get_priv(dev); -#if defined(CONFIG_TPL_BUILD) || \ - (!defined(CONFIG_TPL) && defined(CONFIG_SPL_BUILD)) - if (rk3399_dmc_init(dev)) - return 0; -#endif priv->pmugrf = syscon_get_first_range(ROCKCHIP_SYSCON_PMUGRF); debug("%s: pmugrf = %p\n", __func__, priv->pmugrf); + if (phase_sdram_init() && rk3399_dmc_init(dev)) + return 0; + priv->info.base = CFG_SYS_SDRAM_BASE; priv->info.size = rockchip_sdram_size((phys_addr_t)&priv->pmugrf->os_reg2); @@ -3181,10 +3183,7 @@ U_BOOT_DRIVER(dmc_rk3399) = { .id = UCLASS_RAM, .of_match = rk3399_dmc_ids, .ops = &rk3399_dmc_ops, -#if defined(CONFIG_TPL_BUILD) || \ - (!defined(CONFIG_TPL) && defined(CONFIG_SPL_BUILD)) .of_to_plat = rk3399_dmc_of_to_plat, -#endif .probe = rk3399_dmc_probe, .priv_auto = sizeof(struct dram_info), #if defined(CONFIG_TPL_BUILD) || \ From patchwork Wed Jun 26 15:59:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1952718 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=G7r49Cll; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W8RLv0fYbz20Xf for ; Thu, 27 Jun 2024 02:03:19 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 825ED884DD; Wed, 26 Jun 2024 18:00:28 +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="G7r49Cll"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id AAD48884DD; Wed, 26 Jun 2024 18:00:24 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) (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 B6C008859B for ; Wed, 26 Jun 2024 18:00:22 +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@chromium.org Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-52ce6a9fd5cso3568550e87.3 for ; Wed, 26 Jun 2024 09:00:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1719417622; x=1720022422; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=CiMow7s4j2CsLyjXWJPRpZ4yYDVro6zP4w6YhlUwuAw=; b=G7r49CllzDwYuBqxyMZtPYm0nglKDndwjfNld4YjMKMp8Xxl9rBwF+oPc1ZuhD72lE FwD01Cr+gvuE5kPIVRyn4uACh68eKoaLmIfPLJk2RL2g0oJUjaMZ79oyIpnvj6MO23mH M74yMGERnKfXYr60c5FcWrNf3dNskxvISAXts= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719417622; x=1720022422; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CiMow7s4j2CsLyjXWJPRpZ4yYDVro6zP4w6YhlUwuAw=; b=aL+VVYGP4jqyohFpJTvPAddegk/IaSOyZBB6zCYn9noUFpb+IacZjfiQaSrz1yXtEe p0KVuJH3go1x6oC2o/y34kwxyyzkCxbpxfwH1wru1hHHS/DYbFZFhh379YQ9uHXDeYfV cM656zKXQ9afeDNUAasQIshJ6h3G4Dr1pTDZ8gzR75HZZkF2hm/o2SIRaAL49V/YDo7J kPdmncn12hbRWaCbNVB61vkmQdg3o25b1EtDX6QVAnOrCD3ZT9uuKLE89Uee7CrFikRF L8tYwZ6uOzuTcIG1AHDsgIHvY2QZFcs164ENk8r9YQ9gthTWVZSthTaO6KKQLUN85goA 6lNw== X-Gm-Message-State: AOJu0YyvhUiWuVN0piW1YQMyip7jiIIu6DR74AMSueigowvN/q3ktLVD 6scIi+0mhL6ANxdT2+Crv3XXIUt3M3fmg7ERQ/6PaFWlLDoF2AJA3C7MdM4UdMZTphxjhjsWGwx fJw== X-Google-Smtp-Source: AGHT+IEGuGUJukKRfsWXRddDurJE7ed8OZOS1hGM8e/vnkx353vqtBlM6nNHn7qdYMn/Mt3IP/AUsA== X-Received: by 2002:a05:6512:ba1:b0:52c:dd38:f3a3 with SMTP id 2adb3069b0e04-52ce185cf4amr8875199e87.46.1719417619667; Wed, 26 Jun 2024 09:00:19 -0700 (PDT) Received: from tasman.. (host-92-15-194-143.as13285.net. [92.15.194.143]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-424c827507bsm30753715e9.22.2024.06.26.09.00.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jun 2024 09:00:19 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Jeffy Chen , Jonas Karlman , Quentin Schulz , huang lin Subject: [PATCH v5 15/16] rockchip: bob: kevin: Disable dcache in SPL Date: Wed, 26 Jun 2024 16:59:44 +0100 Message-Id: <20240626155945.278640-16-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240626155945.278640-1-sjg@chromium.org> References: <20240626155945.278640-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.8 at phobos.denx.de X-Virus-Status: Clean This causes a hang, so disable it. Unfortunately the RAM-size fix does not resolve the problem and I am unsure what is wrong. As soon as the cache is enabled the board appears to hang. Fixes: 6d8cdfd1536 ("rockchip: spl: Enable caches to speed up checksum validation") Signed-off-by: Simon Glass --- (no changes since v1) configs/chromebook_bob_defconfig | 1 + configs/chromebook_kevin_defconfig | 1 + 2 files changed, 2 insertions(+) diff --git a/configs/chromebook_bob_defconfig b/configs/chromebook_bob_defconfig index acfe3934104..b2ecfa6050c 100644 --- a/configs/chromebook_bob_defconfig +++ b/configs/chromebook_bob_defconfig @@ -1,5 +1,6 @@ CONFIG_ARM=y CONFIG_SKIP_LOWLEVEL_INIT=y +CONFIG_SPL_SYS_DCACHE_OFF=y CONFIG_COUNTER_FREQUENCY=24000000 CONFIG_ARCH_ROCKCHIP=y CONFIG_TEXT_BASE=0x00200000 diff --git a/configs/chromebook_kevin_defconfig b/configs/chromebook_kevin_defconfig index 95fdb418d82..da748e4f022 100644 --- a/configs/chromebook_kevin_defconfig +++ b/configs/chromebook_kevin_defconfig @@ -2,6 +2,7 @@ CONFIG_ARM=y CONFIG_SKIP_LOWLEVEL_INIT=y CONFIG_COUNTER_FREQUENCY=24000000 CONFIG_ARCH_ROCKCHIP=y +CONFIG_SPL_SYS_DCACHE_OFF=y CONFIG_TEXT_BASE=0x00200000 CONFIG_SPL_GPIO=y CONFIG_NR_DRAM_BANKS=1 From patchwork Wed Jun 26 15:59:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1952719 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=R1b9qQoL; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W8RM60z1Cz20Xf for ; Thu, 27 Jun 2024 02:03:30 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E6646885B3; Wed, 26 Jun 2024 18:00:28 +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="R1b9qQoL"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 96BA8884DD; Wed, 26 Jun 2024 18:00:25 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) (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 1369A885A0 for ; Wed, 26 Jun 2024 18:00:23 +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@chromium.org Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-424a3ccd0c0so15967725e9.1 for ; Wed, 26 Jun 2024 09:00:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1719417622; x=1720022422; darn=lists.denx.de; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=BmoXNBYVFrospD2TCLEmd7FUTXRsZen2gmLgiCnYL2w=; b=R1b9qQoLKA4PdIFJpV1WXx6wtw7uWYz7JeR6Zy3C9vgqbEYqOTn2dsdWpAD/b1T9D+ H8CRpCIeuGP4L92OJhLBAd2E2LNmFnsl0F3FrZd4GG2SOdmXZnSMUJNgT2lbggYs8Wg7 cSI9d1JjnSg7tLLHdCPA84K7BeJ3HBP1gmvP4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719417622; x=1720022422; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BmoXNBYVFrospD2TCLEmd7FUTXRsZen2gmLgiCnYL2w=; b=v8oyVmZWqMU+frmesUipkRM2W47mORWvrNpBRitOM/lL59TFbS0tnBc8qgQxNVbLh3 6KU4o2ux8DjaJENVfzJFTk/N2Y7vHwppvxQoIJartb4/wgGJ0MDtPkQLsD5aec0LEVMf lmqjLHcyH7m1/oCEWCWuYu0RLWjXXGQiJABXPM5gOHGdyU87PoUJjDb54G1xZkxQwuIN KjsCzZKLnzO1SD2as19cKNYAQZjcGiA+z/XIQMZZBf63Q2tWHEW4S4VR9eAipyQQSgbL eEWr7K9qotjCGjqJJrogp0Y3nmHR14te9Qiw3+sDIsvZZwH5aH/wa061mByqFZw72FFq nUCg== X-Gm-Message-State: AOJu0YxVB0v3iszPePErIAnKHitdrXMEXJZlywRnMk59DM8DuP8NcfJ/ CJwOa8zhu7gY2W5X+u4EiGnnpV949/UyUDgmF6XKo1S+fH+iLX7ME0UaYzAc0xkpNRXXa4VUgVN MYw== X-Google-Smtp-Source: AGHT+IGAb0yWQFYttH/K4PiEmYxAheKNsEeVozu/aDRKcdRJrK1WCFZcDkS9O7jTtpif2wER2blyaA== X-Received: by 2002:a7b:cb56:0:b0:423:6957:89bd with SMTP id 5b1f17b1804b1-4248cc287b0mr79647625e9.12.1719417622305; Wed, 26 Jun 2024 09:00:22 -0700 (PDT) Received: from tasman.. (host-92-15-194-143.as13285.net. [92.15.194.143]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-424c827507bsm30753715e9.22.2024.06.26.09.00.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jun 2024 09:00:22 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass Subject: [PATCH v5 16/16] Drop the special am335x_boneblack_vboot target Date: Wed, 26 Jun 2024 16:59:45 +0100 Message-Id: <20240626155945.278640-17-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240626155945.278640-1-sjg@chromium.org> References: <20240626155945.278640-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.8 at phobos.denx.de X-Virus-Status: Clean Now that am335x_evm boots OK on the Beaglebone black, drop the latter and update the docs to cover the change. Also add a few updates about 'make fit' and drop the note about the security review, as U-Boot's verified boot has had quite extensive review now. Signed-off-by: Simon Glass Reviewed-by: Tom Rini --- (no changes since v4) Changes in v4: - Fix 'stating' typo - Move Binman size feature to a separate series Changes in v2: - Drop patch "regulator: rk8xx: Fix incorrect parameter" - Rewrite boneblack patch to onstead drop the target and update docs board/ti/am335x/MAINTAINERS | 1 - configs/am335x_boneblack_vboot_defconfig | 94 ------------------------ configs/am335x_evm_defconfig | 3 +- doc/usage/fit/beaglebone_vboot.rst | 21 +++--- 4 files changed, 12 insertions(+), 107 deletions(-) delete mode 100644 configs/am335x_boneblack_vboot_defconfig diff --git a/board/ti/am335x/MAINTAINERS b/board/ti/am335x/MAINTAINERS index 219c8715bf1..ed8800a2663 100644 --- a/board/ti/am335x/MAINTAINERS +++ b/board/ti/am335x/MAINTAINERS @@ -3,6 +3,5 @@ M: Tom Rini S: Maintained F: board/ti/am335x/ F: include/configs/am335x_evm.h -F: configs/am335x_boneblack_vboot_defconfig F: configs/am335x_evm_defconfig F: configs/am335x_evm_spiboot_defconfig diff --git a/configs/am335x_boneblack_vboot_defconfig b/configs/am335x_boneblack_vboot_defconfig deleted file mode 100644 index d473a1a793b..00000000000 --- a/configs/am335x_boneblack_vboot_defconfig +++ /dev/null @@ -1,94 +0,0 @@ -CONFIG_ARM=y -CONFIG_ARCH_CPU_INIT=y -# CONFIG_SPL_USE_ARCH_MEMCPY is not set -# CONFIG_SPL_USE_ARCH_MEMSET is not set -CONFIG_ARCH_OMAP2PLUS=y -CONFIG_TI_COMMON_CMD_OPTIONS=y -CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y -CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x4030ff00 -CONFIG_SF_DEFAULT_SPEED=24000000 -CONFIG_DEFAULT_DEVICE_TREE="am335x-boneblack" -CONFIG_AM33XX=y -CONFIG_CLOCK_SYNTHESIZER=y -CONFIG_SPL=y -CONFIG_ENV_OFFSET_REDUND=0x280000 -CONFIG_TIMESTAMP=y -CONFIG_FIT_SIGNATURE=y -CONFIG_FIT_VERBOSE=y -CONFIG_SYS_BOOTM_LEN=0x1000000 -CONFIG_DISTRO_DEFAULTS=y -CONFIG_AUTOBOOT_KEYED=y -CONFIG_AUTOBOOT_PROMPT="Press SPACE to abort autoboot in %d seconds\n" -CONFIG_AUTOBOOT_DELAY_STR="d" -CONFIG_AUTOBOOT_STOP_STR=" " -CONFIG_BOOTCOMMAND="run findfdt; run init_console; run finduuid; run distro_bootcmd" -CONFIG_SYS_CONSOLE_INFO_QUIET=y -CONFIG_ARCH_MISC_INIT=y -CONFIG_SPL_SYS_MALLOC=y -CONFIG_SPL_SYS_MALLOC_SIZE=0x800000 -CONFIG_SPL_MUSB_NEW=y -# CONFIG_SPL_NAND_SUPPORT is not set -CONFIG_SPL_NET=y -CONFIG_SPL_NET_VCI_STRING="AM33xx U-Boot SPL" -CONFIG_SPL_OS_BOOT=y -CONFIG_SPL_FALCON_BOOT_MMCSD=y -CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR=0x1700 -CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR=0x1500 -CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS=0x200 -CONFIG_CMD_SPL=y -CONFIG_SYS_I2C_EEPROM_ADDR_LEN=2 -# CONFIG_CMD_SETEXPR is not set -CONFIG_BOOTP_DNS2=y -CONFIG_OF_CONTROL=y -CONFIG_SPL_OF_CONTROL=y -CONFIG_ENV_OVERWRITE=y -CONFIG_ENV_IS_IN_MMC=y -CONFIG_SYS_REDUNDAND_ENVIRONMENT=y -CONFIG_SYS_RELOC_GD_ENV_ADDR=y -CONFIG_SYS_MMC_ENV_DEV=1 -CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y -CONFIG_VERSION_VARIABLE=y -CONFIG_NET_RETRY_COUNT=10 -CONFIG_BOOTP_SEND_HOSTNAME=y -# CONFIG_SPL_BLK is not set -CONFIG_BOOTCOUNT_LIMIT=y -CONFIG_SYS_BOOTCOUNT_BE=y -CONFIG_DFU_MMC=y -CONFIG_DFU_RAM=y -CONFIG_USB_FUNCTION_FASTBOOT=y -CONFIG_DM_I2C=y -CONFIG_MISC=y -CONFIG_SYS_I2C_EEPROM_ADDR=0x50 -# CONFIG_SPL_DM_MMC is not set -CONFIG_MMC_OMAP_HS=y -CONFIG_MTD=y -CONFIG_DM_SPI_FLASH=y -CONFIG_SPI_FLASH_WINBOND=y -CONFIG_PHY_ATHEROS=y -CONFIG_PHY_SMSC=y -CONFIG_PHY_GIGE=y -CONFIG_MII=y -CONFIG_DRIVER_TI_CPSW=y -CONFIG_DM_PMIC=y -# CONFIG_SPL_DM_PMIC is not set -CONFIG_PMIC_TPS65217=y -CONFIG_SPL_POWER_TPS65910=y -CONFIG_SPI=y -CONFIG_DM_SPI=y -CONFIG_OMAP3_SPI=y -CONFIG_TIMER=y -CONFIG_OMAP_TIMER=y -CONFIG_USB=y -CONFIG_DM_USB_GADGET=y -CONFIG_SPL_DM_USB_GADGET=y -CONFIG_USB_MUSB_HOST=y -CONFIG_USB_MUSB_GADGET=y -CONFIG_USB_MUSB_TI=y -CONFIG_USB_GADGET=y -CONFIG_SPL_USB_GADGET=y -CONFIG_USB_GADGET_MANUFACTURER="Texas Instruments" -CONFIG_USB_GADGET_VENDOR_NUM=0x0451 -CONFIG_USB_GADGET_PRODUCT_NUM=0xd022 -CONFIG_USB_ETHER=y -CONFIG_SPL_USB_ETHER=y -CONFIG_LZO=y diff --git a/configs/am335x_evm_defconfig b/configs/am335x_evm_defconfig index d243cb16e72..cabc181460a 100644 --- a/configs/am335x_evm_defconfig +++ b/configs/am335x_evm_defconfig @@ -13,6 +13,8 @@ CONFIG_AM335X_USB0_PERIPHERAL=y CONFIG_AM335X_USB1=y CONFIG_SPL=y CONFIG_TIMESTAMP=y +CONFIG_FIT_SIGNATURE=y +CONFIG_FIT_VERBOSE=y CONFIG_SPL_LOAD_FIT=y CONFIG_SYS_BOOTM_LEN=0x1000000 CONFIG_DISTRO_DEFAULTS=y @@ -119,5 +121,4 @@ CONFIG_SPL_USB_ETHER=y CONFIG_WDT=y # CONFIG_SPL_WDT is not set CONFIG_DYNAMIC_CRC_TABLE=y -CONFIG_RSA=y CONFIG_LZO=y diff --git a/doc/usage/fit/beaglebone_vboot.rst b/doc/usage/fit/beaglebone_vboot.rst index cd6bb141910..1298ba1ae08 100644 --- a/doc/usage/fit/beaglebone_vboot.rst +++ b/doc/usage/fit/beaglebone_vboot.rst @@ -67,18 +67,20 @@ a. Set up the environment variable to point to your toolchain. You will need export CROSS_COMPILE=arm-linux-gnueabi- -b. Configure and build U-Boot with verified boot enabled:: +b. Configure and build U-Boot with verified boot enabled. Note that we use the +am335x_evm target since it covers all boards based on the AM335x evaluation +board:: export UBOOT=/path/to/u-boot cd $UBOOT # You can add -j10 if you have 10 CPUs to make it faster - make O=b/am335x_boneblack_vboot am335x_boneblack_vboot_config all - export UOUT=$UBOOT/b/am335x_boneblack_vboot + make O=b/am335x_evm am335x_evm_config all + export UOUT=$UBOOT/b/am335x_evm c. You will now have a U-Boot image:: - file b/am335x_boneblack_vboot/u-boot-dtb.img - b/am335x_boneblack_vboot/u-boot-dtb.img: u-boot legacy uImage, + file b/am335x_evm/u-boot-dtb.img + b/am335x_evm/u-boot-dtb.img: u-boot legacy uImage, U-Boot 2014.07-rc2-00065-g2f69f8, Firmware/ARM, Firmware Image (Not compressed), 395375 bytes, Sat May 31 16:19:04 2014, Load Address: 0x80800000, Entry Point: 0x00000000, @@ -466,7 +468,7 @@ the private key that you signed with so that it can verify any kernels that you sign:: cd $UBOOT - make O=b/am335x_boneblack_vboot EXT_DTB=${WORK}/am335x-boneblack-pubkey.dtb + make O=b/am335x_evm EXT_DTB=${WORK}/am335x-boneblack-pubkey.dtb Here we are overriding the normal device tree file with our one, which contains the public key. @@ -597,14 +599,11 @@ Further Improvements Several of the steps here can be easily automated. In particular it would be capital if signing and packaging a kernel were easy, perhaps a simple make -target in the kernel. +target in the kernel. A starting point for this is the 'make image.fit' target +for ARM64 in Linux from v6.9 onwards. Some mention of how to use multiple .dtb files in a FIT might be useful. -U-Boot's verified boot mechanism has not had a robust and independent security -review. Such a review should look at the implementation and its resistance to -attacks. - Perhaps the verified boot feature could be integrated into the Amstrom distribution.