You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nuttx.apache.org by 王健宇 <wa...@xiaomi.com.INVALID> on 2025/10/22 05:07:17 UTC

答复: [External Mail]Re: NuttX and Android System Init

Dear All,
Thank you, and hello everyone. Please allow me to add some (potentially redundant) information as follows:

  1.
Reasons for adding this module: As Tomek helped supplement earlier, the main considerations include code size (the shell module is not always required) and daemon management (such as status monitoring and restarting of services).
  2.
Reasons for naming it "init": From a functional perspective, this module is used for system initialization. Referring to Linux distributions and Android, modules with similar functions are generally named "systemd" or "init".
  3.
Regarding NuttX’s support for multiple init entry points: I conducted a simple filter using the command find boards/ -name defconfig | xargs grep INIT_ENTRYPOINT | cut -d ':' -f 2- | sort -u, and it turns out this is indeed the case. However, not all of their logic is used for system initialization. For example, CONFIG_INIT_ENTRYPOINT="hello_main" and CONFIG_INIT_ENTRYPOINT="ostest_main". The well-known and excellent NSH supports almost all system initialization functions; unfortunately, it lacks daemon management. Moreover, in scenarios where code size is a critical concern, NSH may be somewhat bulky. Therefore, we might need a dedicated module for system initialization.
  4.
About the module’s implementation: This module is a new implementation and not a port of Android Init. During the development process, I studied the source code of the excellent Android Init, but this module is more streamlined and compatible with most syntax of the Android Init Language.

Personally, from a functional perspective, I tend to use apps/system/init and CONFIG_SYSTEM_INIT. However, if you have more comprehensive considerations, options like apps/android/init and CONFIG_ANDROID_INIT are also acceptable to me.


Best regards,

Jianyu Wang

________________________________
发件人: Tomek CEDRO <to...@cedro.info>
发送时间: 2025年10月22日 11:37:31
收件人: dev@nuttx.apache.org
主题: [External Mail]Re: NuttX and Android System Init

[外部邮件] 此邮件来源于小米公司外部,请谨慎处理。若对邮件安全性存疑,请将邮件转发给misec@xiaomi.com进行反馈

Okay Jianyu Wang, author of the Android System Init in NuttX code,
joined the dev@ mailing list, welcome, below is the discussion history
as read from the bottom up direction :-)
Tomek

On Tue, Oct 21, 2025 at 11:18 PM Tomek CEDRO <to...@cedro.info> wrote:
>
> Okay I have provided feedback from the dev@ list to the gh prs and
> here comes the reply ;-)
>
> The main advantages of this Android System Init on NuttX:
> * it is custom trimmed down code implementing android system init
> compatible functionality.
> * it can run as standalone app that replaces nsh.
> * it provides ~10x smaller footprint over nsh.
>
> I invited Wang to join discussion here on the mailing list :-)
>
> There may be use cases for this. My proposition is to move all Android
> related stuff to apps/android that is apps/android/system/init and
> apps/android/fastboot. Also to rename kconfig variables so instead
> CONFIG_SYSTEM_SYSTEM it will be CONFIG_ANDROID_SYSTEM or similar? What
> do you think folks? :-)
>
> Thanks :-)
> Tomek
>
>
>
>
>
>
>
>
> On Tue, Oct 21, 2025 at 8:29 AM Luchian Mihai <lu...@gmail.com> wrote:
> >
> > Hi Tomek,
> >
> > I am already more present in the project overall.
> > I usually leave comments rather than start reviews (regarding PRs).
> >
> > There are already comments on Pull Request for the documentation.
> > This subject that I've raised was more suited for the mailing list. It
> > reaches more of the community overall.
> >
> > More input than mine is needed if we want a resolution.
> >
> > Cheers,
> > Mihai
> >
> > On Tue, 21 Oct 2025 at 02:17, Tomek CEDRO <to...@cedro.info> wrote:
> >
> > > Yeah, it is good to have a choice, maybe someone will find this
> > > solution useful and better fit for some applications, but.. we can
> > > already see some confusion with all different system / init solutions,
> > > so we should clearly distinguish the naming and functional separation
> > > (system system init does not say anything at all), and better
> > > documentation right from start (like Alan already requested and
> > > Luchian noted).
> > >
> > > Luchian noticed a common but important problem - one person who create
> > > some solution does not create good (or any) documentation right from
> > > start and then anyone who touches the solution needs to reinvent the
> > > wheel, what is tremendous waste of time and resources. I am sometimes
> > > dropped into such rabbit hole in various projects and it takes weeks
> > > or months to understand what is going on :D Good point! Luchian could
> > > you please provide feedback on the Pull Requests too?
> > >
> > > Thanks! :-)
> > > Tomek
> > >
> > >
> > > On Tue, Oct 21, 2025 at 1:00 AM Alan C. Assis <ac...@gmail.com> wrote:
> > > >
> > > > Hi Luchian,
> > > > that is what I suggested in the Documentation: before saying what Android
> > > > System Init is, the documentation needs to explain what it is solving on
> > > > NuttX.
> > > >
> > > > More important than that: starts explaining the existing solutions and
> > > when
> > > > to use them.
> > > >
> > > > As Xiang commented in the PR, their initial plan was to implement
> > > SystemV,
> > > > but it was more complex (and probably bigger).
> > > >
> > > > So Android System Init could be more beneficial for someone implemented
> > > > deep embedded system with NuttX.
> > > >
> > > > But I didn't give up trying to get the SystemV Init implementation from
> > > > Google, maybe someone there could help us.
> > > >
> > > > BR,
> > > >
> > > > Alan
> > > >
> > > > On Monday, October 20, 2025, Luchian Mihai <lu...@gmail.com>
> > > wrote:
> > > >
> > > > > Hello all,
> > > > >
> > > > > This might stir the waters a bit, but I think it needs to be said.
> > > > >
> > > > > I know Alan already pointed out the need for docs in the PR comments,
> > > but
> > > > > just the documentation is not enough.
> > > > >
> > > > > I think we (the community) or the PMC should be more assertive
> > > regarding
> > > > > these kinds of features.
> > > > > Why do we need another init system? What does this new init system
> > > solve?
> > > > > What should happen with the previous ones?
> > > > > Do not get me wrong, I am not against this new init system, I am in
> > > favour.
> > > > >
> > > > > While NuttX excels in posix compliance as a single standard, a lot of
> > > other
> > > > > things lack unity.
> > > > > Lacking a "default" way of doing things ends up in "hidden features",
> > > or
> > > > > rather, features
> > > > > that are used and known by a set of people.
> > > > >
> > > > > There is also support for fastboot and adb, so the android init system
> > > > > makes sense,
> > > > > but I see nothing that explains why they are present in the first
> > > place.
> > > > > Did they solve something, some time ago? Is the NuttX project aligning
> > > with
> > > > > the android tooling?
> > > > >
> > > > > I would like to point out my experience as a new contributor. It took
> > > me a
> > > > > few months to get the hang of how the thing should be done,
> > > > > or at least what the majority agrees. There are board examples that
> > > differ,
> > > > > but neither are wrong also.
> > > > > The system initialization is the same, I've read documentation about
> > > `exec`
> > > > > and `posix_spawn` and `task_create`,
> > > > > and I am writing docs about the flat, protected, kernel build. Yet, I
> > > still
> > > > > did not find the "NuttX way to leave" the kernel.
> > > > > And here we have another init system.
> > > > >
> > > > > For me this just feels more of a feature creep than a milestone, sorry.
> > > > >
> > > > > It's hard to market (from my own experience) NuttX as anything other
> > > than
> > > > > "high quality code" if it takes days to
> > > > > figure out the solution (out of the existing few) for a specific
> > > problem.
> > > > >
> > > > > I suggest defining the expectations about this PR, and make a separate
> > > > > documentation page.
> > > > > Is something that NuttX wants to adopt going forward, that is great.
> > > > > Will it help only part of the community, that is also great.
> > > > > The only thing I ask is to make that as obvious as possible, it's
> > > tiring to
> > > > > "unravel the NuttX lore" from the mailing list.
> > > > >
> > > > > Cheers,
> > > > > Mihai
> > > > >
> > > > > On Mon, 20 Oct 2025 at 19:09, Tomek CEDRO <to...@cedro.info> wrote:
> > > > >
> > > > > > well. :-(
> > > > > >
> > > > > > On Mon, Oct 20, 2025 at 3:02 PM Alan C. Assis <ac...@gmail.com>
> > > wrote:
> > > > > > >
> > > > > > > +1
> > > > > > >
> > > > > > > It is better to use the right naming.
> > > > > > >
> > > > > > > Fitbit implemented support for System V on NuttX and promised to
> > > donate
> > > > > > it,
> > > > > > > but after Google acquired them, none contribution came from them.
> > > > > > >
> > > > > > > Google also used NuttX on ARA Project, but no single code line was
> > > > > > > submitted to the NuttX mainline.
> > > > > > >
> > > > > > > BR,
> > > > > > >
> > > > > > > Alan
> > > > > > >
> > > > > > > On Mon, Oct 20, 2025 at 8:07 AM Tomek CEDRO <to...@cedro.info>
> > > wrote:
> > > > > > >
> > > > > > > > Hello world :-)
> > > > > > > >
> > > > > > > > There is a very interesting and useful PR by @JianyuWang0623 that
> > > > > adds
> > > > > > > > support for Android System Init functionality to NuttX [1][2]
> > > with
> > > > > > > > working example on qemu [3]. This is alternative to SystemV Init
> > > and
> > > > > > > > probably other init designs. Please help in reviewing the change
> > > :-)
> > > > > > > >
> > > > > > > > My only concern is naming convention here because just "system"
> > > and
> > > > > > > > "system init" is used (i.e. CONFIG_SYSTEM_INIT,
> > > > > CONFIG_SYSTEM_SYSTEM).
> > > > > > > > This may be a bit confusing because we do not know what init
> > > system
> > > > > > > > standard is used and we silently assume Android. My proposition
> > > is to
> > > > > > > > use "Android System Init" naming convention (i.e.
> > > > > > > > CONFIG_SYSTEM_ANDROID_INIT or something like that), so things are
> > > > > > > > self-explanatory, and other init systems may be used when
> > > necessary
> > > > > in
> > > > > > > > future without confusion. I am not insisting here and will
> > > follow the
> > > > > > > > community choice.
> > > > > > > >
> > > > > > > > Please let us know what you think :-)
> > > > > > > >
> > > > > > > > Thanks :-)
> > > > > > > > Tomek
> > > > > > > >
> > > > > > > > [1] https://github.com/apache/nuttx-apps/pull/3192
> > > > > > > > [2] https://github.com/apache/nuttx/pull/17215
> > > > > > > > [3] https://github.com/apache/nuttx/pull/17215
> > > > > > > >
> > > > > > > > --
> > > > > > > > CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
> > > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
> > > > > >
> > > > >
> > >
> > >
> > >
> > > --
> > > CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
> > >
>
>
>
> --
> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info



--
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
#/******本邮件及其附件含有小米公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件! This e-mail and its attachments contain confidential information from XIAOMI, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it!******/#

Re: 答复: [External Mail]Re: NuttX and Android System Init

Posted by Tomek CEDRO <to...@cedro.info>.
Yeah I am okay with this new updated name apps/system/nxinit in place
of too generic apps/system/init :-)

It would be good to vote but as there are no other ideas / comments /
objections we can proceed with the change as NXINIT. If there are this
is the last chance to talk :-)

Thanks :-)
Tomek



On Mon, Oct 27, 2025 at 10:52 AM Alin.Jerpelea@sony.com
<Al...@sony.com> wrote:
>
> Hi Tomek,
>
> +1 NXInit -> apps/system/nxinit -> nxinit.
>
> I think that we should avoid using external names (that inspired the init) to avoid confusion and functionality demands from our init systems (compared with the ones that inspired them).
>
> Best regards
> Alin
>
> ________________________________
> Från: Tomek CEDRO <to...@cedro.info>
> Skickat: den 27 oktober 2025 10:38
> Till: dev@nuttx.apache.org <de...@nuttx.apache.org>
> Ämne: Re: 答复: [External Mail]Re: NuttX and Android System Init
>
> Okay so looks like there are two name propositions for this new application: 1. Android System Init -> apps/android/init -> android_init (or just ainit). 2. NXInit -> apps/system/nxinit -> nxinit. If the discussion with ideas is
>
>
> Okay so looks like there are two name propositions for this new application:
> 1. Android System Init -> apps/android/init -> android_init (or just ainit).
> 2. NXInit -> apps/system/nxinit -> nxinit.
>
> If the discussion with ideas is concluded lets just VOTE on the
> mailing list so the community decides what name is best and merge the
> code named as decided by the community :-) For me both approaches are
> okay :-)
>
> In order to stay compliant with
> https://urldefense.com/v3/__https://www.apache.org/foundation/voting__;!!O7_YSHcmd9jp3hj_4dEAcyQ!0JCOIC16hQ3HxoIk9pIqT4artidleKvzBPykPap3tsQBhnbyyJXu9pAqD0266vl1Jdybh5WBFAZv5a-zoA$ vote should be in dedicated
> thread marked [VOTE] prefix it should take 72h and we can receive
> votes for both options, +1 0 -1 replies are possible, the one that
> gets most count wins, -1 from PMC vetoes a choice unless vote update.
>
> Jianyu Wang could you please start the voting thread and then make
> summary after 72h?
>
> Thanks :-)
> Tomek
>
>
>
> On Fri, Oct 24, 2025 at 10:24 AM Sebastien Lorquet <se...@lorquet.fr> wrote:
> >
> > Hello,
> >
> > I agree. nxinit or similar is fine for me.
> >
> > Sebastien
> >
> > On 10/24/25 10:08, Michal Lenc wrote:
> > > Hello everyone,
> > >
> > >> With reference to Jehudi’s suggestion, I propose naming this new
> > >> component "NuttX Init" (abbreviated as "NxInit", with the path:
> > >> apps/system/nxinit). This naming follows the style of existing
> > >> components, such as nxplayer and nxcamera.
> > >
> > > jumping a bit late to the discussion, but I agree with NuttX Init or
> > > nxinit naming for the system. The Android Init Language adoption for
> > > the init system can be mentioned in the documentation, but Android in
> > > the name could lead to some unnecessary confusion.
> > >
> > > Best regards,
> > > Michal Lenc
>
>
>
> --
> CeDeROM, SQ7MHZ, https://urldefense.com/v3/__http://www.tomek.cedro.info__;!!O7_YSHcmd9jp3hj_4dEAcyQ!0JCOIC16hQ3HxoIk9pIqT4artidleKvzBPykPap3tsQBhnbyyJXu9pAqD0266vl1Jdybh5WBFAZ67IDOFA$
>


-- 
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info

Sv: 答复: [External Mail]Re: NuttX and Android System Init

Posted by "Alin.Jerpelea@sony.com" <Al...@sony.com>.
Hi Tomek,

+1 NXInit -> apps/system/nxinit -> nxinit.

I think that we should avoid using external names (that inspired the init) to avoid confusion and functionality demands from our init systems (compared with the ones that inspired them).

Best regards
Alin

________________________________
Från: Tomek CEDRO <to...@cedro.info>
Skickat: den 27 oktober 2025 10:38
Till: dev@nuttx.apache.org <de...@nuttx.apache.org>
Ämne: Re: 答复: [External Mail]Re: NuttX and Android System Init

Okay so looks like there are two name propositions for this new application: 1. Android System Init -> apps/android/init -> android_init (or just ainit). 2. NXInit -> apps/system/nxinit -> nxinit. If the discussion with ideas is


Okay so looks like there are two name propositions for this new application:
1. Android System Init -> apps/android/init -> android_init (or just ainit).
2. NXInit -> apps/system/nxinit -> nxinit.

If the discussion with ideas is concluded lets just VOTE on the
mailing list so the community decides what name is best and merge the
code named as decided by the community :-) For me both approaches are
okay :-)

In order to stay compliant with
https://urldefense.com/v3/__https://www.apache.org/foundation/voting__;!!O7_YSHcmd9jp3hj_4dEAcyQ!0JCOIC16hQ3HxoIk9pIqT4artidleKvzBPykPap3tsQBhnbyyJXu9pAqD0266vl1Jdybh5WBFAZv5a-zoA$ vote should be in dedicated
thread marked [VOTE] prefix it should take 72h and we can receive
votes for both options, +1 0 -1 replies are possible, the one that
gets most count wins, -1 from PMC vetoes a choice unless vote update.

Jianyu Wang could you please start the voting thread and then make
summary after 72h?

Thanks :-)
Tomek



On Fri, Oct 24, 2025 at 10:24 AM Sebastien Lorquet <se...@lorquet.fr> wrote:
>
> Hello,
>
> I agree. nxinit or similar is fine for me.
>
> Sebastien
>
> On 10/24/25 10:08, Michal Lenc wrote:
> > Hello everyone,
> >
> >> With reference to Jehudi’s suggestion, I propose naming this new
> >> component "NuttX Init" (abbreviated as "NxInit", with the path:
> >> apps/system/nxinit). This naming follows the style of existing
> >> components, such as nxplayer and nxcamera.
> >
> > jumping a bit late to the discussion, but I agree with NuttX Init or
> > nxinit naming for the system. The Android Init Language adoption for
> > the init system can be mentioned in the documentation, but Android in
> > the name could lead to some unnecessary confusion.
> >
> > Best regards,
> > Michal Lenc



--
CeDeROM, SQ7MHZ, https://urldefense.com/v3/__http://www.tomek.cedro.info__;!!O7_YSHcmd9jp3hj_4dEAcyQ!0JCOIC16hQ3HxoIk9pIqT4artidleKvzBPykPap3tsQBhnbyyJXu9pAqD0266vl1Jdybh5WBFAZ67IDOFA$


Re: 答复: [External Mail]Re: NuttX and Android System Init

Posted by Tomek CEDRO <to...@cedro.info>.
Okay so looks like there are two name propositions for this new application:
1. Android System Init -> apps/android/init -> android_init (or just ainit).
2. NXInit -> apps/system/nxinit -> nxinit.

If the discussion with ideas is concluded lets just VOTE on the
mailing list so the community decides what name is best and merge the
code named as decided by the community :-) For me both approaches are
okay :-)

In order to stay compliant with
https://www.apache.org/foundation/voting vote should be in dedicated
thread marked [VOTE] prefix it should take 72h and we can receive
votes for both options, +1 0 -1 replies are possible, the one that
gets most count wins, -1 from PMC vetoes a choice unless vote update.

Jianyu Wang could you please start the voting thread and then make
summary after 72h?

Thanks :-)
Tomek



On Fri, Oct 24, 2025 at 10:24 AM Sebastien Lorquet <se...@lorquet.fr> wrote:
>
> Hello,
>
> I agree. nxinit or similar is fine for me.
>
> Sebastien
>
> On 10/24/25 10:08, Michal Lenc wrote:
> > Hello everyone,
> >
> >> With reference to Jehudi’s suggestion, I propose naming this new
> >> component "NuttX Init" (abbreviated as "NxInit", with the path:
> >> apps/system/nxinit). This naming follows the style of existing
> >> components, such as nxplayer and nxcamera.
> >
> > jumping a bit late to the discussion, but I agree with NuttX Init or
> > nxinit naming for the system. The Android Init Language adoption for
> > the init system can be mentioned in the documentation, but Android in
> > the name could lead to some unnecessary confusion.
> >
> > Best regards,
> > Michal Lenc



-- 
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info

Re: 答复: [External Mail]Re: NuttX and Android System Init

Posted by Sebastien Lorquet <se...@lorquet.fr>.
Hello,

I agree. nxinit or similar is fine for me.

Sebastien

On 10/24/25 10:08, Michal Lenc wrote:
> Hello everyone,
>
>> With reference to Jehudi’s suggestion, I propose naming this new
>> component "NuttX Init" (abbreviated as "NxInit", with the path:
>> apps/system/nxinit). This naming follows the style of existing
>> components, such as nxplayer and nxcamera.
>
> jumping a bit late to the discussion, but I agree with NuttX Init or 
> nxinit naming for the system. The Android Init Language adoption for 
> the init system can be mentioned in the documentation, but Android in 
> the name could lead to some unnecessary confusion.
>
> Best regards,
> Michal Lenc

Re: 答复: [External Mail]Re: NuttX and Android System Init

Posted by Michal Lenc <mi...@seznam.cz>.
Hello everyone,

> With reference to Jehudi’s suggestion, I propose naming this new
> component "NuttX Init" (abbreviated as "NxInit", with the path:
> apps/system/nxinit). This naming follows the style of existing
> components, such as nxplayer and nxcamera.

jumping a bit late to the discussion, but I agree with NuttX Init or 
nxinit naming for the system. The Android Init Language adoption for the 
init system can be mentioned in the documentation, but Android in the 
name could lead to some unnecessary confusion.

Best regards,
Michal Lenc

Re: 答复: [External Mail]Re: NuttX and Android System Init

Posted by 王健宇 <wa...@xiaomi.com.INVALID>.
Dear All,

Thank you for your suggestions and ideas. Many of you have pointed out
that the name "init" may be too broad or lead to confusion, and I
believe this concern deserves our attention.

With reference to Jehudi’s suggestion, I propose naming this new
component "NuttX Init" (abbreviated as "NxInit", with the path:
apps/system/nxinit). This naming follows the style of existing
components, such as nxplayer and nxcamera.

Regarding names like "Android Init" or similar variations, it is
important to clarify that this component is specifically developed
for NuttX and intended for system initialization. While we have
adopted the Android Init Language among various syntax options,
this is a brand-new implementation—it is not a port or variant of
Android Init.

I agree that enhancing the recognizability of this component’s name
is necessary, but I suggest incorporating "NuttX" rather than
"Android" into the name to accurately reflect its affiliation and
nature.

Thank you again for your valuable input.
Jianyu Wang

________________________________
发件人: 王健宇
发送时间: 2025年10月24日 12:15
收件人: dev@nuttx.apache.org
主题: Re: 答复: [External Mail]Re: NuttX and Android System Init


Hi,

Sorry for the delayed response. You’re right that finding example code in the boards directory isn’t always easy. I plan to update the patch soon and will try to make the documentation more understandable through this update.
Thank you for your valuable feedback.

Best regards,
Jianyu Wang

________________________________
发件人: Sebastien Lorquet <se...@lorquet.fr>
发送时间: 2025年10月23日 18:53
收件人: dev@nuttx.apache.org
主题: Re: 答复: [External Mail]Re: NuttX and Android System Init

[外部邮件] 此邮件来源于小米公司外部,请谨慎处理。若对邮件安全性存疑,请将邮件转发给misec@xiaomi.com进行反馈

Hello again

Documentation is always a good start, it could have more examples and
current status about actually supported features, and differences with
the android documentation pointed elsewhere.

It is not always fun to dig useful example code in the boards dir,
beginners will hate it and may not even think about that.

Sebastien


