View previous topic :: View next topic |
Author |
Message |
nanoo Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/5968506904287c16c9dec9.png)
Joined: 23 Jan 2005 Posts: 150
|
Posted: Thu Jan 27, 2005 3:38 am Post subject: guide to kernel recompile |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
Sith_Happens Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/175271068941f9ba0c93f85.png)
Joined: 15 Dec 2004 Posts: 1807 Location: The University of Maryland at College Park
|
Posted: Thu Jan 27, 2005 3:54 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
nanoo Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/5968506904287c16c9dec9.png)
Joined: 23 Jan 2005 Posts: 150
|
Posted: Thu Jan 27, 2005 4:04 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
nanoo Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/5968506904287c16c9dec9.png)
Joined: 23 Jan 2005 Posts: 150
|
Posted: Thu Jan 27, 2005 8:08 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
dwblas Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 14 Jul 2003 Posts: 525 Location: Southern California (No jokes please)
|
Posted: Thu Jan 27, 2005 8:29 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
nanoo Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/5968506904287c16c9dec9.png)
Joined: 23 Jan 2005 Posts: 150
|
Posted: Fri Jan 28, 2005 4:25 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
|