From 85af043d65160303d050ea43f34208596ebf4b09 Mon Sep 17 00:00:00 2001 From: Junbo Zheng Date: Mon, 27 Jul 2026 13:29:30 +0800 Subject: [PATCH] Documentation: add nsh boot command reference Add boot commands.rst section describing its syntax and behavior, including relative image path resolution against the NSH current working directory, and boot command config.rst dependency-table entry mapping CONFIG_BOARDCTL_BOOT_IMAGE and CONFIG_NSH_DISABLE_BOOT. Signed-off-by: Junbo Zheng --- Documentation/applications/nsh/commands.rst | 17 +++++++++++++++++ Documentation/applications/nsh/config.rst | 1 + 2 files changed, 18 insertions(+) diff --git a/Documentation/applications/nsh/commands.rst b/Documentation/applications/nsh/commands.rst index 8e4c933db07..f1d80040457 100644 --- a/Documentation/applications/nsh/commands.rst +++ b/Documentation/applications/nsh/commands.rst @@ -143,6 +143,23 @@ default gateway. removing the preceding path segments and (optionally) removing any trailing ````. +.. _cmdboot: + +``boot`` Boot an Application Image +================================== + +**Command Syntax**:: + + boot [ [
]] + +**Synopsis**. Boot a new application firmware image by invoking +``boardctl(BOARDIOC_BOOT_IMAGE)``. The ```` may be +absolute or relative; relative paths are resolved against the NSH +current working directory, consistent with ``cp``, ``cat``, and +``rm``. This command depends on ``CONFIG_BOARDCTL_BOOT_IMAGE``; if +the boot image cannot be started, ``boardctl()`` returns and an +error is reported. + .. _cmdbreak: ``break`` Terminate a Loop diff --git a/Documentation/applications/nsh/config.rst b/Documentation/applications/nsh/config.rst index ce61947209a..d40227f35af 100644 --- a/Documentation/applications/nsh/config.rst +++ b/Documentation/applications/nsh/config.rst @@ -35,6 +35,7 @@ Command Depends on Configuration Can Be Disabl :ref:`cmdbase64enc` ``CONFIG_NETUTILS_CODECS`` && ``CONFIG_NSH_DISABLE_BASE64ENC`` ``CONFIG_CODECS_BASE64`` :ref:`cmdbasename` . ``CONFIG_NSH_DISABLE_BASENAME`` +:ref:`cmdboot` ``CONFIG_BOARDCTL_BOOT_IMAGE`` ``CONFIG_NSH_DISABLE_BOOT`` :ref:`cmdbreak` ! ``CONFIG_NSH_DISABLESCRIPT`` && . ! ``CONFIG_NSH_DISABLE_LOOPS``   :ref:`cmdcat` ``CONFIG_NSH_DISABLE_CAT`` .