On 10/23/25 12:37, Sebastien Lorquet wrote:
> Hello
>
> I reviewed your code and I find it very cool.
>
> You did a great job on implementing some quite compact and efficient
> code.
>
> I like that you did not try to implement properties that look like the
> most complex and probably less usefull stuff of this whole thing. If
> you do want to implement properties, please make sure that this part
> is entirely optional and the code still can be built without it.
>
> However, this init thing is rather specific for complex systems with
> several services. It must absolutely be kept optional and not forced
> on small systems.
>
>
> Documentation of this program is absolutely a requirement to make it
> shine to its proper value, I think it is so useful and a nice addition
> to NuttX that it must be improved as much as possible so people can
> use it easily without struggles.
>
> I actually see myself trying to use this in one of our products. It
> solves many use cases we had to deal with, including services with
> dependencies, stuff to do after net is initialized, test modes, etc.
>
> I support the inclusion of this app once the naming problems are
> addressed. I have no additional added value here, I already made a
> proposal of a new top directory in apps to support system
> initialization programs, because system/init is a bit too generic.
>
>
> When I get the occasion I will try to evaluate it and make it work on
> a nucleo based stm32h7 board.
>
>
> Sebastien
>
>
> On 10/22/25 07:07, 王健宇 wrote:
>> Dear All,
>> Thank you, and hello everyone. Please allow me to add some
>> (potentially redundant) information as follows:
>>
>>    1.
>> Reasons for adding this module: As Tomek helped supplement earlier,
>> the main considerations include code size (the shell module is not
>> always required) and daemon management (such as status monitoring and
>> restarting of services).
>>    2.
>> Reasons for naming it "init": From a functional perspective, this
>> module is used for system initialization. Referring to Linux
>> distributions and Android, modules with similar functions are
>> generally named "systemd" or "init".
>>    3.
>> Regarding NuttX’s support for multiple init entry points: I conducted
>> a simple filter using the command find boards/ -name defconfig |
>> xargs grep INIT_ENTRYPOINT | cut -d ':' -f 2- | sort -u, and it turns
>> out this is indeed the case. However, not all of their logic is used
>> for system initialization. For example,
>> CONFIG_INIT_ENTRYPOINT="hello_main" and
>> CONFIG_INIT_ENTRYPOINT="ostest_main". The well-known and excellent
>> NSH supports almost all system initialization functions;
>> unfortunately, it lacks daemon management. Moreover, in scenarios
>> where code size is a critical concern, NSH may be somewhat bulky.
>> Therefore, we might need a dedicated module for system initialization.
>>    4.
>> About the module’s implementation: This module is a new
>> implementation and not a port of Android Init. During the development
>> process, I studied the source code of the excellent Android Init, but
>> this module is more streamlined and compatible with most syntax of
>> the Android Init Language.
>>
>> Personally, from a functional perspective, I tend to use
>> apps/system/init and CONFIG_SYSTEM_INIT. However, if you have more
>> comprehensive considerations, options like apps/android/init and
>> CONFIG_ANDROID_INIT are also acceptable to me.
>>
>>
>> Best regards,
>>
>> Jianyu Wang
>>
>> ________________________________
>> 发件人: Tomek CEDRO <to...@cedro.info>
>> 发送时间: 2025年10月22日 11:37:31
>> 收件人: dev@nuttx.apache.org
>> 主题: [External Mail]Re: NuttX and Android System Init
>>
>> [外部邮件]
>> 此邮件来源于小米公司外部,请谨慎处理。若对邮件安全性存疑,请将邮件转发给misec@xiaomi.com进行反馈
>>
>>
>> Okay Jianyu Wang, author of the Android System Init in NuttX code,
>> joined the dev@ mailing list, welcome, below is the discussion history
>> as read from the bottom up direction :-)
>> Tomek
>>
>> On Tue, Oct 21, 2025 at 11:18 PM Tomek CEDRO <to...@cedro.info> wrote:
>>> Okay I have provided feedback from the dev@ list to the gh prs and
>>> here comes the reply ;-)
>>>
>>> The main advantages of this Android System Init on NuttX:
>>> * it is custom trimmed down code implementing android system init
>>> compatible functionality.
>>> * it can run as standalone app that replaces nsh.
>>> * it provides ~10x smaller footprint over nsh.
>>>
>>> I invited Wang to join discussion here on the mailing list :-)
>>>
>>> There may be use cases for this. My proposition is to move all Android
>>> related stuff to apps/android that is apps/android/system/init and
>>> apps/android/fastboot. Also to rename kconfig variables so instead
>>> CONFIG_SYSTEM_SYSTEM it will be CONFIG_ANDROID_SYSTEM or similar? What
>>> do you think folks? :-)
>>>
>>> Thanks :-)
>>> Tomek
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Tue, Oct 21, 2025 at 8:29 AM Luchian Mihai
>>> <lu...@gmail.com> wrote:
>>>> Hi Tomek,
>>>>
>>>> I am already more present in the project overall.
>>>> I usually leave comments rather than start reviews (regarding PRs).
>>>>
>>>> There are already comments on Pull Request for the documentation.
>>>> This subject that I've raised was more suited for the mailing list. It
>>>> reaches more of the community overall.
>>>>
>>>> More input than mine is needed if we want a resolution.
>>>>
>>>> Cheers,
>>>> Mihai
>>>>
>>>> On Tue, 21 Oct 2025 at 02:17, Tomek CEDRO <to...@cedro.info> wrote:
>>>>
>>>>> Yeah, it is good to have a choice, maybe someone will find this
>>>>> solution useful and better fit for some applications, but.. we can
>>>>> already see some confusion with all different system / init
>>>>> solutions,
>>>>> so we should clearly distinguish the naming and functional separation
>>>>> (system system init does not say anything at all), and better
>>>>> documentation right from start (like Alan already requested and
>>>>> Luchian noted).
>>>>>
>>>>> Luchian noticed a common but important problem - one person who
>>>>> create
>>>>> some solution does not create good (or any) documentation right from
>>>>> start and then anyone who touches the solution needs to reinvent the
>>>>> wheel, what is tremendous waste of time and resources. I am sometimes
>>>>> dropped into such rabbit hole in various projects and it takes weeks
>>>>> or months to understand what is going on :D Good point! Luchian could
>>>>> you please provide feedback on the Pull Requests too?
>>>>>
>>>>> Thanks! :-)
>>>>> Tomek
>>>>>
>>>>>
>>>>> On Tue, Oct 21, 2025 at 1:00 AM Alan C. Assis <ac...@gmail.com>
>>>>> wrote:
>>>>>> Hi Luchian,
>>>>>> that is what I suggested in the Documentation: before saying what
>>>>>> Android
>>>>>> System Init is, the documentation needs to explain what it is
>>>>>> solving on
>>>>>> NuttX.
>>>>>>
>>>>>> More important than that: starts explaining the existing
>>>>>> solutions and
>>>>> when
>>>>>> to use them.
>>>>>>
>>>>>> As Xiang commented in the PR, their initial plan was to implement
>>>>> SystemV,
>>>>>> but it was more complex (and probably bigger).
>>>>>>
>>>>>> So Android System Init could be more beneficial for someone
>>>>>> implemented
>>>>>> deep embedded system with NuttX.
>>>>>>
>>>>>> But I didn't give up trying to get the SystemV Init
>>>>>> implementation from
>>>>>> Google, maybe someone there could help us.
>>>>>>
>>>>>> BR,
>>>>>>
>>>>>> Alan
>>>>>>
>>>>>> On Monday, October 20, 2025, Luchian Mihai
>>>>>> <lu...@gmail.com>
>>>>> wrote:
>>>>>>> Hello all,
>>>>>>>
>>>>>>> This might stir the waters a bit, but I think it needs to be said.
>>>>>>>
>>>>>>> I know Alan already pointed out the need for docs in the PR
>>>>>>> comments,
>>>>> but
>>>>>>> just the documentation is not enough.
>>>>>>>
>>>>>>> I think we (the community) or the PMC should be more assertive
>>>>> regarding
>>>>>>> these kinds of features.
>>>>>>> Why do we need another init system? What does this new init system
>>>>> solve?
>>>>>>> What should happen with the previous ones?
>>>>>>> Do not get me wrong, I am not against this new init system, I am in
>>>>> favour.
>>>>>>> While NuttX excels in posix compliance as a single standard, a
>>>>>>> lot of
>>>>> other
>>>>>>> things lack unity.
>>>>>>> Lacking a "default" way of doing things ends up in "hidden
>>>>>>> features",
>>>>> or
>>>>>>> rather, features
>>>>>>> that are used and known by a set of people.
>>>>>>>
>>>>>>> There is also support for fastboot and adb, so the android init
>>>>>>> system
>>>>>>> makes sense,
>>>>>>> but I see nothing that explains why they are present in the first
>>>>> place.
>>>>>>> Did they solve something, some time ago? Is the NuttX project
>>>>>>> aligning
>>>>> with
>>>>>>> the android tooling?
>>>>>>>
>>>>>>> I would like to point out my experience as a new contributor. It
>>>>>>> took
>>>>> me a
>>>>>>> few months to get the hang of how the thing should be done,
>>>>>>> or at least what the majority agrees. There are board examples that
>>>>> differ,
>>>>>>> but neither are wrong also.
>>>>>>> The system initialization is the same, I've read documentation
>>>>>>> about
>>>>> `exec`
>>>>>>> and `posix_spawn` and `task_create`,
>>>>>>> and I am writing docs about the flat, protected, kernel build.
>>>>>>> Yet, I
>>>>> still
>>>>>>> did not find the "NuttX way to leave" the kernel.
>>>>>>> And here we have another init system.
>>>>>>>
>>>>>>> For me this just feels more of a feature creep than a milestone,
>>>>>>> sorry.
>>>>>>>
>>>>>>> It's hard to market (from my own experience) NuttX as anything
>>>>>>> other
>>>>> than
>>>>>>> "high quality code" if it takes days to
>>>>>>> figure out the solution (out of the existing few) for a specific
>>>>> problem.
>>>>>>> I suggest defining the expectations about this PR, and make a
>>>>>>> separate
>>>>>>> documentation page.
>>>>>>> Is something that NuttX wants to adopt going forward, that is
>>>>>>> great.
>>>>>>> Will it help only part of the community, that is also great.
>>>>>>> The only thing I ask is to make that as obvious as possible, it's
>>>>> tiring to
>>>>>>> "unravel the NuttX lore" from the mailing list.
>>>>>>>
>>>>>>> Cheers,
>>>>>>> Mihai
>>>>>>>
>>>>>>> On Mon, 20 Oct 2025 at 19:09, Tomek CEDRO <to...@cedro.info> wrote:
>>>>>>>
>>>>>>>> well. :-(
>>>>>>>>
>>>>>>>> On Mon, Oct 20, 2025 at 3:02 PM Alan C. Assis <ac...@gmail.com>
>>>>> wrote:
>>>>>>>>> +1
>>>>>>>>>
>>>>>>>>> It is better to use the right naming.
>>>>>>>>>
>>>>>>>>> Fitbit implemented support for System V on NuttX and promised to
>>>>> donate
>>>>>>>> it,
>>>>>>>>> but after Google acquired them, none contribution came from them.
>>>>>>>>>
>>>>>>>>> Google also used NuttX on ARA Project, but no single code line
>>>>>>>>> was
>>>>>>>>> submitted to the NuttX mainline.
>>>>>>>>>
>>>>>>>>> BR,
>>>>>>>>>
>>>>>>>>> Alan
>>>>>>>>>
>>>>>>>>> On Mon, Oct 20, 2025 at 8:07 AM Tomek CEDRO <to...@cedro.info>
>>>>> wrote:
>>>>>>>>>> Hello world :-)
>>>>>>>>>>
>>>>>>>>>> There is a very interesting and useful PR by @JianyuWang0623
>>>>>>>>>> that
>>>>>>> adds
>>>>>>>>>> support for Android System Init functionality to NuttX [1][2]
>>>>> with
>>>>>>>>>> working example on qemu [3]. This is alternative to SystemV Init
>>>>> and
>>>>>>>>>> probably other init designs. Please help in reviewing the change
>>>>> :-)
>>>>>>>>>> My only concern is naming convention here because just "system"
>>>>> and
>>>>>>>>>> "system init" is used (i.e. CONFIG_SYSTEM_INIT,
>>>>>>> CONFIG_SYSTEM_SYSTEM).
>>>>>>>>>> This may be a bit confusing because we do not know what init
>>>>> system
>>>>>>>>>> standard is used and we silently assume Android. My proposition
>>>>> is to
>>>>>>>>>> use "Android System Init" naming convention (i.e.
>>>>>>>>>> CONFIG_SYSTEM_ANDROID_INIT or something like that), so things
>>>>>>>>>> are
>>>>>>>>>> self-explanatory, and other init systems may be used when
>>>>> necessary
>>>>>>> in
>>>>>>>>>> future without confusion. I am not insisting here and will
>>>>> follow the
>>>>>>>>>> community choice.
>>>>>>>>>>
>>>>>>>>>> Please let us know what you think :-)
>>>>>>>>>>
>>>>>>>>>> Thanks :-)
>>>>>>>>>> Tomek
>>>>>>>>>>
>>>>>>>>>> [1] https://github.com/apache/nuttx-apps/pull/3192
>>>>>>>>>> [2] https://github.com/apache/nuttx/pull/17215
>>>>>>>>>> [3] https://github.com/apache/nuttx/pull/17215
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
>>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
>>>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
>>>>>
>>>
>>>
>>> --
>>> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
>>
>>
>> --
>> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
>> #/******本邮件及其附件含有小米公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件!
>> This e-mail and its attachments contain confidential information from
>> XIAOMI, which is intended only for the person or entity whose address
>> is listed above. Any use of the information contained herein in any
>> way (including, but not limited to, total or partial disclosure,
>> reproduction, or dissemination) by persons other than the intended
>> recipient(s) is prohibited. If you receive this e-mail in error,
>> please notify the sender by phone or email immediately and delete
>> it!******/#
#/******本邮件及其附件含有小米公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件! This e-mail and its attachments contain confidential information from XIAOMI, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it!******/#

Re: 答复: [External Mail]Re: NuttX and Android System Init

Posted by 王健宇 <wa...@xiaomi.com.INVALID>.
Hi,

Sorry for the delayed response. You’re right that finding example code in the boards directory isn’t always easy. I plan to update the patch soon and will try to make the documentation more understandable through this update.
Thank you for your valuable feedback.

Best regards,
Jianyu Wang

________________________________
发件人: Sebastien Lorquet <se...@lorquet.fr>
发送时间: 2025年10月23日 18:53
收件人: dev@nuttx.apache.org
主题: Re: 答复: [External Mail]Re: NuttX and Android System Init

[外部邮件] 此邮件来源于小米公司外部,请谨慎处理。若对邮件安全性存疑,请将邮件转发给misec@xiaomi.com进行反馈

Hello again

Documentation is always a good start, it could have more examples and
current status about actually supported features, and differences with
the android documentation pointed elsewhere.

It is not always fun to dig useful example code in the boards dir,
beginners will hate it and may not even think about that.

Sebastien


On 10/23/25 12:37, Sebastien Lorquet wrote:
> Hello
>
> I reviewed your code and I find it very cool.
>
> You did a great job on implementing some quite compact and efficient
> code.
>
> I like that you did not try to implement properties that look like the
> most complex and probably less usefull stuff of this whole thing. If
> you do want to implement properties, please make sure that this part
> is entirely optional and the code still can be built without it.
>
> However, this init thing is rather specific for complex systems with
> several services. It must absolutely be kept optional and not forced
> on small systems.
>
>
> Documentation of this program is absolutely a requirement to make it
> shine to its proper value, I think it is so useful and a nice addition
> to NuttX that it must be improved as much as possible so people can
> use it easily without struggles.
>
> I actually see myself trying to use this in one of our products. It
> solves many use cases we had to deal with, including services with
> dependencies, stuff to do after net is initialized, test modes, etc.
>
> I support the inclusion of this app once the naming problems are
> addressed. I have no additional added value here, I already made a
> proposal of a new top directory in apps to support system
> initialization programs, because system/init is a bit too generic.
>
>
> When I get the occasion I will try to evaluate it and make it work on
> a nucleo based stm32h7 board.
>
>
> Sebastien
>
>
> On 10/22/25 07:07, 王健宇 wrote:
>> Dear All,
>> Thank you, and hello everyone. Please allow me to add some
>> (potentially redundant) information as follows:
>>
>>    1.
>> Reasons for adding this module: As Tomek helped supplement earlier,
>> the main considerations include code size (the shell module is not
>> always required) and daemon management (such as status monitoring and
>> restarting of services).
>>    2.
>> Reasons for naming it "init": From a functional perspective, this
>> module is used for system initialization. Referring to Linux
>> distributions and Android, modules with similar functions are
>> generally named "systemd" or "init".
>>    3.
>> Regarding NuttX’s support for multiple init entry points: I conducted
>> a simple filter using the command find boards/ -name defconfig |
>> xargs grep INIT_ENTRYPOINT | cut -d ':' -f 2- | sort -u, and it turns
>> out this is indeed the case. However, not all of their logic is used
>> for system initialization. For example,
>> CONFIG_INIT_ENTRYPOINT="hello_main" and
>> CONFIG_INIT_ENTRYPOINT="ostest_main". The well-known and excellent
>> NSH supports almost all system initialization functions;
>> unfortunately, it lacks daemon management. Moreover, in scenarios
>> where code size is a critical concern, NSH may be somewhat bulky.
>> Therefore, we might need a dedicated module for system initialization.
>>    4.
>> About the module’s implementation: This module is a new
>> implementation and not a port of Android Init. During the development
>> process, I studied the source code of the excellent Android Init, but
>> this module is more streamlined and compatible with most syntax of
>> the Android Init Language.
>>
>> Personally, from a functional perspective, I tend to use
>> apps/system/init and CONFIG_SYSTEM_INIT. However, if you have more
>> comprehensive considerations, options like apps/android/init and
>> CONFIG_ANDROID_INIT are also acceptable to me.
>>
>>
>> Best regards,
>>
>> Jianyu Wang
>>
>> ________________________________
>> 发件人: Tomek CEDRO <to...@cedro.info>
>> 发送时间: 2025年10月22日 11:37:31
>> 收件人: dev@nuttx.apache.org
>> 主题: [External Mail]Re: NuttX and Android System Init
>>
>> [外部邮件]
>> 此邮件来源于小米公司外部,请谨慎处理。若对邮件安全性存疑,请将邮件转发给misec@xiaomi.com进行反馈
>>
>>
>> Okay Jianyu Wang, author of the Android System Init in NuttX code,
>> joined the dev@ mailing list, welcome, below is the discussion history
>> as read from the bottom up direction :-)
>> Tomek
>>
>> On Tue, Oct 21, 2025 at 11:18 PM Tomek CEDRO <to...@cedro.info> wrote:
>>> Okay I have provided feedback from the dev@ list to the gh prs and
>>> here comes the reply ;-)
>>>
>>> The main advantages of this Android System Init on NuttX:
>>> * it is custom trimmed down code implementing android system init
>>> compatible functionality.
>>> * it can run as standalone app that replaces nsh.
>>> * it provides ~10x smaller footprint over nsh.
>>>
>>> I invited Wang to join discussion here on the mailing list :-)
>>>
>>> There may be use cases for this. My proposition is to move all Android
>>> related stuff to apps/android that is apps/android/system/init and
>>> apps/android/fastboot. Also to rename kconfig variables so instead
>>> CONFIG_SYSTEM_SYSTEM it will be CONFIG_ANDROID_SYSTEM or similar? What
>>> do you think folks? :-)
>>>
>>> Thanks :-)
>>> Tomek
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Tue, Oct 21, 2025 at 8:29 AM Luchian Mihai
>>> <lu...@gmail.com> wrote:
>>>> Hi Tomek,
>>>>
>>>> I am already more present in the project overall.
>>>> I usually leave comments rather than start reviews (regarding PRs).
>>>>
>>>> There are already comments on Pull Request for the documentation.
>>>> This subject that I've raised was more suited for the mailing list. It
>>>> reaches more of the community overall.
>>>>
>>>> More input than mine is needed if we want a resolution.
>>>>
>>>> Cheers,
>>>> Mihai
>>>>
>>>> On Tue, 21 Oct 2025 at 02:17, Tomek CEDRO <to...@cedro.info> wrote:
>>>>
>>>>> Yeah, it is good to have a choice, maybe someone will find this
>>>>> solution useful and better fit for some applications, but.. we can
>>>>> already see some confusion with all different system / init
>>>>> solutions,
>>>>> so we should clearly distinguish the naming and functional separation
>>>>> (system system init does not say anything at all), and better
>>>>> documentation right from start (like Alan already requested and
>>>>> Luchian noted).
>>>>>
>>>>> Luchian noticed a common but important problem - one person who
>>>>> create
>>>>> some solution does not create good (or any) documentation right from
>>>>> start and then anyone who touches the solution needs to reinvent the
>>>>> wheel, what is tremendous waste of time and resources. I am sometimes
>>>>> dropped into such rabbit hole in various projects and it takes weeks
>>>>> or months to understand what is going on :D Good point! Luchian could
>>>>> you please provide feedback on the Pull Requests too?
>>>>>
>>>>> Thanks! :-)
>>>>> Tomek
>>>>>
>>>>>
>>>>> On Tue, Oct 21, 2025 at 1:00 AM Alan C. Assis <ac...@gmail.com>
>>>>> wrote:
>>>>>> Hi Luchian,
>>>>>> that is what I suggested in the Documentation: before saying what
>>>>>> Android
>>>>>> System Init is, the documentation needs to explain what it is
>>>>>> solving on
>>>>>> NuttX.
>>>>>>
>>>>>> More important than that: starts explaining the existing
>>>>>> solutions and
>>>>> when
>>>>>> to use them.
>>>>>>
>>>>>> As Xiang commented in the PR, their initial plan was to implement
>>>>> SystemV,
>>>>>> but it was more complex (and probably bigger).
>>>>>>
>>>>>> So Android System Init could be more beneficial for someone
>>>>>> implemented
>>>>>> deep embedded system with NuttX.
>>>>>>
>>>>>> But I didn't give up trying to get the SystemV Init
>>>>>> implementation from
>>>>>> Google, maybe someone there could help us.
>>>>>>
>>>>>> BR,
>>>>>>
>>>>>> Alan
>>>>>>
>>>>>> On Monday, October 20, 2025, Luchian Mihai
>>>>>> <lu...@gmail.com>
>>>>> wrote:
>>>>>>> Hello all,
>>>>>>>
>>>>>>> This might stir the waters a bit, but I think it needs to be said.
>>>>>>>
>>>>>>> I know Alan already pointed out the need for docs in the PR
>>>>>>> comments,
>>>>> but
>>>>>>> just the documentation is not enough.
>>>>>>>
>>>>>>> I think we (the community) or the PMC should be more assertive
>>>>> regarding
>>>>>>> these kinds of features.
>>>>>>> Why do we need another init system? What does this new init system
>>>>> solve?
>>>>>>> What should happen with the previous ones?
>>>>>>> Do not get me wrong, I am not against this new init system, I am in
>>>>> favour.
>>>>>>> While NuttX excels in posix compliance as a single standard, a
>>>>>>> lot of
>>>>> other
>>>>>>> things lack unity.
>>>>>>> Lacking a "default" way of doing things ends up in "hidden
>>>>>>> features",
>>>>> or
>>>>>>> rather, features
>>>>>>> that are used and known by a set of people.
>>>>>>>
>>>>>>> There is also support for fastboot and adb, so the android init
>>>>>>> system
>>>>>>> makes sense,
>>>>>>> but I see nothing that explains why they are present in the first
>>>>> place.
>>>>>>> Did they solve something, some time ago? Is the NuttX project
>>>>>>> aligning
>>>>> with
>>>>>>> the android tooling?
>>>>>>>
>>>>>>> I would like to point out my experience as a new contributor. It
>>>>>>> took
>>>>> me a
>>>>>>> few months to get the hang of how the thing should be done,
>>>>>>> or at least what the majority agrees. There are board examples that
>>>>> differ,
>>>>>>> but neither are wrong also.
>>>>>>> The system initialization is the same, I've read documentation
>>>>>>> about
>>>>> `exec`
>>>>>>> and `posix_spawn` and `task_create`,
>>>>>>> and I am writing docs about the flat, protected, kernel build.
>>>>>>> Yet, I
>>>>> still
>>>>>>> did not find the "NuttX way to leave" the kernel.
>>>>>>> And here we have another init system.
>>>>>>>
>>>>>>> For me this just feels more of a feature creep than a milestone,
>>>>>>> sorry.
>>>>>>>
>>>>>>> It's hard to market (from my own experience) NuttX as anything
>>>>>>> other
>>>>> than
>>>>>>> "high quality code" if it takes days to
>>>>>>> figure out the solution (out of the existing few) for a specific
>>>>> problem.
>>>>>>> I suggest defining the expectations about this PR, and make a
>>>>>>> separate
>>>>>>> documentation page.
>>>>>>> Is something that NuttX wants to adopt going forward, that is
>>>>>>> great.
>>>>>>> Will it help only part of the community, that is also great.
>>>>>>> The only thing I ask is to make that as obvious as possible, it's
>>>>> tiring to
>>>>>>> "unravel the NuttX lore" from the mailing list.
>>>>>>>
>>>>>>> Cheers,
>>>>>>> Mihai
>>>>>>>
>>>>>>> On Mon, 20 Oct 2025 at 19:09, Tomek CEDRO <to...@cedro.info> wrote:
>>>>>>>
>>>>>>>> well. :-(
>>>>>>>>
>>>>>>>> On Mon, Oct 20, 2025 at 3:02 PM Alan C. Assis <ac...@gmail.com>
>>>>> wrote:
>>>>>>>>> +1
>>>>>>>>>
>>>>>>>>> It is better to use the right naming.
>>>>>>>>>
>>>>>>>>> Fitbit implemented support for System V on NuttX and promised to
>>>>> donate
>>>>>>>> it,
>>>>>>>>> but after Google acquired them, none contribution came from them.
>>>>>>>>>
>>>>>>>>> Google also used NuttX on ARA Project, but no single code line
>>>>>>>>> was
>>>>>>>>> submitted to the NuttX mainline.
>>>>>>>>>
>>>>>>>>> BR,
>>>>>>>>>
>>>>>>>>> Alan
>>>>>>>>>
>>>>>>>>> On Mon, Oct 20, 2025 at 8:07 AM Tomek CEDRO <to...@cedro.info>
>>>>> wrote:
>>>>>>>>>> Hello world :-)
>>>>>>>>>>
>>>>>>>>>> There is a very interesting and useful PR by @JianyuWang0623
>>>>>>>>>> that
>>>>>>> adds
>>>>>>>>>> support for Android System Init functionality to NuttX [1][2]
>>>>> with
>>>>>>>>>> working example on qemu [3]. This is alternative to SystemV Init
>>>>> and
>>>>>>>>>> probably other init designs. Please help in reviewing the change
>>>>> :-)
>>>>>>>>>> My only concern is naming convention here because just "system"
>>>>> and
>>>>>>>>>> "system init" is used (i.e. CONFIG_SYSTEM_INIT,
>>>>>>> CONFIG_SYSTEM_SYSTEM).
>>>>>>>>>> This may be a bit confusing because we do not know what init
>>>>> system
>>>>>>>>>> standard is used and we silently assume Android. My proposition
>>>>> is to
>>>>>>>>>> use "Android System Init" naming convention (i.e.
>>>>>>>>>> CONFIG_SYSTEM_ANDROID_INIT or something like that), so things
>>>>>>>>>> are
>>>>>>>>>> self-explanatory, and other init systems may be used when
>>>>> necessary
>>>>>>> in
>>>>>>>>>> future without confusion. I am not insisting here and will
>>>>> follow the
>>>>>>>>>> community choice.
>>>>>>>>>>
>>>>>>>>>> Please let us know what you think :-)
>>>>>>>>>>
>>>>>>>>>> Thanks :-)
>>>>>>>>>> Tomek
>>>>>>>>>>
>>>>>>>>>> [1] https://github.com/apache/nuttx-apps/pull/3192
>>>>>>>>>> [2] https://github.com/apache/nuttx/pull/17215
>>>>>>>>>> [3] https://github.com/apache/nuttx/pull/17215
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
>>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
>>>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
>>>>>
>>>
>>>
>>> --
>>> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
>>
>>
>> --
>> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
>> #/******本邮件及其附件含有小米公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件!
>> This e-mail and its attachments contain confidential information from
>> XIAOMI, which is intended only for the person or entity whose address
>> is listed above. Any use of the information contained herein in any
>> way (including, but not limited to, total or partial disclosure,
>> reproduction, or dissemination) by persons other than the intended
>> recipient(s) is prohibited. If you receive this e-mail in error,
>> please notify the sender by phone or email immediately and delete
>> it!******/#
#/******本邮件及其附件含有小米公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件! This e-mail and its attachments contain confidential information from XIAOMI, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it!******/#

