diff --git a/nshlib/Kconfig b/nshlib/Kconfig index 687d4837d..21b09919c 100644 --- a/nshlib/Kconfig +++ b/nshlib/Kconfig @@ -12,7 +12,7 @@ config NSH_LIBRARY select NETUTILS_NETLIB if NET select LIBC_NETDB if NET select READLINE_HAVE_EXTMATCH - select DRVR_MKRD if !NSH_DISABLE_MKRD + select DRVR_MKRD if !NSH_DISABLE_MKRD && !DISABLE_MOUNTPOINT ---help--- Build the NSH support library. This is used, for example, by system/nsh in order to implement the full NuttShell (NSH). diff --git a/nshlib/nsh.h b/nshlib/nsh.h index 5540dbf3b..a2580f002 100644 --- a/nshlib/nsh.h +++ b/nshlib/nsh.h @@ -861,13 +861,24 @@ int nsh_loginscript(FAR struct nsh_vtbl_s *vtbl); #endif #endif -/* Architecture-specific initialization */ +/* Certain commands are only available if the boardctl() interface is + * available: + */ + +/* Architecture-specific initialization depends on boardctl(BOARDIOC_INIT) */ #if defined(CONFIG_NSH_ARCHINIT) && !defined(CONFIG_LIB_BOARDCTL) # warning CONFIG_NSH_ARCHINIT is set, but CONFIG_LIB_BOARDCTL is not # undef CONFIG_NSH_ARCHINIT #endif +/* The mkrd command depends on boardctl(BOARDIOC_MKRD) */ + +#if !defined(CONFIG_LIB_BOARDCTL) || !defined(CONFIG_DRVR_MKRD) +# undef CONFIG_NSH_DISABLE_MKRD +# define CONFIG_NSH_DISABLE_MKRD 1 +#endif + /* Basic session and message handling */ struct console_stdio_s;