4. Terminal Connection

1. Setting up a Terminal Connection to a PC

To use Bootloader and Linux effectively as a development environment, you need terminal access via the serial port. Later, the system can be configured to start automatically, user interaction is no longer required. The standard way to create a serial port connection is to connect the target computer and development computer with a null modem cable and to run a terminal emulator on the development system.

As described below, you can use either a Linux computer or one running Windows.

1.1. Terminal Access under Linux

In the Linux environment, Kermit fulfils this software requirement. Although also often used for similar purposes, the Minicom terminal emulator should not be used, since there are many reported problems when working with the U-Boot boot loader. There are 2 Kermit packages in many Linux distributions. Of these, gkermit is only a command-line tool for implementing the Kermit FTP (File Transfer Protocol); the appropriate package is ckermit. Under Debian GNU/Linux, you can install the package simply with:

apt-get install ckermit

The packet cKermit belongs to the non-free distribution tree. If the Apt-Packet Manager couldn't find the package, simply add non-free to the configuration file /etc/apt/sources.list for your Debian server and execute

apt-get update

Now the apt command should work successfully.

For configuration, it is a good idea to create the configuration file .kermrc in the home directory used by Kermit for initialisation. Use the following settings to interact with U-Boot:

# example ~/.kermrc
set line /dev/ttyS0
set speed 115200
set carrier-watch off
set handshake none
set flow-control none
set file type bin
set file name lit
set rec pack 1000
set window 5

Normal users need to have read and write permissions for /dev/ttyS0. In most Linux distributions, this is not the case. Either put the user into the right group (on Debian systems this is dialout, may also be uucp on other systems) or run the following command as root:

chmod 666 /dev/ttyS0

Then you can restart Kermit:

kermit -c

Upon starting Linux on the target system, a console is available on the serial port.

1.2. Terminal Access under Windows

Windows operating systems generally offer HyperTerminal as a free terminal emulator, already included in the standard installation. You can execute HyperTerminal from Start → Programs → Accessories → Communication.

HyperTerminal Configuration Menu

Figure 4.1. HyperTerminal Configuration Menu

After starting HyperTerminal, enter any connection name and choose the COM port to be used. Then configure the interface for serial interaction, as shown in the screen shot (Kein(e) = None).