Local Documentation

man pages

Many applications provide documentation of their commands or libraries in the form of man pages (accessed using the man command). These are located in one of three places, depending on which class (target, host or cross) they fall into:

  • cross programs (programs that run on the host, but target a different machine) have their man pages in directories under /opt/STM/STLinux-2.X/devkit//man,

  • host programs (programs that run on the host and are target independent) have their man pages under /opt/STM/STLinux-2.0/host/man,

  • target programs (programs that run on the target only) have their man pages under /opt/STM/STLinux-2.X/devkit//target/usr/share/man.

The target man pages can be displayed when logged into the target using the man command; for example:

target% man sleep

It is also possible to use the man command on the host to look at man pages of any class by specifying the path to the root of these man pages. So, for example, to look at the man page for the cross program sh4-linux-objcopy for the ST40 CPU:

host% man -M /opt/STM/STLinux-2.X/devkit/sh4/man sh4-linux-objcopy

To save having to enter the -M option every time, this can be set in the MANPATH environment variable.

info pages

Many of the GNU programs supplied with the Linux distribution use a different documentation system called info pages. These are a form of hyper-text documentation, which can be read by a number of programs.

info pages are installed similar to man pages, depending on the class of program they describe:

  • cross programs have info pages in /opt/STM/STLinux-2.0/devkit//info.

  • Host programs have info pages in /opt/STM/STLinux-2.0/host/info.

  • Target programs have info pages in /opt/STM/STLinux-2.0/devkit//target/usr/share/info.

The easiest way to read info pages is to use the text based info command. As with man this can be run directly on the target to look at the target info pages. To display the top level info directory enter:

target% info

Individual pages may be viewed through this menu, or viewed directly by providing the page name as an additional option to info. Not surprisingly, the info documentation is provided as info pages, so for more information on how to use info enter:

target% info info

Navigation in the info reader is performed using the cursor keys; when the cursor is positioned over a link pressing the return key will go to that link. Press the U key to go up to the previous level.

The target info pages (like the target man pages) can be viewed from the host. The command for this is, for example:

host% info --directory /opt/STM/STLinux-2.X/devkit/sh4/target/usr/share/info

To save having to specify the full path every time it can be stored in the INFOPATH environment variable.

info pages can also be read by other programs, such as emacs.

Package documentation files

Many packages come with documentation which does not fit into either of the categories above. In this case, the documentation is installed into a documentation directory which is specific to the package. Once again these are located in different places for each class of package. These locations are:

  • for cross programs: /opt/STM/STLinux-2.X/devkit//doc,

  • for host programs: /opt/STM/STLinux-2.X/host/doc,

  • for target programs: /opt/STM/STLinux-2.X/devkit//target/usr/share/doc.

The format of these files is entirely dependent on the package, but most will be text files which can be read using any text editor.

RPM packages

The packages themselves include a small amount of information which at least gives a textual description of the package, as well as some details of when it was built. This information is displayed by the command:

host% rpm --query --info <package-name>

Another --query option is --list, which displays a list of the files which are in the package. Use rpm --help, or the rpm man page to see other options.