Re: 答复: [External Mail]Re: NuttX and Android System Init

Posted by Sebastien Lorquet <se...@lorquet.fr>.
Hello again

Documentation is always a good start, it could have more examples and 
current status about actually supported features, and differences with 
the android documentation pointed elsewhere.

It is not always fun to dig useful example code in the boards dir, 
beginners will hate it and may not even think about that.

Sebastien


On 10/23/25 12:37, Sebastien Lorquet wrote:
> Hello
>
> I reviewed your code and I find it very cool.
>
> You did a great job on implementing some quite compact and efficient 
> code.
>
> I like that you did not try to implement properties that look like the 
> most complex and probably less usefull stuff of this whole thing. If 
> you do want to implement properties, please make sure that this part 
> is entirely optional and the code still can be built without it.
>
> However, this init thing is rather specific for complex systems with 
> several services. It must absolutely be kept optional and not forced 
> on small systems.
>
>
> Documentation of this program is absolutely a requirement to make it 
> shine to its proper value, I think it is so useful and a nice addition 
> to NuttX that it must be improved as much as possible so people can 
> use it easily without struggles.
>
> I actually see myself trying to use this in one of our products. It 
> solves many use cases we had to deal with, including services with 
> dependencies, stuff to do after net is initialized, test modes, etc.
>
> I support the inclusion of this app once the naming problems are 
> addressed. I have no additional added value here, I already made a 
> proposal of a new top directory in apps to support system 
> initialization programs, because system/init is a bit too generic.
>
>
> When I get the occasion I will try to evaluate it and make it work on 
> a nucleo based stm32h7 board.
>
>
> Sebastien
>
>
> On 10/22/25 07:07, 王健宇 wrote:
>> Dear All,
>> Thank you, and hello everyone. Please allow me to add some 
>> (potentially redundant) information as follows:
>>
>>    1.
>> Reasons for adding this module: As Tomek helped supplement earlier, 
>> the main considerations include code size (the shell module is not 
>> always required) and daemon management (such as status monitoring and 
>> restarting of services).
>>    2.
>> Reasons for naming it "init": From a functional perspective, this 
>> module is used for system initialization. Referring to Linux 
>> distributions and Android, modules with similar functions are 
>> generally named "systemd" or "init".
>>    3.
>> Regarding NuttX’s support for multiple init entry points: I conducted 
>> a simple filter using the command find boards/ -name defconfig | 
>> xargs grep INIT_ENTRYPOINT | cut -d ':' -f 2- | sort -u, and it turns 
>> out this is indeed the case. However, not all of their logic is used 
>> for system initialization. For example, 
>> CONFIG_INIT_ENTRYPOINT="hello_main" and 
>> CONFIG_INIT_ENTRYPOINT="ostest_main". The well-known and excellent 
>> NSH supports almost all system initialization functions; 
>> unfortunately, it lacks daemon management. Moreover, in scenarios 
>> where code size is a critical concern, NSH may be somewhat bulky. 
>> Therefore, we might need a dedicated module for system initialization.
>>    4.
>> About the module’s implementation: This module is a new 
>> implementation and not a port of Android Init. During the development 
>> process, I studied the source code of the excellent Android Init, but 
>> this module is more streamlined and compatible with most syntax of 
>> the Android Init Language.
>>
>> Personally, from a functional perspective, I tend to use 
>> apps/system/init and CONFIG_SYSTEM_INIT. However, if you have more 
>> comprehensive considerations, options like apps/android/init and 
>> CONFIG_ANDROID_INIT are also acceptable to me.
>>
>>
>> Best regards,
>>
>> Jianyu Wang
>>
>> ________________________________
>> 发件人: Tomek CEDRO <to...@cedro.info>
>> 发送时间: 2025年10月22日 11:37:31
>> 收件人: dev@nuttx.apache.org
>> 主题: [External Mail]Re: NuttX and Android System Init
>>
>> [外部邮件] 
>> 此邮件来源于小米公司外部,请谨慎处理。若对邮件安全性存疑,请将邮件转发给misec@xiaomi.com进行反馈 
>>
>>
>> Okay Jianyu Wang, author of the Android System Init in NuttX code,
>> joined the dev@ mailing list, welcome, below is the discussion history
>> as read from the bottom up direction :-)
>> Tomek
>>
>> On Tue, Oct 21, 2025 at 11:18 PM Tomek CEDRO <to...@cedro.info> wrote:
>>> Okay I have provided feedback from the dev@ list to the gh prs and
>>> here comes the reply ;-)
>>>
>>> The main advantages of this Android System Init on NuttX:
>>> * it is custom trimmed down code implementing android system init
>>> compatible functionality.
>>> * it can run as standalone app that replaces nsh.
>>> * it provides ~10x smaller footprint over nsh.
>>>
>>> I invited Wang to join discussion here on the mailing list :-)
>>>
>>> There may be use cases for this. My proposition is to move all Android
>>> related stuff to apps/android that is apps/android/system/init and
>>> apps/android/fastboot. Also to rename kconfig variables so instead
>>> CONFIG_SYSTEM_SYSTEM it will be CONFIG_ANDROID_SYSTEM or similar? What
>>> do you think folks? :-)
>>>
>>> Thanks :-)
>>> Tomek
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Tue, Oct 21, 2025 at 8:29 AM Luchian Mihai 
>>> <lu...@gmail.com> wrote:
>>>> Hi Tomek,
>>>>
>>>> I am already more present in the project overall.
>>>> I usually leave comments rather than start reviews (regarding PRs).
>>>>
>>>> There are already comments on Pull Request for the documentation.
>>>> This subject that I've raised was more suited for the mailing list. It
>>>> reaches more of the community overall.
>>>>
>>>> More input than mine is needed if we want a resolution.
>>>>
>>>> Cheers,
>>>> Mihai
>>>>
>>>> On Tue, 21 Oct 2025 at 02:17, Tomek CEDRO <to...@cedro.info> wrote:
>>>>
>>>>> Yeah, it is good to have a choice, maybe someone will find this
>>>>> solution useful and better fit for some applications, but.. we can
>>>>> already see some confusion with all different system / init 
>>>>> solutions,
>>>>> so we should clearly distinguish the naming and functional separation
>>>>> (system system init does not say anything at all), and better
>>>>> documentation right from start (like Alan already requested and
>>>>> Luchian noted).
>>>>>
>>>>> Luchian noticed a common but important problem - one person who 
>>>>> create
>>>>> some solution does not create good (or any) documentation right from
>>>>> start and then anyone who touches the solution needs to reinvent the
>>>>> wheel, what is tremendous waste of time and resources. I am sometimes
>>>>> dropped into such rabbit hole in various projects and it takes weeks
>>>>> or months to understand what is going on :D Good point! Luchian could
>>>>> you please provide feedback on the Pull Requests too?
>>>>>
>>>>> Thanks! :-)
>>>>> Tomek
>>>>>
>>>>>
>>>>> On Tue, Oct 21, 2025 at 1:00 AM Alan C. Assis <ac...@gmail.com> 
>>>>> wrote:
>>>>>> Hi Luchian,
>>>>>> that is what I suggested in the Documentation: before saying what 
>>>>>> Android
>>>>>> System Init is, the documentation needs to explain what it is 
>>>>>> solving on
>>>>>> NuttX.
>>>>>>
>>>>>> More important than that: starts explaining the existing 
>>>>>> solutions and
>>>>> when
>>>>>> to use them.
>>>>>>
>>>>>> As Xiang commented in the PR, their initial plan was to implement
>>>>> SystemV,
>>>>>> but it was more complex (and probably bigger).
>>>>>>
>>>>>> So Android System Init could be more beneficial for someone 
>>>>>> implemented
>>>>>> deep embedded system with NuttX.
>>>>>>
>>>>>> But I didn't give up trying to get the SystemV Init 
>>>>>> implementation from
>>>>>> Google, maybe someone there could help us.
>>>>>>
>>>>>> BR,
>>>>>>
>>>>>> Alan
>>>>>>
>>>>>> On Monday, October 20, 2025, Luchian Mihai 
>>>>>> <lu...@gmail.com>
>>>>> wrote:
>>>>>>> Hello all,
>>>>>>>
>>>>>>> This might stir the waters a bit, but I think it needs to be said.
>>>>>>>
>>>>>>> I know Alan already pointed out the need for docs in the PR 
>>>>>>> comments,
>>>>> but
>>>>>>> just the documentation is not enough.
>>>>>>>
>>>>>>> I think we (the community) or the PMC should be more assertive
>>>>> regarding
>>>>>>> these kinds of features.
>>>>>>> Why do we need another init system? What does this new init system
>>>>> solve?
>>>>>>> What should happen with the previous ones?
>>>>>>> Do not get me wrong, I am not against this new init system, I am in
>>>>> favour.
>>>>>>> While NuttX excels in posix compliance as a single standard, a 
>>>>>>> lot of
>>>>> other
>>>>>>> things lack unity.
>>>>>>> Lacking a "default" way of doing things ends up in "hidden 
>>>>>>> features",
>>>>> or
>>>>>>> rather, features
>>>>>>> that are used and known by a set of people.
>>>>>>>
>>>>>>> There is also support for fastboot and adb, so the android init 
>>>>>>> system
>>>>>>> makes sense,
>>>>>>> but I see nothing that explains why they are present in the first
>>>>> place.
>>>>>>> Did they solve something, some time ago? Is the NuttX project 
>>>>>>> aligning
>>>>> with
>>>>>>> the android tooling?
>>>>>>>
>>>>>>> I would like to point out my experience as a new contributor. It 
>>>>>>> took
>>>>> me a
>>>>>>> few months to get the hang of how the thing should be done,
>>>>>>> or at least what the majority agrees. There are board examples that
>>>>> differ,
>>>>>>> but neither are wrong also.
>>>>>>> The system initialization is the same, I've read documentation 
>>>>>>> about
>>>>> `exec`
>>>>>>> and `posix_spawn` and `task_create`,
>>>>>>> and I am writing docs about the flat, protected, kernel build. 
>>>>>>> Yet, I
>>>>> still
>>>>>>> did not find the "NuttX way to leave" the kernel.
>>>>>>> And here we have another init system.
>>>>>>>
>>>>>>> For me this just feels more of a feature creep than a milestone, 
>>>>>>> sorry.
>>>>>>>
>>>>>>> It's hard to market (from my own experience) NuttX as anything 
>>>>>>> other
>>>>> than
>>>>>>> "high quality code" if it takes days to
>>>>>>> figure out the solution (out of the existing few) for a specific
>>>>> problem.
>>>>>>> I suggest defining the expectations about this PR, and make a 
>>>>>>> separate
>>>>>>> documentation page.
>>>>>>> Is something that NuttX wants to adopt going forward, that is 
>>>>>>> great.
>>>>>>> Will it help only part of the community, that is also great.
>>>>>>> The only thing I ask is to make that as obvious as possible, it's
>>>>> tiring to
>>>>>>> "unravel the NuttX lore" from the mailing list.
>>>>>>>
>>>>>>> Cheers,
>>>>>>> Mihai
>>>>>>>
>>>>>>> On Mon, 20 Oct 2025 at 19:09, Tomek CEDRO <to...@cedro.info> wrote:
>>>>>>>
>>>>>>>> well. :-(
>>>>>>>>
>>>>>>>> On Mon, Oct 20, 2025 at 3:02 PM Alan C. Assis <ac...@gmail.com>
>>>>> wrote:
>>>>>>>>> +1
>>>>>>>>>
>>>>>>>>> It is better to use the right naming.
>>>>>>>>>
>>>>>>>>> Fitbit implemented support for System V on NuttX and promised to
>>>>> donate
>>>>>>>> it,
>>>>>>>>> but after Google acquired them, none contribution came from them.
>>>>>>>>>
>>>>>>>>> Google also used NuttX on ARA Project, but no single code line 
>>>>>>>>> was
>>>>>>>>> submitted to the NuttX mainline.
>>>>>>>>>
>>>>>>>>> BR,
>>>>>>>>>
>>>>>>>>> Alan
>>>>>>>>>
>>>>>>>>> On Mon, Oct 20, 2025 at 8:07 AM Tomek CEDRO <to...@cedro.info>
>>>>> wrote:
>>>>>>>>>> Hello world :-)
>>>>>>>>>>
>>>>>>>>>> There is a very interesting and useful PR by @JianyuWang0623 
>>>>>>>>>> that
>>>>>>> adds
>>>>>>>>>> support for Android System Init functionality to NuttX [1][2]
>>>>> with
>>>>>>>>>> working example on qemu [3]. This is alternative to SystemV Init
>>>>> and
>>>>>>>>>> probably other init designs. Please help in reviewing the change
>>>>> :-)
>>>>>>>>>> My only concern is naming convention here because just "system"
>>>>> and
>>>>>>>>>> "system init" is used (i.e. CONFIG_SYSTEM_INIT,
>>>>>>> CONFIG_SYSTEM_SYSTEM).
>>>>>>>>>> This may be a bit confusing because we do not know what init
>>>>> system
>>>>>>>>>> standard is used and we silently assume Android. My proposition
>>>>> is to
>>>>>>>>>> use "Android System Init" naming convention (i.e.
>>>>>>>>>> CONFIG_SYSTEM_ANDROID_INIT or something like that), so things 
>>>>>>>>>> are
>>>>>>>>>> self-explanatory, and other init systems may be used when
>>>>> necessary
>>>>>>> in
>>>>>>>>>> future without confusion. I am not insisting here and will
>>>>> follow the
>>>>>>>>>> community choice.
>>>>>>>>>>
>>>>>>>>>> Please let us know what you think :-)
>>>>>>>>>>
>>>>>>>>>> Thanks :-)
>>>>>>>>>> Tomek
>>>>>>>>>>
>>>>>>>>>> [1] https://github.com/apache/nuttx-apps/pull/3192
>>>>>>>>>> [2] https://github.com/apache/nuttx/pull/17215
>>>>>>>>>> [3] https://github.com/apache/nuttx/pull/17215
>>>>>>>>>>
>>>>>>>>>> -- 
>>>>>>>>>> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
>>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> -- 
>>>>>>>> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
>>>>>>>>
>>>>>
>>>>>
>>>>> -- 
>>>>> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
>>>>>
>>>
>>>
>>> -- 
>>> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
>>
>>
>> -- 
>> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
>> #/******本邮件及其附件含有小米公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件! 
>> This e-mail and its attachments contain confidential information from 
>> XIAOMI, which is intended only for the person or entity whose address 
>> is listed above. Any use of the information contained herein in any 
>> way (including, but not limited to, total or partial disclosure, 
>> reproduction, or dissemination) by persons other than the intended 
>> recipient(s) is prohibited. If you receive this e-mail in error, 
>> please notify the sender by phone or email immediately and delete 
>> it!******/#

Re: 答复: [External Mail]Re: NuttX and Android System Init

Posted by Sebastien Lorquet <se...@lorquet.fr>.
Hello

I reviewed your code and I find it very cool.

You did a great job on implementing some quite compact and efficient code.

I like that you did not try to implement properties that look like the 
most complex and probably less usefull stuff of this whole thing. If you 
do want to implement properties, please make sure that this part is 
entirely optional and the code still can be built without it.

However, this init thing is rather specific for complex systems with 
several services. It must absolutely be kept optional and not forced on 
small systems.


Documentation of this program is absolutely a requirement to make it 
shine to its proper value, I think it is so useful and a nice addition 
to NuttX that it must be improved as much as possible so people can use 
it easily without struggles.

I actually see myself trying to use this in one of our products. It 
solves many use cases we had to deal with, including services with 
dependencies, stuff to do after net is initialized, test modes, etc.

I support the inclusion of this app once the naming problems are 
addressed. I have no additional added value here, I already made a 
proposal of a new top directory in apps to support system initialization 
programs, because system/init is a bit too generic.


When I get the occasion I will try to evaluate it and make it work on a 
nucleo based stm32h7 board.


Sebastien


