From patchwork Sun Jun 23 17:52:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1951263 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=ckV+khoe; 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) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W6dxR6gGCz1ydW for ; Mon, 24 Jun 2024 03:53:31 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9B8EB884D4; Sun, 23 Jun 2024 19:53:25 +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="ckV+khoe"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E442F8843A; Sun, 23 Jun 2024 19:53:23 +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.2 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-il1-x129.google.com (mail-il1-x129.google.com [IPv6:2607:f8b0:4864:20::129]) (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 BF44F882E6 for ; Sun, 23 Jun 2024 19:53: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=sjg@chromium.org Received: by mail-il1-x129.google.com with SMTP id e9e14a558f8ab-371c97913cdso16659535ab.3 for ; Sun, 23 Jun 2024 10:53:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1719165200; x=1719770000; 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=ckV+khoe5l7GC9iq2MyQoj+eWBf0kU5MBJWkZKhBvq8s3QEGK667fDYAjyqBmTvlVp 8u86JfSuPuokCquEDTMZ/ESWvGfuXLSHltKFrKTRqhCj8rpMuRpeJRNYiSvFPTZ43gRy nfkAoMhkpwKuViP7YReVHOfpQO8C6ez3z2kxs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719165200; x=1719770000; 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=l85aaScElrkNGjupTdmzjUinxgnJ7eFAH9f4MiuQk3bjZ374rTWLfxWNmYx2jP2RqX QLJcTnpSH2Ae/wQAYf6rKXvLfSinkRFUBzJuF6UITRJkRAgChyIayKjykJOOsABtznVi p1hJrFPTsP4+Zxm1PR5czadYjYXVNsQlMOciMLk+Eep30JSKxLlADitGB+WhJ4KGuk3U aYXhp7E8H4Y1iltvvfvewalTOi9wC8ogEC3hfM4bDNFw65fZcK+WNq69UfQl39BzbfJP 3LvFtzbnfyGbNfyiI4zbLezhLSL51U4dE9QIf9u5e8VJTl6X/S0g5pU/kFKeUnN1P+xu Xexw== X-Gm-Message-State: AOJu0YyPAssndUe8AM3NUFBMLiLXVK7anzn/wUIK+GxqvSWgOfa09aoG 9Fu+UUkXvX1j8khn9wULDMa7oIId9zYnFxm/vwS8YVkSEdHJAFwYoH4WZ+yN4k/lcYA6nC6Oulv c2Q== X-Google-Smtp-Source: AGHT+IFTqfFuchwfrRKBrt3lASC1nNlukUCbXJ4qMn9q89sUa24WMnhpEMglhsBdiC9sJMCbSuprsA== X-Received: by 2002:a05:6e02:12cf:b0:374:ad0f:1b00 with SMTP id e9e14a558f8ab-3763b1bf182mr47719545ab.15.1719165200290; Sun, 23 Jun 2024 10:53:20 -0700 (PDT) Received: from chromium.org (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4b9d113ff85sm1636834173.81.2024.06.23.10.53.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jun 2024 10:53:20 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass Subject: [PATCH v4 01/16] mkeficapsule: Add a --version argument Date: Sun, 23 Jun 2024 11:52:47 -0600 Message-Id: <20240623175302.1463973-2-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240623175302.1463973-1-sjg@chromium.org> References: <20240623175302.1463973-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 Sun Jun 23 17:52:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1951264 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=El1of7+1; 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 4W6dxg23dlz1ydW for ; Mon, 24 Jun 2024 03:53:43 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0DF2788473; Sun, 23 Jun 2024 19:53:26 +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="El1of7+1"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8E632882B7; Sun, 23 Jun 2024 19:53: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.2 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-io1-xd35.google.com (mail-io1-xd35.google.com [IPv6:2607:f8b0:4864:20::d35]) (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 7A7918780E for ; Sun, 23 Jun 2024 19:53: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-io1-xd35.google.com with SMTP id ca18e2360f4ac-7ea0b5e0977so149941939f.2 for ; Sun, 23 Jun 2024 10:53:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1719165201; x=1719770001; 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=El1of7+1GsWg1jjtPx1inwgRm4pNY3unnqpAyWoBcFRFo4fdBB+zTkNvutXoDwqzw5 6Zqmo2eR8jmglqPXHp4mPLXddzAwnC7zlIMiPc9qYGK8IkeMlxg1ogA9/PnZ8dIoHfQH QaWDr/E8YMn7qaxj3PjzfB9xYSgyWqhcB/c50= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719165201; x=1719770001; 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=slkLhsFSdhIup0Km2SrodWm8soriECL4paHIuVO78Ofq+0Vl8je5qTiS++Pxr11ThS 7qiykv93SJJ8FdFUbT/aDfAFmvMUNeAS7JBgPU0bZxvOKgEoJPERK/Bt/Br2FhdbYYtB bx4fgYURGiwdAelFiUJ1rwDb2zMOMVf4kzpVHmSXuyN/VZDO14sUia2DQTfOU677q50p KPT/np1zLO+sDRb4H7vM9aZ77zjqwOovoRNBI1Q45PfPoTSq9VXsM/oJg4EsGjxqCsGo EIo572HWtROhoTVEPIuY0TbYEfRHKvUBewNll50f7qqbuCOAAsQ4aCZa5sC89SQy+vF8 TzOg== X-Gm-Message-State: AOJu0YwZ6VC7oAKyTLrRBeOEf0+vdV7GcmM2B4RL+N1v4eYDK7HeorB5 YLLFKMtMd2hXJbJufV6HpG3mIH1cgP/U7CreRpXn/WtQfVsm0pSyviFrVXgrx/CWVekLWKMy8qG MJg== X-Google-Smtp-Source: AGHT+IHmNU7TSc8hWIiRJShrZNSHNFtuPHqUOuVhhPAzhgUpw4qQeXgQHn8l6saHsbRrpKwYCsyDNw== X-Received: by 2002:a05:6e02:20cf:b0:376:3fc4:1180 with SMTP id e9e14a558f8ab-3763fc4128dmr34816075ab.17.1719165200990; Sun, 23 Jun 2024 10:53:20 -0700 (PDT) Received: from chromium.org (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4b9d113ff85sm1636834173.81.2024.06.23.10.53.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jun 2024 10:53:20 -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 v4 02/16] binman: Collect the version number for mkeficapsule Date: Sun, 23 Jun 2024 11:52:48 -0600 Message-Id: <20240623175302.1463973-3-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240623175302.1463973-1-sjg@chromium.org> References: <20240623175302.1463973-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 Sun Jun 23 17:52:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1951265 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=ndD2mMf9; 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 4W6dxs3SYPz1ydW for ; Mon, 24 Jun 2024 03:53:53 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 72EA388477; Sun, 23 Jun 2024 19:53: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="ndD2mMf9"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 738D38851C; Sun, 23 Jun 2024 19:53:26 +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.2 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-io1-xd29.google.com (mail-io1-xd29.google.com [IPv6:2607:f8b0:4864:20::d29]) (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 4262088387 for ; Sun, 23 Jun 2024 19:53: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-io1-xd29.google.com with SMTP id ca18e2360f4ac-7eb85e80661so136407539f.1 for ; Sun, 23 Jun 2024 10:53:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1719165202; x=1719770002; 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=ndD2mMf9SgUuFzbVj/9YHyJLXFuQxBy7/Z7rlahCnQgk2msyusN/3AeIXUxDbSETNk Z1TR/NZl52rI3YlzCejx4J6lr+L8eD5ZgUKGtt6JiMW055EQmdhaLsjHr4uPrfjwn2/b 34izkUNo06cqCzr28sHY2M/WgExI+QoPESHCc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719165202; x=1719770002; 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=tXBdXwl1CgSz5zHkYQJgnBc4i5W2UEpWFdSAskL0KamZenuJLJuAYY3GhhSGzHCuMI XEBMMi3SdAoXzb3n8+JsmpU73JBkr5pR9V/voPYFJ23gmGpfc5xaT8GXijtAmbfX4cbN YMqmzEMvQmzX6Gy7fAKbs7bEXZ9FxU2mSQ+DgmuGo5n9sZwGSY4+SrgMffxLffflox0b uT06AoRp5hPLH5FlY1zNwfJU0HcWUhVlTIV97fQVGOye3QhTniXlLqw8mFaYG7JElNfo P1gyzg/9F+tUoupvAsHV1gGJVTep5wqrKFFFblqEqELssVwHOPIbIBNc71n9VGA9baUL EKrA== X-Gm-Message-State: AOJu0YxW2s7YaO1BbDXWRORNrOOxTxTY9Wi3u4tNAbmi9w+yf2wpd/sH phsp326HaHODklW5Dh9sMc2rwwSqCp/z9OzUNzFL4XRH1hpGP/Meh88cEWSW/kP6lluIsPsZnKl PJg== X-Google-Smtp-Source: AGHT+IFse+2X0LzekOmaSZtzOIbQfGpyY2n/FbaePA5a3mPhxbyo83vnn3nEKonzQEgD+4sah2FXHQ== X-Received: by 2002:a05:6602:1681:b0:7eb:6d0a:613a with SMTP id ca18e2360f4ac-7f3a74a9ddbmr300309339f.2.1719165201703; Sun, 23 Jun 2024 10:53:21 -0700 (PDT) Received: from chromium.org (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4b9d113ff85sm1636834173.81.2024.06.23.10.53.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jun 2024 10:53:21 -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 v4 03/16] binman: Deal with mkeficapsule being missing Date: Sun, 23 Jun 2024 11:52:49 -0600 Message-Id: <20240623175302.1463973-4-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240623175302.1463973-1-sjg@chromium.org> References: <20240623175302.1463973-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 Sun Jun 23 17:52:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1951266 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=ejGUDiaA; 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 4W6dy367MBz1ydW for ; Mon, 24 Jun 2024 03:54:03 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D71CC88433; Sun, 23 Jun 2024 19:53:29 +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="ejGUDiaA"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BC7B188549; Sun, 23 Jun 2024 19:53:27 +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.2 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-il1-x12f.google.com (mail-il1-x12f.google.com [IPv6:2607:f8b0: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 E46218845A for ; Sun, 23 Jun 2024 19:53: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-il1-x12f.google.com with SMTP id e9e14a558f8ab-3748ebe7e53so15114525ab.1 for ; Sun, 23 Jun 2024 10:53:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1719165202; x=1719770002; 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=ejGUDiaAuPUB3432+0FSvH3rjCew5Sht+ERb/3Nh9+lvIWrHwu8sKdRLLIkcg8wSyh qkXk0YRYZAR9zjjon/28uTYVe7z3JCP5GOae2XERcpacNeLDFtUFWm4vo2D9HHXU9hnh U83eHVInTRd6hgDZ+MT0q0FNHpJUsY6xTySjI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719165202; x=1719770002; 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=k7nCFr65VSPid52AFlf++yGp1Id1QaVTNtn78QxHyV4yRHRAIKURPAX/gvWLmZyKOC 3mw0eaKEZb3jy1SaYqp/NlMY/T68IbqvCpgmR8NKf4u7GwIk8QuquVKOaBqIFBw4hhtQ Vjm0Kg9zBwXUjIEORw+ap9laAQ70ELTPRlJPDeXOTxt07/JN8mKBaF+2zcr3X0gzvDo/ cMUahafe2Zqd2bqh8Y9aySatuZ5AVgkMFSu4gqHuq6rFw7b/N9GZBWXyawvgdoWpswHe 9Gc9RtHvpz6DY3bT36WjcJ5fE85RdoW9uv+W63yUbWoqeBHpeqyQd8KoQb4G/61vmrlu H+WQ== X-Gm-Message-State: AOJu0YzAFPLOx0gHpcf4Wfdbs5Ud2pxVYejR1PDk7469+un6radBmKx4 6pQRs6Ye9NOLPLFnlzKXLv6KTxMsHkedKICwGavm7em+TYJXXGQFVNnVf/Rg39nl6VQqCw6nT5F l0g== X-Google-Smtp-Source: AGHT+IF9gFFYiRStUoYz0vCQg1wFmK77YS4dAn1l+ODDNBhVlLItnG8RNej0J6Q/pdsAhcz5UzAEwQ== X-Received: by 2002:a05:6e02:1c05:b0:376:4a18:a4c4 with SMTP id e9e14a558f8ab-3764a18a63bmr4534965ab.3.1719165202427; Sun, 23 Jun 2024 10:53:22 -0700 (PDT) Received: from chromium.org (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4b9d113ff85sm1636834173.81.2024.06.23.10.53.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jun 2024 10:53:22 -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 v4 04/16] binman: Return failure when a usage() message is generated Date: Sun, 23 Jun 2024 11:52:50 -0600 Message-Id: <20240623175302.1463973-5-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240623175302.1463973-1-sjg@chromium.org> References: <20240623175302.1463973-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 Sun Jun 23 17:52:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1951267 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=EW0fbqL0; 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 4W6dyJ2bhrz1ydW for ; Mon, 24 Jun 2024 03:54:16 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 46A6488535; Sun, 23 Jun 2024 19:53:30 +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="EW0fbqL0"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0183A883B1; Sun, 23 Jun 2024 19:53:28 +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.2 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-io1-xd29.google.com (mail-io1-xd29.google.com [IPv6:2607:f8b0:4864:20::d29]) (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 95C2288327 for ; Sun, 23 Jun 2024 19:53:24 +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-io1-xd29.google.com with SMTP id ca18e2360f4ac-7ec00e71a57so138786439f.3 for ; Sun, 23 Jun 2024 10:53:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1719165203; x=1719770003; 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=4Dt1YQ8kz+5dtP6ojgtt4IA7BEq51QeUBf6Sy4i/gbA=; b=EW0fbqL006aZ8YRBuECa7PHqhA5549KrsNPsPThU2l3PtoNPthj4xGqV+rNKlJXBj5 sRj8++87wb/wIFZiQBLU69YwVVCs3p9jLL5fV5YAZuqbybj0Rv+EOFIg0tSmTArCL/cK I8cJL3yZbqRtMHNayJpgswsJxiQKFDRhJdDrA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719165203; x=1719770003; 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=4Dt1YQ8kz+5dtP6ojgtt4IA7BEq51QeUBf6Sy4i/gbA=; b=ANOAheUR/KTJuoLipFNfnB629jNdRM0tr80tTE80D8ApnzJxv2QbzocgAQ6IDKSpxk 542iCUGuwTbN725BJ2ShWYkMh4r7C9z3HT/+BQv3pG6beK+T4/Zm4WAARZrSiGlyCBXS Xc99u1i7PoCvH39M51vzjfonXEcNDLBclKH3EGIuhOqcbmPd0B5oj8XNFRdavPYYW05I gRRQQ20qmeZt8Kyc8Cel2I+tI45MOWEx9vMtdAYfNHVhQI0CY6bN7pf4Ha6WBM58IZcs XLmiiP5HyUgGMGUZPPPR04C2tKWnpZHp7D1+d0ppBChvRo2zXHgRbQFUos/wiwrXfCMG bwwA== X-Gm-Message-State: AOJu0YwaAtgdxxV4TnC+H8DCks/c1wz5nfmgov1lZBqb6aOkZujnB1DW XDEzVN28NxgHSAw1xgbPHjMnG/J94kCcxGopkP6tS1lvncNmaJhLN/1stovS0slaSd3SDKiH70i Vqg== X-Google-Smtp-Source: AGHT+IHeHaEDJ69ryc8VFxyPCAPZuHq2Bjm1sKb09VG/DIi4wbelAJJYWZifqHM2TQwLaCRixlm1VA== X-Received: by 2002:a05:6602:14d1:b0:7eb:bef7:c17b with SMTP id ca18e2360f4ac-7f3a7810ee8mr422050339f.18.1719165203195; Sun, 23 Jun 2024 10:53:23 -0700 (PDT) Received: from chromium.org (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4b9d113ff85sm1636834173.81.2024.06.23.10.53.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jun 2024 10:53:22 -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 v4 05/16] binman: Keep the efi_capsule input file Date: Sun, 23 Jun 2024 11:52:51 -0600 Message-Id: <20240623175302.1463973-6-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240623175302.1463973-1-sjg@chromium.org> References: <20240623175302.1463973-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 --- 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 Sun Jun 23 17:52:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1951268 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=mq19lTMb; 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 4W6dyR5nBPz1ydW for ; Mon, 24 Jun 2024 03:54:23 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9EC518854A; Sun, 23 Jun 2024 19:53:30 +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="mq19lTMb"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4FD218837D; Sun, 23 Jun 2024 19:53:28 +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.2 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-io1-xd2b.google.com (mail-io1-xd2b.google.com [IPv6:2607:f8b0:4864:20::d2b]) (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 82CF0884BE for ; Sun, 23 Jun 2024 19:53:25 +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-io1-xd2b.google.com with SMTP id ca18e2360f4ac-7eb85e80661so136408739f.1 for ; Sun, 23 Jun 2024 10:53:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1719165204; x=1719770004; 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=mq19lTMbjCRLaoIcMx6+JVHh3eVV9g50OM+kTBZRzIJB1E21fKyx5eYVy9aIC+dGhI u9RJg2qfGTxsIsVoIeokPsVMhJ19DhlZIM7RJm7a2GtWgB35ly3Ig3/zw6YXOyVE9j0s jRKkn5Vr3U+Z4MZlad387wID/uREDeI2txe9k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719165204; x=1719770004; 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=YwcrEJ+SPRncf1ADJSwP2Yjm7H4cf1cHVlIwNhLcdwodJoCTBwVbtTcQt9HLXlf2VF gaOqLu/BH59aZeHDzkPmRfwLFY0xQxhTfL2x1I14LE7VAWwsE8prMm00h3Mf7KRYrfed FvXX4NAbrU/krv5F5l+LrEkUcDQWnYvbL57E9MNc52UFQgHHjrrSdz17nH5OFuGS5hjG 9LI/EPYA7WqnBc/X6StJhpBeAKRqwftmHHqOThIZqCNgVgfsvddY2qitz5KKviCs81l5 ouQSFmohqJ3QLiGNT+nD2mMAdE7fWZZ+v+wBHiPsKfd/j/E5l1XFWxDiDqqJfUvtSR4M hA+g== X-Gm-Message-State: AOJu0Yz0j4ItUYgtBv50AtqsJ601XJzKDNq3K+yU+Uwy3Y3UdBTCzoGg ijPntGRSso966u83Pr5tTjIESFPEMIjWot7yYIIHFfrfwl1X2dUoXlUpzQEGptnS0GyS1OOj8fK Ryw== X-Google-Smtp-Source: AGHT+IF8rm+6BZqGI/9DUU7bQLi5SAq3Smxyi/HjbQYxJcyjbnCcHMzlheEjmQcI0QC88I8hbKHIHw== X-Received: by 2002:a05:6602:148b:b0:7eb:89ba:44fa with SMTP id ca18e2360f4ac-7f3a74a9221mr339229539f.4.1719165203976; Sun, 23 Jun 2024 10:53:23 -0700 (PDT) Received: from chromium.org (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4b9d113ff85sm1636834173.81.2024.06.23.10.53.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jun 2024 10:53:23 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass Subject: [PATCH v4 06/16] nvidia: nyan-big: Disable debug UART Date: Sun, 23 Jun 2024 11:52:52 -0600 Message-Id: <20240623175302.1463973-7-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240623175302.1463973-1-sjg@chromium.org> References: <20240623175302.1463973-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 Sun Jun 23 17:52:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1951269 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=OjSklaO9; 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 4W6dyf3RTFz1ydW for ; Mon, 24 Jun 2024 03:54:34 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 14D9E88327; Sun, 23 Jun 2024 19:53:31 +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="OjSklaO9"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C9D95884BE; Sun, 23 Jun 2024 19:53:28 +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.2 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-io1-xd36.google.com (mail-io1-xd36.google.com [IPv6:2607:f8b0:4864:20::d36]) (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 438F4884B2 for ; Sun, 23 Jun 2024 19:53:26 +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-io1-xd36.google.com with SMTP id ca18e2360f4ac-7eb6b1045f7so138612339f.3 for ; Sun, 23 Jun 2024 10:53:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1719165205; x=1719770005; 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=mfcLD1zI16U3eN8QPXtyDsRvUuj2hvtPCbl0nEveeBM=; b=OjSklaO9jrhcAeNmwMlsp+m8ZO6a9DlOnZZQaS+0OSpbHb3wXVsED6plNc4/1LsNvO ElyVitAi7yZ6QJe3oEUHolweSMtR+KEGLBJZNmaFCkCE/MW9LM19fWzsoaV49MISLz+w RinicRjZv+5P3vZIK0mIhRXnnyM0gjjKsW47g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719165205; x=1719770005; 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=mfcLD1zI16U3eN8QPXtyDsRvUuj2hvtPCbl0nEveeBM=; b=tUVfa+Gop5jmkR0DjAyZAqmWv9H0YTjnc/i5P46ZWLiX4eLeB/8dXC6gj+xqw96wfc EKzFFIjzSdY0qgicHWwHY3NB2MIT0LXrNyzGoodtoOhKxKHVDwJRiBclMGQ5MZFKVlLV gwIDSTd8M0MTbx5GOY8+eF/4otM+RE5mhqO9tMTOrDx7xJJpg5PItUBGryWtZ0c/XvtN IoWso+W2pmbWU+VPSGFEgy2B0P8IgxC34/U4DD8IeZr3dUQT5U/ShxUyoIrI8W+0bgVo DxElXHHY7SXN1dlSMR4i0+9L5V2MLc900RZRa0zTa6HyF/81pE37FNYnUHNihTQ02yrN bHLA== X-Gm-Message-State: AOJu0YzJxS8GtCMj1teOU1nKpQQQlGUOqdjMo0U6L+mj4GzFGeq4zO6q IgOKOXP/aih1l51+IazKe8+0gaf6RwXEd2y+nJ9BaOOU3V5xnUu+M5kA+/WNHSVXsAhxx4RtFpE QzA== X-Google-Smtp-Source: AGHT+IHB3+dxvC1L9raNbddBXymUIG338gpWtf3m9UIuawq2vwH5IUJPo5oaiV2CMmon4addfUbBbw== X-Received: by 2002:a05:6602:1504:b0:7ec:cf:1d3 with SMTP id ca18e2360f4ac-7f3a75fa927mr287500139f.19.1719165204798; Sun, 23 Jun 2024 10:53:24 -0700 (PDT) Received: from chromium.org (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4b9d113ff85sm1636834173.81.2024.06.23.10.53.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jun 2024 10:53:24 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Heinrich Schuchardt Subject: [PATCH v4 07/16] tpm: Avoid code bloat when not using EFI_TCG2_PROTOCOL Date: Sun, 23 Jun 2024 11:52:53 -0600 Message-Id: <20240623175302.1463973-8-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240623175302.1463973-1-sjg@chromium.org> References: <20240623175302.1463973-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 6f3096c15a6..b061891e109 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 Sun Jun 23 17:52:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1951270 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=ZmrUFZO8; 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 4W6dys15sqz1ydW for ; Mon, 24 Jun 2024 03:54:45 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 723C78855C; Sun, 23 Jun 2024 19:53:34 +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="ZmrUFZO8"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 950F488405; Sun, 23 Jun 2024 19:53:29 +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.2 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-io1-xd2b.google.com (mail-io1-xd2b.google.com [IPv6:2607:f8b0:4864:20::d2b]) (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 B556788433 for ; Sun, 23 Jun 2024 19:53:26 +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-io1-xd2b.google.com with SMTP id ca18e2360f4ac-7ec07f4170bso144539539f.0 for ; Sun, 23 Jun 2024 10:53:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1719165205; x=1719770005; 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=tElDSyoJfFQYZphlkBNYSPslFhtNW18S3Qmcc0PftvU=; b=ZmrUFZO8UnAaem9SbJW1WxMmq2s9jhHXqM4vviAzgNALHTG94sEOd+D4JOFWYlKM4g WPqXd1+FSs3w1UHfQxU+izCt6iDrZXMeta1DvNh8PEi4pxk+tcCn03XkuMHxRb8KY5Bu FWrColG1PLEG9oATnNZ//iqeUd8X2PPHa5lAY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719165205; x=1719770005; 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=tElDSyoJfFQYZphlkBNYSPslFhtNW18S3Qmcc0PftvU=; b=eHKbdBqLXiMJgk4s2O62oB/nTf1NfVRzZXCBGeo6392RT8sKBa6UhDKx0KTefXvubc I6RtOqPQiHxGcd0CNLH8QsziwxywixK3rmpb/ICKBYEFPxuBejGuVxgR76d3HyzAbnpI PxX8Lri98GzueNvsa9BwJ7FBmjiEufYiy31zkeb+VQpw6uYH7LyJg1ysdaXvwCmnBWGg uXyuhXdA9jJ24LzLXT/g74ctT+N1e1uVtDoI415lnE2UT85TudHY2qHdvtpel3/kAwjP 4qURZmBnWquLsTBF+in2MREmhqoPoENveZAYg8hC1qQ2SPS2B9cdsDfcqpczU0/diCmq fZHA== X-Gm-Message-State: AOJu0YzDxiSCk84KobK4haJFq62GJurQ/I2AEv7CEpFlCgomW3oC8s7M sPBk5uRkZQ5UFXKSuhCS1uTU34b6L9efrqF0IKE27XaW5dfh5H3QYJfZopZdqILVWaFv/tLV2+h PAQ== X-Google-Smtp-Source: AGHT+IGsdcDLh6kEAXHUsMJih8hsxHwpL9ZCPsHUV0JGSimGNeoSwD3T1hXrur4qzUKmOZSVdL0zRw== X-Received: by 2002:a05:6602:6015:b0:7eb:9697:95e1 with SMTP id ca18e2360f4ac-7f3a4d48277mr354413039f.0.1719165205445; Sun, 23 Jun 2024 10:53:25 -0700 (PDT) Received: from chromium.org (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4b9d113ff85sm1636834173.81.2024.06.23.10.53.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jun 2024 10:53:25 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Bin Meng Subject: [PATCH v4 08/16] x86: Set a board-size limit for chromebook_link Date: Sun, 23 Jun 2024 11:52:54 -0600 Message-Id: <20240623175302.1463973-9-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240623175302.1463973-1-sjg@chromium.org> References: <20240623175302.1463973-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 --- 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 Sun Jun 23 17:52:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1951271 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=ht6buAkJ; 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 4W6dz31L7Zz1ydW for ; Mon, 24 Jun 2024 03:54:55 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D7BE18845A; Sun, 23 Jun 2024 19:53:34 +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="ht6buAkJ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DED7388387; Sun, 23 Jun 2024 19:53:29 +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.2 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-il1-x141.google.com (mail-il1-x141.google.com [IPv6:2607:f8b0:4864:20::141]) (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 95DA588535 for ; Sun, 23 Jun 2024 19:53: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=sjg@chromium.org Received: by mail-il1-x141.google.com with SMTP id e9e14a558f8ab-3762c172d9aso12451205ab.2 for ; Sun, 23 Jun 2024 10:53:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1719165206; x=1719770006; 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=ht6buAkJpSZjQfAnfjpNJ9b2+9LWnfH17xDKFPqO3n7DaOAQnHd9rTqArTnJQj0gTk BwckmcA6nLUqFUMJVrwGhCKsQXk46/2J8YvxPNwwp4/aZmyMHZS0sQkVsPMbKKr5IALV qjswrO9w4aepMGSgctFh4ZR3nP8DsTUTWMEU4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719165206; x=1719770006; 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=Zu9lYlbYX0Jweb4NVTO3cV5NeYgw2y0w2XX39Qt/jgdTaJaiJCuDtKcZaxlvn4HUsa NcDifHX4JGrOzh3VUsoDlwPaOgiVrO4IuLFtOhAncFrl8xvNY9c9kVkA60DUDpAYJQ2d 6sMCY5K1loipOhNmKmYogmkFWT3KbTYjayzZl6DRC+9LQlxUhE/wpOiHtfpa9N25qCeN /zsN4+sneZZDyhkA7f6462wcwhvdkqWsqW1CY0Rx7tsWfK6+hQ9wn7GY2T9C4RH/hlhA YxtUmLIKP8LLzS65H++IkMCcPL1ECcJtLFOX7Gubnww3W0Zj/ILYAX866XiPQAyAhhyk v4fg== X-Gm-Message-State: AOJu0YwEwdgHcutXTLSKwik4RaSMHPnD6Fpb43UTkb/JBnjySbLWZy3Q TaTnx2nzKeY+LAHla+9rgYE7wxi5FfwOaGUrxSkL9mGja1yXTKqnSbZgF2yPZK12o3kpQCoc9Em dBbmK X-Google-Smtp-Source: AGHT+IEIVir4ACYVRB77w5jBT9TTL2EXJpqPQko4MLZ0HIljt2RuBoXEEDmZnu4qqhzFTTbU3RWWwg== X-Received: by 2002:a05:6602:158e:b0:7eb:eeba:5e90 with SMTP id ca18e2360f4ac-7f3a75e2cc8mr314060739f.18.1719165206128; Sun, 23 Jun 2024 10:53:26 -0700 (PDT) Received: from chromium.org (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4b9d113ff85sm1636834173.81.2024.06.23.10.53.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jun 2024 10:53:25 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Quentin Schulz , Jeffy Chen , Kever Yang , huang lin Subject: [PATCH v4 09/16] rockchip: veyron: Add logging for power init Date: Sun, 23 Jun 2024 11:52:55 -0600 Message-Id: <20240623175302.1463973-10-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240623175302.1463973-1-sjg@chromium.org> References: <20240623175302.1463973-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 Sun Jun 23 17:52:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1951272 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=oQ/EQ/Mt; 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 4W6dzF6qDjz1ydW for ; Mon, 24 Jun 2024 03:55:05 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 42A1F88578; Sun, 23 Jun 2024 19:53:35 +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="oQ/EQ/Mt"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A9B828855F; Sun, 23 Jun 2024 19:53:30 +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.2 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-io1-xd2f.google.com (mail-io1-xd2f.google.com [IPv6:2607:f8b0:4864:20::d2f]) (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 2ED40883B1 for ; Sun, 23 Jun 2024 19:53: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=sjg@chromium.org Received: by mail-io1-xd2f.google.com with SMTP id ca18e2360f4ac-7eb75c0d0a7so125734339f.3 for ; Sun, 23 Jun 2024 10:53:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1719165207; x=1719770007; 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=oQ/EQ/Mtx5oc38gaxDXEBN61qZ15Thw2KWzh0Tnc4XWJxgbHPdVa7xxDUOt5ulLYiN Qz8dftfYUJwpD3rlvX565ZVFNHLqk6SSGKc+SoNQgv7tmOmj45fCyTUHjj/IJxj1sVL7 sTtLY62UsYVjd5mZCC78hZdKOL7gG/N+4HE+s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719165207; x=1719770007; 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=SbLCz9xi/KzwdOG1t2DKhlPQmPkZRDVr7IEXZLo1SRGM6kwQ8m3f7ibEi6nxFt1iGk tHjbOi+hgtBwr0hXCrOn9wc6igbwHa9bedSuo874qYERZlvnEuFgu2dkpsG40PO1fPqe 4YB8DGAOkJ1o6xf+5IJs6oOdMHwQ4s1MyXNm3m1soaqVEf3RuAKo3svsAWTZisZJj4Nv 3k+ei2kQE2WqhZ7/2KmRRM+XcK86gBL4Ju2VMDn2IiXSrchIoqT03ib2rjUMQYOA5Tpk HD2Y0k+4f9fTlQkTUFQ+95AH6UfXT1/Jih3v835ScguGR3KoBMzJrhikvslXBYM+7LhQ sWrg== X-Gm-Message-State: AOJu0Yws7TAsqDkYMfjl6jjKynj/weGlJ3ARZ/vhvWBnjiTXRGSEIucY epatNIrldAsdwR+VD+h63jWS5HApH9DK/E9chHfbxVrlv8yInd/yFzphy8AE3+q2Dr6tDYeXuek BwA== X-Google-Smtp-Source: AGHT+IESvqIdE+/Rwc6NH3dG0rb9wjhZxi1JkxuSn7wpf7/6xv5r6bukQ2WE1G2XRX/tpyTks5ZaLA== X-Received: by 2002:a05:6602:2ccc:b0:7eb:7351:8beb with SMTP id ca18e2360f4ac-7f3a4d5d227mr315663539f.0.1719165206751; Sun, 23 Jun 2024 10:53:26 -0700 (PDT) Received: from chromium.org (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4b9d113ff85sm1636834173.81.2024.06.23.10.53.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jun 2024 10:53:26 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Jonas Karlman , Quentin Schulz , Lukasz Majewski Subject: [PATCH v4 10/16] power: regulator: Handle autoset in regulators_enable_boot_on() Date: Sun, 23 Jun 2024 11:52:56 -0600 Message-Id: <20240623175302.1463973-11-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240623175302.1463973-1-sjg@chromium.org> References: <20240623175302.1463973-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 Sun Jun 23 17:52:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1951273 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=JK1Z4Mgy; 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 4W6dzS3YZxz20WR for ; Mon, 24 Jun 2024 03:55:16 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A4D4F8857F; Sun, 23 Jun 2024 19:53:35 +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="JK1Z4Mgy"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C24008856F; Sun, 23 Jun 2024 19:53:31 +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.2 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-il1-x12e.google.com (mail-il1-x12e.google.com [IPv6:2607:f8b0:4864:20::12e]) (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 F0B34882E6 for ; Sun, 23 Jun 2024 19:53: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=sjg@chromium.org Received: by mail-il1-x12e.google.com with SMTP id e9e14a558f8ab-36da84df7adso9877075ab.1 for ; Sun, 23 Jun 2024 10:53:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1719165207; x=1719770007; 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=JK1Z4MgyH1WBQ3BbjU0u6gw6UP05r6SYMTukSbabVY6XB/Xjqq5uSCAtUH0a2h0JOh I5po/cnbQ4Frtvgpaz2ATYp9IEo5QCEodIGW2v+wjlATbDlyZ4H98/2iQYNvO+fRoAF4 T+xtwMOlcrKfG6gG0JI1ydsTrxp7jL4Ul0Yoo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719165207; x=1719770007; 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=wf9G6u0CwjK9sDqvF01FNXFuXBZYZFvF7GaQItiliF6lEPKr3ZsNqiBpYSzEk2T6U1 CPxxQyH+3lTyMIeqUB8PWfX52hOWLpEBey8VP3jN1Gy0hex0GK6n7nYyOwJIsdiyYXxj noRRZ/W8620zasZRuKtNlgso0oHU2jqRiQi4NwRJ/XfLwBeXiq5u5ftgPQmtJNUq9MZv gSikiCQQneQWJ1oS6d8n2oIl00MnOElfEjpSKP643iyDfxz/4dxR7c04t7G6yTqBDj4r dqUENnYc69eF83sE9SQ2gPoijtB7fkru6FTK+eozo6wwTwmCfTC4/UQ+xzG6KWzbdQa4 uxtw== X-Gm-Message-State: AOJu0YxOCMyMK2HE6VW3NWcESWpiyqYDpcUUZR91MquZ7imSEycBscbe J+5wfBskEH5vbGi00spT9MdeXcCtK3VLp+x38M351MsXZ+ShRlPs9l1h2hrffidDZAnJvyg27Bp wAA== X-Google-Smtp-Source: AGHT+IFQVqhYODgrMsCwe0iyHTsCvydKrjhURWKIB3o77OTDXzUdjVjpEMV+ZNxAarsGGxCQt0Zs/w== X-Received: by 2002:a05:6e02:12e7:b0:376:4261:5b1c with SMTP id e9e14a558f8ab-37642615ca5mr5864125ab.3.1719165207500; Sun, 23 Jun 2024 10:53:27 -0700 (PDT) Received: from chromium.org (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4b9d113ff85sm1636834173.81.2024.06.23.10.53.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jun 2024 10:53:27 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Jerry Van Baren Subject: [PATCH v4 11/16] fdt: Correct condition for bloblist existing Date: Sun, 23 Jun 2024 11:52:57 -0600 Message-Id: <20240623175302.1463973-12-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240623175302.1463973-1-sjg@chromium.org> References: <20240623175302.1463973-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 Sun Jun 23 17:52:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1951274 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=a8NHxAkf; 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 4W6dzh2B4zz20WR for ; Mon, 24 Jun 2024 03:55:28 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 13A948858C; Sun, 23 Jun 2024 19:53:36 +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="a8NHxAkf"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C64D0882E6; Sun, 23 Jun 2024 19:53:31 +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.2 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-io1-xd2d.google.com (mail-io1-xd2d.google.com [IPv6:2607:f8b0:4864:20::d2d]) (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 A0D3C883C8 for ; Sun, 23 Jun 2024 19:53:29 +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-io1-xd2d.google.com with SMTP id ca18e2360f4ac-7eb895539e3so143364139f.2 for ; Sun, 23 Jun 2024 10:53:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1719165208; x=1719770008; 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=a8NHxAkfC4l+0bJnUC89c1Fd/Te2BhJYzN7rHygHNQE2NroXfB9ppOaHHA8Ypdi4Z9 OybHjWrm2Ft9UTzBxrvxj184E/X5HYW+yCG5Uw/3ZqrOzec/AcFBeA5LZP+bKrKuXR2R WrPk0d7Mu3VAWrziklXgCQqLtrmtqfMQByD8c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719165208; x=1719770008; 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=KLjY1C1RckmOMwfK1tPSOjTiYAkDKu1hWQteUnaW0u8BvZPHrBp2e8Mo7ZHFGnWCE1 IDo/8j3S+yJ+VCSUiZ+RstCRF3U4t67LVeFUJeEAheHh5U+6PN4uz3k1SfFfRZ3xa5oJ J/IW85EOW6yWj/lEaw8cbWvC+bBq/V3r2/zNKWBuHa7ByfoZEFl9tE19rsPSrauLAy3C q7nohP02CuhJ5FIfJWsSEQnBW7YB++lXbU566hzUMS7VzkWeXXlragsJLJ/XsLXRgGPG j1E84KbV3EvNP+3hhFRB2mTDxMP/m2j0rf5WlKgO1lfJR1HAnVcOU28QC7k/J0CZIZx5 h63Q== X-Gm-Message-State: AOJu0Ywujje31Rp1QU4R8Dt1oDBd5DUEvj7YaSj45Viphl0ekOTJWjai rTjAUmwfH6nPUG2laX/y3nzOZthQ/JuwnBX/xj8/7fjSr0B7B22L8H1Au40I0W8phfcxpUpQsY4 Ztg== X-Google-Smtp-Source: AGHT+IFk40aj+L5+NrnBYdPOKlRONSO0IVoVedumpzcv/nVcjia/1Nm2TJPWNZ7Hq6KYUAw4Ob4C+Q== X-Received: by 2002:a05:6602:14c3:b0:7eb:c7ff:26e3 with SMTP id ca18e2360f4ac-7f3a4e36a08mr367763539f.16.1719165208258; Sun, 23 Jun 2024 10:53:28 -0700 (PDT) Received: from chromium.org (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4b9d113ff85sm1636834173.81.2024.06.23.10.53.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jun 2024 10:53:27 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass Subject: [PATCH v4 12/16] spl: Allow ATF to work when dcache is disabled Date: Sun, 23 Jun 2024 11:52:58 -0600 Message-Id: <20240623175302.1463973-13-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240623175302.1463973-1-sjg@chromium.org> References: <20240623175302.1463973-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 Sun Jun 23 17:52:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1951275 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=PfDHOjuY; 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 4W6dzw2Qgxz20WR for ; Mon, 24 Jun 2024 03:55:40 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 71057884B2; Sun, 23 Jun 2024 19:53:36 +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="PfDHOjuY"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 72A5788405; Sun, 23 Jun 2024 19:53:32 +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.2 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-io1-xd2d.google.com (mail-io1-xd2d.google.com [IPv6:2607:f8b0:4864:20::d2d]) (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 625B288551 for ; Sun, 23 Jun 2024 19:53:30 +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-io1-xd2d.google.com with SMTP id ca18e2360f4ac-7f39116e564so78221939f.0 for ; Sun, 23 Jun 2024 10:53:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1719165209; x=1719770009; 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=UIVlvjCM6wlz/Uph5LRLcypc2mEYIAfW4W7EWyp4Ek0=; b=PfDHOjuYaBLv3xxfMohmQ42/xrWfT/ZGe2SkpR9W8tiro53bOnAzwwrUXq+60ehFXm U/plZblstXFj/KR/izRe/B69suh2s9No8A+54pej3GPjZTCtdf5fB0MR1+5RbxLIggGt i6SowJGhckO3GYWRZe0n/3QOLegcWcCp922b0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719165209; x=1719770009; 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=UIVlvjCM6wlz/Uph5LRLcypc2mEYIAfW4W7EWyp4Ek0=; b=V5MY3ls0cvrz4tQii0nupe0se2MlGRbSGdQOgbo+PWoKzC1DFvIa2QLEGuqoG8p8Fm DF/wsK/8Zf2QGpWRRp3fOXPWBsEdm53+PprNJHTm9vNpWffTSjtxfJjNOCmf4EfOXjIU XluJNow0phyZgjM4XCuCfSytMZe1usrtVHYrtn58hDObmUq6WvwJ+MaEgNVEWnvT6RUG pB/JH0Ye2Fl4NPsnbw2RqBAyvmPnb9r2dcwFN+cOmmdI4P76fcRXVN1SXsYLJPmjUJec Ccr06AswouQSEmxQhpZuk5RFeJHNTEUxD/NLIXNrf5JCCrxGAMKmpIlJznn5ykWkbbF6 M9xg== X-Gm-Message-State: AOJu0YxCmg8B/Hu5t6g1dDDiENka6fDxPf2POsa/RmrJnwMQ/owj4Ov1 h1fj1TMdOja7v4WRe2KHT9IUi8bD5Nt7+z5xHUlxybMV1b6LfdZXfExOcptxdSLZft8mqJWFlXB Meg== X-Google-Smtp-Source: AGHT+IHffGGWWH54BoJDFTQMI2Eed+7CxMyvzY46jTCwOSccTq6JVC8ALliykav9kvkRqSX/lxgcRQ== X-Received: by 2002:a05:6602:1582:b0:7eb:cc55:af1d with SMTP id ca18e2360f4ac-7f3a4dda232mr313675339f.12.1719165208960; Sun, 23 Jun 2024 10:53:28 -0700 (PDT) Received: from chromium.org (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4b9d113ff85sm1636834173.81.2024.06.23.10.53.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jun 2024 10:53:28 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Jeffy Chen , Jonas Karlman , Kever Yang , Quentin Schulz , huang lin Subject: [PATCH v4 13/16] rockchip: Ensure memory size is available in RK3399 SPL Date: Sun, 23 Jun 2024 11:52:59 -0600 Message-Id: <20240623175302.1463973-14-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240623175302.1463973-1-sjg@chromium.org> References: <20240623175302.1463973-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 Sun Jun 23 17:53:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1951276 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=GDQqEixz; 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 4W6f075vs7z20WR for ; Mon, 24 Jun 2024 03:55:51 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id CD19288551; Sun, 23 Jun 2024 19:53:36 +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="GDQqEixz"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 408C58837A; Sun, 23 Jun 2024 19:53:33 +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.2 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-io1-xd29.google.com (mail-io1-xd29.google.com [IPv6:2607:f8b0:4864:20::d29]) (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 1A3F08855F for ; Sun, 23 Jun 2024 19:53:31 +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-io1-xd29.google.com with SMTP id ca18e2360f4ac-7eeea388a8eso143693839f.2 for ; Sun, 23 Jun 2024 10:53:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1719165209; x=1719770009; 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=k+p8Pdbfu6l722uGlnhM73JYEXoNC156QEoeBM2oBKw=; b=GDQqEixzgnGTa6OQxQnAM6mK46DC94eDUQ+nZgFJgkyfLPu7fHa+iTYYpU9QGMlkXn bEyOJsGianaG7ux3+lIVIuZ+vYiuzKRMnQ0somkyVa6hPdOkxg0ObBQ1ne9+3ZV/dazM 7eCi8GAjLUYZ0MhY3cBGs0Z7v4MkWK/LPuxxA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719165209; x=1719770009; 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=k+p8Pdbfu6l722uGlnhM73JYEXoNC156QEoeBM2oBKw=; b=ZmPRJYn0uDKpMW9ib5iabIMT8fZy9P7WzfI4pbiCV2cEtJfd2U5G4vzcePWCUONpcy rWeFSNnnP/ynE+qzECL+5qcjuBVkZ3noEjt+KReR4fDJhAppWpmmAi92FPy5+9XhsYKZ yHZmterKOYqDM8Jl4cvCoYeJJL1IYxNVE4K8BZCa/fFFb+6WrtCueBbkaTNKBnuMmizZ qXXf51YJMqNwU7DcgSrUUtQsaQ2/C8WZVTHFuruUd+qvliBxy4HqpAfXzvL4FKQy/+BD fIuqgtnobSdn00tIuI2DSN2K4OZ6iugStmW/8bQ0n9nFf9Kp/U+yEaSHjHYgZDgh3ypW 2LRQ== X-Gm-Message-State: AOJu0YxVG1ST/Tm9bZJXzY5VzJgQuHUoouY9k1by/oUKkCWIm7jF1ISb 31v0Iu7smc2glcI8TvFz80nV9+LLcXZDj8pdFnXUHCE5rHLq0Dw5RseE+UiAQeFiLefex/GFT/m 3Aw== X-Google-Smtp-Source: AGHT+IFPPyq8Fwhmd2mUHls/glX6vdBsEub/QkOq1fi+3FiVKp4wOHFB+QfZhGnOFknVcYEGuSYZBA== X-Received: by 2002:a05:6602:60c1:b0:7e1:af90:44ee with SMTP id ca18e2360f4ac-7f3a7481f22mr239954839f.8.1719165209654; Sun, 23 Jun 2024 10:53:29 -0700 (PDT) Received: from chromium.org (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4b9d113ff85sm1636834173.81.2024.06.23.10.53.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jun 2024 10:53:29 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Jeffy Chen , Jonas Karlman , Kever Yang , Quentin Schulz , huang lin Subject: [PATCH v4 14/16] rockchip: Avoid #ifdefs in RK3399 SPL Date: Sun, 23 Jun 2024 11:53:00 -0600 Message-Id: <20240623175302.1463973-15-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240623175302.1463973-1-sjg@chromium.org> References: <20240623175302.1463973-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. Signed-off-by: Simon Glass --- Changes in v4: - Drop the non-dcache optimisation, since the cache should normally be on Changes in v3: - Split out the refactoring into a separate patch drivers/ram/rockchip/sdram_rk3399.c | 42 +++++++++++++++-------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/drivers/ram/rockchip/sdram_rk3399.c b/drivers/ram/rockchip/sdram_rk3399.c index 3c4e20f4e80..949a082d00c 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", @@ -3138,22 +3144,21 @@ 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()) { + if (rk3399_dmc_init(dev)) + return 0; + } else { + 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); + priv->info.size = rockchip_sdram_size((ulong)&priv->pmugrf->os_reg2); return 0; } @@ -3181,10 +3186,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 Sun Jun 23 17:53:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1951277 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=b+m7gSCm; 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 4W6f0L4Wzcz20WR for ; Mon, 24 Jun 2024 03:56:02 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 387718859C; Sun, 23 Jun 2024 19:53:37 +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="b+m7gSCm"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D7F588837A; Sun, 23 Jun 2024 19:53:33 +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.2 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-il1-x12f.google.com (mail-il1-x12f.google.com [IPv6:2607:f8b0: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 C443F884B2 for ; Sun, 23 Jun 2024 19:53:31 +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-il1-x12f.google.com with SMTP id e9e14a558f8ab-3762eadd807so10239275ab.1 for ; Sun, 23 Jun 2024 10:53:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1719165210; x=1719770010; 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=b+m7gSCm7gNyKIFVUPsVyq3TIUhlXvFrfOfpz3acPGTuGz8ZpmGRFEiH+YW4+lT5a4 wxOCHRMbYZIUOtauN3YhFG8uB0NWSTWERhF0KtkoWkwOPt580L1cnuKKbNYQIMXYVeoU kZUa2D0mmOPluuzVKwQnBsU19oOY2Jm3DCcBI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719165210; x=1719770010; 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=EO4oxj5V5kF0hw7rGQckKoznopJ2NM1O/OcZKtGLOOfT1poJ82FdSFlEElkk6fmFWM cZ802FGWnfBK9Cov/xh7i1A6NBdNq17Sgf5bV8xYQuHdyNxm7Ib45FQSQuf7alXBXbgz IcMIermNIYxz+2uY8NlnJP9NmRBwAVJWYSrr2D3A+T1zq/Gg77l6obXJUGzsOqn9VSV1 ip8FhaySzDwNa0An/QcCzgdl4M0cB4+u0+TtXZmo3I2aKubnbhEMvLpofxsiYU8pIJeU Q5Ef4ivxXn6AnMw6H3TFmoaY416jf3MJQmV58G85szeBnoksp6mlAxr2xR4lnO43iDja 2jIg== X-Gm-Message-State: AOJu0YyegRr0dOIwTAXb2j9Fsz3eIS/ze9/+yvAJIsAX8ECSmlVK46zs Y1+6j/2DFjwTQ2tL8uQalw46hLfKe9a275OC04UBQHyXUtuMjQdWPdSli5A8AzsSAJYTBpxrW9l Tcw== X-Google-Smtp-Source: AGHT+IFbCex4h4YuKZ3ghnPn81SNf6CA2nHRBvaA/Z7NtAVX9HgUlTje81zDnijcVkN//ab6m/07Qg== X-Received: by 2002:a05:6e02:144c:b0:375:86c9:9ec9 with SMTP id e9e14a558f8ab-3763f5b7c7dmr40137175ab.11.1719165210434; Sun, 23 Jun 2024 10:53:30 -0700 (PDT) Received: from chromium.org (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4b9d113ff85sm1636834173.81.2024.06.23.10.53.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jun 2024 10:53:30 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Jeffy Chen , Jonas Karlman , Kever Yang , Quentin Schulz , huang lin Subject: [PATCH v4 15/16] rockchip: bob: kevin: Disable dcache in SPL Date: Sun, 23 Jun 2024 11:53:01 -0600 Message-Id: <20240623175302.1463973-16-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240623175302.1463973-1-sjg@chromium.org> References: <20240623175302.1463973-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 Sun Jun 23 17:53:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1951278 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=dicN1EPR; 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 4W6f0X2KWCz20WR for ; Mon, 24 Jun 2024 03:56:12 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9438188585; Sun, 23 Jun 2024 19:53:41 +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="dicN1EPR"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 072088857A; Sun, 23 Jun 2024 19:53:35 +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.2 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-il1-x131.google.com (mail-il1-x131.google.com [IPv6:2607:f8b0:4864:20::131]) (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 B1D0088403 for ; Sun, 23 Jun 2024 19:53:32 +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-il1-x131.google.com with SMTP id e9e14a558f8ab-36da84df7adso9877145ab.1 for ; Sun, 23 Jun 2024 10:53:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1719165211; x=1719770011; 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=HKGKgd4c58e+gRlPQTUIML+w8C5a+h8e5pLrkFzg85s=; b=dicN1EPRW0XLeE3b6fw4aoepwHo7IiwXxQdeiDDb0ggEe500W1my+t9PqT/Vixwve8 9RZX1kZiN+83jm52NSMB73qqj2AVfy0vOgsZCopNVUizyOBtiCH1OZi87aPBiI8vkD1W FD3rVVhZg3GuMtgexOTEq2pCP9gR5YM7P9K2k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719165211; x=1719770011; 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=HKGKgd4c58e+gRlPQTUIML+w8C5a+h8e5pLrkFzg85s=; b=PHmihW87k26Z8mQzp/oQBmE1WgzPTmKguj/o18oOTc7cUQQmP6FtBeGqjd4Kkhoc8N iGwjEU0kOUnyWtHAfoCcVW2hmjwVaRrnDxHEEycR5bbFtOcGDRL2u0hvcmvWApmTzO4Z HGFnEmflOj9cwh+VfV2tR95RgUXlL9xe/meBsWBuJ23wvcBqF58FgGZ4pemlJ0H1mcMZ 1xnR7DAh/kK2l6rbPBTrMtqGszeDeWtU/F8W/8tSn8YjPh4lMNxev3iB4I6GPng1eILL MwJu4K5DSKGimD5pWJjMYwkHFult/c54zKeJKKLwf7z05JG/qpB88eEfj2Eh0t2HV9dh +G4A== X-Gm-Message-State: AOJu0Yx+vozwEQLG0f1rxiiphe6rStZxaEGWlGgn7e1wdjUxAiGsVwOL ByyynAPFxuBwlsJqa9AmIo8zd+zznyYR9XU0UC3muiTgw8J+2L6poZTZE6zKRubFk2zmnuY5QSg mhw== X-Google-Smtp-Source: AGHT+IHYCYc3mEcG6/KjIJ6CXkkXuJITgEODsFaVlqfKkyQkZDuvnAvgk8ecKKnMNg2VWYEwH8jnkg== X-Received: by 2002:a05:6e02:1187:b0:376:3ece:dc5 with SMTP id e9e14a558f8ab-3763ece0e25mr11594345ab.4.1719165211175; Sun, 23 Jun 2024 10:53:31 -0700 (PDT) Received: from chromium.org (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4b9d113ff85sm1636834173.81.2024.06.23.10.53.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jun 2024 10:53:30 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass Subject: [PATCH v4 16/16] Drop the special am335x_boneblack_vboot target Date: Sun, 23 Jun 2024 11:53:02 -0600 Message-Id: <20240623175302.1463973-17-sjg@chromium.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240623175302.1463973-1-sjg@chromium.org> References: <20240623175302.1463973-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 --- Changes in v4: - 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..1360c71803c 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 stating 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.