You can build the kernel directly on your own PA-RISC box (self-hosted or native build). But on old systems, you may prefer to use another - faster - non PA-RISC computer to compile your kernel (cross-compilation). We will see the two possibilities.
By the time version 1.0 of this howto was released, only gcc-3.0.X was able to build working kernels. There was a bug in more recent versions that made the box crash when network activity occurs. It should be fixed by now, so using the latest version of gcc should be fine. If ever the above mentioned bug occurs, you'll know what's wrong. Anyway, if you want to build any kernel after 2.6.12-rc3, you will need at least gcc-3.3.
Since Debian was the first distribution to support PA-RISC architecture, if you want to use the Super Cow powers, you need to have some basic knowledge about the Debian packaging system. We will explain here how to quickly get a gcc compiler ready on your PA-RISC box. If you are not using Debian, well, we're afraid we can't do much for you: you will have to transpose what is said below to your distribution. We will assume you know how to use
If you are using your own PA-RISC box, you only need the good old GCC compiler. You can install the required tools to build a kernel by issuing:
[user@machine ~/dir]> apt-get install build-essential libncurses5-dev
Essentially, this will install everything you need to build a kernel (and even a bit more). This boils down to binutils, gcc, libc-dev, make, fileutils and libncurses5-dev.
When this is done, you can proceed to the kernel settings.
In this kernel build method, everything depends on the architecture of your building machine. If you want to compile your own toolchain, there is a slightly out-of-date HOWTO (O'Donell 2002). Otherwise, we assume you can either find a cross-compiler package for your build host, or make one by yourself.
As there is not yet a 64bit userspace on HP-PA, you have to cross-compile 64bit kernel even if you are building on a 64bit PA-RISC box. You can get unofficial debs for hppa64 compilers and binutils by running for instance: