PetaLinux Installation Procedure

Download

Pre-release snapshots available for download:

Install

To install the pre-release snapsahot, simply expand the archive from a conventient directory, for example your home directory:

[user@host home]$ tar xvf petalinux-v0.10-rc1.tar.gz

This will create a directory petalinux-v0.10-rc1, which is the "root" of your PetaLinux installation.

Creating a /tftpboot transfer directory (optional) (requires root access)

When working with network-enabled embedded Linux systems, it is often convenient to update Linux images and other files over the TCP/IP network.

The directory /tftpboot is commonly used as a transfer directory for this purpose. The PetaLinux tools can optionally copy Linux and bootloader files into this (or another) directory automatically.

To create the /tftpboot directory, you must have root access. Speak to your system administrator if necessary.

$ su
Password: ********

# mkdir /tftpboot
# chmod -R 777 /tftpboot

This sequence of commands creates the /tftpboot directory, and gives all users permission to read and write its contents.

Notes on creating /tftpboot

  • All files that you place in this directory are visible to all other users of the system. Do not store confidential, or sensitive data such as passwords in this directory.
  • You may choose a directory name other than /tftpboot if you wish. However, remember to change the location settings in the PetaLinux system settings menu (need link here).

Environment Set up

  • To set up your PetaLinux environment, change to the PetaLinux root directory and run the set up script. This script updates your path to point to the bundled gcc toolchain, and sets the $PETALINUX environment variable to point to the PetaLinux root.

There is a different script depending upon whether you use Bash, or C Shell. The following command can be used to identify the shell used in your environment.

  $ echo $SHELL

If you still aren't sure, check with your system administrator to confirm.

Bash Set up Script

$ cd petalinux
$ source ./settings.sh
PetaLinux environment set to '/home/user/petalinux'
$

C Shell setup script

$ cd petalinux
$ source ./settings.csh
PetaLinux environment set to '/home/user/petalinux'
$

Notes on the settings scripts

  • Only run one of these scripts - whichever is appropriate for your terminal shell.
  • You must run the settings script each time you open a new terminal window or shell. The PetaLinux tools will give an error message and refuse to run, if the settings have not been loaded.
  • You must be within the PetaLinux "root" directory to source the settings file (e.g. /home/user/petalinux).

Setting up Kermit

This section include the steps required to install and set up the kermit console program for communication with the target device.

"Kermit" is the console program used to enable communications between the target system and the host machine via the serial connection. Refer to http://www.columbia.edu/kermit for more information on kermit.

The kermit source can be downloaded from here.

Alternatively, you can run "sudo yum install ckermit" or "sudo apt-get ckermit" if your OS supports either of these utilities.

Follow the instructions provided in the Unix Build Instructions Section to build the kermit program for your host machine.

Create or modify the .kermrc script as per the example given below. This file is located in the user directory (~/).

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 key \127 \8
set key \8 \127
set window 5

Note: The above example uses /dev/ttyS0 as the serial connection. Change as per appropriate.

To start the kermit program.

$ kermit -c

Note: Ensure that the serial interface is not bing used by other application program such as minicom before starting kermit.

Example output when kermit loads .kermrc script file as per the example above.

Connecting to /dev/ttyS0, speed 115200
 Escape character: Ctrl-\ (ASCII 28, FS): enabled
Type the escape character followed by C to get back,
or followed by ? to see other options.
----------------------------------------------------

If the "kermit -c" command does not work, try explicitly specifying the ~/.kermrc script file in the command line.

$ kermit ~/.kermrc -c

The kermit console can be terminated by issueing the Ctrl-\q character on the kermit command prompt.