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 Guide
Network File System (NFS)
ST Logo
Previous   Contents   Next


Network File System (NFS)

The target system does not generally have direct access to a disk, therefore any file it requires (other than the downloaded kernel file) must be accessed remotely.

For development purposes, having the root file system as a remote file system accessed across the network has been found to be the most convenient option. In this way a directory on the host PC, and all the files and directories contained within it, can be made to function as the root file system of the target.

To provide this facility, a protocol called Network File System (NFS) is used, and a server daemon must be set up on the host PC to give the target access to these files.

Preparing the root file system

A root file system is set up as part of the installation of the development kit. The first thing to decide is whether to mount the installed root file system directly, or to make a copy of it.

Using the installed system directly has the advantage that no extra disk space will be taken up by the copy, but if more than one person is to use the same host for development, it is beneficial for them to have individual root file systems on the target. This allows configuration files and start up scripts to be freely modified, and prevents one user accidentally interfering with another user's data. In addition, a single root file system cannot be safely shared between multiple targets simultaneously (the generation of unique file names and lock files usually assumes that only one machine will be writing into the appropriate directories). For these reasons each user should have a separate target root file system, keeping the original installed system intact as a reference copy.

The copying of the file system must be done correctly when logged in as root, as the file system contains device special files (in /dev) which can only be created by root. The file system can be copied for each user (<user>) with the command:

host# cp --archive /opt/STM/ST40Linux-2.0/devkit/sh4/target \
/export/rootfs/<user>

This has the disadvantage that every user of the system has a complete copy of the root file system, taking up a lot of space, in which most files will never be modified. If there will be a large number of users sharing a single machine it may be worth while investigating how to set up these root file systems so that most files are hard links to the original binary file, and only the files which are likely to be modified are actual copies.

For more information on setting up NFS root file systems, see the Network Boot HOW-TO.

A Note on Updating the STLinux Distribution

STMicroelectronics makes updates available from time to time in the form of new RPM files. These updates may be installed using either rpm or stmyum. The updates in the RPM files are installed in the default locations, that is the /opt/STM/ST40Linux-2.0/... tree.

It should be borne in mind, that if you have copied the root file system, as recommended above, then such copies will not be automatically updated. That is, the official released RPM files will only update the files in the reference tree of the root file system, that is, the /opt/STM/ST40Linux-2.0/devkit/<arch>/target tree. In this case, you may wish to re-copy the root file systems, so you have the latest versions of the files in the tree your target system uses. Remember to copy any local customisations that you may still need from your previous copy of the tree to your new copy of the tree.

Previous   Contents   Next
Valid HTML 4.01! Last updated: 2006/06/23 15:40:46
© Copyright STMicroelectronics Limited, 2005
Printer