To build a Linux kernel, you need a compiler and the Linux source. The first element is not a trivial thing to find because it depends on how you build your kernel. The second is easier since it lives on the official CVS site. First, we will discuss about GCC compiler. Then, the configuration of your build will be treated. The last paragraph will deal with the installation of this new kernel.
You can compile your kernel with your own HP box. But on oldest systems, perhaps, you prefer to use another computer to compile your kernel. Let's see the two alternatives:
Since Debian is the only distribution supporting PA-RISC architecture, if you want to use the Super Cow powers, you need to have some basic informations about Debian packages system first.
apt-get is a simple command line utility that manages your Debian package system. First, Gustavo Noronha Silva wrote APT HOWTO that I invite you to read for deeper knowledge. Here, we just want to build a kernel. Since hppa port is not out yet, you should be very careful with the mirrors you choose in your /etc/apt/sources.list. For example, In Germany, you can use the following settings:
# non-US packages deb http://www.ftp.uni-erlangen.de/pub/debian/ unstable/non-US main non-free contrib # Binary packages deb http://gluck.debian.org/debian unstable main contrib non-free # source packages deb-src http://gluck.debian.org/debian unstable main contrib non-free |
If you are using your own HP box, you need only the classical GCC compiler. The recommendation is to update to the last version uploaded by the developpers.
apt-get update apt-get upgrade |
binutils
fileutils
gcc
libc-dev
make
When you did this step, you can procede to the kernel tweaking.
For this way of building your kernel, everything depends on the architecture of your building machine. For PC, you can download an already-made cross compiler on PA/Linux FTP server. For the others architectures or if you want to compile your own toolchain, please refer to Carlos O'Donell's HOWTO.
The best way to get performance is to get a well configured kernel. For PA-RISC platform, make oldconfig is a kind of default setup. If you want to make your own kernel, the first step is to know what is your hardware. The best way is to look at your box and find a maximum of information. Then, you go to the official hardware database or the HP partsurfer.
When you know what is inside your box and what you want to do with your box, just run make menuconfig or another config command. Here is the list of menus you should be going in to see if the value set corresponds with your hardware:
Processor type indicates your CPU model
General options tells you what is going to be enable in your kernel
Network device support is used to set your network card
Character devices shows your I/O possiblities
Console drivers is directly related to your console path
Sound enables your Harmony hardware
As you see, menus about HP hardware are not numerous but there is a lot of dependency between them. Now, you must configure accordingly to the use you will do of the box. Here is the list of some menus you should be going in to configure the services you want:
General setup is responsible for binary formats
Parallel port support gives you the choice to deactivate parallel port
Block devices set on the ramdisk and loopback support. You probably won't use them.
File Systems/Network File Systems is where to go to unset NFS support
Once this is done, save your configuration. Everything is written in the .config file. You can backup it because a make distclean will remove it. At this stage, you do make dep vmlinux and if everything goes fine, you have a new kernel.
If you made a native build, you backup the last working kernel with an extension like ".bk" and you copy the recent kernel with the same name. You reboot and try the new one. If it is not working, you can reboot and using PALO command, you change the name of th kernel you want to boot. ( See next section for more informations )
If you are booting via network, you need to set PALO as it is explained in the next section and run make palo