Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
guide to kernel recompile
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
nanoo
Apprentice
Apprentice


Joined: 23 Jan 2005
Posts: 150

PostPosted: Thu Jan 27, 2005 3:38 am    Post subject: guide to kernel recompile Reply with quote

Hi,
I'm new to Gentoo and to Linux, and I'm having trouble getting my wireless card up and running. I have a SMC2802W wireless g card. Although SMC itself has absolutely no linux support that I could find, this card is listed as a supported card under the prism54 driver. This package is unavailabe via emerge for my architecture (amd64), so I've downloaded the tarball and patch for the 2.6 kernel - but I realized that I didn't have some of the necessary support in the kernel. So I need to recompile.
I've never done this before - and I've found a couple of generic guides through the process - is there any guide anyone here would recommend?

Thanks a lot for you help,
Back to top
View user's profile Send private message
Sith_Happens
Veteran
Veteran


Joined: 15 Dec 2004
Posts: 1807
Location: The University of Maryland at College Park

PostPosted: Thu Jan 27, 2005 3:54 am    Post subject: Reply with quote

Recompiling your kernel is really very simple. If you are not using new sources, then you can skip this first step, changing your kernel symlink (make sure that this is pointing to the correct source directory by running ls -l, be sure to check before patching your kernel).
Code:

cd /usr/src/
rm linux
ln -s (name of kernel source directory) linux

Once thats taken care of, configure your kernel:
Code:

cd /usr/src/linux
make menuconfig
#or
make xconfig

then save the configuration and compile your kernel
Code:

make && make modules_install

then copy the bzImage and other files to your boot parition (I think the correct directory for your architecture is x86_64, but I could be wrong)
Code:

mount /boot
cp arch/x86_64/boot/bzImage /boot/kernel-(name of kernel)
cp System.map /boot/System.map-(name of kernel)
cp .config /boot/config-(name of kernel)

To make your life easier you should use the same name as whatever kernel you using now, so that you wont have to update your lilo/grub.conf. However, if you want to play it safe in case the new kernel doesn't work, use a different name then add an entry in your bootloader config for the new kernel. It should look the same as the other entry, only with a different name for the kernel image. You can really call the kernel image whatever you want, as long as you are consistent with the name in your bootloader config. The naming conventions I used are just the ones used by the Gentoo handbook, and the ones I use. Copying your config file is not neccessary, but I find it very handy.
_________________
"That question was less stupid; though you asked it in a profoundly stupid way."
I'm the brains behind Jackass! | Tutorials: Shorewall


Last edited by Sith_Happens on Thu Jan 27, 2005 4:07 am; edited 1 time in total
Back to top
View user's profile Send private message
nanoo
Apprentice
Apprentice


Joined: 23 Jan 2005
Posts: 150

PostPosted: Thu Jan 27, 2005 4:04 am    Post subject: Reply with quote

Oh, ok. That does indeed seem pretty easy. I think I'll have to hold off until tomorrow to do it, but at least now I know what to do.
Thanks for you help,

nanoo
Back to top
View user's profile Send private message
nanoo
Apprentice
Apprentice


Joined: 23 Jan 2005
Posts: 150

PostPosted: Thu Jan 27, 2005 8:08 pm    Post subject: Reply with quote

Hi,
Actually, I'm having some issues with the initial commands to configure the kernel.
As root, I type:
make menuconfig
and I I get
make: *** No rule to make target `menuconfig'. Stop.
I try the same with xconfig
make xconfig
and I get the same error message:
make: *** No rule to make target `xconfig'. Stop.

I feel like I'm missing something obvious, but I don't know what it is... any idea on what the hold up is?

Thanks,
Back to top
View user's profile Send private message
dwblas
Guru
Guru


Joined: 14 Jul 2003
Posts: 525
Location: Southern California (No jokes please)

PostPosted: Thu Jan 27, 2005 8:29 pm    Post subject: Reply with quote

You have to be in the /usr/src/linux dir which is a symlink to usr/src/linux-2.6.10-etc.. or whatever source you are using. The make x/menuconfig is looking for the file .config (note the dot at the beginning). It has to be in the directory. You may have several linux-... directories in /usr/src so be sure you are using the one you want to recompile.
Back to top
View user's profile Send private message
nanoo
Apprentice
Apprentice


Joined: 23 Jan 2005
Posts: 150

PostPosted: Fri Jan 28, 2005 4:25 am    Post subject: Reply with quote

Ah, yes. Thank you. I checked the sym link in /usr/src/linux, but then I left that directory to look at grub.conf and didn't switch back.
Now that I'm in the right directory everything goes fine.

Thanks for you hellp,

nanoo
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum