Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I read from wireless developers that I have to run make menuconfig command to change some configuration of the wireless driver (enable/disable something). After changing, do I have to recompile the kernel to give effect to changes? If I have to, how to compile?

share|improve this question
add comment

2 Answers 2

up vote 2 down vote accepted

First of all you have to get the kernel sources. Please have a look at the answer to »Getting the kernel source in Ubuntu«. It shows you where to get the sources. If you used the command apt-get source linux-source, you'll a tar.gz-file. You can double-click on it to unpack or use the command line:

tar xfz linux.tar.gz

You might also need several other packages. This command installs all needed:

sudo apt-get install git kernel-package fakeroot build-essential ncurses-dev

Now you should change into the directory where your kernel sources reside. If you downloaded it with git they might be in the subdirectory linux. Otherwise they are copied to /usr/src.

In the next step you should copy your existing kernel config file to the source tree:

cp /boot/config-$(uname -r) .config

And now you can execute

make menuconfig

and enter your changes. Please see also the site GitKernelBuild in the Ubuntu wiki for more advice. After you saved your changes you can compile your new kernel:

CONCURRENCY_LEVEL=`getconf _NPROCESSORS_ONLN` fakeroot make-kpkg --initrd --append-to-version=-custom kernel_image kernel_headers

and if you enter ls .. you'll see some .deb files. You can install them and use your new kernel.

share|improve this answer
    
I followed "apt-get source linux-source..." and dowloaded a "linux...tar.gz". Now do I have to extract it? –  victor Dec 18 '12 at 11:09
    
Yes, I added some lines in my answer. –  qbi Dec 18 '12 at 11:13
    
please help me until I finish it. Now, I am at extracted folder, run command "cp /boot/config-$(uname -r) .config" and "make menuconfig". I made my changes and then recompile kernel. Is it right? –  victor Dec 18 '12 at 11:25
    
Yes, if you type make menuconfig there should appear a menu on the command. line –  qbi Dec 18 '12 at 11:29
add comment

You can look here for more instructions for a Debian specific way.

To build the kernel, execute these two commands:

make-kpkg clean
fakeroot make-kpkg --initrd --append-to-version=-custom kernel_image kernel_headers

After --append-to-version= you can write any string that helps you identify the kernel, but it must begin with a minus (-) and must not contain whitespace.

This site has more generic instructions, which look a lot more familiar:

Start compiling to create a compressed kernel image, enter:

make

Start compiling to kernel modules:

make modules
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.