mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-19 11:23:07 +08:00
nshlib: move etc romfs mount from nsh to nuttx
This commit corresponds to apache/nuttx#11498 in nuttx. Move etc romfs mount to sched/init for compatibility with kernel/protected mode. changes: - move etc romfs mount from nsh to Nuttx, but keep the script to parse and execute. - move and rename the related CONFIG, move customized nsh_romfsimg.h to etc_romfs.c in boards, and no need declaration for romfs_img/romfs_img_len. Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
This commit is contained in:
@@ -106,7 +106,7 @@ void nsh_initialize(void)
|
||||
#if defined (CONFIG_NSH_SYMTAB)
|
||||
struct boardioc_symtab_s symdesc;
|
||||
#endif
|
||||
#if defined(CONFIG_NSH_ROMFSETC) && !defined(CONFIG_NSH_DISABLESCRIPT)
|
||||
#if defined(CONFIG_ETC_ROMFS) && !defined(CONFIG_NSH_DISABLESCRIPT)
|
||||
FAR struct console_stdio_s *pstate;
|
||||
#endif
|
||||
|
||||
@@ -122,10 +122,6 @@ void nsh_initialize(void)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Mount the /etc filesystem */
|
||||
|
||||
(void)nsh_romfsetc();
|
||||
|
||||
#ifdef CONFIG_NSH_USBDEV_TRACE
|
||||
/* Initialize any USB tracing options that were requested */
|
||||
|
||||
@@ -147,7 +143,7 @@ void nsh_initialize(void)
|
||||
boardctl(BOARDIOC_INIT, 0);
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_NSH_ROMFSETC) && !defined(CONFIG_NSH_DISABLESCRIPT)
|
||||
#if defined(CONFIG_ETC_ROMFS) && !defined(CONFIG_NSH_DISABLESCRIPT)
|
||||
pstate = nsh_newconsole(false);
|
||||
|
||||
/* Execute the system init script */
|
||||
@@ -167,7 +163,7 @@ void nsh_initialize(void)
|
||||
boardctl(BOARDIOC_FINALINIT, 0);
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_NSH_ROMFSETC) && !defined(CONFIG_NSH_DISABLESCRIPT)
|
||||
#if defined(CONFIG_ETC_ROMFS) && !defined(CONFIG_NSH_DISABLESCRIPT)
|
||||
/* Execute the start-up script */
|
||||
|
||||
nsh_initscript(&pstate->cn_vtbl);
|
||||
|
Reference in New Issue
Block a user