Difference between revisions of "Communicate with your board from a Linux Host (Basics)"

From ArmadeusWiki
Jump to: navigation, search
 
(TFTP server)
Line 36: Line 36:
  
 
==TFTP server==
 
==TFTP server==
In order to send your files (uBoot, Linux, rootfs ...) with higher speed to the armadeus board, you can use a tftp server.
+
In order to send your image files (U-Boot, Linux zImage, rootfs ...) with higher speed to the armadeus board, you can use a tftp server.
Once the server started, the files located in the server shared directory (or current directory) will be accessible from the U-Boot TFTP client.
+
Once the server started, the files located in the server shared directory (/tftpboot by default) will be accessible from the U-Boot TFTP client.
  
 
===TFTP server installation===   
 
===TFTP server installation===   
 +
On Ubuntu:
 +
# apt-get install tftpd
 +
or use Synaptic<br>
 +
On Fedora:
 +
# rpm -q tftpd
  
 +
Then create the directory that will contain all the files that the server will export (you have to be root to do that):
 +
# mkdir /tftpboot
 +
# chmod 777 /tftpboot
  
 
===Server configuration===   
 
===Server configuration===   
* Select the directory in which the files you want to sent to the Armadeus board are located ("Browse" button)
+
Edit or create the configuration file /etc/xinetd.d/tftp and modify/add it the following lines:
* Set the server address if necessary (must be your Host IP address)
+
# default: off
If the Armadeus board has been correctly configured (host address, netmask ...) the transfer will start immediately.
+
# description: The tftp server serves files using the trivial file transfer
 
+
#      protocol.  The tftp protocol is often used to boot diskless
 +
#      workstations, download configuration files to network-aware printers,
 +
#      and to start the installation process for some operating systems.
 +
service tftp
 +
{
 +
        socket_type            = dgram
 +
        protocol                = udp
 +
        wait                    = yes
 +
        user                    = root
 +
        server                  = /usr/sbin/in.tftpd
 +
        server_args            = -s /tftpboot
 +
#      disable                = yes
 +
}
 +
 +
Restart xinetd service:
 +
# killall -HUP xinetd
  
 
==Links==
 
==Links==
 
* [http://www.columbia.edu/kermit/ Kermit Homepage]
 
* [http://www.columbia.edu/kermit/ Kermit Homepage]
 
*
 
*

Revision as of 10:20, 5 October 2006

RS232 configuration

We suggest you to use Kermit as Terminal emulator for RS232 connection. Minicom was sadly reported to have problems when communicating with U-Boot.

Kermit installation

  • On Ubuntu:
apt-get install gkermit

or use Synaptic graphical package manager.

  • On Fedora:
rpm -q gkermit

Kermit configuration

  • Edit/Create .kermrc file in your $HOME directory and put it in:
set line /dev/ttyS0
set speed 115200
set carrier-watch off
set handshake none
set flow-control none
robust
set file type bin
set file name lit
set rec pack 1000
set send pack 1000
set window 5
set transmit linefeed on
  • In this example, we assume that your serial port is ttyS0 (first serial port). Change this to correct value if necessary.
  • If you use an USB<->Serial converter then serial port would surely be named like that: ttyUSB0

Kermit usage

  • To launch it:
kermit -c
  • To switch from terminal mode to command mode:
CTRL + \ + c
  • To switch from command mode to terminal mode:
C-Kermit>c

TFTP server

In order to send your image files (U-Boot, Linux zImage, rootfs ...) with higher speed to the armadeus board, you can use a tftp server. Once the server started, the files located in the server shared directory (/tftpboot by default) will be accessible from the U-Boot TFTP client.

TFTP server installation

On Ubuntu:

# apt-get install tftpd

or use Synaptic
On Fedora:

# rpm -q tftpd

Then create the directory that will contain all the files that the server will export (you have to be root to do that):

# mkdir /tftpboot
# chmod 777 /tftpboot

Server configuration

Edit or create the configuration file /etc/xinetd.d/tftp and modify/add it the following lines:

# default: off
# description: The tftp server serves files using the trivial file transfer
#       protocol.  The tftp protocol is often used to boot diskless
#       workstations, download configuration files to network-aware printers,
#       and to start the installation process for some operating systems.
service tftp
{
       socket_type             = dgram
       protocol                = udp
       wait                    = yes
       user                    = root
       server                  = /usr/sbin/in.tftpd
       server_args             = -s /tftpboot
#       disable                 = yes
}

Restart xinetd service:

# killall -HUP xinetd

Links