In this chapter we will download the Linux kernel sources, add a few patches, and compile and install our own custom kernel on the harddisk. When we have successfully accomplished this exciting event, we don't have to boot from the installation boot floppy anymore.
The kernel that comes with the system, 2.2.15 is a quite stable kernel. But there have been a lot of development since it came out, including just recently, frame buffer support for the internal IBM E15 graphics card. To get this to work we have to get some kernel sources and patches, and compile a new kernel.
As for the installation we just have done, X does work, but only when you boot from the boot disk. Would it not have been nice to be able to boot directly off the hard disk - and by the way, what about sound support? Let's set up this together as quickly as possible.
Before starting downloading files and compiling the kernel, check that you have these packages installed:
make
gcc
cpp
glibc
glibc-devel
ncurses-devel
kernel-headers
This list should probably be longer
We'll use the 2.2.16 kernel sources. To add better support for our Carolina motherboard, well add two patches from David Monro's Carolina page. This may sound complicated, but believe me, it's not. Follow the steps below here, and we'll get you up in an hour or so.
Start out by making a brand new directory for the files in a appropriate place, like /usr/src/my_new_linux_kernel. (You have to be root to do this. Use su to become root, and issue the command 'mkdir /usr/src/my_new_linux_kernel' or something like that.) Download all files to this directory.
Begin with the linux-2.2.16.tar.gz source from the /pub/linux/kernel/v2.2 directory at ftp.kernel.org or a local mirror (recommended for faster download).
Then, get the Carolina patch and the IBM E15 frame buffer patch from David Monro's Carolina page at http://www.amberdata.demon.co.uk/carolina
The next step is to unpack and patch the source files you just downloaded. cd to the directory where you downloaded the files, and unpack the kernel source by issuing these commands:
gunzip linux-2.2.16.tar.gz tar xvf linux-2.2.16.tar |
gunzip carolina.diff.gz gunzip ibm_e15fb.diff.gz |
mv linux new patch -p0 <carolina.diff |
patch -p0 <ibm_e15fb.diff |
mv new linux |
The details of configuring the kernel are way outside the scope of this document. To get more help, try The Kernel HOWTO. Here, we'll just cover the basics to get a working kernel. Download my kernel config file into the linux directory in the kernel tree top directory.
In the directory containing the linux kernel tree, start the configuration program by issuing these commands:
cd linux make menuconfig |
In the main menu, save your new configuration for later use, if you like, and select exit. Answer Yes to the question about saving the changes. You are now ready to compile the kernel.
To compile the kernel is quite straightforward. If you're not in there already, enter the linux directory in the top level of the kernel tree, and issue this command series:
make dep && make clean && make zImage && make modules && make modules_install |
Now it's time to install your fresh-baked kernel. On RedHat-like systems like LinuxPPC, we keep kernels and their setupfiles in the /boot directory. Assuming you used /usr/src/my_new_linux_kernel previously, let's do some copying now:
cp /usr/src/my_new_linux_kernel/linux/arch/ppc/boot/zImage /boot/vmlinuz-2.2.16 cp /usr/src/my_new_linux_kernel/linux/System.map /boot/System.map-2.2.16 |
dd if=/boot/zimage-2.2.16 of=/dev/sda1 |
mv /boot/System.map /boot/System.map.old ln -s /boot/System.map-2.2.16 /boot/System.map |
reboot |
In this chapter we will set up X, if it does not work properly already.
To set up X, check that you have installed the following packages:
XFree86
XFree86-FBDev
XFree86-100dpi-fonts and/or XFree86-75dpi-fonts
Xconfigurator
Maybe more packages here...
Xconfigurator |