Release Notes for MkLinux on HP PA-RISC

version 1.1

Introduction

This is the release of the MkLinux server based on Linux 2.0.32 and the Open Group R1 Microkernel (called pmk1.1) for the HP PA-RISC 1.1 HP700 series. This distribution provides a bootable root file system, usr and var directories as compressed tar files, and the Microkernel and Linux server sources.

The system comes with the complete X11R6 distribution, the ELF GNU compiler tools, and gdb in RPM format.

This document describes how to install and set up an HP machine for MkLinux.

Supported Machines

The PA1.1 family of processors are supported (PA7150, PA7100LC, PA7200), and the kernel has been successfully booted on a number of HP700 machines (720, 725/50, 725/100, 770) with corresponding family of bus adaptors (WAX, LASI, ASP, SCSI, and FWSCSI).

Supported devices are SCSI and FWSCSI disks, RS232 serial port, HIL and PS2 keyboard and mouse, pc586 Ethernet and CRX/GRX graphics. Fast networks, Myrinet, and FDDI are supported by the microkernel, but not yet exported to the Linux server.

Disk Requirements

Installer Disk

You need a machine into which you can plug your future Linux disk and to which you can do a 'dd'. The root partition is 64M uncompressed.

Installed Disk

In order to install the full MkLinux system and a comfortable amount (32M) of swap space, a 425M disk is a minimum.

Status

The system is robust enough to support several hours of edit-compilation-test loops without a crash. The Mach kernel and the Linux server can be rebuilt, as well as the GNU tools and other commands and libraries. Most of the packages not provided here can be built out of the box. However, keep in mind that a lot of functionality may still be missing or may not be fully tested.

Why the Microkernel?

We had already ported the Open Group RI Microkernel to the HP PA-RISC (OSF1/MK-PA) and the MkLinux server was already running on the PowerMac and Intel platforms. We took this as a good opportunity to show the modularity and portability of the kernel/server architecture. The experience showed that absolutely no work was needed in the Microkernel, and that about 5 weeks effort was needed to port the machine-dependent parts of the Linux server itself. The only changes in the machine-independent code were due to the stack direction differences between the PA-RISC and other architectures.

However, since no Linux system was available for the PA-RISC, a significant amount of work was need to obtain a usable system, including bootstrapping the Linux file system, port commands and libraries, X11R6 support, gcc and debugger support, benchmarking and code optimization.

Installation

Downloading the distribution

Note that the distribution is quite large in size, as it includes a physical copy of the root partition and a tar file of the /usr binaries. The files in this distribution (with their sizes noted in parentheses) are:

binaries

root_ext2_g_dd.bin.gz: a bootable root partition (22896202 bytes)
usr.tar.gz: the /usr content (25520971 bytes)
var.tar.gz: the /var content (660 bytes)
X11R6.tar.gz: the /usr/X11R6 content (41282940 bytes)
boot.tar.gz: the boot block (Used to build a new disk)

sources

mklinux_src.tar.gz: the Mklinux server sources (8838199 bytes)
pmk1.1_pa_src.tar.gz: the pmk1.1 microkernel sources (3443940 bytes)
x11r6-linuxhppa.patch: X11R6 patch file (instructions below)
Note: .gz files are compressed with gzip.

The root_ext2_g_dd.bin image contains the boot, the disklabel, and the root file system (ext2) of a Linux system, assuming that your target SCSI disk is set to ID 6.

To load the image from the host machine, you need to plug your disk into a machine from which you can dump it, using something like the following: You can now boot in single user mode. (Still assuming SCSI ID 6): The -a flag is used to boot interactively. The kernel should start up and ask you the root device and the servers. Add -s to vmlinux to boot in single user mode: If you are asked for a root device, answer 'sdXa', where X is your corresponding SCSI ID. Accept the prompted servers.

Setting up MkLinux

Mounting the disk read/write

At this stage, if your disk was not initially at SCSI ID 6, you can edit /etc/fstab with ed.

Creating the swap space

The swap area is the second partition.

Creating the file systems

The first time you boot, you'll get a message about an 'unexpected inconsistency' in the file system, and be instructed to run fsck manually on /usr and /var. Ignore it. The release expects /var on partition 4 and /usr on partition 5. Partition 3 maps the full disk.

Correspondence between Mach devices and linux minors:

Outside MkLinux, the disks are named with the Mach terminology. Linux terminology is used when accessing them from /dev. The main difference is that the disks are referenced in Mach by letters and in Linux by numbers, while the partitions are referenced in Mach by numbers and in Linux by letters. Also, minors are counted from 16 to 16 (for compatibility with Intel and PPC). For example, the 4th partition of a SCSI disk at ID 6 Mach device would be sd6d, whereas the linux device would be /dev/sdg4 (minor 100 = 6*16+4).

Configuring the network

The following files need to be modified in order to configure your network:

Commands to activate the network interface:

Populating /usr and /var:

The next step is to ftp the /usr and /var tar(.gz) files. Untar(/gzip) them to their respective mounted file systems and delete the tar(.gz) files.

Shutdown and reboot.

Creating a new disk:

You can label a new disk or change partition sizes with the 'disklabel' command. The disk descriptions are in /etc/disktab.

If you want your disk to be bootable, the boot sectors provided with the release should be installed on the disk: (root_ext2_g_dd.bin is already bootable)

Building X11R6

1. get the xc-?.tar.gz files
2. uncompress/untar them
3. apply the x11r6-linuxhppa.patch file: (in the xc directory: patch -p1 < x11r6-linuxhppa.patch)
4. make World; make install

Building MkLinux

Preparation

Assuming the sources are installed in /usr/src/:

1. Install the ODE tools under /usr/ode.
2. Untar pmk1.1.tar in /usr/src/pmk1.1
3. Untar MkLinux.tar in /usr/src/linux
4. Create the following links:

Build the Mach kernel

1. Use the ODE make:
PATH=/usr/ode/bin:$PATH
2. Create a .sandboxrc file with the lines: 3. type 'workon -rc .sandboxrc ; build'
4. install the kernel on root: '/usr/src/pmk1.1/tools/hp_pa/hp_pa_linux/hostbin/makeboot -o /mach ../obj/hp700/mach_kernel/PRODUCTION/mach_kernel.PRODUCTION ../obj/hp700/bootstrap/bootstrap'
5. install the default pager: 'cp ../obj/hp700/default_pager/default_pager /mach_servers'

Build the Linux server

1. Exit from the previous shell and add to your path:
PATH=/usr/src/pmk1.1/tools/hp_pa/hp_pa_linux/hostbin/:$PATH
2. Make and install the new linux server

Debugging MkLinux

Gdb is available to debug ELF Linux programs, however to debug the MkLinux server itself, we use a remote ethernet gdb called tgdb, which has been found very useful to do symbolic debugging on (unix or non-unix) Mach tasks.

Support for loading and debugging MkLinux as a second server is not yet available.

Acknowledgments

The first PA Mach port was done by the University of Utah (see Mach/Lites 4.4 PA port) from which many of the drivers and locore core was derived. NSWC stressed the real time support and they were the first courageous real use of the OSF1/MKPA system, helping us to identify numerous real time bugs. Finally, thanks to HP for having supported us for this project.

Christian Bruel