Sparc Netra X1 Linux

This page written for those who want to bring up a version of Linux 2.4.19 on a Sun Microsystems Netra X1. My experience may benefit you.

I used the Aurora Linux Distribution, Build 0.42.

Unable to get our Netras to netboot, we decided the easiest way to install the system was to pop the top, plug in a Sun IDE CD drive, and install from there. We were successful in doing this.

The Ethernet interfaces did not seem to be working on boot, but we found that:

When the machine would boot, it seemed that it didn't have a default route to its gateway. I haven't tracked down why this was the case, because I fixed it by including the followng line in /etc/sysconfig/static-routes:
any net default gw 128.227.170.65
Of course, 128.227.170.65 is the address of our gateway machine, you'd need to substitute your own gateway address.

The machine would boot just fine and function well, but my goal was to write filesystem modules for the machine. I cloned Ori Pomerantz's hello module and compiled it without error. My attempt to insmod this module, however, failed. Apparently, the compiler that ships with the Aurora distribution is a 32 bit compiler, but the kernel is 64 bit code.

An enterprising student, Dan Karrels, found the software tools necessary to compile such a module. One needs to get the following three rpms from ftp://auroralinux.org/pub/aurora/build-0.4/en/os/sparc/RedHat/RPMS:

After instaling these with rpm -i, you can then compile Ori's hello module, link it, and insmod it. I have a sample Makefile suited to the task of making such modules.

Unfortunately, attempts to compile and insmod a more complex module such as ramfs failed. The modules would compile fine, but they would not load because the version strings of the external symbols in the running 0.42 build kernel did not match any of the version strings in the /usr/local/linux-2.4 source tree.

I realized that the only way I was likely to install such modules into the kernel would be to compile a running kernel from the same source tree. I encountered several problems in trying to make the kernel:

I'm providing a collection of diffs that will make the changes I needed to make. You can place these diffs in /usr/src and execute
patch -p0 
You can then make the kernel using the following steps:
cd /usr/src/linux-2.4
mv .config ../config
make mrproper
mv ../config .config
touch Makefile
(date; yes '' | make config 2>&1; date) | tee z.make-config
(date; make dep 2>&1; date) | tee z.make-dep
(date; make 2>&1; date) | tee z.make
(date; make modules 2>&1; date) | tee z.make-modules
(date; make modules_install 2>&1; date) | tee z.make-modules_install
I like to keep track of what happened during the makes and how long it took. Then if there were any warning messages, I can take my time tracking down the inconsistencies that led to them.

The whole process takes about 35 minutes.

If I boot the kernel made with these changes, I can compile file system modules and successfully insmod and use them.

To boot this newly compiled kernel, you must copy it into the boot partition if you are to boot it. I copied mine as follows:

cp /usr/src/linux-2.4/vmlinux /boot/vmlinux.new
The final change required to get the kernel to boot is to change /boot/silo.conf to include a stanza to allow the new kernel to be selected at boot time (by typing its label name when the Silo boot: prompt appears at boot time). I added the following stanza to silo.conf:
image=/vmlinux.new
        label=linux.new
        initrd=/initrd-2.4.19-0.004sparc.img
        read-only
        root=/dev/hda2
Now, when I want this kernel version to boot, I issue a shutdown -r now command, then type linux.new (the label name I chose) when the Silo boot: prompt appears (several minutes after initiating the shutdown).

To make this the default kernel, one can add the following line at the beginning of silo.conf:

default=linux.new
If you have any corrections to the above process or comments, feel free to contact me at jnw@cise.ufl.edu.