From a82d74b8a1d7a219bc63bbf51f3b490a0f064f24 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Sun, 19 Apr 2020 23:05:09 +0800 Subject: [PATCH] nshlib: Call BOARDIOC_FINALINIT in nsh_telnetstart if CONFIG_NSH_CONSOLE not define Signed-off-by: Xiang Xiao --- nshlib/nsh_telnetd.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/nshlib/nsh_telnetd.c b/nshlib/nsh_telnetd.c index b2a75dc00..057175c95 100644 --- a/nshlib/nsh_telnetd.c +++ b/nshlib/nsh_telnetd.c @@ -259,13 +259,21 @@ int nsh_telnetstart(sa_family_t family) /* Execute the startup script. If standard console is also defined, * then we will not bother with the initscript here (although it is - * safe to call nshinitscript multiple times). + * safe to call nsh_initscript multiple times). */ #if defined(CONFIG_NSH_ROMFSETC) && !defined(CONFIG_NSH_CONSOLE) nsh_initscript(vtbl); #endif + /* Perform architecture-specific final-initialization(if configured) */ + +#if defined(CONFIG_NSH_ARCHINIT) && \ + defined(CONFIG_BOARDCTL_FINALINIT) && \ + !defined(CONFIG_NSH_CONSOLE) + boardctl(BOARDIOC_FINALINIT, 0); +#endif + /* Configure the telnet daemon */ config.d_port = HTONS(CONFIG_NSH_TELNETD_PORT);