This is an automated email from the ASF dual-hosted git repository.
xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new f40e948594b Documentation/nxinit: document property triggers and fix
CONFIG names
f40e948594b is described below
commit f40e948594bee9a3a050aa946ed2aa9a84c742dc
Author: wangjianyu3 <[email protected]>
AuthorDate: Mon Aug 17 12:33:19 2026 +0800
Documentation/nxinit: document property triggers and fix CONFIG names
The Triggers section previously stated that action (property) triggers
were not yet implemented; they are supported now, so describe the
fnmatch value matching and the edge-triggered semantics of on <event>.
The Examples section used the stale CONFIG_SYSTEM_INIT_* prefix and now
uses CONFIG_SYSTEM_NXINIT_* together with a property trigger example.
This documents the behavior added in
https://github.com/apache/nuttx-apps/pull/3726.
Assisted-by: GitHubCopilot:claude-opus-4.8
Signed-off-by: wangjianyu3 <[email protected]>
---
Documentation/applications/system/nxinit/index.rst | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
diff --git a/Documentation/applications/system/nxinit/index.rst
b/Documentation/applications/system/nxinit/index.rst
index b99ff224917..37861f1daac 100644
--- a/Documentation/applications/system/nxinit/index.rst
+++ b/Documentation/applications/system/nxinit/index.rst
@@ -67,9 +67,14 @@ triggers (also known as property triggers, e.g.,
property:a=b). Actions can
include multiple action triggers but only one event trigger. Triggers can be
combined with && to represent "AND" conditions.
-.. note:: Currently, only event triggers are supported.
+The value of a property trigger is matched with ``fnmatch``, so glob
+patterns are accepted. Use ``!=`` to trigger when the value does not match,
+e.g. ``property:a!=b``. An ``on <event>`` action fires only on the edge when
+its condition becomes satisfied, not on every subsequent property update.
-.. todo:: Implement action triggers.
+Property (action) trigger support requires the ``init_property_*()`` backend
+to be provided; ``property_simple.c`` offers a minimal implementation that
+forwards ``setprop`` to the action manager.
1. Event Trigger Execution Order
--------------------------------
@@ -111,10 +116,10 @@ defconfig:
.. code-block:: diff
+CONFIG_INIT_ENTRYPOINT="init_main"
- +CONFIG_SYSTEM_INIT=y
- +CONFIG_SYSTEM_INIT_DEBUG=y
- +CONFIG_SYSTEM_INIT_INFO=y
- +CONFIG_SYSTEM_INIT_WARN=y
+ +CONFIG_SYSTEM_NXINIT=y
+ +CONFIG_SYSTEM_NXINIT_DEBUG=y
+ +CONFIG_SYSTEM_NXINIT_INFO=y
+ +CONFIG_SYSTEM_NXINIT_WARN=y
init.rc:
@@ -124,6 +129,9 @@ init.rc:
start console /* Start the service named "console" */
sleep 1 /* Block for 1 second */
exec_start mkdir_tmp /* Start the "mkdir_tmp" service and wait for
exit */
+
+ on boot && property:sys.boot.reason=bootloader
+ echo "On boot, the reason is BL."
start fastboot
service console sh