Skip to content

Documentation/applications/system/nxinit: document the "console" option - #20098

Open
JianyuWang0623 wants to merge 1 commit into
apache:masterfrom
JianyuWang0623:doc-nxinit-console-option
Open

Documentation/applications/system/nxinit: document the "console" option#20098
JianyuWang0623 wants to merge 1 commit into
apache:masterfrom
JianyuWang0623:doc-nxinit-console-option

Conversation

@JianyuWang0623

@JianyuWang0623 JianyuWang0623 commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Documents the per-service console [<device>] option added to nxinit
by the companion apache/nuttx-apps#3776.

Documentation/applications/system/nxinit/index.rst is nxinit's only
existing doc page. This adds console to the option list in "Services
and Options" and a dedicated subsection explaining:

  • what the option does (open the given device, or
    CONFIG_SYSTEM_NXINIT_CONSOLE_DEV if omitted, and dup it onto the
    service's stdin/stdout/stderr before spawning);
  • why a plain shell service needs it while nsh does not (nsh
    already does the equivalent internally via nsh_consolemain());
  • why a USB gadget console (CDC-ACM/PL2303) additionally needs the
    gadget itself brought up first (e.g. via exec -- sercon), since
    the device does not exist until then, unlike a plain UART.

Impact

Documentation only, no code change.

Testing

$ tools/checkpatch.sh -g HEAD
✔️ All checks pass.
$ cd Documentation && make html
...
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded.

The HTML pages are in _build/html.

Confirmed the new section renders correctly in the generated output
(_build/html/applications/system/nxinit/index.html):

$ grep -o "console.\{0,80\}" _build/html/applications/system/nxinit/index.html
console-option">The <code class="docutils literal notranslate"><span class="pre">consol
console (redirect the service's stdio to a console device; see below),
console-option">
console</span></code> Option<a class="headerlink" href="#the-console-option" title="Lin
console [ &lt;device&gt; ]

Document the per-service "console [<device>]" option added to nxinit
by the companion apache/nuttx-apps PR: what it does (open the given
device, or CONFIG_SYSTEM_NXINIT_CONSOLE_DEV if omitted, and dup it onto
the service's stdin/stdout/stderr before spawning), why a plain shell
service needs it (unlike nsh, it never opens a console device on its
own), and why a USB gadget console additionally needs the gadget
brought up first (e.g. via "exec -- sercon"), since the device does not
exist until then.

Assisted-by: Kiro:claude-sonnet-5
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
@github-actions github-actions Bot added Area: Documentation Improvements or additions to documentation Size: S The size of the change in this PR is small labels Sep 9, 2026
@JianyuWang0623
JianyuWang0623 marked this pull request as ready for review September 10, 2026 02:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Documentation Improvements or additions to documentation Size: S The size of the change in this PR is small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants