DYNIX/ptx V4.6.x Sources Release Notes

These release notes contain instructions for installing and building the following DYNIX/ptx® source products:

These products must be built on a system running DYNIX/ptx V4.6 or later. They cannot be built on a machine running an earlier version of DYNIX/ptx.


Build Tools Sources

The Build Tools Sources contain the special binaries and headers used to build the DYNIX/ptx operating system. These binaries and headers were used to build the operating system, and are in turn used on your system to build the DYNIX/ptx source distributions. To build the binaries, your system must be running DYNIX/ptx V465 or later.


Verify Filesystem Space

The sources are installed in the directory /usr/DYNIXptx, regardless of your current directory. If the /usr/DYNIXptx directory contains sources from a previous release, move the sources to another location (or remove them) before installing the sources CD-ROM. If /usr/DYNIXptx is a symbolic link, simply remove that symbolic link.

Before starting the installation, verify that there is sufficient free disk space for the sources you are loading. Table 1 lists the amount of disk space required to load the sources for the build tools, base operating system, kernel, and encryption software.

Table 1. Disk Space Requirements to Install Sources

Contents

Disk Space to Load

Build Tools Sources

521838 blocks

Base OS Sources

267320 blocks

Kernel Sources

256780 blocks

Encryption Sources

3060 blocks

Man Page Sources

14620 blocks

Total

1063618 blocks

A complete build takes an additional 273708 blocks beyond this total. Be sure to use a filesystem that is large enough to hold the source and all of the generated binaries. You will also need some additional space (about 180 MB) for temporary files created by the build.


To verify that the root filesystem has sufficient free disk space, type the df command as shown in the following example:

# df /
/ (/dev/dsk/sd0s2 ): 10399 blocks 42316 i-nodes

If there is not enough disk space available, you can take one of these steps:


Installation Procedure

To install the sources from the CD, follow the procedure described in the DYNIX/ptx V4.6.x and Layered Products Software Installation Release Notes. You can install all of the sources in a single pass. You must install the Build Tools Sources and the Base Operating System Sources packages; the other packages are optional.


Contents of the Build Tools Source Directory

When the installation is complete, the /usr/DYNIXptx directory will contain all of the header files and tools required to build the complete set of DYNIX/ptx commands, utilities, libraries, and kernel files. The build tools source directory includes these files and directories:

i386/tmpos/
The prototype root-directory structure constructed by the build process. It contains header files and libraries used in the build process. This is the destination directory (DESTDIR) for installations performed during the build process (refer to install(1M)).
i386/tmpos_crypt/
The prototype root-directory structure for the DYNIX/ptx encryption software. This is the destination directory (CRYPT_DESTDIR) for installations of the encryption software during the build process.
i386/tools/
Tools for the build procedure, such as special versions of cc and as.
i386/tools/i386/build
The program used to build the utilities from their source files.
i386/tmpos_public/
The prototype directory structure for the DYNIX/ptx public software.

The Base Operating System Sources

This package contains the source files used to build DYNIX/ptx commands, utilities, and libraries. To build binaries using the files, your system must be running DYNIX/ptx V4.6 or later.


Contents of the Base Operating System Directory

When the installation is complete, /usr/DYNIXptx/usr/src will contain all of the source files required to build the complete set of DYNIX/ptx commands, utilities, and libraries. The directory includes these files and directories:

usr/src/
The main source directory containing the top level Makefile and the various mk files that perform the different parts of the build.
usr/src/cmd/
The directory containing the sources for the base operating-system commands and utilities. This directory contains a separate subdirectory for each command. The :mkcmd script is used to build this source.
usr/src/lib/
The directory containing the sources for the various libraries. The :mklib script is used to build this source.
usr/src/head/
The directory containing the sources for the header files. The :mkhead script is used to build this source.
usr/src/public/
The directory containing the sources for the public software. The :mkpublic script is used to build this source.
usr/src/stand/
The directory containing the sources for the stand-alone software. The :mkstand script is used to build this source.

The Build Procedure

The Base Operating System package contains source for commands, libraries, and header files that are required to build and install binaries for all DYNIX/ptx source distributions.

We recommend that you install all of the sources you will be using before you build binaries.

We also recommend that you run the build procedures as root.


The Build Environment

