Next Previous Contents

5. Testing the cross compiler

We are going to test the cross compiler by attempting to build the linux kernel for PARISC.

We have a small cluster of 32x 712/50's and we need a new kernel!

Always remember to add the parisc bin directory to your path.

5.1 Building the Kernel for PARISC

The kernel is setup with all the defaults of "make oldconfig" If these don't suit your setup, then run "make menuconfig" and change as required.

You'll notice during the build that hppa-linux-gcc is being used to compile the kernel. Don't ask... it's magic. In reality you'll have to "export cc=hppa-linux-gcc" to use the cross compiler forcefully.

Magic aside, there is an explicit "ARCH := parisc" which overrides ARCH selection by the kernel Makefile, which then in turn means that ./arch/parisc/Makefile is used for the build... and that defines CROSS_COMPILE=hppa-linux- and makes the kernel run hppa-linux-gcc instead of gcc.

You now have a kernel (vmlinux) you can use on any HP box that will boot that kernel. You will want to tweak the kernel parameters passed so that you can mount the proper root and setup a serial console (but that's another HOWTO, as well as for making lifimages for network boot. See the PA-RISC/Linux Boot HOWTO for details).

Enjoy! :)


Next Previous Contents