Tux
Communication
Mailing lists
Documentation
User Manual
Target board info.
Target chip info.
Support
Linux support
Bugzilla
Downloads
STLinux
Updates
Search
Google


The web
stlinux.com
Getting Started
Installing the target software
ST Logo
Previous   Contents   Next

MontaVista We described earlier how the easiest way to to install a Linux system on the host PC is to use a distribution. This is also true for the ST40 target system. Rather than invent our own distribution from scratch, we based our distribution on the MontaVista HardHat™ distribution, and then modified it to create the STMicroelectronics Base Distribution.

RPM All the software you need to run Linux on the ST40 is provided in the form of RPMs. An RPM (RedHat Package Manager) file is a single file which contains a complete application - namely a list of prerequisite packages which must already be installed, all the new files needed, and scripts which perform any additional configuration which is needed when the package is installed. It also contains uninstallation information should you ever wish to delete or upgrade the package. For more information, see www.rpm.org.

Notes for Specific Host Distributions

RedHat 6.2

If you are installing on RedHat 6.2 we recommend that you first update bash to the latest version from RedHat. This appears to fix a nasty race condition which we have seen sometimes while installing the RPMS. This can be downloaded from the RedHat web server from the Red Hat Linux 6.2 General Advisories page.

RedHat 7.x

If you are installing on RedHat 7.x, you will need to have installed some backward compatibility shared libraries. Most of these are installed by default, but one frequently is not: ncurses4. This needs to be installed before starting the ST40 Linux installation. You can check whether this is installed using the command:

host# rpm -q ncurses4

If this tells you that the package is not installed, it needs to be installed before you start the installation process. The package is provided on the RedHat CDs, or can be downloaded from their FTP server (versions for RedHat release 7.0 and 7.1, release 7.2 and release 7.3). It is installed using the command (while logged in as root):

host# rpm -Uhv ncurses4-5.0-4.i386.rpm

The exact version number will depend on your version of RedHat.

Note: the version of ncurses4 supplied in versions of RedHat Linux prior to 7.3 is subject to a RedHat Security Advisory. As none of the programs we supply which use this library are installed set-UID, this should not present any risk, but you may which to upgrade to the later versions anyway.

RedHat 8.0

Redhat 8.0 also does not install the ncurses compatibility library by default. This will need to be installed. It is located on disc 3 of the CD set.

In addition RedHat 8.0 requires a C++ compatibility library. This is compat-libstdc++, and appears to be installed by default. If however it is not, it can be installed using the command:

host# rpm -Uhv compat-libstdc++-7.3-2.96.110.i386.rpm

However, there is a bug in the version of rpm that comes with Redhat 8.0. The install script will NOT WORK correctly due to this bug. Fortunately, there is a simple workaround. You must set the environment variable RPM_INSTALL_PREFIX to be /opt/STM/ST40Linux-1.0/devkit/sh4/target before running the install script. If you are running an sh like shell the following command will do that.

host# RPM_INSTALL_PREFIX=/opt/STM/ST40Linux-1.0/devkit/sh4/target ./install

Unfortunately, because it has a different prefix, st40load must be reinstalled as well. Delete it with the prefix above, and then reinstall it with the correct prefix, as shown below.

host# RPM_INSTALL_PREFIX=/opt/STM/ST40Linux-1.0/devkit/sh4/target rpm -e stm-st40load
host# RPM_INSTALL_PREFIX=/opt rpm -Uvh stm-st40load-0.11-3.i386.rpm

Hopefully, redhat will fix this bug quickly, and we can then tell you to install the fixed rpm before doing the install.

RedHat 9

RedHat 9 appears to have fixed the rpm installation problems, however backward compatibility libraries are still required. ncurses4 is on CD 2 and compat-libstdc++ is on CD 1.

Fedora

Fedora Core 1 has the same issues as RedHat 9, both ncurses4 and compat-libstdc++ packages need to be installed.

Unfortunately Fedora Core 2 onwards no longer ships the ncurses4 package. However the package from Fedora Core 1 appears to work successfully.

Instructions

The first step is to download the release. More information on where you can download the release from is on the downloads web page.

The easiest way to do this is download the CD-ROM image, and write a CD. However if you don't want to write a CD-ROM, Linux also allows the CD-ROM image to be mounted using the loopback device:

host# mount -o loop -t iso9660 release-1.0-install.iso /mnt/cdrom

It is also possible to download the individual RPMS. This may be useful if you have a slow connection, and don't intend to install the full release. Have a look in the Step-by-Step install page if you want to know what to install.

You are now ready to start the installation. Assuming you have mounted the CD-ROM on /mnt/cdrom, installation is started simply by typing:

host# /mnt/cdrom/install

Answer the questions as they appear. All are yes or no answers, which should be answered as y or n. Once the installation program has all the information it needs it will check that the required RPMS are available, and if they are, will start the installation process. It is possible that some files or packages which the target distribution depends on may be missing from your system. If so they should be installed using RPMS from your distributor.

Finally, please note that there are many packages supplied as part of the distribution which are not installed by default. Many of these are for specialised applications, and so are not installed by default. Check the RPMS directory to see if any could be useful to you. In addition there is an updates directory on the FTP server which contains updates to packages in the release (bug fixes, enhancements etc), plus additional packages added after the release.

Finally, remember that the RPMS for the target are marked as being for the SuperH architecture, and you will be installing them on an x86 host. Normally RPM will not allow you to install files for the `wrong' architecture, so you need to suppress this check by adding the --ignorearch flag, for example:

host# rpm -Uhv --ignorearch stm-sh4-blackbox-0.61.1-2.sh4.rpm
Previous   Contents   Next
Valid HTML 4.01! Last updated: 2004/12/08 11:00:07
© Copyright STMicroelectronics Limited, 2005
Printer