On 10/22/25 07:07, 王健宇 wrote:
> Dear All,
> Thank you, and hello everyone. Please allow me to add some (potentially redundant) information as follows:
>
>    1.
> Reasons for adding this module: As Tomek helped supplement earlier, the main considerations include code size (the shell module is not always required) and daemon management (such as status monitoring and restarting of services).
>    2.
> Reasons for naming it "init": From a functional perspective, this module is used for system initialization. Referring to Linux distributions and Android, modules with similar functions are generally named "systemd" or "init".
>    3.
> Regarding NuttX’s support for multiple init entry points: I conducted a simple filter using the command find boards/ -name defconfig | xargs grep INIT_ENTRYPOINT | cut -d ':' -f 2- | sort -u, and it turns out this is indeed the case. However, not all of their logic is used for system initialization. For example, CONFIG_INIT_ENTRYPOINT="hello_main" and CONFIG_INIT_ENTRYPOINT="ostest_main". The well-known and excellent NSH supports almost all system initialization functions; unfortunately, it lacks daemon management. Moreover, in scenarios where code size is a critical concern, NSH may be somewhat bulky. Therefore, we might need a dedicated module for system initialization.
>    4.
> About the module’s implementation: This module is a new implementation and not a port of Android Init. During the development process, I studied the source code of the excellent Android Init, but this module is more streamlined and compatible with most syntax of the Android Init Language.
>
> Personally, from a functional perspective, I tend to use apps/system/init and CONFIG_SYSTEM_INIT. However, if you have more comprehensive considerations, options like apps/android/init and CONFIG_ANDROID_INIT are also acceptable to me.
>
>
> Best regards,
>
> Jianyu Wang
>
> ________________________________
> 发件人: Tomek CEDRO <to...@cedro.info>
> 发送时间: 2025年10月22日 11:37:31
> 收件人: dev@nuttx.apache.org
> 主题: [External Mail]Re: NuttX and Android System Init
>
> [外部邮件] 此邮件来源于小米公司外部,请谨慎处理。若对邮件安全性存疑,请将邮件转发给misec@xiaomi.com进行反馈
>
> Okay Jianyu Wang, author of the Android System Init in NuttX code,
> joined the dev@ mailing list, welcome, below is the discussion history
> as read from the bottom up direction :-)
> Tomek
>
> On Tue, Oct 21, 2025 at 11:18 PM Tomek CEDRO <to...@cedro.info> wrote:
>> Okay I have provided feedback from the dev@ list to the gh prs and
>> here comes the reply ;-)
>>
>> The main advantages of this Android System Init on NuttX:
>> * it is custom trimmed down code implementing android system init
>> compatible functionality.
>> * it can run as standalone app that replaces nsh.
>> * it provides ~10x smaller footprint over nsh.
>>
>> I invited Wang to join discussion here on the mailing list :-)
>>
>> There may be use cases for this. My proposition is to move all Android
>> related stuff to apps/android that is apps/android/system/init and
>> apps/android/fastboot. Also to rename kconfig variables so instead
>> CONFIG_SYSTEM_SYSTEM it will be CONFIG_ANDROID_SYSTEM or similar? What
>> do you think folks? :-)
>>
>> Thanks :-)
>> Tomek
>>
>>
>>
>>
>>
>>
>>
>>
>> On Tue, Oct 21, 2025 at 8:29 AM Luchian Mihai <lu...@gmail.com> wrote:
>>> Hi Tomek,
>>>
>>> I am already more present in the project overall.
>>> I usually leave comments rather than start reviews (regarding PRs).
>>>
>>> There are already comments on Pull Request for the documentation.
>>> This subject that I've raised was more suited for the mailing list. It
>>> reaches more of the community overall.
>>>
>>> More input than mine is needed if we want a resolution.
>>>
>>> Cheers,
>>> Mihai
>>>
>>> On Tue, 21 Oct 2025 at 02:17, Tomek CEDRO <to...@cedro.info> wrote:
>>>
>>>> Yeah, it is good to have a choice, maybe someone will find this
>>>> solution useful and better fit for some applications, but.. we can
>>>> already see some confusion with all different system / init solutions,
>>>> so we should clearly distinguish the naming and functional separation
>>>> (system system init does not say anything at all), and better
>>>> documentation right from start (like Alan already requested and
>>>> Luchian noted).
>>>>
>>>> Luchian noticed a common but important problem - one person who create
>>>> some solution does not create good (or any) documentation right from
>>>> start and then anyone who touches the solution needs to reinvent the
>>>> wheel, what is tremendous waste of time and resources. I am sometimes
>>>> dropped into such rabbit hole in various projects and it takes weeks
>>>> or months to understand what is going on :D Good point! Luchian could
>>>> you please provide feedback on the Pull Requests too?
>>>>
>>>> Thanks! :-)
>>>> Tomek
>>>>
>>>>
>>>> On Tue, Oct 21, 2025 at 1:00 AM Alan C. Assis <ac...@gmail.com> wrote:
>>>>> Hi Luchian,
>>>>> that is what I suggested in the Documentation: before saying what Android
>>>>> System Init is, the documentation needs to explain what it is solving on
>>>>> NuttX.
>>>>>
>>>>> More important than that: starts explaining the existing solutions and
>>>> when
>>>>> to use them.
>>>>>
>>>>> As Xiang commented in the PR, their initial plan was to implement
>>>> SystemV,
>>>>> but it was more complex (and probably bigger).
>>>>>
>>>>> So Android System Init could be more beneficial for someone implemented
>>>>> deep embedded system with NuttX.
>>>>>
>>>>> But I didn't give up trying to get the SystemV Init implementation from
>>>>> Google, maybe someone there could help us.
>>>>>
>>>>> BR,
>>>>>
>>>>> Alan
>>>>>
>>>>> On Monday, October 20, 2025, Luchian Mihai <lu...@gmail.com>
>>>> wrote:
>>>>>> Hello all,
>>>>>>
>>>>>> This might stir the waters a bit, but I think it needs to be said.
>>>>>>
>>>>>> I know Alan already pointed out the need for docs in the PR comments,
>>>> but
>>>>>> just the documentation is not enough.
>>>>>>
>>>>>> I think we (the community) or the PMC should be more assertive
>>>> regarding
>>>>>> these kinds of features.
>>>>>> Why do we need another init system? What does this new init system
>>>> solve?
>>>>>> What should happen with the previous ones?
>>>>>> Do not get me wrong, I am not against this new init system, I am in
>>>> favour.
>>>>>> While NuttX excels in posix compliance as a single standard, a lot of
>>>> other
>>>>>> things lack unity.
>>>>>> Lacking a "default" way of doing things ends up in "hidden features",
>>>> or
>>>>>> rather, features
>>>>>> that are used and known by a set of people.
>>>>>>
>>>>>> There is also support for fastboot and adb, so the android init system
>>>>>> makes sense,
>>>>>> but I see nothing that explains why they are present in the first
>>>> place.
>>>>>> Did they solve something, some time ago? Is the NuttX project aligning
>>>> with
>>>>>> the android tooling?
>>>>>>
>>>>>> I would like to point out my experience as a new contributor. It took
>>>> me a
>>>>>> few months to get the hang of how the thing should be done,
>>>>>> or at least what the majority agrees. There are board examples that
>>>> differ,
>>>>>> but neither are wrong also.
>>>>>> The system initialization is the same, I've read documentation about
>>>> `exec`
>>>>>> and `posix_spawn` and `task_create`,
>>>>>> and I am writing docs about the flat, protected, kernel build. Yet, I
>>>> still
>>>>>> did not find the "NuttX way to leave" the kernel.
>>>>>> And here we have another init system.
>>>>>>
>>>>>> For me this just feels more of a feature creep than a milestone, sorry.
>>>>>>
>>>>>> It's hard to market (from my own experience) NuttX as anything other
>>>> than
>>>>>> "high quality code" if it takes days to
>>>>>> figure out the solution (out of the existing few) for a specific
>>>> problem.
>>>>>> I suggest defining the expectations about this PR, and make a separate
>>>>>> documentation page.
>>>>>> Is something that NuttX wants to adopt going forward, that is great.
>>>>>> Will it help only part of the community, that is also great.
>>>>>> The only thing I ask is to make that as obvious as possible, it's
>>>> tiring to
>>>>>> "unravel the NuttX lore" from the mailing list.
>>>>>>
>>>>>> Cheers,
>>>>>> Mihai
>>>>>>
>>>>>> On Mon, 20 Oct 2025 at 19:09, Tomek CEDRO <to...@cedro.info> wrote:
>>>>>>
>>>>>>> well. :-(
>>>>>>>
>>>>>>> On Mon, Oct 20, 2025 at 3:02 PM Alan C. Assis <ac...@gmail.com>
>>>> wrote:
>>>>>>>> +1
>>>>>>>>
>>>>>>>> It is better to use the right naming.
>>>>>>>>
>>>>>>>> Fitbit implemented support for System V on NuttX and promised to
>>>> donate
>>>>>>> it,
>>>>>>>> but after Google acquired them, none contribution came from them.
>>>>>>>>
>>>>>>>> Google also used NuttX on ARA Project, but no single code line was
>>>>>>>> submitted to the NuttX mainline.
>>>>>>>>
>>>>>>>> BR,
>>>>>>>>
>>>>>>>> Alan
>>>>>>>>
>>>>>>>> On Mon, Oct 20, 2025 at 8:07 AM Tomek CEDRO <to...@cedro.info>
>>>> wrote:
>>>>>>>>> Hello world :-)
>>>>>>>>>
>>>>>>>>> There is a very interesting and useful PR by @JianyuWang0623 that
>>>>>> adds
>>>>>>>>> support for Android System Init functionality to NuttX [1][2]
>>>> with
>>>>>>>>> working example on qemu [3]. This is alternative to SystemV Init
>>>> and
>>>>>>>>> probably other init designs. Please help in reviewing the change
>>>> :-)
>>>>>>>>> My only concern is naming convention here because just "system"
>>>> and
>>>>>>>>> "system init" is used (i.e. CONFIG_SYSTEM_INIT,
>>>>>> CONFIG_SYSTEM_SYSTEM).
>>>>>>>>> This may be a bit confusing because we do not know what init
>>>> system
>>>>>>>>> standard is used and we silently assume Android. My proposition
>>>> is to
>>>>>>>>> use "Android System Init" naming convention (i.e.
>>>>>>>>> CONFIG_SYSTEM_ANDROID_INIT or something like that), so things are
>>>>>>>>> self-explanatory, and other init systems may be used when
>>>> necessary
>>>>>> in
>>>>>>>>> future without confusion. I am not insisting here and will
>>>> follow the
>>>>>>>>> community choice.
>>>>>>>>>
>>>>>>>>> Please let us know what you think :-)
>>>>>>>>>
>>>>>>>>> Thanks :-)
>>>>>>>>> Tomek
>>>>>>>>>
>>>>>>>>> [1] https://github.com/apache/nuttx-apps/pull/3192
>>>>>>>>> [2] https://github.com/apache/nuttx/pull/17215
>>>>>>>>> [3] https://github.com/apache/nuttx/pull/17215
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
>>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
>>>>>>>
>>>>
>>>>
>>>> --
>>>> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
>>>>
>>
>>
>> --
>> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
>
>
> --
> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
> #/******本邮件及其附件含有小米公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件! This e-mail and its attachments contain confidential information from XIAOMI, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it!******/#

Re: 答复: [External Mail]Re: NuttX and Android System Init

Posted by 王健宇 <wa...@xiaomi.com.INVALID>.
Hi,

Thank you for your efforts.

> Just one question about this pull request:
> https://github.com/apache/nuttx/pull/17216

Adding a new configuration for the Init component is indeed a good
idea; however, it may seem somewhat redundant to add an additional
config for the Fastboot component.

My thought might not be comprehensive enough. What I
proposed was merely selecting one config to switch "seamlessly"
from `nsh_main` to `init_main` (the shell will still be launched,
but via sh instead of nsh) — this was intended as an example.

What troubles me is that, unlike NSH, which has practical functions (such as
parsing scripts and serving as a console), the Init component has almost no
point in creating a config independently. It needs to demonstrate its functions
by starting and managing other daemons.

Best regards,
Jianyu Wang

________________________________
发件人: Sebastien Lorquet <se...@lorquet.fr>
发送时间: 2025年10月22日 18:49
收件人: dev@nuttx.apache.org
主题: Re: 答复: [External Mail]Re: NuttX and Android System Init

[外部邮件] 此邮件来源于小米公司外部,请谨慎处理。若对邮件安全性存疑,请将邮件转发给misec@xiaomi.com进行反馈

Thanks, that was useful to understand context.

I would avoid strong associations that would imply full compatibility
with android. Why not restrict ourselves to suggest this new system is
"based" on android stuff, even if for now it is *very* based on it?

It is using the android init language, but it is an independent
reimplementation, and we may find interesting additional features not
supported by android.


Looking at the pull requests: CONFIG_SYSTEM_INIT kinda implies that this
is THE init system.

CONFIG_SYSTEM_AILINIT and CONFIG_SYSTEM_INIT_AIL is a valid value I
think (if AIL means android init language).

But we could be a bit more radical here since this is a very specific
kind of program.

Could we add a top level "init" directory with your android init in
$(APPS)/init/android ?

Would that solve the problem in a good way ?

This leaves room from many other init systems if people want these instead.

NSH is not really an init system, it is a full shell, and yes, it's
heavy and init scripting is a bit clunky, with dependencies on
automounted romfs and such.


Just one question about this pull request:
https://github.com/apache/nuttx/pull/17216

Can this just be a new configuration instead of modification of an
existing one? There is no reason to *replace* stuff in existing configs.

eg: leave boards/arm64/qemu/qemu-armv8a/configs/fastboot/defconfig
<https://github.com/apache/nuttx/pull/17216/commits/2ba9ce62ecdea6d1501372782cb81798a0743aeb#diff-96078269f3ae76fc83ac8309e6f63c0a4002956cd2a46f4e3ed4f831a8b62c7e> unchanged

and add
boards/arm64/qemu/qemu-armv8a/configs/fastboot_android_init/defconfig
<https://github.com/apache/nuttx/pull/17216/commits/2ba9ce62ecdea6d1501372782cb81798a0743aeb#diff-96078269f3ae76fc83ac8309e6f63c0a4002956cd2a46f4e3ed4f831a8b62c7e>

What do you think?


Sebastien



On 10/22/25 12:26, 王健宇 wrote:
> Hi,
>
>
>> If it's just inspired from android but is an original development, what
>> would prevent the use of the "NuttX Init system"?
>
> The main point discussed here is that Tomek has suggested using the name
> "Android System Init".
>
> Details:https://www.mail-archive.com/dev@nuttx.apache.org/msg13694.html
>
>> Is there interesting value to keep strict compatibility with "original
>> android stuff" ?
>
> The main reason is that the Android Init Language has been verified through
> long-term practice and has well-established specifications. Compatibility
> with this syntax can avoid redundant design and potential pitfalls, thereby
> enhancing the stability and reliability of new modules.
>
> Moreover, developers familiar with the Android ecosystem do not need to
> learn a new syntax (in fact, I am new to the Android Init Language, but it
> is really easy to get started with). This allows them to quickly engage in
> development and maintenance work, reducing the learning costs.
>
> Best regards,
> Jianyu Wang
>
> ________________________________
> 发件人: Sebastien Lorquet<se...@lorquet.fr>
> 发送时间: 2025年10月22日 17:10:02
> 收件人:dev@nuttx.apache.org
> 主题: Re: 答复: [External Mail]Re: NuttX and Android System Init
>
> [外部邮件] 此邮件来源于小米公司外部,请谨慎处理。若对邮件安全性存疑,请将邮件转发给misec@xiaomi.com进行反馈
>
> Hello,
>
> I have well noted that this is fully optional applicative code.
>
> I'll have a look at this when I get some time, because initializing
> things is a common problem in embedded systems and an unified way might
> be a useful thing.
>
> If it's just inspired from android but is an original development, what
> would prevent the use of the "NuttX Init system"?
>
> Inspiration is good, but maybe it's a good occasion to fix flaws you
> found in the original android implementation so it becomes even better?
>
> Is there interesting value to keep strict compatibility with "original
> android stuff" ?
>
> sebastien
>
>
> On 10/22/25 11:01, 王健宇 wrote:
>> Hi,
>>
>> Thank you for your reminder. Please rest assured—regarding the issue you
>> mentioned, here is a detailed clarification:
>>
>> The newly added initialization module is an application program, serving
>> as an independent and optional feature. Users who need this module can
>> switch to it by configuring `INIT_ENTRYPOINT`. My previous description may
>> not have been clear enough, but it was never my intention to replace the
>> `INIT_ENTRYPOINT` of all boards with `init_main`.
>>
>> Thank you again for your thoughtful reminder.
>>
>> Best regards,
>> Jianyu Wang
>>
>> ________________________________
>> 发件人: Sebastien Lorquet<se...@lorquet.fr>
>> 发送时间: 2025年10月22日 16:01:45
>> 收件人:dev@nuttx.apache.org; 王健宇
>> 主题: Re: 答复: [External Mail]Re: NuttX and Android System Init
>>
>> [外部邮件] 此邮件来源于小米公司外部,请谨慎处理。若对邮件安全性存疑,请将邮件转发给misec@xiaomi.com进行反馈
>>
>> Hello
>>
>>
>> Here are some general remarks that may or may not apply ( I did not
>> check enough), please do not take them personally, they do not apply to
>> your idea and are just general warnings.
>>
>>
>> -the boards from nuttx repositories are only samples and are NOT
>> representative of the usual industrial practice that is applied in
>> external boards. Please do not make suppositions about proprietary init
>> systems used by nuttx users.
>>
>>
>> -the startup of daemons is just ONE of the myriad of possibilities to
>> init a system. Please make sure that this init system is ONLY an
>> applicative system that can be entirely be made optional and DO NOT
>> BREAK existing systems like:
>>
>> * nsh and its initialization systems
>>
>> * methods to boot by indicating entry points via names and/or routines.
>>
>>
>> Again, please, do feature creep as you wish (this is a nuttx philosophy
>> by now </irony>) but PLEASE do not remove and break existing frameworks
>> and force everyone to fix their code when updating a release.
>>
>> Not everyone has hours and days of porting efforts to fix breakage.
>>
>> NuttX is a mature project and its features are expected to be stable.
>>
>> Evolution can go forward without being a pain (as much as possible).
>>
>> Sometimes pain is inevitable, but then negotiation must be made on the
>> mailing list to manage it beforehand.
>>
>>
>> Thank you for your attention to every user of nuttx. Use cases are
>> wildly different and you cannot force every user to follow your shiny
>> project.
>>
>> You may not be going in these directions, but some problems like that
>> happened before, were VERY energy and time consuming to manage so the
>> project goes back on track, and I do not wish to deal with that sort of
>> things again.
>>
>>
>> Sebastien
>>
>>
>> On 10/22/25 07:07, 王健宇 wrote:
>>> Dear All,
>>> Thank you, and hello everyone. Please allow me to add some (potentially redundant) information as follows:
>>>
>>>      1.
>>> Reasons for adding this module: As Tomek helped supplement earlier, the main considerations include code size (the shell module is not always required) and daemon management (such as status monitoring and restarting of services).
>>>      2.
>>> Reasons for naming it "init": From a functional perspective, this module is used for system initialization. Referring to Linux distributions and Android, modules with similar functions are generally named "systemd" or "init".
>>>      3.
>>> Regarding NuttX’s support for multiple init entry points: I conducted a simple filter using the command find boards/ -name defconfig | xargs grep INIT_ENTRYPOINT | cut -d ':' -f 2- | sort -u, and it turns out this is indeed the case. However, not all of their logic is used for system initialization. For example, CONFIG_INIT_ENTRYPOINT="hello_main" and CONFIG_INIT_ENTRYPOINT="ostest_main". The well-known and excellent NSH supports almost all system initialization functions; unfortunately, it lacks daemon management. Moreover, in scenarios where code size is a critical concern, NSH may be somewhat bulky. Therefore, we might need a dedicated module for system initialization.
>>>      4.
>>> About the module’s implementation: This module is a new implementation and not a port of Android Init. During the development process, I studied the source code of the excellent Android Init, but this module is more streamlined and compatible with most syntax of the Android Init Language.
>>>
>>> Personally, from a functional perspective, I tend to use apps/system/init and CONFIG_SYSTEM_INIT. However, if you have more comprehensive considerations, options like apps/android/init and CONFIG_ANDROID_INIT are also acceptable to me.
>>>
>>>
>>> Best regards,
>>>
>>> Jianyu Wang
>>>
>>> ________________________________
>>> 发件人: Tomek CEDRO<to...@cedro.info>
>>> 发送时间: 2025年10月22日 11:37:31
>>> 收件人:dev@nuttx.apache.org
>>> 主题: [External Mail]Re: NuttX and Android System Init
>>>
>>> [外部邮件] 此邮件来源于小米公司外部,请谨慎处理。若对邮件安全性存疑,请将邮件转发给misec@xiaomi.com进行反馈
>>>
>>> Okay Jianyu Wang, author of the Android System Init in NuttX code,
>>> joined the dev@ mailing list, welcome, below is the discussion history
>>> as read from the bottom up direction :-)
>>> Tomek
>>>
>>> On Tue, Oct 21, 2025 at 11:18 PM Tomek CEDRO<to...@cedro.info> wrote:
>>>> Okay I have provided feedback from the dev@ list to the gh prs and
>>>> here comes the reply ;-)
>>>>
>>>> The main advantages of this Android System Init on NuttX:
>>>> * it is custom trimmed down code implementing android system init
>>>> compatible functionality.
>>>> * it can run as standalone app that replaces nsh.
>>>> * it provides ~10x smaller footprint over nsh.
>>>>
>>>> I invited Wang to join discussion here on the mailing list :-)
>>>>
>>>> There may be use cases for this. My proposition is to move all Android
>>>> related stuff to apps/android that is apps/android/system/init and
>>>> apps/android/fastboot. Also to rename kconfig variables so instead
>>>> CONFIG_SYSTEM_SYSTEM it will be CONFIG_ANDROID_SYSTEM or similar? What
>>>> do you think folks? :-)
>>>>
>>>> Thanks :-)
>>>> Tomek
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Tue, Oct 21, 2025 at 8:29 AM Luchian Mihai<lu...@gmail.com> wrote:
>>>>> Hi Tomek,
>>>>>
>>>>> I am already more present in the project overall.
>>>>> I usually leave comments rather than start reviews (regarding PRs).
>>>>>
>>>>> There are already comments on Pull Request for the documentation.
>>>>> This subject that I've raised was more suited for the mailing list. It
>>>>> reaches more of the community overall.
>>>>>
>>>>> More input than mine is needed if we want a resolution.
>>>>>
>>>>> Cheers,
>>>>> Mihai
>>>>>
>>>>> On Tue, 21 Oct 2025 at 02:17, Tomek CEDRO<to...@cedro.info> wrote:
>>>>>
>>>>>> Yeah, it is good to have a choice, maybe someone will find this
>>>>>> solution useful and better fit for some applications, but.. we can
>>>>>> already see some confusion with all different system / init solutions,
>>>>>> so we should clearly distinguish the naming and functional separation
>>>>>> (system system init does not say anything at all), and better
>>>>>> documentation right from start (like Alan already requested and
>>>>>> Luchian noted).
>>>>>>
>>>>>> Luchian noticed a common but important problem - one person who create
>>>>>> some solution does not create good (or any) documentation right from
>>>>>> start and then anyone who touches the solution needs to reinvent the
>>>>>> wheel, what is tremendous waste of time and resources. I am sometimes
>>>>>> dropped into such rabbit hole in various projects and it takes weeks
>>>>>> or months to understand what is going on :D Good point! Luchian could
>>>>>> you please provide feedback on the Pull Requests too?
>>>>>>
>>>>>> Thanks! :-)
>>>>>> Tomek
>>>>>>
>>>>>>
>>>>>> On Tue, Oct 21, 2025 at 1:00 AM Alan C. Assis<ac...@gmail.com> wrote:
>>>>>>> Hi Luchian,
>>>>>>> that is what I suggested in the Documentation: before saying what Android
>>>>>>> System Init is, the documentation needs to explain what it is solving on
>>>>>>> NuttX.
>>>>>>>
>>>>>>> More important than that: starts explaining the existing solutions and
>>>>>> when
>>>>>>> to use them.
>>>>>>>
>>>>>>> As Xiang commented in the PR, their initial plan was to implement
>>>>>> SystemV,
>>>>>>> but it was more complex (and probably bigger).
>>>>>>>
>>>>>>> So Android System Init could be more beneficial for someone implemented
>>>>>>> deep embedded system with NuttX.
>>>>>>>
>>>>>>> But I didn't give up trying to get the SystemV Init implementation from
>>>>>>> Google, maybe someone there could help us.
>>>>>>>
>>>>>>> BR,
>>>>>>>
>>>>>>> Alan
>>>>>>>
>>>>>>> On Monday, October 20, 2025, Luchian Mihai<lu...@gmail.com>
>>>>>> wrote:
>>>>>>>> Hello all,
>>>>>>>>
>>>>>>>> This might stir the waters a bit, but I think it needs to be said.
>>>>>>>>
>>>>>>>> I know Alan already pointed out the need for docs in the PR comments,
>>>>>> but
>>>>>>>> just the documentation is not enough.
>>>>>>>>
>>>>>>>> I think we (the community) or the PMC should be more assertive
>>>>>> regarding
>>>>>>>> these kinds of features.
>>>>>>>> Why do we need another init system? What does this new init system
>>>>>> solve?
>>>>>>>> What should happen with the previous ones?
>>>>>>>> Do not get me wrong, I am not against this new init system, I am in
>>>>>> favour.
>>>>>>>> While NuttX excels in posix compliance as a single standard, a lot of
>>>>>> other
>>>>>>>> things lack unity.
>>>>>>>> Lacking a "default" way of doing things ends up in "hidden features",
>>>>>> or
>>>>>>>> rather, features
>>>>>>>> that are used and known by a set of people.
>>>>>>>>
>>>>>>>> There is also support for fastboot and adb, so the android init system
>>>>>>>> makes sense,
>>>>>>>> but I see nothing that explains why they are present in the first
>>>>>> place.
>>>>>>>> Did they solve something, some time ago? Is the NuttX project aligning
>>>>>> with
>>>>>>>> the android tooling?
>>>>>>>>
>>>>>>>> I would like to point out my experience as a new contributor. It took
>>>>>> me a
>>>>>>>> few months to get the hang of how the thing should be done,
>>>>>>>> or at least what the majority agrees. There are board examples that
>>>>>> differ,
>>>>>>>> but neither are wrong also.
>>>>>>>> The system initialization is the same, I've read documentation about
>>>>>> `exec`
>>>>>>>> and `posix_spawn` and `task_create`,
>>>>>>>> and I am writing docs about the flat, protected, kernel build. Yet, I
>>>>>> still
>>>>>>>> did not find the "NuttX way to leave" the kernel.
>>>>>>>> And here we have another init system.
>>>>>>>>
>>>>>>>> For me this just feels more of a feature creep than a milestone, sorry.
>>>>>>>>
>>>>>>>> It's hard to market (from my own experience) NuttX as anything other
>>>>>> than
>>>>>>>> "high quality code" if it takes days to
>>>>>>>> figure out the solution (out of the existing few) for a specific
>>>>>> problem.
>>>>>>>> I suggest defining the expectations about this PR, and make a separate
>>>>>>>> documentation page.
>>>>>>>> Is something that NuttX wants to adopt going forward, that is great.
>>>>>>>> Will it help only part of the community, that is also great.
>>>>>>>> The only thing I ask is to make that as obvious as possible, it's
>>>>>> tiring to
>>>>>>>> "unravel the NuttX lore" from the mailing list.
>>>>>>>>
>>>>>>>> Cheers,
>>>>>>>> Mihai
>>>>>>>>
>>>>>>>> On Mon, 20 Oct 2025 at 19:09, Tomek CEDRO<to...@cedro.info> wrote:
>>>>>>>>
>>>>>>>>> well. :-(
>>>>>>>>>
>>>>>>>>> On Mon, Oct 20, 2025 at 3:02 PM Alan C. Assis<ac...@gmail.com>
>>>>>> wrote:
>>>>>>>>>> +1
>>>>>>>>>>
>>>>>>>>>> It is better to use the right naming.
>>>>>>>>>>
>>>>>>>>>> Fitbit implemented support for System V on NuttX and promised to
>>>>>> donate
>>>>>>>>> it,
>>>>>>>>>> but after Google acquired them, none contribution came from them.
>>>>>>>>>>
>>>>>>>>>> Google also used NuttX on ARA Project, but no single code line was
>>>>>>>>>> submitted to the NuttX mainline.
>>>>>>>>>>
>>>>>>>>>> BR,
>>>>>>>>>>
>>>>>>>>>> Alan
>>>>>>>>>>
>>>>>>>>>> On Mon, Oct 20, 2025 at 8:07 AM Tomek CEDRO<to...@cedro.info>
>>>>>> wrote:
>>>>>>>>>>> Hello world :-)
>>>>>>>>>>>
>>>>>>>>>>> There is a very interesting and useful PR by @JianyuWang0623 that
>>>>>>>> adds
>>>>>>>>>>> support for Android System Init functionality to NuttX [1][2]
>>>>>> with
>>>>>>>>>>> working example on qemu [3]. This is alternative to SystemV Init
>>>>>> and
>>>>>>>>>>> probably other init designs. Please help in reviewing the change
>>>>>> :-)
>>>>>>>>>>> My only concern is naming convention here because just "system"
>>>>>> and
>>>>>>>>>>> "system init" is used (i.e. CONFIG_SYSTEM_INIT,
>>>>>>>> CONFIG_SYSTEM_SYSTEM).
>>>>>>>>>>> This may be a bit confusing because we do not know what init
>>>>>> system
>>>>>>>>>>> standard is used and we silently assume Android. My proposition
>>>>>> is to
>>>>>>>>>>> use "Android System Init" naming convention (i.e.
>>>>>>>>>>> CONFIG_SYSTEM_ANDROID_INIT or something like that), so things are
>>>>>>>>>>> self-explanatory, and other init systems may be used when
>>>>>> necessary
>>>>>>>> in
>>>>>>>>>>> future without confusion. I am not insisting here and will
>>>>>> follow the
>>>>>>>>>>> community choice.
>>>>>>>>>>>
>>>>>>>>>>> Please let us know what you think :-)
>>>>>>>>>>>
>>>>>>>>>>> Thanks :-)
>>>>>>>>>>> Tomek
>>>>>>>>>>>
>>>>>>>>>>> [1]https://github.com/apache/nuttx-apps/pull/3192
>>>>>>>>>>> [2]https://github.com/apache/nuttx/pull/17215
>>>>>>>>>>> [3]https://github.com/apache/nuttx/pull/17215
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> CeDeROM, SQ7MHZ,http://www.tomek.cedro.info
>>>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> CeDeROM, SQ7MHZ,http://www.tomek.cedro.info
>>>>>>>>>
>>>>>> --
>>>>>> CeDeROM, SQ7MHZ,http://www.tomek.cedro.info
>>>>>>
>>>> --
>>>> CeDeROM, SQ7MHZ,http://www.tomek.cedro.info
>>> --
>>> CeDeROM, SQ7MHZ,http://www.tomek.cedro.info
>>> #/******本邮件及其附件含有小米公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件! This e-mail and its attachments contain confidential information from XIAOMI, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it!******/#
>> #/******本邮件及其附件含有小米公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件! This e-mail and its attachments contain confidential information from XIAOMI, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it!******/#
> #/******本邮件及其附件含有小米公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件! This e-mail and its attachments contain confidential information from XIAOMI, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it!******/#
#/******本邮件及其附件含有小米公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件! This e-mail and its attachments contain confidential information from XIAOMI, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it!******/#

