From patchwork Mon Mar 21 13:37:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masami Hiramatsu X-Patchwork-Id: 553338 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:1248:0:0:0:0 with SMTP id z8csp1510564mag; Mon, 21 Mar 2022 06:37:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwCtWbT/kjbm7rb5CnR1M5gC4iRR7+Nledm+i7bVseOYgMqs42v0+BPAjJO87qQ3LzmeraB X-Received: by 2002:aa7:d5c1:0:b0:419:113:3e2b with SMTP id d1-20020aa7d5c1000000b0041901133e2bmr19515854eds.237.1647869871680; Mon, 21 Mar 2022 06:37:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647869871; cv=none; d=google.com; s=arc-20160816; b=xJScEXQJ4pX5BRyhRou5Zo6GjMzhNl0eXjOSi02k1l29RMMdqF2J5NIjcWyfqZs5pt 9voz6y3kePHbi0NrusoISXr01as1SrrbQtIOGs0SWTSjs09ys4AbT6NTtdsT40Bqz7JF DgXHphEvFeaihf6Fe1WiiStVJHp2NIWjos3klgr9NpxAqWtdp6Rlawyq4aY3RcMDIXKr yr7br1KJmT7Hxi2RWju2LSggdQ0kQFk0lZIC9Embvirx2ULi93Us/ovlwgSxVcyvSBtg qn4A4Q9s5NtNb7QnhXOJ37byvCkZFssabLM6zD8gtk1w0ufluGGErV7MvzI7cWj05uK9 cEjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:user-agent:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=nm97opa7boGMjzGJjMYc6NfrqKMy8FzGRuPY4kdz+y4=; b=n8rakZpBOoRfuzEdmM7m5P9H1+Homxf9KnOLoRokQ/E7GriMEsPmkGApy93Rw0fhNd zu/T6lbSaTzqm1h+t2fTL+kA7Xvl9sWAkfvhON4GdtDeREyi4szAbU5a/tAJuC37RY4U 3vETMAUQ3kE7w1AfX1dhxtjoyi5r1oCdsxp+DXq7duRvhg9dVWH5wAU2BrWxeIFkfcqK SelBNh9j3Rc0gP3GqfHwR4dh0jxD0p5amCwO7sAUiRElVxpxqJfywRy32ZR6PLVWI2Qf m/CQ/9KtNzX8QBI/biNljbIK95Dc6I8qfgl5Mt6wAQNqFy6iqqr2zB7KWLkMc3N2MXJ+ CtQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IPNIHKOi; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id lr8-20020a170906fb8800b006df76385c6asi2897190ejb.266.2022.03.21.06.37.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Mar 2022 06:37:51 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IPNIHKOi; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DC9BE8269E; Mon, 21 Mar 2022 14:37:49 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="IPNIHKOi"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4AA9483951; Mon, 21 Mar 2022 14:37:47 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) (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 17A6B839B2 for ; Mon, 21 Mar 2022 14:37:42 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=masami.hiramatsu@linaro.org Received: by mail-pj1-x102f.google.com with SMTP id e3so13034923pjm.5 for ; Mon, 21 Mar 2022 06:37:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=nm97opa7boGMjzGJjMYc6NfrqKMy8FzGRuPY4kdz+y4=; b=IPNIHKOij3MzLRWeWmLLDYaVPtdwFiLXmvGauJT24ReSp42iDGdZGKnMPqFZHA84aT zeXrzbcWVJyK/od5Scs8hHdTuCDMahhiGV6UVMmVzCt6OO2ROLTHB3VokZyyyf3vBd77 DOPBwjzk1rpS3W7f0S8hvoV1insm16h1We4Uiu7At6D7Tbawtn1RxUS8UYvlpzsfoHhw ECvLlZUpyayPN+AQlHwso1+221WH5elH2dn5H/HW9RUp+2Dg4V4hFKcBOW0JKnV7eQoN jOtwaqtpzzYnIQ6XBAWyQnGEMay9UV7zfE43G5O9usnEzZ3tUhvWFT5K+q5KEk2oiJ54 Hstw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=nm97opa7boGMjzGJjMYc6NfrqKMy8FzGRuPY4kdz+y4=; b=dxTqJICka3jVfYC1wib3LaYBlbK8Kzp9OQmd7s/c5WNi7Q+FeUMBKuqQ6SsaA26RtZ LgZFtj1ra0Cn1a5ysJOIwii05r3zsc8UTNcvZnVwm/DVNX/S1KhxjSyx1E+YFYoMz6jR FDnwhfXLZU8w3ZY8wDq/8Hn1+Yal1GexHT38k7k93P1vt7V2KPNx1I/n/usG8eKPbRqG BWmf3PRJOmzzekPeDG4WWyeJdAmDqVc4/qgM1tidezxCG9w1Q6wjw6IBiatKEjgzvXfn bOaeI6PuJLR4FVlAnzS3XlXnbRPNZxDqb+ApBBIjD72CatLb8NsDwlAMXvD8ugZX0Kt8 5Hrg== X-Gm-Message-State: AOAM530ReU+BqYDeThO7LtwhDOvnm4AqYT4hs61O+X+wD5V5GQmGCxtT W7xhWtp3FCjxI+dTKq7ig/v0p3A9Y9BHwg== X-Received: by 2002:a17:902:cec8:b0:154:6dd6:255d with SMTP id d8-20020a170902cec800b001546dd6255dmr2120406plg.62.1647869860257; Mon, 21 Mar 2022 06:37:40 -0700 (PDT) Received: from localhost.localdomain (113x37x226x201.ap113.ftth.ucom.ne.jp. [113.37.226.201]) by smtp.gmail.com with ESMTPSA id g14-20020a63be4e000000b00382800d1528sm3631484pgo.21.2022.03.21.06.37.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Mar 2022 06:37:39 -0700 (PDT) From: Masami Hiramatsu To: u-boot@lists.denx.de, Simon Glass Cc: Masami Hiramatsu , Patrick Delaunay , Patrice Chotard , Heinrich Schuchardt , Alexander Graf , AKASHI Takahiro , Bin Meng , Ilias Apalodimas , Jose Marinho , Grant Likely , Tom Rini , Etienne Carriere , Sughosh Ganu , Paul Liu Subject: [PATCH v3 1/3] cmd: efidebug: Disable 'capsule disk-update' when CONFIG_EFI_CAPSULE_ON_DISK=n Date: Mon, 21 Mar 2022 22:37:35 +0900 Message-Id: <164786985547.412493.7408749396405838912.stgit@localhost> X-Mailer: git-send-email 2.25.1 In-Reply-To: <164786984495.412493.4209842889853239285.stgit@localhost> References: <164786984495.412493.4209842889853239285.stgit@localhost> User-Agent: StGit/0.19 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.5 at phobos.denx.de X-Virus-Status: Clean Disable 'capsule disk-update' option for the efidebug command when CONFIC_EFI_CAPSULE_ON_DISK is disabled, because this option is available only when the EFI capsule update on disk is enabled. Signed-off-by: Masami Hiramatsu Suggested-by: Heinrich Schuchardt --- cmd/efidebug.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/efidebug.c b/cmd/efidebug.c index 401d13cc4c..a1a0717ecb 100644 --- a/cmd/efidebug.c +++ b/cmd/efidebug.c @@ -84,6 +84,7 @@ static int do_efi_capsule_update(struct cmd_tbl *cmdtp, int flag, return CMD_RET_SUCCESS; } +#ifdef CONFIG_EFI_CAPSULE_ON_DISK static int do_efi_capsule_on_disk_update(struct cmd_tbl *cmdtp, int flag, int argc, char * const argv[]) { @@ -93,6 +94,7 @@ static int do_efi_capsule_on_disk_update(struct cmd_tbl *cmdtp, int flag, return ret == EFI_SUCCESS ? CMD_RET_SUCCESS : CMD_RET_FAILURE; } +#endif /** * do_efi_capsule_show() - show capsule information @@ -303,8 +305,10 @@ static struct cmd_tbl cmd_efidebug_capsule_sub[] = { U_BOOT_CMD_MKENT(esrt, CONFIG_SYS_MAXARGS, 1, do_efi_capsule_esrt, "", ""), #endif +#ifdef CONFIG_EFI_CAPSULE_ON_DISK U_BOOT_CMD_MKENT(disk-update, 0, 0, do_efi_capsule_on_disk_update, "", ""), +#endif U_BOOT_CMD_MKENT(result, CONFIG_SYS_MAXARGS, 1, do_efi_capsule_res, "", ""), };