The DYNIX/ptx utilities are built in a nearly closed environment. The build procedure is designed not to use tools, header files, libraries, or other files from the host environment. To achieve this goal, the build environment contains versions of all relevant tools, header files, libraries, and other files needed to build the DYNIX/ptx utilities.

A special tool, the build utility, supports the DYNIX/ptx build procedure. It is located in /usr/DYNIXptx/i386/tools/i386/build. The build utility is very similar to make and is used in the same way. Actually, build simply invokes make with a number of macros already defined (refer to make(1)). You can invoke build from any directory in the source distribution that contains a Makefile.


ATTENTION

Always use the build utility to build the DYNIX/ptx utilities from source. Invoking make directly bypasses the carefully constructed build environment included in this source distribution.


If you are using the C shell and expect to build the DYNIX/ptx utilities from source frequently, you might want to create an alias for the build utility:

# alias build \
'/usr/DYNIXptx/i386/tools/i386/build -V /usr/DYNIXptx -M i386 \!*'

Build the Full DYNIX/ptx Distribution

Because the build command can make maximum use of your system's parallel resources, you must decide whether a short build time or minimum impact on other system users is more important. For the build command to make maximum use of the system, the system must have a large amount of swap space and a high system-wide limit on the number of concurrent processes. To meet these requirements, you might need to change the configuration of your kernel, as described in the following procedure.

If you choose not to reconfigure the kernel, you might want to limit the number of concurrent processes that build invokes. To do this, use the -P1 or -P2 options to build (refer to make(1)).

The following procedure builds the full set of DYNIX/ptx commands, utilities, libraries, and kernel files from the source directories. This procedure assumes you have installed all of the source files (for example, base, kernel, and encryption) on your machine.

  1. Add /usr/DYNIXptx/i386/tools/i386 to your shell PATH variable (refer to environ(5)).

  2. Ensure that the number of processes running concurrently will not severely affect system performance. To do this, either use the -P option to build, which limits the number of parallel processes that can be invoked during the build, or make sure that the system-wide process limit (MAXUSERS) is high enough to build the utilities and allow other user processes to proceed at the same time.

    To build the utilities quickly and still permit other system activity to continue, ensure that the MAXUSERS kernel parameter is set to at least 64. (As distributed, the kernel is configured with MAXUSERS set to 64.) If you need to change the MAXUSERS parameter, use the ptx/ADMIN® menu system to configure a new kernel having a higher value for MAXUSERS and then compile the new kernel. Refer to DYNIX/ptx System Configuration and Performance for more information about building and installing a new kernel.

  3. Create the following symbolic link, which is necessary for the build to work correctly:

    # cd /usr/DYNIXptx/i386/tmpos/etc
    # ln -s ../usr/conf conf
  4. To build the remote lp commands (which are located in /usr/DYNIXptx/usr/src/cmd/lp/remote), ptx/TCP/IP V4.7 or later must be installed on your system. Before building the lp commands, you must copy several TCP/IP files to the directory /usr/DYNIXptx/i386/tmpos/usr.

    Issue the following commands:

    # cd /usr/DYNIXptx/i386/tmpos/usr
    # mkdir -p include/netinet

    # cp /usr/lib/libinet.so lib
    # cp /usr/lib/libsocket.so lib
    # cp /usr/lib/libsocket.so.1 lib

    # cp /usr/include/netdb.h include
    # cp /usr/include/sys/bitypes.h include/sys
    # cp /usr/include/sys/cdefs.h include/sys
    # cp /usr/include/netinet/in.h include/netinet
  5. Invoke the build command to build the DYNIX/ptx kernel, commands, utilities, and libraries. In the following examples, the system's use of parallel resources is limited.

The time required to build the full command set from the source distribution will depend on your system configuration, the system load, and whether you use the -P option to build. Doing a full build under these conditions normally takes about three hours.

The build program invokes make, specifying the Makefile in the current directory and passing to make any parameters specified in the build command. When build is invoked from the directory /usr/DYNIXptx/usr/src, it installs each utility in the appropriate command directory (such as /usr/DYNIXptx/i386/tmpos/usr/bin, /usr/DYNIXptx/i386/tmpos/etc, /usr/DYNIXptx/i386/tmpos/bin).


Check for Errors

When you have completed the build, use the grep command to check for errors. You should see the output shown here:

# grep Error makelog*
makelog.cmd:*** Error code 1 (ignored)
makelog.lib: No Errors

Build Individual Utilities

