(Category) (Category) Linux on PowerPC FAQ-O-Matic : (Category) Languages and Compilers :
How to compile a new 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.us.kernel.org, for example). It is called linux-2.2.0.tar.gz 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.0.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 config
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 config. 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
Subcategories:
Answers in this category:
(Answer) Recompiling kernels
(Answer) Building a linuxPPC kernel (2.2.x)
[New Answer in "How to compile a new kernel"]
Previous: (Answer) I get compiler errors in netinet/in.h or linux/in.h (glibc-1.99, kernel-2.1.x)
Next: (Answer) How to get GTK 1.2.2 to compile successfully
This document is: http://www.jonh.net/cgi-bin/lppcfom/fom?file=524
[Search] [Appearance] [Show This Entire Category]
This is a Faq-O-Matic 2.717d.
Hosted by anduin.org and SourceForge Logo