From patchwork Tue Sep 2 15:21:44 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 184 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=1756826566; bh=LcHS8HEjoIf7VE/iWi8ULELbV4eGiq26Yioohv4UlEE=; 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=cuz9EICq8MOaLcyWm/AD8mnAyllQcMdgfI7kaIDpzW5m/0VukXujraxlOcI2SOlz3 e4KhbG4sdAjFVgSLBiZXET0SzsvQnOD2R3NzR/c7JoxrgbLpo6ZPKPPUVxfmzM32V9 wgZ8IG7jbmxW8LIqO4+CXNaY/YkD6ikwimgbfpdPzBWoexRLLKgNe0KratwldLqiRD XuXHQ43+/mMGYY4MCuc9MSH5CzDmMw5UPqidqw1La+c6Cb+qUlZ+4qeRg064HKSnwf z8Lh5Z26YBRYhWOuFnRduuM4XIcpOQhWhYLGfq7LwJRD/byOkEBt5J7gCK09oeOUep OU/D2faLsCXTw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id C3C126787E for ; Tue, 2 Sep 2025 09:22: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 lm4Apjtq00_G for ; Tue, 2 Sep 2025 09:22:46 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1756826565; bh=LcHS8HEjoIf7VE/iWi8ULELbV4eGiq26Yioohv4UlEE=; 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=nZ4rS7cXKv8cLMm/b6RLoF9bU9HRIudZqshHuWRn6N18TknI51Ud2Fgwf0T3PnqRd B2cyrLhclBh6chcjDqL/4jlBtLIiBL3vFhnZvYZ2eVe/1Lfp3pYDnoUQ9/OrlJ5iux DqmQa8xU85mOZ6Zomj9Gub2iBcKNXQsBLCkI5MaLDjRiMXkO8T3bNoZ0m16J2oBZ8M /wajJ/VqRz2015yCqx5+LECqvXCLrZNs0ga4soLYNZu9kXM+KwEuAc8AXSWTt7CfZw hVYRZ74SQcWs/XdvMZc3/MxRUBk60K1MbaBW2WEaZmchfEHzGUDyQp7VjyCYA5igwD VaXBNwgJKLMnw== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 89E1A677F7 for ; Tue, 2 Sep 2025 09:22:45 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1756826562; bh=zvzvcp/z3NaOk2qBZKBc2R9xOWYCy23ZNQ1sIexVyHY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WTUsXTu7i0M+2XuW4CZbapYdi91rofC9Sb17lVRgu2ymcolLo+0To1LRjqWP9lI6J bjDAH9/r/Kf0JSIB7lseedtuXXuFLkzMwG5gc8jWNz+8afmyOS92OLfbTmZSR8+Mab 1LEz+mvVzb3CnIdz7aukJNOhwVR0Yy76ZdkPn0oiOF0VfUc3e1YMVzgTZAqakXP79t Lj7/vTmXoJDp6VZvFxM75vVNFdgg21d5190w28XwWF8LYInb3g6spq7NRYYuq/cera 7bacEf+CxAw2F0bGlP1rvWIifglUSQxZpizug0b/IvOpPyAx2yr8MaL68EHL6pjIf4 8FPBoKNTUUFrQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 510B26787E; Tue, 2 Sep 2025 09:22:42 -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 5mNbmGRVfLcI; Tue, 2 Sep 2025 09:22:42 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1756826555; bh=XXEEHTCjyt62sXx9IO2gfZH5x16a4Fq2JaBIyCdgEDo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rSeB697H3/jKuUFLdhJ22pTaCVBHncRgKdiC71kQ1SpHjWKzQsciRcK3GtWqQ98Ho HrSuaoXRiWTNQAiNuTASNRNgTAMnl+mSFRwD4kziVyl/KXh7bU1w8xqdn1cO4oqs6k lvyfS3kaDyirlVn8KEv/3SLt/d61X3M+k2U8Hf2Z4W4fBX7TUk8r8Rwj2/AW1/Ax78 DSzTES1506y5f0obp6JIjpsjR49D2OOCc2dWiknsxrQ0wmO4UP8JucuZjrR7+Z+r0S YuxR2FRCBbgismmwVJJum80nkZPnkQOT7HvsjwH3fN4BS/+Vkvk6Nc6UKimYvvUgUU aadNwB9suCQqQ== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id CA06367867; Tue, 2 Sep 2025 09:22:34 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Tue, 2 Sep 2025 09:21:44 -0600 Message-ID: <20250902152158.2285264-13-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250902152158.2285264-1-sjg@u-boot.org> References: <20250902152158.2285264-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: NSZTH4KASBVIA3ZM76R34VO5JWZUIAI6 X-Message-ID-Hash: NSZTH4KASBVIA3ZM76R34VO5JWZUIAI6 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 12/18] efi: 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 | 73 +++++++++++++++++++++++++++++++++++--- 2 files changed, 74 insertions(+), 6 deletions(-) diff --git a/cmd/efidebug.c b/cmd/efidebug.c index 627045a295e..baa2c73b149 100644 --- a/cmd/efidebug.c +++ b/cmd/efidebug.c @@ -1167,9 +1167,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 || 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..deab986887a 100644 --- a/doc/usage/cmd/efidebug.rst +++ b/doc/usage/cmd/efidebug.rst @@ -13,6 +13,11 @@ Synopsis :: + efidebug boot add -b