mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-20 12:55:43 +08:00
nsh/script: support rc.sysinit script
Follow: http://glennastory.net/boot/sysinit.html This is first script that init runs is rc.sysinit. This script does serval initialization tasks about basic service. The boot sequence currently provided to the board level is: board_earlyinitialize-> board_lateinitialize(Peripherals driver, core driver, ...)-> run rcS script(mount fs, run service) -> board_appinitialize-> After this patch: The boot sequence currently provided to the board level is: board_earlyinitialize-> board_lateinitialize(core driver,...)-> run rc.sysinit script(mount fs, run core service) -> board_appinitialize(Peripherals driver)-> run rcS script(run other service)-> So, Peripheral drivers can do more with the file system and core services. Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
This commit is contained in:

committed by
Petro Karashchenko

parent
768a21b587
commit
9f79bf183a
@@ -145,6 +145,22 @@ int nsh_script(FAR struct nsh_vtbl_s *vtbl, FAR const char *cmd,
|
||||
return ret;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: nsh_sysinitscript
|
||||
*
|
||||
* Description:
|
||||
* Attempt to execute the configured system initialization script. This
|
||||
* script should be executed once when NSH starts.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_NSH_ROMFSETC
|
||||
int nsh_sysinitscript(FAR struct nsh_vtbl_s *vtbl)
|
||||
{
|
||||
return nsh_script(vtbl, "sysinit", NSH_SYSINITPATH);
|
||||
}
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: nsh_initscript
|
||||
*
|
||||
|
Reference in New Issue
Block a user