On 2024-07-09 09:21:32, Gregory Nutt wrote:
> On 7/9/2024 9:10 AM, michal.lyszc...@bofc.pl wrote:
> > I am just copy pasting my message from other thread, as I did not see
> > that one in time :) So my proposition is:
> > 
> > I think I would be good if nuttx had something like /sbin/init that would
> > do some very simple service management. Then you could just tick
> > "Start NSH after boot up". Programs would probably be had to added via
> > some compile-time header file that could look like that: [snip]
> 
> Starting any initialization task implies that you have already initialized
> the operating system.  This is fine for application level initialization but
> OS level initialization must already be complete.
> 
> The only complex thing about initialization are the chicken'n'egg problems. 
> For example, on DRAM-based platforms you can't execute any "normal" C code
> until memory resources are initialized.  Any initialization sequence must
> account for the initialization and ordering requirements of all supported
> platforms but must do so in a platform-independent way.
> 
> Sweeping generalizations generally don't work for all initialization cases.

I only meant to use init to replace boardctl initializations but I see your
point. Well, my point still stands for most of it. Init should be a separate
program that would start nsh (and other user daemons), not the other way
around.

-- 
.-----------------.-------------------.----------------------.-----------------.
| Michal Lyszczek | Embedded C, Linux |   Company Address    |  .-. opensource |
| +48 727 564 419 | Software Engineer | Akacjowa 10a; 55-330 |  oo|  supporter |
| https://bofc.pl `----.--------------: Brzezinka Sredzka PL | /`'\      &     |
| GPG FF1EBFE7E3A974B1 | Bits of Code | NIP:   813 349 58 78 |(\_;/) programer |
`----------------------^--------------^----------------------^-----------------'

Attachment: signature.asc
Description: PGP signature

Reply via email to