Skip to content

apps/nxinit: Make init.rc file path configurable#3506

Merged
acassis merged 4 commits into
apache:masterfrom
linguini1:nxinit-path-conf
May 28, 2026
Merged

apps/nxinit: Make init.rc file path configurable#3506
acassis merged 4 commits into
apache:masterfrom
linguini1:nxinit-path-conf

Conversation

@linguini1
Copy link
Copy Markdown
Contributor

@linguini1 linguini1 commented May 27, 2026

Summary

The init.rc file path is now configurable to allow users to choose where to put the startup script. This is useful for devices that mount external media to a special directory like /sd.

Also fixed some compilation errors not caught earlier.

Documentation update here: apache/nuttx#18981

Impact

Better user experience with NXInit.

Testing

N/A.

Fix typo in help string.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
linguini1 added 3 commits May 27, 2026 19:53
Would not compile due to typo in macro describing service name length.

Change ensures that:
* We do not malloc an extra `len` bytes since this is already allocated
  as part of the struct
* The name string always has a null terminating byte

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>

FIx
The init.rc file path is now configurable to allow users to choose where
to put the startup script. This is useful for devices that mount
external media to a special directory like `/sd`.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
Without debug enabled, the code would not compile due to checking
`WIFEXITED(wstatus)` when `wstatus` was uninitialized.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
Copy link
Copy Markdown
Contributor

@cederom cederom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @linguini1 :-)

@acassis acassis merged commit 418cf21 into apache:master May 28, 2026
41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants