diff --git a/examples/lvglterm/Kconfig b/examples/lvglterm/Kconfig index 7c4a70683..dba596b44 100644 --- a/examples/lvglterm/Kconfig +++ b/examples/lvglterm/Kconfig @@ -75,3 +75,13 @@ config EXAMPLES_LVGLTERM_STACKSIZE default 16384 endif # EXAMPLES_LVGLTERM + +config EXAMPLES_LVGLTERM_SHELL + string "Shell to run in the terminal" + default "nsh" + depends on EXAMPLES_LVGLTERM + ---help--- + The program the terminal spawns. A bare name is looked up on + PATH; a path is taken as given, which is what a configuration + installing NSH under another name needs -- "/system/bin/init", + for instance, where NSH is the system's init. diff --git a/examples/lvglterm/lvglterm.c b/examples/lvglterm/lvglterm.c index f2dcb1f10..ad555cc55 100644 --- a/examples/lvglterm/lvglterm.c +++ b/examples/lvglterm/lvglterm.c @@ -93,7 +93,16 @@ /* NSH Task to be started */ -#define NSH_TASK "nsh" +/* The shell to run. A name is looked up on PATH, a path is taken as + * given, which matters where the shell is installed under another name, + * as it is when NSH is built as the system's init. + */ + +#ifdef CONFIG_EXAMPLES_LVGLTERM_SHELL +# define NSH_TASK CONFIG_EXAMPLES_LVGLTERM_SHELL +#else +# define NSH_TASK "nsh" +#endif /**************************************************************************** * Private Function Prototypes