On our Toradex modules, the U-Boot boot loader and the Linux kernel use UART_A as serial debug console. The serial console is the primary and most reliable interface to the boot loader and Linux kernel. This article has two main sections:
Warning: We do not recommend to use UART_A for any other purpose. Disabling it prevents analyzing errors (e.g. crash of the user interface) or analyzing if the system is in a non-bootable state.
Warning: This article shows how to disable the debug messages on the serial console only. In case you would like to disable debug messages or the virtual console on graphical output (DVI-I, HDMI, LVDS, or VGA) please refer to the Framebuffer (Linux) article.
You can easily access your Toradex SoM via the serial, in this section, you will find out how to set up the hardware on each of our boards as well as know the parameters.
Connecting to the board requires some parameters, here they are:
/dev/ttyUSBx
on Linux, or COMx
on Windows, being x
a number to be determined in the next section.115200
none
8
1
none
Go to Control Panel and find the Device Manager. Your COMx
port will be listed under Ports.
Unplug the device from your computer and run:
$ ls /dev/ttyUSB*
Plug the device and run the same command again, your device will be listed:
$ ls /dev/ttyUSB*
To avoid being requested to use sudo
all the time, you can add your user to the dialout group. You can find your user name with the whoami
command. To do it in a single-line, in your development PC, run:
$ sudo usermod -a -G dialout $(whoami)
To apply the changes, either reboot or log-off, and log-in.
Select your carrier board from the tabs below:
Connect a USB micro-B to USB Type-A cable to X66
.
Note: Notice that the micro USB connector (X66) has an integrated USB-serial converter that provides access to the computer on module debug serial port.
Attention: Verdin has an integrated Serial-to-USB converter that lists 4 serial ports on your computer. The highest index is the Linux serial console. Example, if you see /dev/ttyUSB0
, /dev/ttyUSB1
, /dev/ttyUSB2
and /dev/ttyUSB3
listed, then /dev/ttyUSB3
is the serial console. The same logic applies for Windows.
Connect a USB C to USB Type-A cable to DEBUG
.
Note: Notice that the USB C connector (DEBUG) has an integrated USB-serial converter that provides access to the computer on module debug serial port.
Attention: Verdin has an integrated Serial-to-USB converter that lists 4 serial ports on your computer. The highest index is the Linux serial console. Example, if you see /dev/ttyUSB0
, /dev/ttyUSB1
, /dev/ttyUSB2
and /dev/ttyUSB3
listed, then /dev/ttyUSB3
is the serial console. The same logic applies for Windows.
Connect the DB9 to the IDC adapter cable to the X22
connector on the Ixora:
Note: The adapter is included in the Toradex Cable Kit, the standard we used is normally called DTK or Intel standard.
Connect your host machine to the adapter cable using a serial cable or Serial to USB converter:
Use UART-1 via the USB Type-B connector X29
:
Make sure that the jumpers JP10
and JP12
are set to USB mode as shown in the image below:
Connect the DB9 to the IDC adapter cable to the X13
connector on the Iris:
Note: The adapter is included in the Toradex Cable Kit, the standard we used is normally called DTK or Intel standard.
Connect your host machine to the adapter cable using a serial cable or Serial to USB converter:
Connect a USB micro-B to USB Type-A cable to X4
.
Note: Notice that the micro USB connector (X4) can be employed as a means to power the system and also has an integrated USB-serial converter that provides access to the computer on module debug serial port.
In case you want to know how to set up a terminal emulator to start accessing your module, please refer to Serial Terminal Emulator article.
To get your board IP address, follow the instructions from the section Find your IP and MAC address on the article Basic Linux Commands.
Examples why you need your board IP:
Here are sections for disabling the console on U-Boot and the Linux kernel. Make sure to check on UART (Linux) the name of the UART interfaces available for your specific SoM before proceeding.
The following config options need to be defined in the respective board header file to quiet messages on the serial console:
CONFIG_SILENT_CONSOLE CONFIG_SYS_DEVICE_NULLDEV CONFIG_SILENT_CONSOLE_UPDATE_ON_RELOC
For enabling silent console append the environment variable 'silent=1' to CONFIG_EXTRA_ENV_SETTINGS in respective board header file.
Please refer to the following article concerning setup/compilation of the same:
Build U-Boot and Linux Kernel from Source Code
Note: Enabling silent console just bypasses the console messages to null. Depending on the module type and U-Boot version you might still be able to interrupt U-Boot by pressing the specified key which allows you to control the U-Boot at run time.
To get fewer debug messages from the Linux Kernel one can use the "quiet" Kernel parameter.
# setenv defargs '${defargs} quiet'
# saveenv
Disable the console from kernel completely by setting the console= option on the kernel command line. This can be achieved by doing it from U-Boot prompt or using U-Boot-envtools under Linux to modify the env variables:
# setenv console null
# saveenv
or using U-Boot-envtools under Linux:
# fw_setenv console null
# reboot
After this, no kernel messages/serial login are available on debug serial port anymore. To re-enable the debug serial port console one needs to reset the 'console' variable back to respective serial tty (e.g: ttyLP0 on Colibri VFxx).
# setenv console ttyLP0
# saveenv
or using U-Boot-envtools under Linux:
# fw_setenv console ttyLP0
# reboot
While during boot the serial baudrate is taken from the U-Boot environment variable baudrate
, the later login shell baudrate
needs to be configured separately if required in respective /etc/systemd/system/getty.target.wants/serial-getty@
Newer BSPs always start an explicit serial getty on UART_A which can be disabled as follows:
# systemctl disable serial-getty@ttyS0.service
Starting from Bsp 3.0 (Kernel 4.14), serial getty cannot be disabled anymore. You need to mask it as follows:
# systemctl mask serial-getty@ttymxc0.service
An interesting blog post from Mr. Poettering about the thematic can be found here.