This is an automated email from the ASF dual-hosted git repository. acassis pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
commit 2b5899c7d4b277c1977e6e14d8c0ef8a9921782e Author: Matteo Golin <[email protected]> AuthorDate: Wed May 27 19:32:57 2026 -0400 apps/nxinit: Make init.rc file path configurable 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 <[email protected]> --- system/nxinit/Kconfig | 6 ++++++ system/nxinit/init.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/system/nxinit/Kconfig b/system/nxinit/Kconfig index fc2670312..e159e90b7 100644 --- a/system/nxinit/Kconfig +++ b/system/nxinit/Kconfig @@ -31,6 +31,12 @@ config SYSTEM_NXINIT_PROGNAME comment "NXInit Run Control(RC)" +config SYSTEM_NXINIT_RC_FILE_PATH + string "Path to RC file" + default "/etc/init.d/init.rc" + ---help--- + Path to the init.rc file to use for NXInit's boot logic. + config SYSTEM_NXINIT_RC_LINE_MAX int "Max line length of RC file" default 128 diff --git a/system/nxinit/init.c b/system/nxinit/init.c index 8a88c63d9..d501abcad 100644 --- a/system/nxinit/init.c +++ b/system/nxinit/init.c @@ -180,7 +180,7 @@ int main(int argc, FAR char *argv[]) } } - r = init_parse_config_file(parser, "/etc/init.d/init.rc"); + r = init_parse_config_file(parser, CONFIG_SYSTEM_NXINIT_RC_FILE_PATH); if (r < 0) { goto out;
