If CONFIG_SERIAL_TERMIOS is not selected then non-consoles will do
nothing. In order to restore legacy behavior you would have to do this:
+#ifdef CONFIG_SERIAL_TERMIOS
if (
-#ifdef CONFIG_SERIAL_TERMIOS
dev->tc_iflag & ECHO
-#else - dev->isconsole -#endif
)
...
}
+#endif
That should eliminate the double character echo.
So the command line tool has to do the different thing(echo or non echo by
self) based on CONFIG_SERIAL_TERMIOS?
No, the legacy behavior is that the serial driver never echos by itself
unless ECHO is selected.