From patchwork Thu Aug 28 22:16:50 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 167 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1756419466; bh=5AzB/ZwYGfPaeh3g4Wt5yuhC3y0gWuDbf6wd6PPiE9U=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=UVUYLtouq0LjVjitRJYpz0KCSqRPXnYCkvvessxetuJV+4DuRDQIJOmg8Q1UuD5Kj PHEjgFXk3OWZf9mVK4XMVo1FR6DFGSwL3MiUewiRvNnDTe2gquBcwSl1ABdpTc774x W7uBRI5Gfh84fexm934T/0hze6+0Kea9WxZ7IBifNyN34DiivqPwR5Cvl3qaTHlFQT nJJMRctZ2aDPuR4bTGWUtweVlOqUADdk382NwITBnMS9ongP1RldCeIJZtRWU/4Ttz w50O9EpFTzySPYlZKOjufTHXsl0P5vxc3UVQ/pd7STd9Ug+3Pudp7fQoA7LbK69H5f 8KNV/xSCDL/gA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 60DE36780C for ; Thu, 28 Aug 2025 16:17:46 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id W7_YxdaJRf1M for ; Thu, 28 Aug 2025 16:17:46 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1756419464; bh=5AzB/ZwYGfPaeh3g4Wt5yuhC3y0gWuDbf6wd6PPiE9U=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=TACv2uZSR1eFLQzboBuMyP6i3QfY4O3F0zHW0/3BtWp4FGnTEMUuzd/Nevt0v95mS qYgngQoKoQdEamAY3ZyQxwItNkivI7uP1yXf1Po+gc3w1ewn3duANMXQKkEGsyfNYh UTWSL8G2nAAclvZTHAeuDvz3jygiy32Hrd5ividJJ6m/4tbtf+ItbkAagfSo3YtI5B uoByB1DFgX+OmYKf201Jy/y7iS+Z3ZPQ8gfl93QcVenISmHzQJRZSUexWnoGowJ9TF AoseCIXy2cqDMrCgHi7yZNkM+VxtRqiU5Y7EzVH2WFsGv9tXhAtukhyPAlyZDQvUOY eyXovK6hjc6Ig== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 91C0467845 for ; Thu, 28 Aug 2025 16:17:44 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1756419461; bh=4qtKfzHCrurzWpAUmFVfrxfFEmTndO26hGgk30gx3ZI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BOMN/tPcJzRZ4NIhl2jIKfr/44nG6uiiYkwQ2PCdssJ6xddvAq48GSwUoq3IjVDIE eRRTtAK64oMOpR2SeUJsubp4IGfP6SJUI9pqJTYlpbuozuQD8cjbg3xWuAFrw+IXbZ /opptqn3uD2fwtTOnmxBM4JUi5cSn8QvIxhlb9ZYYKI6xI1SBvIjrXfH+o7xtbBxW/ /3D+UxoSszEeH4etCPo9FKmdMz9y0wb0q1ObkGmkMSKrBHhV5y7MenRu1BK4r1C8ur PXURyvyVDkQawtam+QMoncgb5ZKmMJ2KzS4mw1JGE5y4olqad/1gDqXDUjf7uaoNiz NXWJ8lkgg7MXw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 6369B675BB; Thu, 28 Aug 2025 16:17:41 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id 4GC64U3NfEBO; Thu, 28 Aug 2025 16:17:41 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1756419460; bh=sql918ssWRevMrFSo2h0G7tI7o4fewLignoXod4k1nw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lrvb5FOooZNwzZGgkAyaVzP2cbfKfKcyZtwLiNn5CT5jnWj6QLRiwwlmXxogG8HfJ Qx0BX4VpJiizIEyWM2eNy6w45kwqJylgxQPEQb6l/31ZRsirloA/36pF49URqxH+Xg sAcv5li+R0ThxQN0l6hxMNhT7axjXfm/voBdkRynr+6YPXHP7LRsLpd4gOtQkkX40w 8L0/ojAZx+vBKduyAusxlxG5PgpXz8epA5loF1gZTzlbakMlLpB/OfPnotYmFqUSEk zGqDyZ8dxnLrbiNDQLmWmbs1A8nzKe+i5B07UGYOVfWs8Vg7hyINRYHoop7gDuB0+e tJ25/iM9wS2DA== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 910E35FC79; Thu, 28 Aug 2025 16:17:40 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Thu, 28 Aug 2025 16:16:50 -0600 Message-ID: <20250828221713.3218908-5-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250828221713.3218908-1-sjg@u-boot.org> References: <20250828221713.3218908-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: 6K7VSJXFXMHRZAF6SVXO224EJCHEPZ6O X-Message-ID-Hash: 6K7VSJXFXMHRZAF6SVXO224EJCHEPZ6O X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Heinrich Schuchardt , Simon Glass , Claude X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 4/8] doc: Add documentation for about efidebug boot List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass So far this subcommand is undocumented. Provide some notes. Also show a better error when 'efidebug boot rm' fails. Co-developed-by: Claude Signed-off-by: Simon Glass --- cmd/efidebug.c | 7 ++- doc/usage/cmd/efidebug.rst | 97 +++++++++++++++++++++++++++++++++----- 2 files changed, 90 insertions(+), 14 deletions(-) diff --git a/cmd/efidebug.c b/cmd/efidebug.c index 71b99f9c8d7..3f956fea31a 100644 --- a/cmd/efidebug.c +++ b/cmd/efidebug.c @@ -1166,9 +1166,12 @@ static int do_efi_boot_rm(struct cmd_tbl *cmdtp, int flag, guid = efi_global_variable_guid; for (i = 1; i < argc; i++, argv++) { - id = (int)hextoul(argv[1], &endp); - if (*endp != '\0' || id > 0xffff) + id = (int)hextoul(argv[i], &endp); + if (*endp != '\0' || id > 0xffff) { + printf("Invalid ID '%s', use '0001' for example\n", + argv[i]); return CMD_RET_FAILURE; + } efi_create_indexed_name(var_name16, sizeof(var_name16), "Boot", id); diff --git a/doc/usage/cmd/efidebug.rst b/doc/usage/cmd/efidebug.rst index 8c8a4895197..a739f6b4e06 100644 --- a/doc/usage/cmd/efidebug.rst +++ b/doc/usage/cmd/efidebug.rst @@ -13,6 +13,11 @@ Synopsis :: + efidebug boot add -b