[[PageOutline]] = Disabling Serial Console = For varying privacy and security reasons, some people like to completely silence the serial console output. This needs to be done in the following places: * [#bootloader Bootloader] (serial console) * [#kernel Linux Kernel] (serial console) * [#linuxos Linux OS] (console login) ''' Please NOTE: There will be no way to access the board besides over the network after making these changes.''' ''' Please make changes at your own risk''' Recovery would be through re-programming the board via the Gateworks JTAG Programmer. [=#bootloader] == Disable U-Boot bootloader serial console == In order to disable serial console for the U-Boot bootloader you must re-build the bootloader with the feature disabled. * Ventana bootloader - see [wiki:ventana/bootloader] for building - alter config (configs/gwventana_defconfig): * remove 'CONFIG_DM_SERIAL=y' * set CONFIG_BOOTDELAY to 0 to save a couple of seconds on bootup [=#kernel] == Disable Kernel serial console == In order to disable serial console for the Linux Kernel you can either recompile it with the support disabled, or you can alter the bootargs the bootloader passes to the kernel to disable it at runtime. Kernel configuration: * Remove the following from the kernel config (.config) * CONFIG_SERIAL_CORE_CONSOLE * CONFIG_SERIAL_EARLYCON * CONFIG_SERIAL_IMX_CONSOLE (Ventana / imx6) Kernel bootargs: * Remove the 'console' bootargs Example bootloader configuration to remove the {{{console}}} bootarg: * Ventana - unset {{{console}}}: {{{ setenv console saveenv }}} [=#linuxos] == Disable Linux OS console login == In order to disable console login in a Linux OS you must disable the service that performs this function. While this is Linux distribution specific it usually involves the 'init' process launching the 'getty' or 'login' application with a parameter of a specific serial device or tty1 (which is the kernel console tty) === OpenWrt === modern OpenWrt uses it's own {{{procd}}} as a replacement for the standard Linux init. While it is a complete re-implementation it still follows the standard of processing an {{{/etc/inittab}}} file for configuring what processes are spawned from init. To kill off login from the kernel serial console as well as any other serial devices, remove or comment with a leading '#' any lines that invoke {{{/bin/ash --login}}} from /etc/inittab such as: {{{ ::askconsole:/bin/ash --login tty1::askfirst:/bin/ash --login }}} === Yocto (and other Linux distros using the standard sysvinit) === Many Linus distros use the {{{sysvinit}}} package which processes {{{/etc/inittab}}} for commands to spawn a {{{getty}}} on various serial devices or tty's. To kill off login from the kernel serial console as well as any other serial devices, remove or comment with a leading '#' any lines that invoke the {{{getty}}} process from /etc/inittab. For example, remove the following: {{{ mxc1:12345:respawn:/sbin/getty -L 115200 ttymxc1 1:12345:respawn:/sbin/getty 38400 tty1 }}} === Ubuntu === Ubuntu doesn't by default enable serial console or serial port login capability however if you have added this it may have been done by adding an {{{/etc/init/serial.conf}}} that you can alter or remove.