Getting 2.5.44 running on Alpha Miata
This document was written to help those of you who would like to run Linux on a Alpha Miata desktop. The details of the machine used for the following are:
- Alpha Miata personal workstation 433 (pws433au) CPU speed 433Mhz 192MB ram 324MB Swapspace 4.0GB scsi hard drive
SRM
What is SRM, SRM is the boot firmware for the Alpha machine. Its main function is to provide an interface for booting an operating system, . Alpha Linux http://www.alphalinux.org, has a SRM how to that explains more than is needed for this document.
Some of the important SRM commands to get you started are listed below:
>>> show displays the current environment settings
>>> show dev displays the current devices found on the machine
>>> set <variable> <what you want> Sets the variable to what you want.
e.g.
>>> set ewa0_inetaddr 123.87.239.23 Sets the network interface ewa0 to IP address 123.87.239.23
>>> boot [-file <filename>] [-flags <kernel flags>] Will boot image filename and pass kernel flags to the boot process. As a warning here if the kernel image is in a directory under root i.e. /boot/<filename> then the -file option should be -file <directory/filename>.
>>> help will list commands and synopsis of help.
SRM also has two modes for the console to run in (1) is serial and (2) is graphics. If you have a serial connection then you can interact with SRM via an alternate remote serial console. To set the console use the the following:
>>> set console {serial | graphics}
- ==== Update SRM Firmware ====
- This section details the process of updating the Alpha firmware that was present on the testing machine. To view the current firmware type the following command at the SRM prompt:
>>> show config | more The details of the current firmware on this machine was: Firmware SRM Console: V6.7-250 <some build date> ARC Console: 5.64 PALcode: VMS PALcode V1.20-13, OSF PALcode V1.22-14 SROM Version: v5.88The following procedure is based on the DiSy playpen network that runs a bootp server and documentation from HP Alpha (this link has a broken css file click OK if an error box pops up and the page should be displayed). Updating the firmware requires:
Downloading the current firmware and documentation from HP Alpha.
copying the the fwupdate.exe onto the bootp server.
- booting the firmware update via the SRM console and network interface.
- Update the firmware.
- Downloading and copying the firmware executable should be self explanatory.
- Booting via SRM console and the network interface:
>>> boot -fi fwupdate.exe -fl "0,0" ewa0 Digital Personal WorkStation 433au Console V5.6-1 built on Sep 24 1999 at 16:25:55 >>>(boot pmem:180000 -flags unit=1) bootstrap code read in base = 180000, image_start = 0, image_bytes = 800000 initializing HWRPB at 2000 initializing page table at 798000 initializing machine state setting affinity to the primary CPU jumping to bootstrap code *** Digital Personal WorkStation 433au -- Firmware Update *** Use HELP or ? for help Update Verify List Show DEbug NDebug ? Apu-> Show *** ROM: SRM Firmware = MIATA_SRM Version = v6.7-250 *** ROM: ARC /AlphaBIOS Firmware = MIATA_ARC Version = 5.64 - Update the firmware:
Apu-> Update APU-I ARE YOU READY TO PROGRAM (SRM ) ROM DEVICE ? (Y/N) y APU-I ERASING (SRM ) ROM DEVICE APU-I PROGRAMMING (SRM ) ROM DEVICE APU-I VERIFY LOADED (SRM ) ROM IMAGE APU-I VERIFY LOADED (SRM ) ROM IMAGE DONE APU-I PROGRAMMING (SRM ) ROM COMPLETED APU-I ERASING (ARC /AlphaBIOS) ROM DEVICE APU-I PROGRAMMING (ARC /AlphaBIOS) ROM DEVICE APU-I VERIFY LOADED (ARC /AlphaBIOS) ROM IMAGE APU-I VERIFY LOADED (ARC /AlphaBIOS) ROM IMAGE DONE APU-I PROGRAMMING (ARC /AlphaBIOS) ROM COMPLETED APU-I ERASING (SROM ) ROM DEVICE APU-I PROGRAMMING (SROM ) ROM DEVICE APU-I VERIFY LOADED (SROM ) ROM IMAGE APU-I VERIFY LOADED (SROM ) ROM IMAGE DONE APU-I PROGRAMMING (SROM ) ROM COMPLETED Apu-> Show *** ROM: SRM Firmware = MIATA_SRM Version = v7.2_1 *** ROM: ARC /AlphaBIOS Firmware = MIATA_ARC Version = 5.70 Apu-> exitErasing (SRM, ARC and SROM) may take some time so be patient and DO NOT power off or reset the machine.
NOTE: If SRM is in console mode then the firmware update interface will only be displayed on the serial port.
- Some useful links for this procedure:
- This section details the process of updating the Alpha firmware that was present on the testing machine. To view the current firmware type the following command at the SRM prompt:
2.5.44 kernel
The 2.5.44 release of the linux kernel has several issues with Alpha machines. The issues appear to have been rectified in later updates. In the gelato project we use the BitKeeper repository tool to maintain the linux kernel source tree. This means the first step of building a kernel is to extract the source from the source tree. This is accomplished with the following:
# bk clone -rv2.5.44 <BitKeeper repository> <target>
Once the tree has been extracted the source needs to be checked out of the repository with:
# cd <target> # bk -r co
The result will be a source tree that can be compiled, patched and modified.
Compiling
As most of you will know the .config file takes care of the configuration of the target compilation. When compiling the kernel there are several methods that may be used to configure the kernel, these are as follows:
# make xconfig there must be an X server running on the compile machine.
# make menuconfig the compile machine must have a curses library.
# make config runs on all linux systems regardless.
Or you can manually alter the .config file yourself and then run
# make oldconfig
Note** If you have an IDE CDROM and do not want to unplug it from the mainboard then do not include IDE CDROM support in the configuration of the kernel. There is a boot time bug that will slow down the boot process because kernel initialisation attempts to locate the CDROM, resulting in time out errors. This may have been fixed in later kernels.
Here is a link to a config file that will compile a 2.5.44 kernel image with minimum features Alpha Config File.
Making the necessary changes
The following are changes that were required to successfully compile and run the 2.5.44 kernel.
Changes to the standard kernel tree
The following is a well documented change that is a missing #include in arch/alpha/kernel/irq_impl.h. Add the line
#include <linux/irq.h> #include <linux/profile.h>. + #include <linux/interrupt.h> #define RTC_IRQ 8
An update of the IP version 4 driver is also required with a missing symbol NF_IP_LOCAL_OUT that net/ipv4/raw.c uses . This is rectified with the replacement of:
- #include <linux/netfilter.h> + #include <linux/netfilter_ipv4.h>
Note** ipv6 was not compiled into the kernel.
This will compile, however the kernel cannot boot due to the initial low level kernel jump code, at this point you should be able to get to a kernel panic! To solve this a patch supplied by Jeff Wiedemeier will work and can be found here at this link. I was unable to automatically apply this patch so I had to revert to manually applying the changes, I did not apply all the patch since I did not require PnP support. If you are using a later kernel version this patch should already be applied.
Compiling a network boot kernel
There is a little extra work involved to generate a kernel that can be used as a network boot kernel...
# make vmlinux
# make bootpfile
This will give a bootpfile that can then be installed on a remote server. I found that I could not cross-compile a bootpfile though I was able to create one on the alpha machine.
Linux with SuperPage support
The Alpha architecture also supports SuperPages, Lucy Chubb and Darren Williams are working on implementations to extend Linux with Super Page support on both Alpha and Ia64SuperPages.