Re: 答复: [External Mail]Re: NuttX and Android System Init

Posted by Sebastien Lorquet <se...@lorquet.fr>.
Thanks, that was useful to understand context.

I would avoid strong associations that would imply full compatibility 
with android. Why not restrict ourselves to suggest this new system is 
"based" on android stuff, even if for now it is *very* based on it?

It is using the android init language, but it is an independent 
reimplementation, and we may find interesting additional features not 
supported by android.


Looking at the pull requests: CONFIG_SYSTEM_INIT kinda implies that this 
is THE init system.

CONFIG_SYSTEM_AILINIT and CONFIG_SYSTEM_INIT_AIL is a valid value I 
think (if AIL means android init language).

But we could be a bit more radical here since this is a very specific 
kind of program.

Could we add a top level "init" directory with your android init in 
$(APPS)/init/android ?

Would that solve the problem in a good way ?

This leaves room from many other init systems if people want these instead.

NSH is not really an init system, it is a full shell, and yes, it's 
heavy and init scripting is a bit clunky, with dependencies on 
automounted romfs and such.


Just one question about this pull request: 
https://github.com/apache/nuttx/pull/17216

Can this just be a new configuration instead of modification of an 
existing one? There is no reason to *replace* stuff in existing configs.

eg: leave boards/arm64/qemu/qemu-armv8a/configs/fastboot/defconfig 
<https://github.com/apache/nuttx/pull/17216/commits/2ba9ce62ecdea6d1501372782cb81798a0743aeb#diff-96078269f3ae76fc83ac8309e6f63c0a4002956cd2a46f4e3ed4f831a8b62c7e> unchanged

and add 
boards/arm64/qemu/qemu-armv8a/configs/fastboot_android_init/defconfig 
<https://github.com/apache/nuttx/pull/17216/commits/2ba9ce62ecdea6d1501372782cb81798a0743aeb#diff-96078269f3ae76fc83ac8309e6f63c0a4002956cd2a46f4e3ed4f831a8b62c7e>

What do you think?


Sebastien



On 10/22/25 12:26, 王健宇 wrote:
> Hi,
>
>
>> If it's just inspired from android but is an original development, what
>> would prevent the use of the "NuttX Init system"?
>
> The main point discussed here is that Tomek has suggested using the name
> "Android System Init".
>
> Details:https://www.mail-archive.com/dev@nuttx.apache.org/msg13694.html
>
>> Is there interesting value to keep strict compatibility with "original
>> android stuff" ?
>
> The main reason is that the Android Init Language has been verified through
> long-term practice and has well-established specifications. Compatibility
> with this syntax can avoid redundant design and potential pitfalls, thereby
> enhancing the stability and reliability of new modules.
>
> Moreover, developers familiar with the Android ecosystem do not need to
> learn a new syntax (in fact, I am new to the Android Init Language, but it
> is really easy to get started with). This allows them to quickly engage in
> development and maintenance work, reducing the learning costs.
>
> Best regards,
> Jianyu Wang
>
> ________________________________
> 发件人: Sebastien Lorquet<se...@lorquet.fr>
> 发送时间: 2025年10月22日 17:10:02
> 收件人:dev@nuttx.apache.org
> 主题: Re: 答复: [External Mail]Re: NuttX and Android System Init
>
> [外部邮件] 此邮件来源于小米公司外部,请谨慎处理。若对邮件安全性存疑,请将邮件转发给misec@xiaomi.com进行反馈
>
> Hello,
>
> I have well noted that this is fully optional applicative code.
>
> I'll have a look at this when I get some time, because initializing
> things is a common problem in embedded systems and an unified way might
> be a useful thing.
>
> If it's just inspired from android but is an original development, what
> would prevent the use of the "NuttX Init system"?
>
> Inspiration is good, but maybe it's a good occasion to fix flaws you
> found in the original android implementation so it becomes even better?
>
> Is there interesting value to keep strict compatibility with "original
> android stuff" ?
>
> sebastien
>
>
> On 10/22/25 11:01, 王健宇 wrote:
>> Hi,
>>
>> Thank you for your reminder. Please rest assured—regarding the issue you
>> mentioned, here is a detailed clarification:
>>
>> The newly added initialization module is an application program, serving
>> as an independent and optional feature. Users who need this module can
>> switch to it by configuring `INIT_ENTRYPOINT`. My previous description may
>> not have been clear enough, but it was never my intention to replace the
>> `INIT_ENTRYPOINT` of all boards with `init_main`.
>>
>> Thank you again for your thoughtful reminder.
>>
>> Best regards,
>> Jianyu Wang
>>
>> ________________________________
>> 发件人: Sebastien Lorquet<se...@lorquet.fr>
>> 发送时间: 2025年10月22日 16:01:45
>> 收件人:dev@nuttx.apache.org; 王健宇
>> 主题: Re: 答复: [External Mail]Re: NuttX and Android System Init
>>
>> [外部邮件] 此邮件来源于小米公司外部,请谨慎处理。若对邮件安全性存疑,请将邮件转发给misec@xiaomi.com进行反馈
>>
>> Hello
>>
>>
>> Here are some general remarks that may or may not apply ( I did not
>> check enough), please do not take them personally, they do not apply to
>> your idea and are just general warnings.
>>
>>
>> -the boards from nuttx repositories are only samples and are NOT
>> representative of the usual industrial practice that is applied in
>> external boards. Please do not make suppositions about proprietary init
>> systems used by nuttx users.
>>
>>
>> -the startup of daemons is just ONE of the myriad of possibilities to
>> init a system. Please make sure that this init system is ONLY an
>> applicative system that can be entirely be made optional and DO NOT
>> BREAK existing systems like:
>>
>> * nsh and its initialization systems
>>
>> * methods to boot by indicating entry points via names and/or routines.
>>
>>
>> Again, please, do feature creep as you wish (this is a nuttx philosophy
>> by now </irony>) but PLEASE do not remove and break existing frameworks
>> and force everyone to fix their code when updating a release.
>>
>> Not everyone has hours and days of porting efforts to fix breakage.
>>
>> NuttX is a mature project and its features are expected to be stable.
>>
>> Evolution can go forward without being a pain (as much as possible).
>>
>> Sometimes pain is inevitable, but then negotiation must be made on the
>> mailing list to manage it beforehand.
>>
>>
>> Thank you for your attention to every user of nuttx. Use cases are
>> wildly different and you cannot force every user to follow your shiny
>> project.
>>
>> You may not be going in these directions, but some problems like that
>> happened before, were VERY energy and time consuming to manage so the
>> project goes back on track, and I do not wish to deal with that sort of
>> things again.
>>
>>
>> Sebastien
>>
>>
>> On 10/22/25 07:07, 王健宇 wrote:
>>> Dear All,
>>> Thank you, and hello everyone. Please allow me to add some (potentially redundant) information as follows:
>>>
>>>      1.
>>> Reasons for adding this module: As Tomek helped supplement earlier, the main considerations include code size (the shell module is not always required) and daemon management (such as status monitoring and restarting of services).
>>>      2.
>>> Reasons for naming it "init": From a functional perspective, this module is used for system initialization. Referring to Linux distributions and Android, modules with similar functions are generally named "systemd" or "init".
>>>      3.
>>> Regarding NuttX’s support for multiple init entry points: I conducted a simple filter using the command find boards/ -name defconfig | xargs grep INIT_ENTRYPOINT | cut -d ':' -f 2- | sort -u, and it turns out this is indeed the case. However, not all of their logic is used for system initialization. For example, CONFIG_INIT_ENTRYPOINT="hello_main" and CONFIG_INIT_ENTRYPOINT="ostest_main". The well-known and excellent NSH supports almost all system initialization functions; unfortunately, it lacks daemon management. Moreover, in scenarios where code size is a critical concern, NSH may be somewhat bulky. Therefore, we might need a dedicated module for system initialization.
>>>      4.
>>> About the module’s implementation: This module is a new implementation and not a port of Android Init. During the development process, I studied the source code of the excellent Android Init, but this module is more streamlined and compatible with most syntax of the Android Init Language.
>>>
>>> Personally, from a functional perspective, I tend to use apps/system/init and CONFIG_SYSTEM_INIT. However, if you have more comprehensive considerations, options like apps/android/init and CONFIG_ANDROID_INIT are also acceptable to me.
>>>
>>>
>>> Best regards,
>>>
>>> Jianyu Wang
>>>
>>> ________________________________
>>> 发件人: Tomek CEDRO<to...@cedro.info>
>>> 发送时间: 2025年10月22日 11:37:31
>>> 收件人:dev@nuttx.apache.org
>>> 主题: [External Mail]Re: NuttX and Android System Init
>>>
>>> [外部邮件] 此邮件来源于小米公司外部,请谨慎处理。若对邮件安全性存疑,请将邮件转发给misec@xiaomi.com进行反馈
>>>
>>> Okay Jianyu Wang, author of the Android System Init in NuttX code,
>>> joined the dev@ mailing list, welcome, below is the discussion history
>>> as read from the bottom up direction :-)
>>> Tomek
>>>
>>> On Tue, Oct 21, 2025 at 11:18 PM Tomek CEDRO<to...@cedro.info> wrote:
>>>> Okay I have provided feedback from the dev@ list to the gh prs and
>>>> here comes the reply ;-)
>>>>
>>>> The main advantages of this Android System Init on NuttX:
>>>> * it is custom trimmed down code implementing android system init
>>>> compatible functionality.
>>>> * it can run as standalone app that replaces nsh.
>>>> * it provides ~10x smaller footprint over nsh.
>>>>
>>>> I invited Wang to join discussion here on the mailing list :-)
>>>>
>>>> There may be use cases for this. My proposition is to move all Android
>>>> related stuff to apps/android that is apps/android/system/init and
>>>> apps/android/fastboot. Also to rename kconfig variables so instead
>>>> CONFIG_SYSTEM_SYSTEM it will be CONFIG_ANDROID_SYSTEM or similar? What
>>>> do you think folks? :-)
>>>>
>>>> Thanks :-)
>>>> Tomek
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Tue, Oct 21, 2025 at 8:29 AM Luchian Mihai<lu...@gmail.com> wrote:
>>>>> Hi Tomek,
>>>>>
>>>>> I am already more present in the project overall.
>>>>> I usually leave comments rather than start reviews (regarding PRs).
>>>>>
>>>>> There are already comments on Pull Request for the documentation.
>>>>> This subject that I've raised was more suited for the mailing list. It
>>>>> reaches more of the community overall.
>>>>>
>>>>> More input than mine is needed if we want a resolution.
>>>>>
>>>>> Cheers,
>>>>> Mihai
>>>>>
>>>>> On Tue, 21 Oct 2025 at 02:17, Tomek CEDRO<to...@cedro.info> wrote:
>>>>>
>>>>>> Yeah, it is good to have a choice, maybe someone will find this
>>>>>> solution useful and better fit for some applications, but.. we can
>>>>>> already see some confusion with all different system / init solutions,
>>>>>> so we should clearly distinguish the naming and functional separation
>>>>>> (system system init does not say anything at all), and better
>>>>>> documentation right from start (like Alan already requested and
>>>>>> Luchian noted).
>>>>>>
>>>>>> Luchian noticed a common but important problem - one person who create
>>>>>> some solution does not create good (or any) documentation right from
>>>>>> start and then anyone who touches the solution needs to reinvent the
>>>>>> wheel, what is tremendous waste of time and resources. I am sometimes
>>>>>> dropped into such rabbit hole in various projects and it takes weeks
>>>>>> or months to understand what is going on :D Good point! Luchian could
>>>>>> you please provide feedback on the Pull Requests too?
>>>>>>
>>>>>> Thanks! :-)
>>>>>> Tomek
>>>>>>
>>>>>>
>>>>>> On Tue, Oct 21, 2025 at 1:00 AM Alan C. Assis<ac...@gmail.com> wrote:
>>>>>>> Hi Luchian,
>>>>>>> that is what I suggested in the Documentation: before saying what Android
>>>>>>> System Init is, the documentation needs to explain what it is solving on
>>>>>>> NuttX.
>>>>>>>
>>>>>>> More important than that: starts explaining the existing solutions and
>>>>>> when
>>>>>>> to use them.
>>>>>>>
>>>>>>> As Xiang commented in the PR, their initial plan was to implement
>>>>>> SystemV,
>>>>>>> but it was more complex (and probably bigger).
>>>>>>>
>>>>>>> So Android System Init could be more beneficial for someone implemented
>>>>>>> deep embedded system with NuttX.
>>>>>>>
>>>>>>> But I didn't give up trying to get the SystemV Init implementation from
>>>>>>> Google, maybe someone there could help us.
>>>>>>>
>>>>>>> BR,
>>>>>>>
>>>>>>> Alan
>>>>>>>
>>>>>>> On Monday, October 20, 2025, Luchian Mihai<lu...@gmail.com>
>>>>>> wrote:
>>>>>>>> Hello all,
>>>>>>>>
>>>>>>>> This might stir the waters a bit, but I think it needs to be said.
>>>>>>>>
>>>>>>>> I know Alan already pointed out the need for docs in the PR comments,
>>>>>> but
>>>>>>>> just the documentation is not enough.
>>>>>>>>
>>>>>>>> I think we (the community) or the PMC should be more assertive
>>>>>> regarding
>>>>>>>> these kinds of features.
>>>>>>>> Why do we need another init system? What does this new init system
>>>>>> solve?
>>>>>>>> What should happen with the previous ones?
>>>>>>>> Do not get me wrong, I am not against this new init system, I am in
>>>>>> favour.
>>>>>>>> While NuttX excels in posix compliance as a single standard, a lot of
>>>>>> other
>>>>>>>> things lack unity.
>>>>>>>> Lacking a "default" way of doing things ends up in "hidden features",
>>>>>> or
>>>>>>>> rather, features
>>>>>>>> that are used and known by a set of people.
>>>>>>>>
>>>>>>>> There is also support for fastboot and adb, so the android init system
>>>>>>>> makes sense,
>>>>>>>> but I see nothing that explains why they are present in the first
>>>>>> place.
>>>>>>>> Did they solve something, some time ago? Is the NuttX project aligning
>>>>>> with
>>>>>>>> the android tooling?
>>>>>>>>
>>>>>>>> I would like to point out my experience as a new contributor. It took
>>>>>> me a
>>>>>>>> few months to get the hang of how the thing should be done,
>>>>>>>> or at least what the majority agrees. There are board examples that
>>>>>> differ,
>>>>>>>> but neither are wrong also.
>>>>>>>> The system initialization is the same, I've read documentation about
>>>>>> `exec`
>>>>>>>> and `posix_spawn` and `task_create`,
>>>>>>>> and I am writing docs about the flat, protected, kernel build. Yet, I
>>>>>> still
>>>>>>>> did not find the "NuttX way to leave" the kernel.
>>>>>>>> And here we have another init system.
>>>>>>>>
>>>>>>>> For me this just feels more of a feature creep than a milestone, sorry.
>>>>>>>>
>>>>>>>> It's hard to market (from my own experience) NuttX as anything other
>>>>>> than
>>>>>>>> "high quality code" if it takes days to
>>>>>>>> figure out the solution (out of the existing few) for a specific
>>>>>> problem.
>>>>>>>> I suggest defining the expectations about this PR, and make a separate
>>>>>>>> documentation page.
>>>>>>>> Is something that NuttX wants to adopt going forward, that is great.
>>>>>>>> Will it help only part of the community, that is also great.
>>>>>>>> The only thing I ask is to make that as obvious as possible, it's
>>>>>> tiring to
>>>>>>>> "unravel the NuttX lore" from the mailing list.
>>>>>>>>
>>>>>>>> Cheers,
>>>>>>>> Mihai
>>>>>>>>
>>>>>>>> On Mon, 20 Oct 2025 at 19:09, Tomek CEDRO<to...@cedro.info> wrote:
>>>>>>>>
>>>>>>>>> well. :-(
>>>>>>>>>
>>>>>>>>> On Mon, Oct 20, 2025 at 3:02 PM Alan C. Assis<ac...@gmail.com>
>>>>>> wrote:
>>>>>>>>>> +1
>>>>>>>>>>
>>>>>>>>>> It is better to use the right naming.
>>>>>>>>>>
>>>>>>>>>> Fitbit implemented support for System V on NuttX and promised to
>>>>>> donate
>>>>>>>>> it,
>>>>>>>>>> but after Google acquired them, none contribution came from them.
>>>>>>>>>>
>>>>>>>>>> Google also used NuttX on ARA Project, but no single code line was
>>>>>>>>>> submitted to the NuttX mainline.
>>>>>>>>>>
>>>>>>>>>> BR,
>>>>>>>>>>
>>>>>>>>>> Alan
>>>>>>>>>>
>>>>>>>>>> On Mon, Oct 20, 2025 at 8:07 AM Tomek CEDRO<to...@cedro.info>
>>>>>> wrote:
>>>>>>>>>>> Hello world :-)
>>>>>>>>>>>
>>>>>>>>>>> There is a very interesting and useful PR by @JianyuWang0623 that
>>>>>>>> adds
>>>>>>>>>>> support for Android System Init functionality to NuttX [1][2]
>>>>>> with
>>>>>>>>>>> working example on qemu [3]. This is alternative to SystemV Init
>>>>>> and
>>>>>>>>>>> probably other init designs. Please help in reviewing the change
>>>>>> :-)
>>>>>>>>>>> My only concern is naming convention here because just "system"
>>>>>> and
>>>>>>>>>>> "system init" is used (i.e. CONFIG_SYSTEM_INIT,
>>>>>>>> CONFIG_SYSTEM_SYSTEM).
>>>>>>>>>>> This may be a bit confusing because we do not know what init
>>>>>> system
>>>>>>>>>>> standard is used and we silently assume Android. My proposition
>>>>>> is to
>>>>>>>>>>> use "Android System Init" naming convention (i.e.
>>>>>>>>>>> CONFIG_SYSTEM_ANDROID_INIT or something like that), so things are
>>>>>>>>>>> self-explanatory, and other init systems may be used when
>>>>>> necessary
>>>>>>>> in
>>>>>>>>>>> future without confusion. I am not insisting here and will
>>>>>> follow the
>>>>>>>>>>> community choice.
>>>>>>>>>>>
>>>>>>>>>>> Please let us know what you think :-)
>>>>>>>>>>>
>>>>>>>>>>> Thanks :-)
>>>>>>>>>>> Tomek
>>>>>>>>>>>
>>>>>>>>>>> [1]https://github.com/apache/nuttx-apps/pull/3192
>>>>>>>>>>> [2]https://github.com/apache/nuttx/pull/17215
>>>>>>>>>>> [3]https://github.com/apache/nuttx/pull/17215
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> CeDeROM, SQ7MHZ,http://www.tomek.cedro.info
>>>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> CeDeROM, SQ7MHZ,http://www.tomek.cedro.info
>>>>>>>>>
>>>>>> --
>>>>>> CeDeROM, SQ7MHZ,http://www.tomek.cedro.info
>>>>>>
>>>> --
>>>> CeDeROM, SQ7MHZ,http://www.tomek.cedro.info
>>> --
>>> CeDeROM, SQ7MHZ,http://www.tomek.cedro.info
>>> #/******本邮件及其附件含有小米公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件! This e-mail and its attachments contain confidential information from XIAOMI, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it!******/#
>> #/******本邮件及其附件含有小米公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件! This e-mail and its attachments contain confidential information from XIAOMI, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it!******/#
> #/******本邮件及其附件含有小米公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件! This e-mail and its attachments contain confidential information from XIAOMI, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it!******/#

Re: 答复: [External Mail]Re: NuttX and Android System Init

Posted by Tomek CEDRO <to...@cedro.info>.
On Wed, Oct 22, 2025 at 12:26 PM 王健宇 <wa...@xiaomi.com.invalid> wrote:
> Hi,
> > If it's just inspired from android but is an original development, what
> > would prevent the use of the "NuttX Init system"?
>
> The main point discussed here is that Tomek has suggested using the name
> "Android System Init".

If you web search "nuttx init" there are already popping up results:

[1] https://github.com/apache/nuttx/blob/master/sched/init/nx_start.c
[2] https://nuttx.apache.org/docs/latest/applications/nsh/installation.html
[3] https://nuttx.apache.org/docs/latest/faq/index.html#how-to-start-directly-my-application-instead-starting-nsh
[4] https://www.youtube.com/watch?v=jYvCe8yQ1OY

It looks like "init" component is already present in the NuttX. It is
the entry point for scheduler [1] that defaults to nsh but can be
replaced with any other function via kconfig interface [2][3][4]
(CONFIG_INIT_ENTRYPOINT).

Adding application named just "init" / "system init" that will be
called by existing "init" / "sched init" / "nuttx init" / "system
init" is confusing because this name was so far reserved to NuttX
functionality and is already associated so. This does not self-explain
whether we are talking about "application" init or the "rtos" init.
Then, talking about "init script" will not self-explain if we are
talking about "nsh init script" or the "application init script
compatible with android system init".

Alan mentioned interest in yet another SystemV Init. So there may be
yet another init possible.

This is why I propose to use right from start clear and
self-explanatory distinction for the new code proposition to use
"Android System Init" in nomenclature, in documentation, in files
structure, and in variables structure. This way we will quickly know
if we are talking about "NuttX Init" (scheduler) or the "Android
System Init" (application) :-)

This new functionality also needs good documentation, to explain what
it offers (i.e. starting or scheduling other applications), what are
benefits (i.e. reduced firmware size), what are implementation
limitations (i.e. not fully compatible), and how to use it (i.e.
examples). References to this new functionality also should show up in
existing documentation places that mention init / initalization (i.e.
[2][3]). There will be use cases where this solution is highly
desirable and users should find it easily in the documentation in
various existing places mentioning system initialization and then go
to dedicated detailed description.