Be aware that many items depend on other items in order to build correctly. For example, almost every command requires that libc has already been built and installed in the tmpos directory. It's usually easiest to do a complete build first and then work on individual commands after all of the libraries have been built.

You should also be aware that the header .h files are installed in the /usr/DYNIXptx/i386/tmpos/usr/include directory. If you want to change any of the header files, you will need to install them by hand in the tmpos directory over the version included with the Build Tools Sources package. They will be available from that point on for any builds that you attempt.

To build a particular command from its source file(s), perform the following steps:

  1. Move to the directory containing the source files. Note that some utilities are made up of several source files collected into subdirectories.

  2. Examine the Makefile in that directory to determine which parameters (if any) must be passed through the build command to the make command.

  3. Invoke the build command with any necessary parameters.

For example, you might want to rebuild the df command and then install it in /usr/DYNIXptx/i386/tmpos/bin/df. The Makefile in the /usr/DYNIXptx/usr/src/cmd/df directory indicates that make all will build the df command and make install will install it.

If the install operation fails, check the Makefile; you will need to undo operations other than the line that invokes $(INS) -f. For example, the Makefile for the df command (df.mk) contains the following operations:

install:
      $(INS) -f $(INSDIR) -m 4555 -0 root -g bin df
      ln $(INSDIR)/df $(DVDIR)/devnm

This example contains two operations: the install command (the line beginning with $(INS) -f), and a ln command that creates a link to $(DVDIR)/devnm. To install df successfully, you must remove the link; then run the install step again.


The Kernel Sources

This package contains the source files used to build the DYNIX/ptx kernel. To build binaries using the files, your system must be running DYNIX/ptx V4.6 or later.


Contents of the Kernel Source Directory

When the installation is complete, /usr/DYNIXptx/usr/src/ will contain all of the source files required to build the kernel. The kernel source includes these files and directories:

usr/src/:mkuts
The script used to build the kernel during a complete product build.
usr/src/uts/
The directory created during a build of the kernel to hold the kernel header files.
/usr/src/uts/cachesim
Remote cache simulator source code.
/usr/src/uts/cdfs/
CDFS filesystem source code.
usr/src/uts/io/
>I/O device source and config files.
usr/src/uts/ipc/
IPC common code.
usr/src/uts/kernel/
The main kernel source files.
usr/src/uts/mfs/
MFS filesystem source code.
usr/src/uts/msg/
Interprocess communication message facility source code.
usr/src/uts/namefs/
NAMEFS filesystem source code.
usr/src/uts/sem/
Interprocess communication semaphore facility source code.
usr/src/uts/shm/
Interprocess communication shared-memory facility source code.
usr/src/uts/specfs/
FIFO and specfs source code.
usr/src/uts/symmetry/
Kernel configuration files.
usr/src/uts/symmetry.std/

The standard kernel build directory.

usr/src/uts/ufs/
UNIX filesystem source code.

Configure and Build the DYNIX/ptx Kernel

Before you can build the DYNIX/ptx kernel, it must be configured for the appropriate architecture type (either sb8000 or sci). To configure the kernel included with the Kernel Sources, use the /usr/DYNIXptx/i386/tools/i386/xconfig program that was loaded with the Build Tools Sources package. The complete procedure to configure and build the kernel takes about 15 minutes, depending on your system configuration.

  1. Move to the uts directory:

    # cd /usr/DYNIXptx/usr/src/uts
  2. Run the xconfig program with the option corresponding to your architecture type:

  3. Build the kernel. Be sure that /usr/DYNIXptx/i386/tools/i386 is in your path.

    The following examples assume that your system has the sci architecture.


The Encryption Sources

This package contains the source files used to create the special Encryption Software for DYNIX/ptx. To build binaries using the files, your system must be running DYNIX/ptx V4.6 or later.


Contents of the Encryption Source Directory

When the installation is complete, /usr/DYNIXptx/usr/src will contain all of the source files required to build the encryption product. The encryption sources include the following:

usr/src/cmd/crypt/crypt.c

The new version of the crypt command.

usr/src/lib/libcrypt/
The source code for libcrypt.
usr/src/lib/libnsl/des
The source code for libnsl.

Build Encryption

We recommend that you build the binaries as described in the section "The Build Procedure" earlier in this document. If you want to build crypt, vi, ed, and the libcrypt library separately, refer to the section "Build Individual Utilities."