In this how-to section, you will access the Linux terminal through the debug UART interface and learn basic useful Linux commands. In this module you will:
Note: We will access the module using the Serial Terminal, therefore the USB keyboard and video interface connected to the module will not be used in this section.
Open a terminal in the host machine:
Install a serial terminal emulator application in your host computer:
sudo apt-get install minicom
To find out what is the serial port device that you must use, you can execute the command below:
ls -l /dev/serial/by-id
Alternatively, use the command below. If in doubt: unplug the USB-Serial adapter --> execute the command --> plug the USB-Serial adapter --> execute the command again and find the new device listed.
ls -l /dev/tty*
The new device listed, in this case /dev/ttyUSB0 is the USB-serial adapter. It will be required when you start the serial application.
To start the serial application, the parameters must be correctly set. The table below presents them:
For instance, to use minicom you only need to adjust the serial port - the other parameters are correctly set by default. You might need to have administrator privilege to access the hardware. See the following steps to learn how to configure minicom.
Start minicom configuration menu:
sudo minicom -s
You will see a menu such as in the figure below:
Press the "a" key from your keyboard to edit the Serial Device field. Use the device found in step 3 for your system. Press "Enter" to apply the configuration. Since many customers do not use hardware flow control, you might want to disable it by pressing the "f" key.
Press "Enter" until you return to the previous menu.
Save the setup as default:
Choose the "Exit" option and the terminal will be ready:
Note: To exit Minicom, press "ctrl+a" and then press "x".
Power-on the embedded system. Messages will immediately start to be printed in the serial terminal. When the messages stop, a login prompt will be the last content printed to the terminal. You can press Enter to refresh the login prompt if any message is printed after it. To login, the default username is root and no password is required:
Some modules will get a kernel panic error while updating from an image 2.7b3 or older to 2.74b4 or newer, it occurs because images 2.7b3 and older use EXT-3 for mouting the root file system, and starting with image 2.7b4, the root file system is mounted using EXT-4, to solve this problem, power-cycle the system and enter U-Boot command line by pressing any key, then reload the default U-Boot environment and save it, as presented in the commands below:
env default -asaveenvboot
Warning: If you have custom U-Boot variables set, please make sure to copy them before proceeding, since this will erase any custom variables.
If you are new to Linux or the command-line interface and want to learn some basic commands, please read this article