diff --git a/nshlib/nsh_altconsole.c b/nshlib/nsh_altconsole.c index dd574becb..ed2fe82c2 100644 --- a/nshlib/nsh_altconsole.c +++ b/nshlib/nsh_altconsole.c @@ -292,12 +292,6 @@ int nsh_consolemain(int argc, char *argv[]) netinit_bringup(); #endif -#if defined(CONFIG_NSH_ARCHINIT) && defined(CONFIG_BOARDCTL_FINALINIT) - /* Perform architecture-specific final-initialization (if configured) */ - - boardctl(BOARDIOC_FINALINIT, 0); -#endif - /* First map stderr and stdout to alternative devices */ ret = nsh_clone_console(pstate); diff --git a/nshlib/nsh_consolemain.c b/nshlib/nsh_consolemain.c index 61aabf3ae..5ff9f0ed0 100644 --- a/nshlib/nsh_consolemain.c +++ b/nshlib/nsh_consolemain.c @@ -110,12 +110,6 @@ int nsh_consolemain(int argc, char *argv[]) netinit_bringup(); #endif -#if defined(CONFIG_NSH_ARCHINIT) && defined(CONFIG_BOARDCTL_FINALINIT) - /* Perform architecture-specific final-initialization (if configured) */ - - boardctl(BOARDIOC_FINALINIT, 0); -#endif - /* Execute the session */ ret = nsh_session(pstate); diff --git a/nshlib/nsh_script.c b/nshlib/nsh_script.c index a29994ebf..cf77ef964 100644 --- a/nshlib/nsh_script.c +++ b/nshlib/nsh_script.c @@ -190,6 +190,12 @@ int nsh_initscript(FAR struct nsh_vtbl_s *vtbl) if (!already) { ret = nsh_script(vtbl, "init", NSH_INITPATH); + +#if defined(CONFIG_NSH_ARCHINIT) && defined(CONFIG_BOARDCTL_FINALINIT) + /* Perform architecture-specific final-initialization (if configured) */ + + boardctl(BOARDIOC_FINALINIT, 0); +#endif } return ret; diff --git a/nshlib/nsh_usbconsole.c b/nshlib/nsh_usbconsole.c index 11c160219..60a881599 100644 --- a/nshlib/nsh_usbconsole.c +++ b/nshlib/nsh_usbconsole.c @@ -325,12 +325,6 @@ int nsh_consolemain(int argc, char *argv[]) netinit_bringup(); #endif -#if defined(CONFIG_NSH_ARCHINIT) && defined(CONFIG_BOARDCTL_FINALINIT) - /* Perform architecture-specific final-initialization (if configured) */ - - boardctl(BOARDIOC_FINALINIT, 0); -#endif - /* Now loop, executing creating a session for each USB connection */ for (;;)