(Answer) (Category) Linux on PowerPC FAQ-O-Matic : (Category) Trash : (Category) Revised FOM :
How To Compile a Kernel
OK, not that I know what I'm doing or anything, but this worked for me:
First of all, grab the kernel source tarball from all the usual places (ftp://ftp.us.kernel.org/
for example). It is called linux-2.2.x.tar.gz (the x means whatever version number you are downloading)
and it is over 11MB so grab a book and relax (I want my ADSL!). If you are using Fetch (in Mac OS),
make sure to specify Binary download. If you're getting it on the linux side, it should be OK. Download 
it to wherever you want. I did it in Linux as this avoided file transfer between OSs. When it's done, do 
mv /dir/where/you/downloaded/linux-2.2.x.tar.gz /usr/src cd /usr/src

If you have a linux directory here, you need to delete it. Only do this if you are sure that you won't
need the sources of whatever version kernel you have there. To delete the direcory do
rm -rf linux
Then uncompress the tarball:
tar -xvpzf linux-2.2.0.tar.gz
This will create a new linux directory with all the source tree in it. Then
cd linux
Now we're ready for the actual compile. Do
make mrproper; make menuconfig
This will allow you to configure the kernel and decide what functionality you want compiled into the 
kernel and what you want modular. I don't really know what most of those things were, so I tended to take
defaults. After this do
make dep; make clean; make
Then sit back for some more time and watch the oodles of text as it scrolls on your console as the 
kernel is compiling. On my G3/233 tower it took about 5-10 min. Your mileage may vary. When it is done,
you will end up with a file vmlinux. This is your new kernel. Its size will depend on what you 
did with make menuconfig. Mine ended up about 2.2 MB, same as the precompiled 2.1.125 I have been using,
so I figured I must have done *something* right. Now you need to get your modules set up. Do
make modules make modules_install
Now copy your kernal to the Mac side (I ftp'd it from my powerbook and then copied it over via 
file sharing to the G3) and drop it into the System Folder. Rename the old kernel first (something like 
vmlinux-2.1.125) so that you have it in case your machine won't boot.

There you go. That's what I did and it worked fine (mostly). My video is kinda messed up, but that 
could be a whole different issue. Like I said, I'm not an expert, so your mileage may vary, no warranty
expressed or implied, subject to pricing and availability, use at your own risk, place out of reach of small children.
inet2@akos.net
While accpeting the defaults will result in a working kernel, it will not result in an optimized kernel, and it will also not result in a kernel that is like the distribution kernel. For example, the distribution kernel has the Tulip driver for ethernet enabled, the default config is to have it disabled. There are numerous other examples, so unless you have a specific need to compile a kernel, DON'T.
And if you do, be prepared to do it several times until you figure out what you are doing. It's not a very difficult proces, so don't be afraid of it, ust be prepared for some time investment.
lbutler@southgaylord.com
[Append to This Answer]
This document is: http://www.jonh.net/cgi-bin/lppcfom/fom?file=901
[Search] [Appearance]
This is a Faq-O-Matic 2.715d.
Hosted by anduin.org and SourceForge Logo