{"id":2175526,"url":"http://patchwork.ozlabs.org/api/1.0/patches/2175526/?format=json","project":{"id":18,"url":"http://patchwork.ozlabs.org/api/1.0/projects/18/?format=json","name":"U-Boot","link_name":"uboot","list_id":"u-boot.lists.denx.de","list_email":"u-boot@lists.denx.de","web_url":null,"scm_url":null,"webscm_url":null},"msgid":"<20251218-b4-bdinfo-doc-v2-1-2fb328750026@cherry.de>","date":"2025-12-18T11:44:41","name":"[v2,1/3] cmd: bdinfo: provide long help with all options","commit_ref":"de3754fea3c0d76a854f3cd2f87fd0c39ad3043f","pull_url":null,"state":"accepted","archived":true,"hash":"42d4d7a82ac2eb9f80b591b079048ed3d89f1f24","submitter":{"id":84425,"url":"http://patchwork.ozlabs.org/api/1.0/people/84425/?format=json","name":"Quentin Schulz","email":"foss+uboot@0leil.net"},"delegate":{"id":68728,"url":"http://patchwork.ozlabs.org/api/1.0/users/68728/?format=json","username":"xypron","first_name":"Heinrich","last_name":"Schuchardt","email":"xypron.glpk@gmx.de"},"mbox":"http://patchwork.ozlabs.org/project/uboot/patch/20251218-b4-bdinfo-doc-v2-1-2fb328750026@cherry.de/mbox/","series":[{"id":485831,"url":"http://patchwork.ozlabs.org/api/1.0/series/485831/?format=json","date":"2025-12-18T11:44:40","name":"cmd: bdinfo: further document","version":2,"mbox":"http://patchwork.ozlabs.org/series/485831/mbox/"}],"check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2175526/checks/","tags":{},"headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)","phobos.denx.de;\n dmarc=none (p=none dis=none) header.from=0leil.net","phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de","phobos.denx.de;\n dmarc=none (p=none dis=none) header.from=0leil.net","phobos.denx.de;\n spf=pass smtp.mailfrom=foss+uboot@0leil.net"],"Received":["from phobos.denx.de (phobos.denx.de\n [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4dX83n0Bxqz1xty\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 18 Dec 2025 22:45:09 +1100 (AEDT)","from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id CF89A83DA7;\n\tThu, 18 Dec 2025 12:44:53 +0100 (CET)","by phobos.denx.de (Postfix, from userid 109)\n id 26D7683C54; Thu, 18 Dec 2025 12:44:52 +0100 (CET)","from smtp-bc0d.mail.infomaniak.ch (smtp-bc0d.mail.infomaniak.ch\n [45.157.188.13])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id 1AF2083D5D\n for <u-boot@lists.denx.de>; Thu, 18 Dec 2025 12:44:50 +0100 (CET)","from smtp-4-0000.mail.infomaniak.ch (smtp-4-0000.mail.infomaniak.ch\n [10.7.10.107])\n by smtp-4-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4dX83P5bqCzH5g;\n Thu, 18 Dec 2025 12:44:49 +0100 (CET)","from unknown by smtp-4-0000.mail.infomaniak.ch (Postfix) with ESMTPA\n id 4dX83P1kNFzcqy; Thu, 18 Dec 2025 12:44:49 +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=-1.9 required=5.0 tests=BAYES_00,\n RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,\n RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED,\n SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2","From":"Quentin Schulz <foss+uboot@0leil.net>","Date":"Thu, 18 Dec 2025 12:44:41 +0100","Subject":"[PATCH v2 1/3] cmd: bdinfo: provide long help with all options","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"7bit","Message-Id":"<20251218-b4-bdinfo-doc-v2-1-2fb328750026@cherry.de>","References":"<20251218-b4-bdinfo-doc-v2-0-2fb328750026@cherry.de>","In-Reply-To":"<20251218-b4-bdinfo-doc-v2-0-2fb328750026@cherry.de>","To":"u-boot@lists.denx.de","Cc":"Michal Simek <michal.simek@amd.com>, Tom Rini <trini@konsulko.com>,\n Heinrich Schuchardt <xypron.glpk@gmx.de>, Simon Glass <sjg@chromium.org>,\n Ilias Apalodimas <ilias.apalodimas@linaro.org>,\n Sam Protsenko <semen.protsenko@linaro.org>,\n Quentin Schulz <quentin.schulz@cherry.de>","X-Mailer":"b4 0.14.3","X-Infomaniak-Routing":"alpha","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.39","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<https://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=subscribe>","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>","X-Virus-Scanned":"clamav-milter 0.103.8 at phobos.denx.de","X-Virus-Status":"Clean"},"content":"From: Quentin Schulz <quentin.schulz@cherry.de>\n\nDocument the bdinfo -a, -e and -m options in the long help, but only\nwhen they can be used. The string concatenation is a bit odd with two\nnewlines, but it does render properly once in U-Boot CLI.\n\nTested-by: Michal Simek <michal.simek@amd.com>\nSigned-off-by: Quentin Schulz <quentin.schulz@cherry.de>\n---\n cmd/bdinfo.c      | 16 +++++++++++++++-\n test/cmd/bdinfo.c | 11 +++++++++++\n 2 files changed, 26 insertions(+), 1 deletion(-)","diff":"diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c\nindex 09fe8067642..f36c6123ca7 100644\n--- a/cmd/bdinfo.c\n+++ b/cmd/bdinfo.c\n@@ -212,5 +212,19 @@ int do_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])\n U_BOOT_CMD(\n \tbdinfo,\t2,\t1,\tdo_bdinfo,\n \t\"print Board Info structure\",\n-\t\"\"\n+// Long help prepended with command's name, and `bdinfo` is a valid command\n+\t\"\\n\"\n+#if CONFIG_IS_ENABLED(GETOPT)\n+\t\"bdinfo -a\\n\"\n+#endif\n+\t\"  - print all Board Info structure\"\n+#if CONFIG_IS_ENABLED(GETOPT)\n+\t\"\\n\"\n+#if IS_ENABLED(CONFIG_NET) || IS_ENABLED(CONFIG_NET_LWIP)\n+\t\"bdinfo -e\\n\"\n+\t\"  - print Board Info related to network\\n\"\n+#endif\n+\t\"bdinfo -m\\n\"\n+\t\"  - print Board Info related to DRAM\"\n+#endif\n );\ndiff --git a/test/cmd/bdinfo.c b/test/cmd/bdinfo.c\nindex 2ba57edc685..5112c399931 100644\n--- a/test/cmd/bdinfo.c\n+++ b/test/cmd/bdinfo.c\n@@ -254,6 +254,17 @@ static int bdinfo_test_help(struct unit_test_state *uts)\n \t\tut_assert_nextline_empty();\n \t\tut_assert_nextlinen(\"Usage:\");\n \t\tut_assert_nextlinen(\"bdinfo\");\n+\t\tif (CONFIG_IS_ENABLED(GETOPT))\n+\t\t\tut_assert_nextlinen(\"bdinfo -a\");\n+\t\tut_assert_nextlinen(\"  - print all Board Info structure\");\n+\t\tif (CONFIG_IS_ENABLED(GETOPT)) {\n+\t\t\tif (IS_ENABLED(CONFIG_NET) || IS_ENABLED(CONFIG_NET_LWIP)) {\n+\t\t\t\tut_assert_nextlinen(\"bdinfo -e\");\n+\t\t\t\tut_assert_nextlinen(\"  - print Board Info related to network\");\n+\t\t\t}\n+\t\t\tut_assert_nextlinen(\"bdinfo -m\");\n+\t\t\tut_assert_nextlinen(\"  - print Board Info related to DRAM\");\n+\t\t}\n \t}\n \tut_assert_console_end();\n \n","prefixes":["v2","1/3"]}