Release Notes for MkLinux on HP PA-RISC

version 2.1

Introduction

This is the release of the MkLinux server based on Linux 2.0.30 and the Open Group RI 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). The kernel has been successfully booted on a number of HP700 machines (705, 720, 725/50, 725/100, 770) with the 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 on which you can plug your future Linux disk and 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. The X11R6 suite needs to be built.

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 on itself 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 functionalities may still be missing or not 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 needed to obtain a usable system, including bootstrapping the Linux file system, porting commands and libraries, X11R6 support, gcc and debugger support, benchmarking and code optimization.

Installation

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

binaries
sources

.gz files are compressed with gzip.

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

To load the image from the host machine, you need to plug your disk on a machine from which you can dump it:

dd if=root_ext2_g_dd.bin of=/dev/xxxx bs=512

You can now boot in single user mode, still assuming your disk is at SCSI 6:

BOOT_ADMIN> b SCSI.6.0 isl
OSF Mach boot
[/mach]:-a

The -a flag is 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:

startup: /dev/boot_device/mach_servers/vmlinux -s

If you are asked for a root device, answer 'sdXa' where X is your SCSI address. Accept the prompted servers.

Setting up MkLinux

Mounting the root disk read/write

mount -n -o remount -rw /

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

Creating the swap

The swap area is the partition 2.

mkswap /dev/sdg2
swapon -a

Creating the file systems

The first time you boot, you'll get a message saying "UNEXPECTED INCONSISTENCY RUN fsck MANUALLY" on the /usr and /var partitions. Ignore it. The disk release binary expects /var in the partition 4 and /usr in the partition 5. The partition 3 maps the full disk.

mkfs -t ext2 /dev/sdg4
mkfs -t ext2 /dev/sdg5
mount /dev/sdg4 /var
mount /dev/sdg5 /usr
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, for the the 4th partition of a SCSI at address 6 you'll find the Mach device sd6d and Linux device /dev/sdg4 (minor 100 = 6*16 + 4)

Configuring the network

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

/etc/hosts
/etc/sysconfig/network
/etc/sysconfig/network-scripts/ifcfg-eth0
/etc/resolv.conf
/etc/sendmail.cf
Script to launch the network:
ifconfig lo 127.0.0.1
route add 127.0.0.1
ifconfig eth0 IPADDR netmask NETMASK
route add -net NETWORK netmask NETMASK
route add default gw GATEWAY metric 1

Populating /usr and /var.

The next step is to ftp the usr.tar and var.tar files. Untar them in their respective mounted file systems and delete the tar files.

shutdown and reboot.

Creating a new disk.

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

If you want your disk to be bootable, the bootsectors provided with the release should then be installed on the disk: (the root.dd dump provided in the release is already bootable).

dd if=b0 of=/dev/sdg3 count=1 bs=1k
dd if=b1 of=/dev/sdg3 seek=2 skip=1 bs=1k

Building X11R6

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

Building MkLinux

Preparation

  1. You need to have the latest binutils and gcc.
  2. Install the ODE tools under /usr/ode.
  3. Untar pmk1.1.tar in /usr/src/pmk1.1
  4. Untar mklinux.tar in /usr/src/linux
  5. Create the following links:
    ln -s /usr/src/linux/include/linux /usr/include
    ln -s /usr/src/linux/include/asm /usr/include
    ln -s /usr/src/linux/include/osfmach3 /usr/include
    ln -s /usr/src/pmk1.1/export/hp700/include/mach /usr/include
    ln -s /usr/src/pmk1.1/export/hp700 /usr/src/linux/export-osfmach3/osfmach3_hp_pa

Build the Mach kernel

  1. Use the ODE make:
    PATH=/usr/ode/bin:$PATH
  2. Create a .sandboxrc file with the lines:
    default pmk1.1
    base * /users/src
    sb pmk1.1
  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. reset your PATH:
    PATH=/usr/local/bin:/usr/src/pmk1.1/tools/hp_pa/hp_pa_linux/hostbin/:$PATH
  2. make and install the new linux server
    cd /usr/src/linux ; make
    cp vmlinux /mach_servers/vmlinux

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. A short document on the setup of tgdb is available.

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 code was derived. NSWC stressed the real time support and they were the first courageous real user of the OSF1/MKPA system, helping us to identify numerous real time bugs. Finally, thanks to HP for having supported us for this project.

Last Modified: Fri Oct 15 15:23:33 CDT 1999 by [email protected]
Copyright 1997 The Open Group
Copyright 1999 the Central Iowa (Model) Railroad