JianyuWang0623 commented on PR #3192:
URL: https://github.com/apache/nuttx-apps/pull/3192#issuecomment-3424689388

   > Just a feedback after dev@ mailing list discussion, thank you for 
understanding / considering @JianyuWang0623 :
   > 
   > 1. 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.
   > 2. 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.
   
   @cederom 
   > Why do we need another init system? What should happen with the previous 
ones? What does this new init system solve? 
   
   As I supplemented in the data for the PR 
https://github.com/apache/nuttx/pull/17216 , NSH, when used as an 
initialization program, may seem relatively bloated in scenarios where code 
size is a major concern. NSH and Init can coexist, allowing users to choose 
based on their own needs. Init addresses issues such as the excessive code size 
of NSH when used as an initialization program, and its lack of management 
(e.g., restarting) for daemons.
   | Config Changes                     | ELF Size(bytes)  |
   |:-----------------------------------|----------:|
   | defconfig                          | 7,008,056 |
   | `+ETC_ROMFS`                       | 7,066,048 |
   | `+INIT`                            | 7,127,536 |
   | `-TELENT`                          | 7,127,024 |
   | `-NSH_LIBRARY` <br>`-SYSTEM_NSH`   | 6,509,392 |
   
   For the ELF file, Init requires 61,488 bytes, while NSH and NSH_LIBRARY 
together require 617,632 bytes. Switching from NSH to Init can save a 
significant amount of space(556,144 bytes).
   
   > How this relates to Fastboot? 
   
   Init and Fastboot have nothing to do with each other; it's just that a 
daemon is needed as an example of a service.
   
   > When, why, and how can I use it? 
   
   Here are some simple examples: When code size is a major concern and no 
shell is needed, replacing NSH with Init can save a significant amount of 
space; management functions such as restarting are required when a daemon fails 
to start or exits abnormally; and so on. 
   
   > What are best use cases with some examples?
   
   An example has already been added to 
https://github.com/apache/nuttx/pull/17215.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to