As this System Init is second application next to Fastboot that comes
from Android ecosystem my proposition is to create dedicated
apps/android location to keep all Android related components in one
place so these are clearly visible and distinguishable from
"apps/system" that is "NuttX system" applications. Probably more
solutions will show up there. That way user will easily know what
Android solutions are ported to NuttX, even if these are minimalistic
implementations that provide only selected parts of functionality
(that should be clearly documented too).

Have a good day folks :-)
Tomek

ps/2: For some time I am thinking about porting NuttX to Android
(using NDK) along with LVGL to see if that can be used as alternative
minimalistic and long term self compatible solution to create mobile
applications. Parts of this would propably land into rtos/arch and
parts in the apps/android. Thus my thoughts here. Its just in my long
queue of todo :-P

-- 
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info

Re: 答复: [External Mail]Re: NuttX and Android System Init

Posted by 王健宇 <wa...@xiaomi.com.INVALID>.
Hi,


> If it's just inspired from android but is an original development, what
> would prevent the use of the "NuttX Init system"?


The main point discussed here is that Tomek has suggested using the name
"Android System Init".

Details: https://www.mail-archive.com/dev@nuttx.apache.org/msg13694.html

> Is there interesting value to keep strict compatibility with "original
> android stuff" ?


The main reason is that the Android Init Language has been verified through
long-term practice and has well-established specifications. Compatibility
with this syntax can avoid redundant design and potential pitfalls, thereby
enhancing the stability and reliability of new modules.

Moreover, developers familiar with the Android ecosystem do not need to
learn a new syntax (in fact, I am new to the Android Init Language, but it
is really easy to get started with). This allows them to quickly engage in
development and maintenance work, reducing the learning costs.

Best regards,
Jianyu Wang

________________________________
发件人: Sebastien Lorquet <se...@lorquet.fr>
发送时间: 2025年10月22日 17:10:02
收件人: dev@nuttx.apache.org
主题: Re: 答复: [External Mail]Re: NuttX and Android System Init

[外部邮件] 此邮件来源于小米公司外部,请谨慎处理。若对邮件安全性存疑,请将邮件转发给misec@xiaomi.com进行反馈

Hello,

I have well noted that this is fully optional applicative code.

I'll have a look at this when I get some time, because initializing
things is a common problem in embedded systems and an unified way might
be a useful thing.

If it's just inspired from android but is an original development, what
would prevent the use of the "NuttX Init system"?

Inspiration is good, but maybe it's a good occasion to fix flaws you
found in the original android implementation so it becomes even better?

Is there interesting value to keep strict compatibility with "original
android stuff" ?

sebastien


On 10/22/25 11:01, 王健宇 wrote:
> Hi,
>
> Thank you for your reminder. Please rest assured—regarding the issue you
> mentioned, here is a detailed clarification:
>
> The newly added initialization module is an application program, serving
> as an independent and optional feature. Users who need this module can
> switch to it by configuring `INIT_ENTRYPOINT`. My previous description may
> not have been clear enough, but it was never my intention to replace the
> `INIT_ENTRYPOINT` of all boards with `init_main`.
>
> Thank you again for your thoughtful reminder.
>
> Best regards,
> Jianyu Wang
>
> ________________________________
> 发件人: Sebastien Lorquet <se...@lorquet.fr>
> 发送时间: 2025年10月22日 16:01:45
> 收件人: dev@nuttx.apache.org; 王健宇
> 主题: Re: 答复: [External Mail]Re: NuttX and Android System Init
>
> [外部邮件] 此邮件来源于小米公司外部,请谨慎处理。若对邮件安全性存疑,请将邮件转发给misec@xiaomi.com进行反馈
>
> Hello
>
>
> Here are some general remarks that may or may not apply ( I did not
> check enough), please do not take them personally, they do not apply to
> your idea and are just general warnings.
>
>
> -the boards from nuttx repositories are only samples and are NOT
> representative of the usual industrial practice that is applied in
> external boards. Please do not make suppositions about proprietary init
> systems used by nuttx users.
>
>
> -the startup of daemons is just ONE of the myriad of possibilities to
> init a system. Please make sure that this init system is ONLY an
> applicative system that can be entirely be made optional and DO NOT
> BREAK existing systems like:
>
> * nsh and its initialization systems
>
> * methods to boot by indicating entry points via names and/or routines.
>
>
> Again, please, do feature creep as you wish (this is a nuttx philosophy
> by now </irony>) but PLEASE do not remove and break existing frameworks
> and force everyone to fix their code when updating a release.
>
> Not everyone has hours and days of porting efforts to fix breakage.
>
> NuttX is a mature project and its features are expected to be stable.
>
> Evolution can go forward without being a pain (as much as possible).
>
> Sometimes pain is inevitable, but then negotiation must be made on the
> mailing list to manage it beforehand.
>
>
> Thank you for your attention to every user of nuttx. Use cases are
> wildly different and you cannot force every user to follow your shiny
> project.
>
> You may not be going in these directions, but some problems like that
> happened before, were VERY energy and time consuming to manage so the
> project goes back on track, and I do not wish to deal with that sort of
> things again.
>
>
> Sebastien
>
>
> On 10/22/25 07:07, 王健宇 wrote:
>> Dear All,
>> Thank you, and hello everyone. Please allow me to add some (potentially redundant) information as follows:
>>
>>     1.
>> Reasons for adding this module: As Tomek helped supplement earlier, the main considerations include code size (the shell module is not always required) and daemon management (such as status monitoring and restarting of services).
>>     2.
>> Reasons for naming it "init": From a functional perspective, this module is used for system initialization. Referring to Linux distributions and Android, modules with similar functions are generally named "systemd" or "init".
>>     3.
>> Regarding NuttX’s support for multiple init entry points: I conducted a simple filter using the command find boards/ -name defconfig | xargs grep INIT_ENTRYPOINT | cut -d ':' -f 2- | sort -u, and it turns out this is indeed the case. However, not all of their logic is used for system initialization. For example, CONFIG_INIT_ENTRYPOINT="hello_main" and CONFIG_INIT_ENTRYPOINT="ostest_main". The well-known and excellent NSH supports almost all system initialization functions; unfortunately, it lacks daemon management. Moreover, in scenarios where code size is a critical concern, NSH may be somewhat bulky. Therefore, we might need a dedicated module for system initialization.
>>     4.
>> About the module’s implementation: This module is a new implementation and not a port of Android Init. During the development process, I studied the source code of the excellent Android Init, but this module is more streamlined and compatible with most syntax of the Android Init Language.
>>
>> Personally, from a functional perspective, I tend to use apps/system/init and CONFIG_SYSTEM_INIT. However, if you have more comprehensive considerations, options like apps/android/init and CONFIG_ANDROID_INIT are also acceptable to me.
>>
>>
>> Best regards,
>>
>> Jianyu Wang
>>
>> ________________________________
>> 发件人: Tomek CEDRO <to...@cedro.info>
>> 发送时间: 2025年10月22日 11:37:31
>> 收件人: dev@nuttx.apache.org
>> 主题: [External Mail]Re: NuttX and Android System Init
>>
>> [外部邮件] 此邮件来源于小米公司外部,请谨慎处理。若对邮件安全性存疑,请将邮件转发给misec@xiaomi.com进行反馈
>>
>> Okay Jianyu Wang, author of the Android System Init in NuttX code,
>> joined the dev@ mailing list, welcome, below is the discussion history
>> as read from the bottom up direction :-)
>> Tomek
>>
>> On Tue, Oct 21, 2025 at 11:18 PM Tomek CEDRO <to...@cedro.info> wrote:
>>> Okay I have provided feedback from the dev@ list to the gh prs and
>>> here comes the reply ;-)
>>>
>>> The main advantages of this Android System Init on NuttX:
>>> * it is custom trimmed down code implementing android system init
>>> compatible functionality.
>>> * it can run as standalone app that replaces nsh.
>>> * it provides ~10x smaller footprint over nsh.
>>>
>>> I invited Wang to join discussion here on the mailing list :-)
>>>
>>> There may be use cases for this. My proposition is to move all Android
>>> related stuff to apps/android that is apps/android/system/init and
>>> apps/android/fastboot. Also to rename kconfig variables so instead
>>> CONFIG_SYSTEM_SYSTEM it will be CONFIG_ANDROID_SYSTEM or similar? What
>>> do you think folks? :-)
>>>
>>> Thanks :-)
>>> Tomek
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Tue, Oct 21, 2025 at 8:29 AM Luchian Mihai <lu...@gmail.com> wrote:
>>>> Hi Tomek,
>>>>
>>>> I am already more present in the project overall.
>>>> I usually leave comments rather than start reviews (regarding PRs).
>>>>
>>>> There are already comments on Pull Request for the documentation.
>>>> This subject that I've raised was more suited for the mailing list. It
>>>> reaches more of the community overall.
>>>>
>>>> More input than mine is needed if we want a resolution.
>>>>
>>>> Cheers,
>>>> Mihai
>>>>
>>>> On Tue, 21 Oct 2025 at 02:17, Tomek CEDRO <to...@cedro.info> wrote:
>>>>
>>>>> Yeah, it is good to have a choice, maybe someone will find this
>>>>> solution useful and better fit for some applications, but.. we can
>>>>> already see some confusion with all different system / init solutions,
>>>>> so we should clearly distinguish the naming and functional separation
>>>>> (system system init does not say anything at all), and better
>>>>> documentation right from start (like Alan already requested and
>>>>> Luchian noted).
>>>>>
>>>>> Luchian noticed a common but important problem - one person who create
>>>>> some solution does not create good (or any) documentation right from
>>>>> start and then anyone who touches the solution needs to reinvent the
>>>>> wheel, what is tremendous waste of time and resources. I am sometimes
>>>>> dropped into such rabbit hole in various projects and it takes weeks
>>>>> or months to understand what is going on :D Good point! Luchian could
>>>>> you please provide feedback on the Pull Requests too?
>>>>>
>>>>> Thanks! :-)
>>>>> Tomek
>>>>>
>>>>>
>>>>> On Tue, Oct 21, 2025 at 1:00 AM Alan C. Assis <ac...@gmail.com> wrote:
>>>>>> Hi Luchian,
>>>>>> that is what I suggested in the Documentation: before saying what Android
>>>>>> System Init is, the documentation needs to explain what it is solving on
>>>>>> NuttX.
>>>>>>
>>>>>> More important than that: starts explaining the existing solutions and
>>>>> when
>>>>>> to use them.
>>>>>>
>>>>>> As Xiang commented in the PR, their initial plan was to implement
>>>>> SystemV,
>>>>>> but it was more complex (and probably bigger).
>>>>>>
>>>>>> So Android System Init could be more beneficial for someone implemented
>>>>>> deep embedded system with NuttX.
>>>>>>
>>>>>> But I didn't give up trying to get the SystemV Init implementation from
>>>>>> Google, maybe someone there could help us.
>>>>>>
>>>>>> BR,
>>>>>>
>>>>>> Alan
>>>>>>
>>>>>> On Monday, October 20, 2025, Luchian Mihai <lu...@gmail.com>
>>>>> wrote:
>>>>>>> Hello all,
>>>>>>>
>>>>>>> This might stir the waters a bit, but I think it needs to be said.
>>>>>>>
>>>>>>> I know Alan already pointed out the need for docs in the PR comments,
>>>>> but
>>>>>>> just the documentation is not enough.
>>>>>>>
>>>>>>> I think we (the community) or the PMC should be more assertive
>>>>> regarding
>>>>>>> these kinds of features.
>>>>>>> Why do we need another init system? What does this new init system
>>>>> solve?
>>>>>>> What should happen with the previous ones?
>>>>>>> Do not get me wrong, I am not against this new init system, I am in
>>>>> favour.
>>>>>>> While NuttX excels in posix compliance as a single standard, a lot of
>>>>> other
>>>>>>> things lack unity.
>>>>>>> Lacking a "default" way of doing things ends up in "hidden features",
>>>>> or
>>>>>>> rather, features
>>>>>>> that are used and known by a set of people.
>>>>>>>
>>>>>>> There is also support for fastboot and adb, so the android init system
>>>>>>> makes sense,
>>>>>>> but I see nothing that explains why they are present in the first
>>>>> place.
>>>>>>> Did they solve something, some time ago? Is the NuttX project aligning
>>>>> with
>>>>>>> the android tooling?
>>>>>>>
>>>>>>> I would like to point out my experience as a new contributor. It took
>>>>> me a
>>>>>>> few months to get the hang of how the thing should be done,
>>>>>>> or at least what the majority agrees. There are board examples that
>>>>> differ,
>>>>>>> but neither are wrong also.
>>>>>>> The system initialization is the same, I've read documentation about
>>>>> `exec`
>>>>>>> and `posix_spawn` and `task_create`,
>>>>>>> and I am writing docs about the flat, protected, kernel build. Yet, I
>>>>> still
>>>>>>> did not find the "NuttX way to leave" the kernel.
>>>>>>> And here we have another init system.
>>>>>>>
>>>>>>> For me this just feels more of a feature creep than a milestone, sorry.
>>>>>>>
>>>>>>> It's hard to market (from my own experience) NuttX as anything other
>>>>> than
>>>>>>> "high quality code" if it takes days to
>>>>>>> figure out the solution (out of the existing few) for a specific
>>>>> problem.
>>>>>>> I suggest defining the expectations about this PR, and make a separate
>>>>>>> documentation page.
>>>>>>> Is something that NuttX wants to adopt going forward, that is great.
>>>>>>> Will it help only part of the community, that is also great.
>>>>>>> The only thing I ask is to make that as obvious as possible, it's
>>>>> tiring to
>>>>>>> "unravel the NuttX lore" from the mailing list.
>>>>>>>
>>>>>>> Cheers,
>>>>>>> Mihai
>>>>>>>
>>>>>>> On Mon, 20 Oct 2025 at 19:09, Tomek CEDRO <to...@cedro.info> wrote:
>>>>>>>
>>>>>>>> well. :-(
>>>>>>>>
>>>>>>>> On Mon, Oct 20, 2025 at 3:02 PM Alan C. Assis <ac...@gmail.com>
>>>>> wrote:
>>>>>>>>> +1
>>>>>>>>>
>>>>>>>>> It is better to use the right naming.
>>>>>>>>>
>>>>>>>>> Fitbit implemented support for System V on NuttX and promised to
>>>>> donate
>>>>>>>> it,
>>>>>>>>> but after Google acquired them, none contribution came from them.
>>>>>>>>>
>>>>>>>>> Google also used NuttX on ARA Project, but no single code line was
>>>>>>>>> submitted to the NuttX mainline.
>>>>>>>>>
>>>>>>>>> BR,
>>>>>>>>>
>>>>>>>>> Alan
>>>>>>>>>
>>>>>>>>> On Mon, Oct 20, 2025 at 8:07 AM Tomek CEDRO <to...@cedro.info>
>>>>> wrote:
>>>>>>>>>> Hello world :-)
>>>>>>>>>>
>>>>>>>>>> There is a very interesting and useful PR by @JianyuWang0623 that
>>>>>>> adds
>>>>>>>>>> support for Android System Init functionality to NuttX [1][2]
>>>>> with
>>>>>>>>>> working example on qemu [3]. This is alternative to SystemV Init
>>>>> and
>>>>>>>>>> probably other init designs. Please help in reviewing the change
>>>>> :-)
>>>>>>>>>> My only concern is naming convention here because just "system"
>>>>> and
>>>>>>>>>> "system init" is used (i.e. CONFIG_SYSTEM_INIT,
>>>>>>> CONFIG_SYSTEM_SYSTEM).
>>>>>>>>>> This may be a bit confusing because we do not know what init
>>>>> system
>>>>>>>>>> standard is used and we silently assume Android. My proposition
>>>>> is to
>>>>>>>>>> use "Android System Init" naming convention (i.e.
>>>>>>>>>> CONFIG_SYSTEM_ANDROID_INIT or something like that), so things are
>>>>>>>>>> self-explanatory, and other init systems may be used when
>>>>> necessary
>>>>>>> in
>>>>>>>>>> future without confusion. I am not insisting here and will
>>>>> follow the
>>>>>>>>>> community choice.
>>>>>>>>>>
>>>>>>>>>> Please let us know what you think :-)
>>>>>>>>>>
>>>>>>>>>> Thanks :-)
>>>>>>>>>> Tomek
>>>>>>>>>>
>>>>>>>>>> [1] https://github.com/apache/nuttx-apps/pull/3192
>>>>>>>>>> [2] https://github.com/apache/nuttx/pull/17215
>>>>>>>>>> [3] https://github.com/apache/nuttx/pull/17215
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
>>>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
>>>>>>>>
>>>>>
>>>>> --
>>>>> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
>>>>>
>>>
>>> --
>>> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
>>
>> --
>> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
>> #/******本邮件及其附件含有小米公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件! This e-mail and its attachments contain confidential information from XIAOMI, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it!******/#
> #/******本邮件及其附件含有小米公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件! This e-mail and its attachments contain confidential information from XIAOMI, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it!******/#
#/******本邮件及其附件含有小米公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件! This e-mail and its attachments contain confidential information from XIAOMI, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it!******/#

Re: 答复: [External Mail]Re: NuttX and Android System Init

Posted by Sebastien Lorquet <se...@lorquet.fr>.
Hello,

I have well noted that this is fully optional applicative code.

I'll have a look at this when I get some time, because initializing 
things is a common problem in embedded systems and an unified way might 
be a useful thing.

If it's just inspired from android but is an original development, what 
would prevent the use of the "NuttX Init system"?

Inspiration is good, but maybe it's a good occasion to fix flaws you 
found in the original android implementation so it becomes even better?

Is there interesting value to keep strict compatibility with "original 
android stuff" ?

sebastien


