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 we have used this far is a 2.2.18 kernel that I have provided. This is a quite stable and good kernel, but it's not sure that it's what you want. You should make your own kernel so you know what patches you need and what modules you can install when you really need them. Here are links to all sources and patches, and a step by step guide to compile your new kernel.
As for the installation we just have done, X does work, but only when you boot from the boot floppy. 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.18 kernel sources. The 2.2.19 kernel is availble, but it has some problems with compiling on ppc, so we'll stay with 2.2.18. 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.
We're going to use the standard place for linux kernels, that is /usr/src/ There might be a linux directory there already, so let's rename it:
mv /usr/src/linux /usr/src/linux.old |
Begin with the linux-2.2.18.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 this command:
tar xzvf linux-2.2.18.tar.gz |
(On some mirrors there are only bz2 files availble. If this is the issue, use xvIf instead of xvzf.)
This will make a directory called "linux" with all the kernel source. Now we shall add the patches. If the patches have the extentions "gz", unpack them with gunzip like this:
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.
cp /usr/src/linux/arch/ppc/boot/zImage /boot/vmlinuz-2.2.18 cp /usr/src/linux/System.map /boot/System.map-2.2.18 |
dd if=/boot/zimage-2.2.18 of=/dev/sda1 |
mv /boot/System.map /boot/System.map.old ln -s /boot/System.map-2.2.18 /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 |
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |