Repository navigation
Add documentation for NxInit (apps/system/nxinit) - #17215
JianyuWang0623 wants to merge 1 commit into
Conversation
|
The Pull Request Labeler workflow error: is related to this issue on |
|
@JianyuWang0623 This error on MSYS2 is because genromfs is missing! I'll run some tests and then open a PR. |
cederom
left a comment
There was a problem hiding this comment.
Thank you @JianyuWang0623 :-)
- Just as in apache/nuttx-apps#3192 I would advise using "Android System Init" naming convention as there are several different init types out there and the name / variables would be self-explanatory and maybe one day add other init types.
- This PR is about adding documentation but also changes code. Shouldn't code changes go to the PR where code is changed?
c3a8e36 to
b658801
Compare
@cederom Both of these commits are related to the Init process. The code changes can serve as detailed examples for the documentation. If this is not appropriate, I have split them. Could you help review the pull request? #17216 |
|
Big thank you @JianyuWang0623 !! :-) I would like to discuss the naming convention please, I will start thread on the mailing list :-) The change is very useful but naming like "Android System Init" would make it more clear for the users :-) Thank you :-) |
|
|
||
| 1. Actions and Commands | ||
| ----------------------- | ||
| :: |
There was a problem hiding this comment.
Throughout the NuttX documentation the
.. code-block:: console or .. code-block:: bash block is used, rather than literal blocks ::
I suggest using the same approach here for anything "output"/commands related.
There was a problem hiding this comment.
@tinnedkarma what happens when uses :: without the code-block pattern? Will it try to autodetect the type of the block?
There was a problem hiding this comment.
No, not at all. It will do nothing.
The simple :: is part of reStructuredText specs, built in. It just creates a block of text.
The ..code-block:: [language] is a Sphinx directive. This directive adds syntax highlighting based on language specified
There was a problem hiding this comment.
@tinnedkarma Useful syntax. I've specified the diff format for the defconfig in the Example. Thank you.
There was a problem hiding this comment.
@JianyuWang0623 your Documentation is very good! Kudos.
As @cederom suggested the naming "System Init" could confuse some users. Because now there are many ways to initialize the system or an application on NuttX:
- The INIT_ENTRYPOINT is in some way a system init (if the "system" of the user is just his application)
- NSH Init Script is also a way to initialize the system
- Android System Init.
So I suggest you starting the Documentation explaining about these differences before explaining about this new system init. This way the user will get a better understanding of the options and when and why they will select the Android System Init option.
Also please include some information about the footprint and limitation of each usage case.
cederom
left a comment
There was a problem hiding this comment.
Just a feedback after dev@ mailing list discussion, thank you for understanding / considering @JianyuWang0623 :
- We clearly need to use "Android System Init" naming here and update all kconfig/global variables names to clearly distinguish from current NuttX Init, Android System Init, and SystemV Init (there is sill a change it will show up here one day), maybe others. "system_system" or "system_init" or "init_main" is really confusing and not self-explanatory, does not even point to "android_system_init". I know this is a bit longer but will provide important context and clear separation between completely different functionalities / implementations.
- We need better documentation for this "Android System Init" as well as "Fastboot". These functionalities are welcome, people want to use it, but users / developers ask questions like: Why do we need another init system? What should happen with the previous ones? What does this new init system solve? How this relates to Fastboot? When, why, and how can I use it? What are best use cases with some examples? Please consider approach like explaining and convincing someone who wants to use it but has zero knowledge about the solution.
b658801 to
1305c54
Compare
| sleep 1 /* Block for 1 second */ | ||
| exec_start mkdir_tmp /* Start the "mkdir_tmp" service and wait for exit */ | ||
|
|
||
| on property:ro.boot.resetcause=cpu_soft_reset(bootloader) /* Trigger after rebooting to bootloader */ |
There was a problem hiding this comment.
I cant find in the code where properties are supported. maybe it's my fault, or it's not there yet?
There was a problem hiding this comment.
@7rx8 Sorry, this part is still in the internal repository and hasn’t been upstreamed yet. For now, let’s treat it as a feature preview. Alternatively, if it’s causing confusion, I can remove this part first.
There was a problem hiding this comment.
OK, that means you have more pull requests with property support coming :)
Did you make sure to keep this optional? Because the system is already useful without properties.
My suggestion regarding this is: update the doc so it matches the current code pull request, then update the doc later so it matches the future functions. I understand this is more work for you, so you're free to refuse.
OR: just add a note that this is not implemented yet.
Looking forward to see this integrated in nuttx, good job, thank you.
There was a problem hiding this comment.
@7rx8 Yes, there will be a new pull request to support properties. It will be independent and optional, and may be more suitable/needed in certain scenarios that require action triggering.
Regarding the documentation, I fully agree with your point of view. I have already removed the descriptions of features that haven't been submitted yet, as this might cause confusion for users. Thank you.
There was a problem hiding this comment.
I have seen the new doc, it is probably enough for now. We should update it when users ask questions about topics that were not documented yet.
Add documentation for the Init component, including syntax explanations and simple examples. Signed-off-by: wangjianyu3 <[email protected]>
1305c54 to
a2c876e
Compare
|
Hello I do not agree with this closure. This is a great addition to nuttx that was worked on for a long time and is almost ready. Why are you closing this? @JianyuWang0623 has worked a lot of time to reply to community requests there is no point in closing this. |
Summary
This PR adds documentation for the Init component and updates the configuration for qemu-armv8a:fastboot.
Depends-on: apache/nuttx-apps#3192
Impact
Testing