On 10/22/25 11:01, 王健宇 wrote:
> Hi,
>
> Thank you for your reminder. Please rest assured—regarding the issue you
> mentioned, here is a detailed clarification:
>
> The newly added initialization module is an application program, serving
> as an independent and optional feature. Users who need this module can
> switch to it by configuring `INIT_ENTRYPOINT`. My previous description may
> not have been clear enough, but it was never my intention to replace the
> `INIT_ENTRYPOINT` of all boards with `init_main`.
>
> Thank you again for your thoughtful reminder.
>
> Best regards,
> Jianyu Wang
>
> ________________________________
> 发件人: Sebastien Lorquet <se...@lorquet.fr>
> 发送时间: 2025年10月22日 16:01:45
> 收件人: dev@nuttx.apache.org; 王健宇
> 主题: Re: 答复: [External Mail]Re: NuttX and Android System Init
>
> [外部邮件] 此邮件来源于小米公司外部,请谨慎处理。若对邮件安全性存疑,请将邮件转发给misec@xiaomi.com进行反馈
>
> Hello
>
>
> Here are some general remarks that may or may not apply ( I did not
> check enough), please do not take them personally, they do not apply to
> your idea and are just general warnings.
>
>
> -the boards from nuttx repositories are only samples and are NOT
> representative of the usual industrial practice that is applied in
> external boards. Please do not make suppositions about proprietary init
> systems used by nuttx users.
>
>
> -the startup of daemons is just ONE of the myriad of possibilities to
> init a system. Please make sure that this init system is ONLY an
> applicative system that can be entirely be made optional and DO NOT
> BREAK existing systems like:
>
> * nsh and its initialization systems
>
> * methods to boot by indicating entry points via names and/or routines.
>
>
> Again, please, do feature creep as you wish (this is a nuttx philosophy
> by now </irony>) but PLEASE do not remove and break existing frameworks
> and force everyone to fix their code when updating a release.
>
> Not everyone has hours and days of porting efforts to fix breakage.
>
> NuttX is a mature project and its features are expected to be stable.
>
> Evolution can go forward without being a pain (as much as possible).
>
> Sometimes pain is inevitable, but then negotiation must be made on the
> mailing list to manage it beforehand.
>
>
> Thank you for your attention to every user of nuttx. Use cases are
> wildly different and you cannot force every user to follow your shiny
> project.
>
> You may not be going in these directions, but some problems like that
> happened before, were VERY energy and time consuming to manage so the
> project goes back on track, and I do not wish to deal with that sort of
> things again.
>
>
> Sebastien
>
>
> On 10/22/25 07:07, 王健宇 wrote:
>> Dear All,
>> Thank you, and hello everyone. Please allow me to add some (potentially redundant) information as follows:
>>
>>     1.
>> Reasons for adding this module: As Tomek helped supplement earlier, the main considerations include code size (the shell module is not always required) and daemon management (such as status monitoring and restarting of services).
>>     2.
>> Reasons for naming it "init": From a functional perspective, this module is used for system initialization. Referring to Linux distributions and Android, modules with similar functions are generally named "systemd" or "init".
>>     3.
>> Regarding NuttX’s support for multiple init entry points: I conducted a simple filter using the command find boards/ -name defconfig | xargs grep INIT_ENTRYPOINT | cut -d ':' -f 2- | sort -u, and it turns out this is indeed the case. However, not all of their logic is used for system initialization. For example, CONFIG_INIT_ENTRYPOINT="hello_main" and CONFIG_INIT_ENTRYPOINT="ostest_main". The well-known and excellent NSH supports almost all system initialization functions; unfortunately, it lacks daemon management. Moreover, in scenarios where code size is a critical concern, NSH may be somewhat bulky. Therefore, we might need a dedicated module for system initialization.
>>     4.
>> About the module’s implementation: This module is a new implementation and not a port of Android Init. During the development process, I studied the source code of the excellent Android Init, but this module is more streamlined and compatible with most syntax of the Android Init Language.
>>
>> Personally, from a functional perspective, I tend to use apps/system/init and CONFIG_SYSTEM_INIT. However, if you have more comprehensive considerations, options like apps/android/init and CONFIG_ANDROID_INIT are also acceptable to me.
>>
>>
>> Best regards,
>>
>> Jianyu Wang
>>
>> ________________________________
>> 发件人: Tomek CEDRO <to...@cedro.info>
>> 发送时间: 2025年10月22日 11:37:31
>> 收件人: dev@nuttx.apache.org
>> 主题: [External Mail]Re: NuttX and Android System Init
>>
>> [外部邮件] 此邮件来源于小米公司外部,请谨慎处理。若对邮件安全性存疑,请将邮件转发给misec@xiaomi.com进行反馈
>>
>> Okay Jianyu Wang, author of the Android System Init in NuttX code,
>> joined the dev@ mailing list, welcome, below is the discussion history
>> as read from the bottom up direction :-)
>> Tomek
>>
>> On Tue, Oct 21, 2025 at 11:18 PM Tomek CEDRO <to...@cedro.info> wrote:
>>> Okay I have provided feedback from the dev@ list to the gh prs and
>>> here comes the reply ;-)
>>>
>>> The main advantages of this Android System Init on NuttX:
>>> * it is custom trimmed down code implementing android system init
>>> compatible functionality.
>>> * it can run as standalone app that replaces nsh.
>>> * it provides ~10x smaller footprint over nsh.
>>>
>>> I invited Wang to join discussion here on the mailing list :-)
>>>
>>> There may be use cases for this. My proposition is to move all Android
>>> related stuff to apps/android that is apps/android/system/init and
>>> apps/android/fastboot. Also to rename kconfig variables so instead
>>> CONFIG_SYSTEM_SYSTEM it will be CONFIG_ANDROID_SYSTEM or similar? What
>>> do you think folks? :-)
>>>
>>> Thanks :-)
>>> Tomek
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Tue, Oct 21, 2025 at 8:29 AM Luchian Mihai <lu...@gmail.com> wrote:
>>>> Hi Tomek,
>>>>
>>>> I am already more present in the project overall.
>>>> I usually leave comments rather than start reviews (regarding PRs).
>>>>
>>>> There are already comments on Pull Request for the documentation.
>>>> This subject that I've raised was more suited for the mailing list. It
>>>> reaches more of the community overall.
>>>>
>>>> More input than mine is needed if we want a resolution.
>>>>
>>>> Cheers,
>>>> Mihai
>>>>
>>>> On Tue, 21 Oct 2025 at 02:17, Tomek CEDRO <to...@cedro.info> wrote:
>>>>
>>>>> Yeah, it is good to have a choice, maybe someone will find this
>>>>> solution useful and better fit for some applications, but.. we can
>>>>> already see some confusion with all different system / init solutions,
>>>>> so we should clearly distinguish the naming and functional separation
>>>>> (system system init does not say anything at all), and better
>>>>> documentation right from start (like Alan already requested and
>>>>> Luchian noted).
>>>>>
>>>>> Luchian noticed a common but important problem - one person who create
>>>>> some solution does not create good (or any) documentation right from
>>>>> start and then anyone who touches the solution needs to reinvent the
>>>>> wheel, what is tremendous waste of time and resources. I am sometimes
>>>>> dropped into such rabbit hole in various projects and it takes weeks
>>>>> or months to understand what is going on :D Good point! Luchian could
>>>>> you please provide feedback on the Pull Requests too?
>>>>>
>>>>> Thanks! :-)
>>>>> Tomek
>>>>>
>>>>>
>>>>> On Tue, Oct 21, 2025 at 1:00 AM Alan C. Assis <ac...@gmail.com> wrote:
>>>>>> Hi Luchian,
>>>>>> that is what I suggested in the Documentation: before saying what Android
>>>>>> System Init is, the documentation needs to explain what it is solving on
>>>>>> NuttX.
>>>>>>
>>>>>> More important than that: starts explaining the existing solutions and
>>>>> when
>>>>>> to use them.
>>>>>>
>>>>>> As Xiang commented in the PR, their initial plan was to implement
>>>>> SystemV,
>>>>>> but it was more complex (and probably bigger).
>>>>>>
>>>>>> So Android System Init could be more beneficial for someone implemented
>>>>>> deep embedded system with NuttX.
>>>>>>
>>>>>> But I didn't give up trying to get the SystemV Init implementation from
>>>>>> Google, maybe someone there could help us.
>>>>>>
>>>>>> BR,
>>>>>>
>>>>>> Alan
>>>>>>
>>>>>> On Monday, October 20, 2025, Luchian Mihai <lu...@gmail.com>
>>>>> wrote:
>>>>>>> Hello all,
>>>>>>>
>>>>>>> This might stir the waters a bit, but I think it needs to be said.
>>>>>>>
>>>>>>> I know Alan already pointed out the need for docs in the PR comments,
>>>>> but
>>>>>>> just the documentation is not enough.
>>>>>>>
>>>>>>> I think we (the community) or the PMC should be more assertive
>>>>> regarding
>>>>>>> these kinds of features.
>>>>>>> Why do we need another init system? What does this new init system
>>>>> solve?
>>>>>>> What should happen with the previous ones?
>>>>>>> Do not get me wrong, I am not against this new init system, I am in
>>>>> favour.
>>>>>>> While NuttX excels in posix compliance as a single standard, a lot of
>>>>> other
>>>>>>> things lack unity.
>>>>>>> Lacking a "default" way of doing things ends up in "hidden features",
>>>>> or
>>>>>>> rather, features
>>>>>>> that are used and known by a set of people.
>>>>>>>
>>>>>>> There is also support for fastboot and adb, so the android init system
>>>>>>> makes sense,
>>>>>>> but I see nothing that explains why they are present in the first
>>>>> place.
>>>>>>> Did they solve something, some time ago? Is the NuttX project aligning
>>>>> with
>>>>>>> the android tooling?
>>>>>>>
>>>>>>> I would like to point out my experience as a new contributor. It took
>>>>> me a
>>>>>>> few months to get the hang of how the thing should be done,
>>>>>>> or at least what the majority agrees. There are board examples that
>>>>> differ,
>>>>>>> but neither are wrong also.
>>>>>>> The system initialization is the same, I've read documentation about
>>>>> `exec`
>>>>>>> and `posix_spawn` and `task_create`,
>>>>>>> and I am writing docs about the flat, protected, kernel build. Yet, I
>>>>> still
>>>>>>> did not find the "NuttX way to leave" the kernel.
>>>>>>> And here we have another init system.
>>>>>>>
>>>>>>> For me this just feels more of a feature creep than a milestone, sorry.
>>>>>>>
>>>>>>> It's hard to market (from my own experience) NuttX as anything other
>>>>> than
>>>>>>> "high quality code" if it takes days to
>>>>>>> figure out the solution (out of the existing few) for a specific
>>>>> problem.
>>>>>>> I suggest defining the expectations about this PR, and make a separate
>>>>>>> documentation page.
>>>>>>> Is something that NuttX wants to adopt going forward, that is great.
>>>>>>> Will it help only part of the community, that is also great.
>>>>>>> The only thing I ask is to make that as obvious as possible, it's
>>>>> tiring to
>>>>>>> "unravel the NuttX lore" from the mailing list.
>>>>>>>
>>>>>>> Cheers,
>>>>>>> Mihai
>>>>>>>
>>>>>>> On Mon, 20 Oct 2025 at 19:09, Tomek CEDRO <to...@cedro.info> wrote:
>>>>>>>
>>>>>>>> well. :-(
>>>>>>>>
>>>>>>>> On Mon, Oct 20, 2025 at 3:02 PM Alan C. Assis <ac...@gmail.com>
>>>>> wrote:
>>>>>>>>> +1
>>>>>>>>>
>>>>>>>>> It is better to use the right naming.
>>>>>>>>>
>>>>>>>>> Fitbit implemented support for System V on NuttX and promised to
>>>>> donate
>>>>>>>> it,
>>>>>>>>> but after Google acquired them, none contribution came from them.
>>>>>>>>>
>>>>>>>>> Google also used NuttX on ARA Project, but no single code line was
>>>>>>>>> submitted to the NuttX mainline.
>>>>>>>>>
>>>>>>>>> BR,
>>>>>>>>>
>>>>>>>>> Alan
>>>>>>>>>
>>>>>>>>> On Mon, Oct 20, 2025 at 8:07 AM Tomek CEDRO <to...@cedro.info>
>>>>> wrote:
>>>>>>>>>> Hello world :-)
>>>>>>>>>>
>>>>>>>>>> There is a very interesting and useful PR by @JianyuWang0623 that
>>>>>>> adds
>>>>>>>>>> support for Android System Init functionality to NuttX [1][2]
>>>>> with
>>>>>>>>>> working example on qemu [3]. This is alternative to SystemV Init
>>>>> and
>>>>>>>>>> probably other init designs. Please help in reviewing the change
>>>>> :-)
>>>>>>>>>> My only concern is naming convention here because just "system"
>>>>> and
>>>>>>>>>> "system init" is used (i.e. CONFIG_SYSTEM_INIT,
>>>>>>> CONFIG_SYSTEM_SYSTEM).
>>>>>>>>>> This may be a bit confusing because we do not know what init
>>>>> system
>>>>>>>>>> standard is used and we silently assume Android. My proposition
>>>>> is to
>>>>>>>>>> use "Android System Init" naming convention (i.e.
>>>>>>>>>> CONFIG_SYSTEM_ANDROID_INIT or something like that), so things are
>>>>>>>>>> self-explanatory, and other init systems may be used when
>>>>> necessary
>>>>>>> in
>>>>>>>>>> future without confusion. I am not insisting here and will
>>>>> follow the
>>>>>>>>>> community choice.
>>>>>>>>>>
>>>>>>>>>> Please let us know what you think :-)
>>>>>>>>>>
>>>>>>>>>> Thanks :-)
>>>>>>>>>> Tomek
>>>>>>>>>>
>>>>>>>>>> [1] https://github.com/apache/nuttx-apps/pull/3192
>>>>>>>>>> [2] https://github.com/apache/nuttx/pull/17215
>>>>>>>>>> [3] https://github.com/apache/nuttx/pull/17215
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
>>>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
>>>>>>>>
>>>>>
>>>>> --
>>>>> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
>>>>>
>>>
>>> --
>>> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
>>
>> --
>> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
>> #/******本邮件及其附件含有小米公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件! This e-mail and its attachments contain confidential information from XIAOMI, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it!******/#
> #/******本邮件及其附件含有小米公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件! This e-mail and its attachments contain confidential information from XIAOMI, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it!******/#

Re: 答复: [External Mail]Re: NuttX and Android System Init

Posted by 王健宇 <wa...@xiaomi.com.INVALID>.
Hi,

Thank you for your reminder. Please rest assured—regarding the issue you
mentioned, here is a detailed clarification:

The newly added initialization module is an application program, serving
as an independent and optional feature. Users who need this module can
switch to it by configuring `INIT_ENTRYPOINT`. My previous description may
not have been clear enough, but it was never my intention to replace the
`INIT_ENTRYPOINT` of all boards with `init_main`.

Thank you again for your thoughtful reminder.

Best regards,
Jianyu Wang

________________________________
发件人: Sebastien Lorquet <se...@lorquet.fr>
发送时间: 2025年10月22日 16:01:45
收件人: dev@nuttx.apache.org; 王健宇
主题: Re: 答复: [External Mail]Re: NuttX and Android System Init

[外部邮件] 此邮件来源于小米公司外部,请谨慎处理。若对邮件安全性存疑,请将邮件转发给misec@xiaomi.com进行反馈

Hello


Here are some general remarks that may or may not apply ( I did not
check enough), please do not take them personally, they do not apply to
your idea and are just general warnings.


-the boards from nuttx repositories are only samples and are NOT
representative of the usual industrial practice that is applied in
external boards. Please do not make suppositions about proprietary init
systems used by nuttx users.


-the startup of daemons is just ONE of the myriad of possibilities to
init a system. Please make sure that this init system is ONLY an
applicative system that can be entirely be made optional and DO NOT
BREAK existing systems like:

* nsh and its initialization systems

* methods to boot by indicating entry points via names and/or routines.


Again, please, do feature creep as you wish (this is a nuttx philosophy
by now </irony>) but PLEASE do not remove and break existing frameworks
and force everyone to fix their code when updating a release.

Not everyone has hours and days of porting efforts to fix breakage.

NuttX is a mature project and its features are expected to be stable.

Evolution can go forward without being a pain (as much as possible).

Sometimes pain is inevitable, but then negotiation must be made on the
mailing list to manage it beforehand.


Thank you for your attention to every user of nuttx. Use cases are
wildly different and you cannot force every user to follow your shiny
project.

You may not be going in these directions, but some problems like that
happened before, were VERY energy and time consuming to manage so the
project goes back on track, and I do not wish to deal with that sort of
things again.


Sebastien


On 10/22/25 07:07, 王健宇 wrote:
> Dear All,
> Thank you, and hello everyone. Please allow me to add some (potentially redundant) information as follows:
>
>    1.
> Reasons for adding this module: As Tomek helped supplement earlier, the main considerations include code size (the shell module is not always required) and daemon management (such as status monitoring and restarting of services).
>    2.
> Reasons for naming it "init": From a functional perspective, this module is used for system initialization. Referring to Linux distributions and Android, modules with similar functions are generally named "systemd" or "init".
>    3.
> Regarding NuttX’s support for multiple init entry points: I conducted a simple filter using the command find boards/ -name defconfig | xargs grep INIT_ENTRYPOINT | cut -d ':' -f 2- | sort -u, and it turns out this is indeed the case. However, not all of their logic is used for system initialization. For example, CONFIG_INIT_ENTRYPOINT="hello_main" and CONFIG_INIT_ENTRYPOINT="ostest_main". The well-known and excellent NSH supports almost all system initialization functions; unfortunately, it lacks daemon management. Moreover, in scenarios where code size is a critical concern, NSH may be somewhat bulky. Therefore, we might need a dedicated module for system initialization.
>    4.
> About the module’s implementation: This module is a new implementation and not a port of Android Init. During the development process, I studied the source code of the excellent Android Init, but this module is more streamlined and compatible with most syntax of the Android Init Language.
>
> Personally, from a functional perspective, I tend to use apps/system/init and CONFIG_SYSTEM_INIT. However, if you have more comprehensive considerations, options like apps/android/init and CONFIG_ANDROID_INIT are also acceptable to me.
>
>
> Best regards,
>
> Jianyu Wang
>
> ________________________________
> 发件人: Tomek CEDRO <to...@cedro.info>
> 发送时间: 2025年10月22日 11:37:31
> 收件人: dev@nuttx.apache.org
> 主题: [External Mail]Re: NuttX and Android System Init
>
> [外部邮件] 此邮件来源于小米公司外部,请谨慎处理。若对邮件安全性存疑,请将邮件转发给misec@xiaomi.com进行反馈
>
> Okay Jianyu Wang, author of the Android System Init in NuttX code,
> joined the dev@ mailing list, welcome, below is the discussion history
> as read from the bottom up direction :-)
> Tomek
>
> On Tue, Oct 21, 2025 at 11:18 PM Tomek CEDRO <to...@cedro.info> wrote:
>> Okay I have provided feedback from the dev@ list to the gh prs and
>> here comes the reply ;-)
>>
>> The main advantages of this Android System Init on NuttX:
>> * it is custom trimmed down code implementing android system init
>> compatible functionality.
>> * it can run as standalone app that replaces nsh.
>> * it provides ~10x smaller footprint over nsh.
>>
>> I invited Wang to join discussion here on the mailing list :-)
>>
>> There may be use cases for this. My proposition is to move all Android
>> related stuff to apps/android that is apps/android/system/init and
>> apps/android/fastboot. Also to rename kconfig variables so instead
>> CONFIG_SYSTEM_SYSTEM it will be CONFIG_ANDROID_SYSTEM or similar? What
>> do you think folks? :-)
>>
>> Thanks :-)
>> Tomek
>>
>>
>>
>>
>>
>>
>>
>>
>> On Tue, Oct 21, 2025 at 8:29 AM Luchian Mihai <lu...@gmail.com> wrote:
>>> Hi Tomek,
>>>
>>> I am already more present in the project overall.
>>> I usually leave comments rather than start reviews (regarding PRs).
>>>
>>> There are already comments on Pull Request for the documentation.
>>> This subject that I've raised was more suited for the mailing list. It
>>> reaches more of the community overall.
>>>
>>> More input than mine is needed if we want a resolution.
>>>
>>> Cheers,
>>> Mihai
>>>
>>> On Tue, 21 Oct 2025 at 02:17, Tomek CEDRO <to...@cedro.info> wrote:
>>>
>>>> Yeah, it is good to have a choice, maybe someone will find this
>>>> solution useful and better fit for some applications, but.. we can
>>>> already see some confusion with all different system / init solutions,
>>>> so we should clearly distinguish the naming and functional separation
>>>> (system system init does not say anything at all), and better
>>>> documentation right from start (like Alan already requested and
>>>> Luchian noted).
>>>>
>>>> Luchian noticed a common but important problem - one person who create
>>>> some solution does not create good (or any) documentation right from
>>>> start and then anyone who touches the solution needs to reinvent the
>>>> wheel, what is tremendous waste of time and resources. I am sometimes
>>>> dropped into such rabbit hole in various projects and it takes weeks
>>>> or months to understand what is going on :D Good point! Luchian could
>>>> you please provide feedback on the Pull Requests too?
>>>>
>>>> Thanks! :-)
>>>> Tomek
>>>>
>>>>
>>>> On Tue, Oct 21, 2025 at 1:00 AM Alan C. Assis <ac...@gmail.com> wrote:
>>>>> Hi Luchian,
>>>>> that is what I suggested in the Documentation: before saying what Android
>>>>> System Init is, the documentation needs to explain what it is solving on
>>>>> NuttX.
>>>>>
>>>>> More important than that: starts explaining the existing solutions and
>>>> when
>>>>> to use them.
>>>>>
>>>>> As Xiang commented in the PR, their initial plan was to implement
>>>> SystemV,
>>>>> but it was more complex (and probably bigger).
>>>>>
>>>>> So Android System Init could be more beneficial for someone implemented
>>>>> deep embedded system with NuttX.
>>>>>
>>>>> But I didn't give up trying to get the SystemV Init implementation from
>>>>> Google, maybe someone there could help us.
>>>>>
>>>>> BR,
>>>>>
>>>>> Alan
>>>>>
>>>>> On Monday, October 20, 2025, Luchian Mihai <lu...@gmail.com>
>>>> wrote:
>>>>>> Hello all,
>>>>>>
>>>>>> This might stir the waters a bit, but I think it needs to be said.
>>>>>>
>>>>>> I know Alan already pointed out the need for docs in the PR comments,
>>>> but
>>>>>> just the documentation is not enough.
>>>>>>
>>>>>> I think we (the community) or the PMC should be more assertive
>>>> regarding
>>>>>> these kinds of features.
>>>>>> Why do we need another init system? What does this new init system
>>>> solve?
>>>>>> What should happen with the previous ones?
>>>>>> Do not get me wrong, I am not against this new init system, I am in
>>>> favour.
>>>>>> While NuttX excels in posix compliance as a single standard, a lot of
>>>> other
>>>>>> things lack unity.
>>>>>> Lacking a "default" way of doing things ends up in "hidden features",
>>>> or
>>>>>> rather, features
>>>>>> that are used and known by a set of people.
>>>>>>
>>>>>> There is also support for fastboot and adb, so the android init system
>>>>>> makes sense,
>>>>>> but I see nothing that explains why they are present in the first
>>>> place.
>>>>>> Did they solve something, some time ago? Is the NuttX project aligning
>>>> with
>>>>>> the android tooling?
>>>>>>
>>>>>> I would like to point out my experience as a new contributor. It took
>>>> me a
>>>>>> few months to get the hang of how the thing should be done,
>>>>>> or at least what the majority agrees. There are board examples that
>>>> differ,
>>>>>> but neither are wrong also.
>>>>>> The system initialization is the same, I've read documentation about
>>>> `exec`
>>>>>> and `posix_spawn` and `task_create`,
>>>>>> and I am writing docs about the flat, protected, kernel build. Yet, I
>>>> still
>>>>>> did not find the "NuttX way to leave" the kernel.
>>>>>> And here we have another init system.
>>>>>>
>>>>>> For me this just feels more of a feature creep than a milestone, sorry.
>>>>>>
>>>>>> It's hard to market (from my own experience) NuttX as anything other
>>>> than
>>>>>> "high quality code" if it takes days to
>>>>>> figure out the solution (out of the existing few) for a specific
>>>> problem.
>>>>>> I suggest defining the expectations about this PR, and make a separate
>>>>>> documentation page.
>>>>>> Is something that NuttX wants to adopt going forward, that is great.
>>>>>> Will it help only part of the community, that is also great.
>>>>>> The only thing I ask is to make that as obvious as possible, it's
>>>> tiring to
>>>>>> "unravel the NuttX lore" from the mailing list.
>>>>>>
>>>>>> Cheers,
>>>>>> Mihai
>>>>>>
>>>>>> On Mon, 20 Oct 2025 at 19:09, Tomek CEDRO <to...@cedro.info> wrote:
>>>>>>
>>>>>>> well. :-(
>>>>>>>
>>>>>>> On Mon, Oct 20, 2025 at 3:02 PM Alan C. Assis <ac...@gmail.com>
>>>> wrote:
>>>>>>>> +1
>>>>>>>>
>>>>>>>> It is better to use the right naming.
>>>>>>>>
>>>>>>>> Fitbit implemented support for System V on NuttX and promised to
>>>> donate
>>>>>>> it,
>>>>>>>> but after Google acquired them, none contribution came from them.
>>>>>>>>
>>>>>>>> Google also used NuttX on ARA Project, but no single code line was
>>>>>>>> submitted to the NuttX mainline.
>>>>>>>>
>>>>>>>> BR,
>>>>>>>>
>>>>>>>> Alan
>>>>>>>>
>>>>>>>> On Mon, Oct 20, 2025 at 8:07 AM Tomek CEDRO <to...@cedro.info>
>>>> wrote:
>>>>>>>>> Hello world :-)
>>>>>>>>>
>>>>>>>>> There is a very interesting and useful PR by @JianyuWang0623 that
>>>>>> adds
>>>>>>>>> support for Android System Init functionality to NuttX [1][2]
>>>> with
>>>>>>>>> working example on qemu [3]. This is alternative to SystemV Init
>>>> and
>>>>>>>>> probably other init designs. Please help in reviewing the change
>>>> :-)
>>>>>>>>> My only concern is naming convention here because just "system"
>>>> and
>>>>>>>>> "system init" is used (i.e. CONFIG_SYSTEM_INIT,
>>>>>> CONFIG_SYSTEM_SYSTEM).
>>>>>>>>> This may be a bit confusing because we do not know what init
>>>> system
>>>>>>>>> standard is used and we silently assume Android. My proposition
>>>> is to
>>>>>>>>> use "Android System Init" naming convention (i.e.
>>>>>>>>> CONFIG_SYSTEM_ANDROID_INIT or something like that), so things are
>>>>>>>>> self-explanatory, and other init systems may be used when
>>>> necessary
>>>>>> in
>>>>>>>>> future without confusion. I am not insisting here and will
>>>> follow the
>>>>>>>>> community choice.
>>>>>>>>>
>>>>>>>>> Please let us know what you think :-)
>>>>>>>>>
>>>>>>>>> Thanks :-)
>>>>>>>>> Tomek
>>>>>>>>>
>>>>>>>>> [1] https://github.com/apache/nuttx-apps/pull/3192
>>>>>>>>> [2] https://github.com/apache/nuttx/pull/17215
>>>>>>>>> [3] https://github.com/apache/nuttx/pull/17215
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
>>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
>>>>>>>
>>>>
>>>>
>>>> --
>>>> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
>>>>
>>
>>
>> --
>> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
>
>
> --
> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
> #/******本邮件及其附件含有小米公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件! This e-mail and its attachments contain confidential information from XIAOMI, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it!******/#
#/******本邮件及其附件含有小米公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件! This e-mail and its attachments contain confidential information from XIAOMI, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it!******/#

Re: 答复: [External Mail]Re: NuttX and Android System Init

Posted by Laczen JMS <la...@gmail.com>.
Hi,

This is a very nice addition for NuttX.

Regarding the naming: it is not Android Init, it is not SystemV, it is
a new proposal for NuttX that uses the syntax of Android Init. Since
such a system is not yet available in NuttX a first come, first serve
should be followed. So the name "init" should be acceptable, but since
it is dedicated to NuttX it could also be called something like
"nxinit".

Best Regards,

Jehudi

