Skip to content

Documentation: add initial nxpkg application page#18875

Draft
aviralgarg05 wants to merge 3 commits into
apache:masterfrom
aviralgarg05:gsoc/nxpkg-doc-pr1
Draft

Documentation: add initial nxpkg application page#18875
aviralgarg05 wants to merge 3 commits into
apache:masterfrom
aviralgarg05:gsoc/nxpkg-doc-pr1

Conversation

@aviralgarg05
Copy link
Copy Markdown
Contributor

@aviralgarg05 aviralgarg05 commented May 13, 2026

Note: Please adhere to Contributing Guidelines.

Summary

Add an initial nxpkg application page under Documentation/applications/system.

This documents the current MVP scope of nxpkg, the on-device /etc + /var
layout used by the current implementation, the configuration knobs, the local
repository generation helper, and the XIAO ESP32S3 runtime validation flow used
for the first app-side slice.

This documentation change is the follow-up requested during review of the
companion nuttx-apps PR:

Impact

  • adds a new Applications page for nxpkg
  • documents the current MVP, storage layout, local repository flow, and validated runtime path
  • no runtime or build behavior changes in nuttx itself

Testing

Host used for documentation checks:

  • OS: macOS 26.5 arm64
  • Python: 3.9

Companion app/runtime target used for the documented validation flow:

  • arch: xtensa
  • board/config: esp32s3-xiao:elf
  • board: Seeed XIAO ESP32S3 Sense

Documentation verification performed:

  • python3 -m docutils.core --strict --halt=warning Documentation/applications/system/nxpkg/index.rst /tmp/nxpkg-doc.html
  • PATH=/Users/aviralgarg/Library/Python/3.9/bin:$PATH make html from Documentation/

Companion runtime flow verified on hardware and documented in the page:

  1. boot to NSH over USB CDC
  2. run nxpkg and confirm usage output
  3. run elf
  4. run source /mnt/elf/romfs/pkgtest.nsh
  5. verify nxpkg install hello
  6. verify nxpkg list

Exact ROMFS-backed validation script used on the board:

mount -t tmpfs /etc
mount -t tmpfs /var
mkdir /etc/nxpkg
cp /mnt/elf/romfs/index.json /etc/nxpkg/index.json
nxpkg install hello
nxpkg list

Relevant observed output from the documented runtime flow:

nsh> source /mnt/elf/romfs/pkgtest.nsh
nxpkg: info: layout prepared
nxpkg: info: loading index from /etc/nxpkg/index.json
nxpkg: info: index read complete (213 bytes)
nxpkg: info: cJSON_Parse returned success
nxpkg: info: parsed manifest hello 1.0.0
nxpkg: info: selected hello version 1.0.0
nxpkg: info: artifact source /mnt/elf/romfs/hello
nxpkg: info: artifact copied to staging
nxpkg: info: sha256 verified
nxpkg: info: payload staged at /var/lib/nxpkg/pkgs/hello/1.0.0/hello
nxpkg: info: manifest written
nxpkg: info: compatibility check passed
nxpkg: info: installed metadata updated
nxpkg: info: installed hello version 1.0.0
hello current=1.0.0 previous=- type=elf arch=xtensa compat=esp32s3-xiao versions=1.0.0

Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>
Comment thread Documentation/applications/system/nxpkg/index.rst
Comment thread Documentation/applications/system/nxpkg/index.rst
Comment thread Documentation/applications/system/nxpkg/index.rst
Comment thread Documentation/applications/system/nxpkg/index.rst
@cederom
Copy link
Copy Markdown
Contributor

cederom commented May 13, 2026

Thank you @aviralgarg05 :-) My comments in the code :-)

Alternatively we may just use top level /usr/local:

  • /usr/local/etc/nxpkg/ to keep all configurations here:
    • nxpkg.conf package manager configuration.
    • pkg_installed.json for installed packages.
    • pkg_repo.json for information about packages on the repo configured in nxpkg.conf.
  • Then /usr/local/nxpkg/ to keep:
    • cache/ to store packages.
    • stage/ for staging.
  • All packages, libraries, configs would use /usr/local prefix (i.e. /usr/local/bin, /usr/local/lib, etc).
  • This would allow keeping everything under /usr/local that may be mounted from external storage, provide kind of BASE and USERLAND spaces separation, also keep nxpkg files more right?

What do you think @acassis ? :-)

@github-actions github-actions Bot added Area: Documentation Improvements or additions to documentation Size: M The size of the change in this PR is medium labels May 13, 2026
Comment thread Documentation/applications/system/nxpkg/index.rst
Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>
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: M The size of the change in this PR is medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants