PDA

View Full Version : HowTo compile a kernel: Ubuntu way - problem with kernel sources


cryma
26th May 2009, 16:52
Hi,

I'm having trouble with the .deb files obtained as the HowTo (http://www.howtoforge.com/kernel_compilation_ubuntu) describes.

I've created the two .deb on a machine, which rebooted on the new kernel with no problem. Then I installed the two .deb on a second machine and also this one booted on the new kernel with no problem.

But, on the second machine, when i try to compile modules, such as madwifi, the compilation fails with pretty strange errors (errors attached). Errors seems related to kernel source files missing or different. I did install the headers.deb too.

On the machine where the .deb have been obtained madwifi compiles. However, I noticed that on that machine /lib/modules/linux-my-kernel/build and /lib/modules/linux-my-kernel/source link to the folder where I had compiled the kernel and not to the source folder obtained through the .deb

If i do change those links to point to the source folder obtained from the .deb, as it is on the second machine, then madwifi does not compile anymore. I attach the diff of the two folders.

I'm currently re-doing the compilation process to be sure I did not skip any step (I already know I did not create a link to /usr/src/linux, but could that alone explain the problem?). I'll let you know the outcome of this second try.

Last piece of info: the kernel I'm compiling is the vanilla kernel 2.6.24.7 patched to install click as a kernel module (http://read.cs.ucla.edu/click/click-1.7.0rc1.tar.gz, click-1.7.0rc1/etc/linux-2.6.24.7-patch). Madwifi is version 0.9.4, svn revisions 4007.


Any idea?

Thanks :)

cryma
26th May 2009, 19:15
I just finished to rebuild the .deb and install them on both the original and the second machine. Same problem as before.

The only other hint that I can give you is the output of:
sudo dpkg -i linux-image-2.6.24.7-click_2.6.24.7-click-10.00.Custom_i386.deb

sudo dpkg -i linux-image-2.6.24.7-click_2.6.24.7-click-10.00.Custom_i386.deb
[stripped]
Setting up linux-image-2.6.24.7-click (2.6.24.7-click-10.00.Custom) ...

Hmm. There is a symbolic link /lib/modules/2.6.24.7-click/build
However, I can not read it: No such file or directory
Therefore, I am deleting /lib/modules/2.6.24.7-click/build


Hmm. The package shipped with a symbolic link /lib/modules/2.6.24.7-click/source
However, I can not read the target: No such file or directory
Therefore, I am deleting /lib/modules/2.6.24.7-click/source

[stripped]


However, /lib/modules/mykernel/build points to the right sources (installed by the deb). However with those sources I cannot compile madwifi.