Linux for HP9000/340s

Recently I've been playing around with getting Linux to run on my HP9000/340 (this is an 680x0 workstation; don't confuse it with the later series using PA-RISC CPUs.) Phil Blundell has done a lot of the work here, getting the thing to run at all; you can download suitable patches and so forth from his page on the port.

Note that this port is still in the very early stages; there are currently no drivers, and so there's no way to mount a filesystem. Also it only currently works on 16MB HP9000/340s; feel free to help find and fix these machine-dependencies!

My contributions have been more modest; I've been working on the serial driver, since I have no monitor and have to use a serial console. I'm also the person who ported the rbootd daemon to Linux; you can obtain that from my page about booting NetBSD on these machines; much of the configuration and booting method is currently the same for Linux. In order to try to boot a kernel, you need to set up rbootd, bootparamd, and RARP exactly as for NetBSD. However, instead of putting the NetBSD root filesystem and kernel image in the NFS-exported directory, you put a suitably altered Linux kernel image there.

The NetBSD bootloader doesn't understand ELF binaries, so it's necessary to turn the vmlinux image into something that can be loaded by it. To do this I use a simple Perl script in conjunction with (a modified version of) Phil's genaout program. [If you don't happen to have Perl then (a) why not? and (b) you can easily translate the script into something else or do it by hand; it's pretty simple...]

NB: the bootloader understands gzipped files: just gzip the output of fixupimage and call it netbsd.gz...

Oh yes, to compile the kernel you'll need a crosscompiler and set of cross-binutils, unless you're running a different Linux/m68k system. Debian, my distribution of choice, provides gcc-m68k-linux and binutils-m68k-linux packages which are sufficient for this; if you're running something else then I'm afraid you'll have to compile a cross version of gcc yourself (it's pretty easy if you read the documentation.)

Finally, I've produced some patches which are intended to be applied after Phil Blundell's patches. These provide:

I've also been hacking together an ethernet driver. It's currently not working, but here's the source anyway:

The current situation is that it will transmit packets but doesn't receive any, for some reason [it doesn't ever generate RX interrupts, although it will generate TX interrupts...] Also, there are some issues with precisely what the interface between the generic and specific routines ought to be.


This page written by Peter Maydell (pmaydell@chiark.greenend.org.uk).