Op wo 22 okt 2025 om 10:02 schreef Sebastien Lorquet <se...@lorquet.fr>:
>
> Hello
>
>
> Here are some general remarks that may or may not apply ( I did not
> check enough), please do not take them personally, they do not apply to
> your idea and are just general warnings.
>
>
> -the boards from nuttx repositories are only samples and are NOT
> representative of the usual industrial practice that is applied in
> external boards. Please do not make suppositions about proprietary init
> systems used by nuttx users.
>
>
> -the startup of daemons is just ONE of the myriad of possibilities to
> init a system. Please make sure that this init system is ONLY an
> applicative system that can be entirely be made optional and DO NOT
> BREAK existing systems like:
>
> * nsh and its initialization systems
>
> * methods to boot by indicating entry points via names and/or routines.
>
>
> Again, please, do feature creep as you wish (this is a nuttx philosophy
> by now </irony>) but PLEASE do not remove and break existing frameworks
> and force everyone to fix their code when updating a release.
>
> Not everyone has hours and days of porting efforts to fix breakage.
>
> NuttX is a mature project and its features are expected to be stable.
>
> Evolution can go forward without being a pain (as much as possible).
>
> Sometimes pain is inevitable, but then negotiation must be made on the
> mailing list to manage it beforehand.
>
>
> Thank you for your attention to every user of nuttx. Use cases are
> wildly different and you cannot force every user to follow your shiny
> project.
>
> You may not be going in these directions, but some problems like that
> happened before, were VERY energy and time consuming to manage so the
> project goes back on track, and I do not wish to deal with that sort of
> things again.
>
>
> Sebastien
>
>
> On 10/22/25 07:07, 王健宇 wrote:
> > Dear All,
> > Thank you, and hello everyone. Please allow me to add some (potentially redundant) information as follows:
> >
> >    1.
> > Reasons for adding this module: As Tomek helped supplement earlier, the main considerations include code size (the shell module is not always required) and daemon management (such as status monitoring and restarting of services).
> >    2.
> > Reasons for naming it "init": From a functional perspective, this module is used for system initialization. Referring to Linux distributions and Android, modules with similar functions are generally named "systemd" or "init".
> >    3.
> > Regarding NuttX’s support for multiple init entry points: I conducted a simple filter using the command find boards/ -name defconfig | xargs grep INIT_ENTRYPOINT | cut -d ':' -f 2- | sort -u, and it turns out this is indeed the case. However, not all of their logic is used for system initialization. For example, CONFIG_INIT_ENTRYPOINT="hello_main" and CONFIG_INIT_ENTRYPOINT="ostest_main". The well-known and excellent NSH supports almost all system initialization functions; unfortunately, it lacks daemon management. Moreover, in scenarios where code size is a critical concern, NSH may be somewhat bulky. Therefore, we might need a dedicated module for system initialization.
> >    4.
> > About the module’s implementation: This module is a new implementation and not a port of Android Init. During the development process, I studied the source code of the excellent Android Init, but this module is more streamlined and compatible with most syntax of the Android Init Language.
> >
> > Personally, from a functional perspective, I tend to use apps/system/init and CONFIG_SYSTEM_INIT. However, if you have more comprehensive considerations, options like apps/android/init and CONFIG_ANDROID_INIT are also acceptable to me.
> >
> >
> > Best regards,
> >
> > Jianyu Wang
> >
> > ________________________________
> > 发件人: Tomek CEDRO <to...@cedro.info>
> > 发送时间: 2025年10月22日 11:37:31
> > 收件人: dev@nuttx.apache.org
> > 主题: [External Mail]Re: NuttX and Android System Init
> >
> > [外部邮件] 此邮件来源于小米公司外部,请谨慎处理。若对邮件安全性存疑,请将邮件转发给misec@xiaomi.com进行反馈
> >
> > Okay Jianyu Wang, author of the Android System Init in NuttX code,
> > joined the dev@ mailing list, welcome, below is the discussion history
> > as read from the bottom up direction :-)
> > Tomek
> >
> > On Tue, Oct 21, 2025 at 11:18 PM Tomek CEDRO <to...@cedro.info> wrote:
> >> Okay I have provided feedback from the dev@ list to the gh prs and
> >> here comes the reply ;-)
> >>
> >> The main advantages of this Android System Init on NuttX:
> >> * it is custom trimmed down code implementing android system init
> >> compatible functionality.
> >> * it can run as standalone app that replaces nsh.
> >> * it provides ~10x smaller footprint over nsh.
> >>
> >> I invited Wang to join discussion here on the mailing list :-)
> >>
> >> There may be use cases for this. My proposition is to move all Android
> >> related stuff to apps/android that is apps/android/system/init and
> >> apps/android/fastboot. Also to rename kconfig variables so instead
> >> CONFIG_SYSTEM_SYSTEM it will be CONFIG_ANDROID_SYSTEM or similar? What
> >> do you think folks? :-)
> >>
> >> Thanks :-)
> >> Tomek
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >> On Tue, Oct 21, 2025 at 8:29 AM Luchian Mihai <lu...@gmail.com> wrote:
> >>> Hi Tomek,
> >>>
> >>> I am already more present in the project overall.
> >>> I usually leave comments rather than start reviews (regarding PRs).
> >>>
> >>> There are already comments on Pull Request for the documentation.
> >>> This subject that I've raised was more suited for the mailing list. It
> >>> reaches more of the community overall.
> >>>
> >>> More input than mine is needed if we want a resolution.
> >>>
> >>> Cheers,
> >>> Mihai
> >>>
> >>> On Tue, 21 Oct 2025 at 02:17, Tomek CEDRO <to...@cedro.info> wrote:
> >>>
> >>>> Yeah, it is good to have a choice, maybe someone will find this
> >>>> solution useful and better fit for some applications, but.. we can
> >>>> already see some confusion with all different system / init solutions,
> >>>> so we should clearly distinguish the naming and functional separation
> >>>> (system system init does not say anything at all), and better
> >>>> documentation right from start (like Alan already requested and
> >>>> Luchian noted).
> >>>>
> >>>> Luchian noticed a common but important problem - one person who create
> >>>> some solution does not create good (or any) documentation right from
> >>>> start and then anyone who touches the solution needs to reinvent the
> >>>> wheel, what is tremendous waste of time and resources. I am sometimes
> >>>> dropped into such rabbit hole in various projects and it takes weeks
> >>>> or months to understand what is going on :D Good point! Luchian could
> >>>> you please provide feedback on the Pull Requests too?
> >>>>
> >>>> Thanks! :-)
> >>>> Tomek
> >>>>
> >>>>
> >>>> On Tue, Oct 21, 2025 at 1:00 AM Alan C. Assis <ac...@gmail.com> wrote:
> >>>>> Hi Luchian,
> >>>>> that is what I suggested in the Documentation: before saying what Android
> >>>>> System Init is, the documentation needs to explain what it is solving on
> >>>>> NuttX.
> >>>>>
> >>>>> More important than that: starts explaining the existing solutions and
> >>>> when
> >>>>> to use them.
> >>>>>
> >>>>> As Xiang commented in the PR, their initial plan was to implement
> >>>> SystemV,
> >>>>> but it was more complex (and probably bigger).
> >>>>>
> >>>>> So Android System Init could be more beneficial for someone implemented
> >>>>> deep embedded system with NuttX.
> >>>>>
> >>>>> But I didn't give up trying to get the SystemV Init implementation from
> >>>>> Google, maybe someone there could help us.
> >>>>>
> >>>>> BR,
> >>>>>
> >>>>> Alan
> >>>>>
> >>>>> On Monday, October 20, 2025, Luchian Mihai <lu...@gmail.com>
> >>>> wrote:
> >>>>>> Hello all,
> >>>>>>
> >>>>>> This might stir the waters a bit, but I think it needs to be said.
> >>>>>>
> >>>>>> I know Alan already pointed out the need for docs in the PR comments,
> >>>> but
> >>>>>> just the documentation is not enough.
> >>>>>>
> >>>>>> I think we (the community) or the PMC should be more assertive
> >>>> regarding
> >>>>>> these kinds of features.
> >>>>>> Why do we need another init system? What does this new init system
> >>>> solve?
> >>>>>> What should happen with the previous ones?
> >>>>>> Do not get me wrong, I am not against this new init system, I am in
> >>>> favour.
> >>>>>> While NuttX excels in posix compliance as a single standard, a lot of
> >>>> other
> >>>>>> things lack unity.
> >>>>>> Lacking a "default" way of doing things ends up in "hidden features",
> >>>> or
> >>>>>> rather, features
> >>>>>> that are used and known by a set of people.
> >>>>>>
> >>>>>> There is also support for fastboot and adb, so the android init system
> >>>>>> makes sense,
> >>>>>> but I see nothing that explains why they are present in the first
> >>>> place.
> >>>>>> Did they solve something, some time ago? Is the NuttX project aligning
> >>>> with
> >>>>>> the android tooling?
> >>>>>>
> >>>>>> I would like to point out my experience as a new contributor. It took
> >>>> me a
> >>>>>> few months to get the hang of how the thing should be done,
> >>>>>> or at least what the majority agrees. There are board examples that
> >>>> differ,
> >>>>>> but neither are wrong also.
> >>>>>> The system initialization is the same, I've read documentation about
> >>>> `exec`
> >>>>>> and `posix_spawn` and `task_create`,
> >>>>>> and I am writing docs about the flat, protected, kernel build. Yet, I
> >>>> still
> >>>>>> did not find the "NuttX way to leave" the kernel.
> >>>>>> And here we have another init system.
> >>>>>>
> >>>>>> For me this just feels more of a feature creep than a milestone, sorry.
> >>>>>>
> >>>>>> It's hard to market (from my own experience) NuttX as anything other
> >>>> than
> >>>>>> "high quality code" if it takes days to
> >>>>>> figure out the solution (out of the existing few) for a specific
> >>>> problem.
> >>>>>> I suggest defining the expectations about this PR, and make a separate
> >>>>>> documentation page.
> >>>>>> Is something that NuttX wants to adopt going forward, that is great.
> >>>>>> Will it help only part of the community, that is also great.
> >>>>>> The only thing I ask is to make that as obvious as possible, it's
> >>>> tiring to
> >>>>>> "unravel the NuttX lore" from the mailing list.
> >>>>>>
> >>>>>> Cheers,
> >>>>>> Mihai
> >>>>>>
> >>>>>> On Mon, 20 Oct 2025 at 19:09, Tomek CEDRO <to...@cedro.info> wrote:
> >>>>>>
> >>>>>>> well. :-(
> >>>>>>>
> >>>>>>> On Mon, Oct 20, 2025 at 3:02 PM Alan C. Assis <ac...@gmail.com>
> >>>> wrote:
> >>>>>>>> +1
> >>>>>>>>
> >>>>>>>> It is better to use the right naming.
> >>>>>>>>
> >>>>>>>> Fitbit implemented support for System V on NuttX and promised to
> >>>> donate
> >>>>>>> it,
> >>>>>>>> but after Google acquired them, none contribution came from them.
> >>>>>>>>
> >>>>>>>> Google also used NuttX on ARA Project, but no single code line was
> >>>>>>>> submitted to the NuttX mainline.
> >>>>>>>>
> >>>>>>>> BR,
> >>>>>>>>
> >>>>>>>> Alan
> >>>>>>>>
> >>>>>>>> On Mon, Oct 20, 2025 at 8:07 AM Tomek CEDRO <to...@cedro.info>
> >>>> wrote:
> >>>>>>>>> Hello world :-)
> >>>>>>>>>
> >>>>>>>>> There is a very interesting and useful PR by @JianyuWang0623 that
> >>>>>> adds
> >>>>>>>>> support for Android System Init functionality to NuttX [1][2]
> >>>> with
> >>>>>>>>> working example on qemu [3]. This is alternative to SystemV Init
> >>>> and
> >>>>>>>>> probably other init designs. Please help in reviewing the change
> >>>> :-)
> >>>>>>>>> My only concern is naming convention here because just "system"
> >>>> and
> >>>>>>>>> "system init" is used (i.e. CONFIG_SYSTEM_INIT,
> >>>>>> CONFIG_SYSTEM_SYSTEM).
> >>>>>>>>> This may be a bit confusing because we do not know what init
> >>>> system
> >>>>>>>>> standard is used and we silently assume Android. My proposition
> >>>> is to
> >>>>>>>>> use "Android System Init" naming convention (i.e.
> >>>>>>>>> CONFIG_SYSTEM_ANDROID_INIT or something like that), so things are
> >>>>>>>>> self-explanatory, and other init systems may be used when
> >>>> necessary
> >>>>>> in
> >>>>>>>>> future without confusion. I am not insisting here and will
> >>>> follow the
> >>>>>>>>> community choice.
> >>>>>>>>>
> >>>>>>>>> Please let us know what you think :-)
> >>>>>>>>>
> >>>>>>>>> Thanks :-)
> >>>>>>>>> Tomek
> >>>>>>>>>
> >>>>>>>>> [1] https://github.com/apache/nuttx-apps/pull/3192
> >>>>>>>>> [2] https://github.com/apache/nuttx/pull/17215
> >>>>>>>>> [3] https://github.com/apache/nuttx/pull/17215
> >>>>>>>>>
> >>>>>>>>> --
> >>>>>>>>> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
> >>>>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>> --
> >>>>>>> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
> >>>>>>>
> >>>>
> >>>>
> >>>> --
> >>>> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
> >>>>
> >>
> >>
> >> --
> >> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
> >
> >
> > --
> > CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
> > #/******本邮件及其附件含有小米公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件! This e-mail and its attachments contain confidential information from XIAOMI, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it!******/#

Re: 答复: [External Mail]Re: NuttX and Android System Init

Posted by Sebastien Lorquet <se...@lorquet.fr>.
Hello


Here are some general remarks that may or may not apply ( I did not 
check enough), please do not take them personally, they do not apply to 
your idea and are just general warnings.


-the boards from nuttx repositories are only samples and are NOT 
representative of the usual industrial practice that is applied in 
external boards. Please do not make suppositions about proprietary init 
systems used by nuttx users.


-the startup of daemons is just ONE of the myriad of possibilities to 
init a system. Please make sure that this init system is ONLY an 
applicative system that can be entirely be made optional and DO NOT 
BREAK existing systems like:

* nsh and its initialization systems

* methods to boot by indicating entry points via names and/or routines.


Again, please, do feature creep as you wish (this is a nuttx philosophy 
by now </irony>) but PLEASE do not remove and break existing frameworks 
and force everyone to fix their code when updating a release.

Not everyone has hours and days of porting efforts to fix breakage.

NuttX is a mature project and its features are expected to be stable.

Evolution can go forward without being a pain (as much as possible).

Sometimes pain is inevitable, but then negotiation must be made on the 
mailing list to manage it beforehand.


Thank you for your attention to every user of nuttx. Use cases are 
wildly different and you cannot force every user to follow your shiny 
project.

You may not be going in these directions, but some problems like that 
happened before, were VERY energy and time consuming to manage so the 
project goes back on track, and I do not wish to deal with that sort of 
things again.


Sebastien


On 10/22/25 07:07, 王健宇 wrote:
> Dear All,
> Thank you, and hello everyone. Please allow me to add some (potentially redundant) information as follows:
>
>    1.
> Reasons for adding this module: As Tomek helped supplement earlier, the main considerations include code size (the shell module is not always required) and daemon management (such as status monitoring and restarting of services).
>    2.
> Reasons for naming it "init": From a functional perspective, this module is used for system initialization. Referring to Linux distributions and Android, modules with similar functions are generally named "systemd" or "init".
>    3.
> Regarding NuttX’s support for multiple init entry points: I conducted a simple filter using the command find boards/ -name defconfig | xargs grep INIT_ENTRYPOINT | cut -d ':' -f 2- | sort -u, and it turns out this is indeed the case. However, not all of their logic is used for system initialization. For example, CONFIG_INIT_ENTRYPOINT="hello_main" and CONFIG_INIT_ENTRYPOINT="ostest_main". The well-known and excellent NSH supports almost all system initialization functions; unfortunately, it lacks daemon management. Moreover, in scenarios where code size is a critical concern, NSH may be somewhat bulky. Therefore, we might need a dedicated module for system initialization.
>    4.
> About the module’s implementation: This module is a new implementation and not a port of Android Init. During the development process, I studied the source code of the excellent Android Init, but this module is more streamlined and compatible with most syntax of the Android Init Language.
>
> Personally, from a functional perspective, I tend to use apps/system/init and CONFIG_SYSTEM_INIT. However, if you have more comprehensive considerations, options like apps/android/init and CONFIG_ANDROID_INIT are also acceptable to me.
>
>
> Best regards,
>
> Jianyu Wang
>
> ________________________________
> 发件人: Tomek CEDRO <to...@cedro.info>
> 发送时间: 2025年10月22日 11:37:31
> 收件人: dev@nuttx.apache.org
> 主题: [External Mail]Re: NuttX and Android System Init
>
> [外部邮件] 此邮件来源于小米公司外部,请谨慎处理。若对邮件安全性存疑,请将邮件转发给misec@xiaomi.com进行反馈
>
> Okay Jianyu Wang, author of the Android System Init in NuttX code,
> joined the dev@ mailing list, welcome, below is the discussion history
> as read from the bottom up direction :-)
> Tomek
>
> On Tue, Oct 21, 2025 at 11:18 PM Tomek CEDRO <to...@cedro.info> wrote:
>> Okay I have provided feedback from the dev@ list to the gh prs and
>> here comes the reply ;-)
>>
>> The main advantages of this Android System Init on NuttX:
>> * it is custom trimmed down code implementing android system init
>> compatible functionality.
>> * it can run as standalone app that replaces nsh.
>> * it provides ~10x smaller footprint over nsh.
>>
>> I invited Wang to join discussion here on the mailing list :-)
>>
>> There may be use cases for this. My proposition is to move all Android
>> related stuff to apps/android that is apps/android/system/init and
>> apps/android/fastboot. Also to rename kconfig variables so instead
>> CONFIG_SYSTEM_SYSTEM it will be CONFIG_ANDROID_SYSTEM or similar? What
>> do you think folks? :-)
>>
>> Thanks :-)
>> Tomek
>>
>>
>>
>>
>>
>>
>>
>>
>> On Tue, Oct 21, 2025 at 8:29 AM Luchian Mihai <lu...@gmail.com> wrote:
>>> Hi Tomek,
>>>
>>> I am already more present in the project overall.
>>> I usually leave comments rather than start reviews (regarding PRs).
>>>
>>> There are already comments on Pull Request for the documentation.
>>> This subject that I've raised was more suited for the mailing list. It
>>> reaches more of the community overall.
>>>
>>> More input than mine is needed if we want a resolution.
>>>
>>> Cheers,
>>> Mihai
>>>
>>> On Tue, 21 Oct 2025 at 02:17, Tomek CEDRO <to...@cedro.info> wrote:
>>>
>>>> Yeah, it is good to have a choice, maybe someone will find this
>>>> solution useful and better fit for some applications, but.. we can
>>>> already see some confusion with all different system / init solutions,
>>>> so we should clearly distinguish the naming and functional separation
>>>> (system system init does not say anything at all), and better
>>>> documentation right from start (like Alan already requested and
>>>> Luchian noted).
>>>>
>>>> Luchian noticed a common but important problem - one person who create
>>>> some solution does not create good (or any) documentation right from
>>>> start and then anyone who touches the solution needs to reinvent the
>>>> wheel, what is tremendous waste of time and resources. I am sometimes
>>>> dropped into such rabbit hole in various projects and it takes weeks
>>>> or months to understand what is going on :D Good point! Luchian could
>>>> you please provide feedback on the Pull Requests too?
>>>>
>>>> Thanks! :-)
>>>> Tomek
>>>>
>>>>
>>>> On Tue, Oct 21, 2025 at 1:00 AM Alan C. Assis <ac...@gmail.com> wrote:
>>>>> Hi Luchian,
>>>>> that is what I suggested in the Documentation: before saying what Android
>>>>> System Init is, the documentation needs to explain what it is solving on
>>>>> NuttX.
>>>>>
>>>>> More important than that: starts explaining the existing solutions and
>>>> when
>>>>> to use them.
>>>>>
>>>>> As Xiang commented in the PR, their initial plan was to implement
>>>> SystemV,
>>>>> but it was more complex (and probably bigger).
>>>>>
>>>>> So Android System Init could be more beneficial for someone implemented
>>>>> deep embedded system with NuttX.
>>>>>
>>>>> But I didn't give up trying to get the SystemV Init implementation from
>>>>> Google, maybe someone there could help us.
>>>>>
>>>>> BR,
>>>>>
>>>>> Alan
>>>>>
>>>>> On Monday, October 20, 2025, Luchian Mihai <lu...@gmail.com>
>>>> wrote:
>>>>>> Hello all,
>>>>>>
>>>>>> This might stir the waters a bit, but I think it needs to be said.
>>>>>>
>>>>>> I know Alan already pointed out the need for docs in the PR comments,
>>>> but
>>>>>> just the documentation is not enough.
>>>>>>
>>>>>> I think we (the community) or the PMC should be more assertive
>>>> regarding
>>>>>> these kinds of features.
>>>>>> Why do we need another init system? What does this new init system
>>>> solve?
>>>>>> What should happen with the previous ones?
>>>>>> Do not get me wrong, I am not against this new init system, I am in
>>>> favour.
>>>>>> While NuttX excels in posix compliance as a single standard, a lot of
>>>> other
>>>>>> things lack unity.
>>>>>> Lacking a "default" way of doing things ends up in "hidden features",
>>>> or
>>>>>> rather, features
>>>>>> that are used and known by a set of people.
>>>>>>
>>>>>> There is also support for fastboot and adb, so the android init system
>>>>>> makes sense,
>>>>>> but I see nothing that explains why they are present in the first
>>>> place.
>>>>>> Did they solve something, some time ago? Is the NuttX project aligning
>>>> with
>>>>>> the android tooling?
>>>>>>
>>>>>> I would like to point out my experience as a new contributor. It took
>>>> me a
>>>>>> few months to get the hang of how the thing should be done,
>>>>>> or at least what the majority agrees. There are board examples that
>>>> differ,
>>>>>> but neither are wrong also.
>>>>>> The system initialization is the same, I've read documentation about
>>>> `exec`
>>>>>> and `posix_spawn` and `task_create`,
>>>>>> and I am writing docs about the flat, protected, kernel build. Yet, I
>>>> still
>>>>>> did not find the "NuttX way to leave" the kernel.
>>>>>> And here we have another init system.
>>>>>>
>>>>>> For me this just feels more of a feature creep than a milestone, sorry.
>>>>>>
>>>>>> It's hard to market (from my own experience) NuttX as anything other
>>>> than
>>>>>> "high quality code" if it takes days to
>>>>>> figure out the solution (out of the existing few) for a specific
>>>> problem.
>>>>>> I suggest defining the expectations about this PR, and make a separate
>>>>>> documentation page.
>>>>>> Is something that NuttX wants to adopt going forward, that is great.
>>>>>> Will it help only part of the community, that is also great.
>>>>>> The only thing I ask is to make that as obvious as possible, it's
>>>> tiring to
>>>>>> "unravel the NuttX lore" from the mailing list.
>>>>>>
>>>>>> Cheers,
>>>>>> Mihai
>>>>>>
>>>>>> On Mon, 20 Oct 2025 at 19:09, Tomek CEDRO <to...@cedro.info> wrote:
>>>>>>
>>>>>>> well. :-(
>>>>>>>
>>>>>>> On Mon, Oct 20, 2025 at 3:02 PM Alan C. Assis <ac...@gmail.com>
>>>> wrote:
>>>>>>>> +1
>>>>>>>>
>>>>>>>> It is better to use the right naming.
>>>>>>>>
>>>>>>>> Fitbit implemented support for System V on NuttX and promised to
>>>> donate
>>>>>>> it,
>>>>>>>> but after Google acquired them, none contribution came from them.
>>>>>>>>
>>>>>>>> Google also used NuttX on ARA Project, but no single code line was
>>>>>>>> submitted to the NuttX mainline.
>>>>>>>>
>>>>>>>> BR,
>>>>>>>>
>>>>>>>> Alan
>>>>>>>>
>>>>>>>> On Mon, Oct 20, 2025 at 8:07 AM Tomek CEDRO <to...@cedro.info>
>>>> wrote:
>>>>>>>>> Hello world :-)
>>>>>>>>>
>>>>>>>>> There is a very interesting and useful PR by @JianyuWang0623 that
>>>>>> adds
>>>>>>>>> support for Android System Init functionality to NuttX [1][2]
>>>> with
>>>>>>>>> working example on qemu [3]. This is alternative to SystemV Init
>>>> and
>>>>>>>>> probably other init designs. Please help in reviewing the change
>>>> :-)
>>>>>>>>> My only concern is naming convention here because just "system"
>>>> and
>>>>>>>>> "system init" is used (i.e. CONFIG_SYSTEM_INIT,
>>>>>> CONFIG_SYSTEM_SYSTEM).
>>>>>>>>> This may be a bit confusing because we do not know what init
>>>> system
>>>>>>>>> standard is used and we silently assume Android. My proposition
>>>> is to
>>>>>>>>> use "Android System Init" naming convention (i.e.
>>>>>>>>> CONFIG_SYSTEM_ANDROID_INIT or something like that), so things are
>>>>>>>>> self-explanatory, and other init systems may be used when
>>>> necessary
>>>>>> in
>>>>>>>>> future without confusion. I am not insisting here and will
>>>> follow the
>>>>>>>>> community choice.
>>>>>>>>>
>>>>>>>>> Please let us know what you think :-)
>>>>>>>>>
>>>>>>>>> Thanks :-)
>>>>>>>>> Tomek
>>>>>>>>>
>>>>>>>>> [1] https://github.com/apache/nuttx-apps/pull/3192
>>>>>>>>> [2] https://github.com/apache/nuttx/pull/17215
>>>>>>>>> [3] https://github.com/apache/nuttx/pull/17215
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
>>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
>>>>>>>
>>>>
>>>>
>>>> --
>>>> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
>>>>
>>
>>
>> --
>> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
>
>
> --
> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
> #/******本邮件及其附件含有小米公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件! This e-mail and its attachments contain confidential information from XIAOMI, which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it!******/#