New Kernel and problem with compiling VirtualBox

This forum is dedicated to advanced help and support :

Ask here your questions about advanced usage of Mageia. For example you may post here all your questions about network and automated installs, complex server configurations, kernel tuning, creating your own Mageia mirrors, and all tasks likely to be touchy even for skilled users.

New Kernel and problem with compiling VirtualBox

Postby james » Jul 20th, '13, 16:54

I asked this on irc but apparently nobody knew how to solve it.
Here is the problem. My wireless card wasn't working with mageia kernel (even with the latest 3.10.1 version so I had to download kernel source code from kernel.org and compile it myself. I've followed the normal procedure (make menuconfig, make, make modules_install, make headers_install). I can boot into my own kernel and everything works fine except that I can't compile Virtualbox. When I issue 'kmk -all' I get error below (the error seems to be related to "kernel headers" though I have installed them using 'make headers_install'):

Code: Select all
/lib/modules/3.10.1JamesRC1/build/include/linux/kconfig.h:4:32: fatal error: generated/autoconf.h: No such file or directory
compilation terminated


(3.10.1JamesRC1) is the name of the kernel I have compiled.

the file autoconf.h doesn't exist in "/lib/modules/3.10.1JamesRC1/build/include/generated/" and it also doesn't exist my kernel source directory: 'Sources/linux-3.10.1/linux-3.10.1/include/generated/' (they are the same thing since /lib/modules/3.10.1JamesRC1/build points to ~/Sources/linux-3.10.1/linux-3.10.1) . In fact the only places that I can find 'autoconf.h' are in '/usr/src/linux-3.10.1-desktop586-1.mga4/include/generated' and '/usr/src/linux-3.10.1-desktop586-1.mga4/arch/x86/include/generated' which are related to not-in-use Mageia's kernel.

What I've noticed that '/usr/src/linux-3.10.1-desktop586-1.mga4/include/generated/' contains a lot of files that simply does not exist in '/lib/modules/3.10.1JamesRC1/build/include/generated/':

Code: Select all
ls -l /usr/src/linux-3.10.1-desktop586-1.mga4/include/generated/

total 200
-rw-r--r-- 1 root root   5874 Jul 15 00:15 asm-offsets.h
-rw-r--r-- 1 root root 177926 Jul 15 00:15 autoconf.h
-rw-r--r-- 1 root root    270 Jul 15 00:15 bounds.h
-rw-r--r-- 1 root root    269 Jul 15 00:15 compile.h
drwxr-xr-x 3 root root   4096 Jul 16 12:41 uapi/
-rw-r--r-- 1 root root     47 Jul 15 00:15 utsrelease.h



while
Code: Select all
ls -l /lib/modules/3.10.1JamesRC1/build/include/generated/

total 4
drwxr-xr-x 3 james james 4096 Jul 20 12:24 uapi/



So what is wrong here? Have I missed anything about the kernel compilation process? why my '/lib/modules/3.10.1JamesRC1/build/include/generated/' does not contain the files necessary for compilation of Virtualbox?
james
 
Posts: 2
Joined: Jul 20th, '13, 16:26

Re: New Kernel and problem with compiling VirtualBox

Postby jiml8 » Jul 21st, '13, 19:28

I have encountered this problem before, and I always have to fumble my way through it because, though I frequently compile kernels, I seldom compile a new kernel with a new name.

Your problem basically comes down to the extraversion tag being wrong; it has to match the name of the kernel you are building, though not necessarily the name of the directory you are building that kernel from. You should start in the Makefile for the kernel (in /usr/src/linux) and change that value to what you want. I think there is also someplace in the .config file that you need to change it.

You can get the current configuration of your running kernel (including its version info) with this command:

zcat /proc/config.gz >myconfig
jiml8
 
Posts: 1254
Joined: Jul 7th, '13, 18:09

Re: New Kernel and problem with compiling VirtualBox

Postby james » Jul 22nd, '13, 13:05

I don't think the problem is related to the name I chose for the kernel. I had this problem when I compiled a previous kernel (I think it was 3.9.8) with default settings and without changing the name. The name 'JamesRC1' in my current kernel was added before compilation and in menuconfig:
General setup --->
(-ARCH) Local version - append to kernel release

Also, as I mentioned earlier the source code for my kernel is NOT in /usr/src/ but it is in ~/Sources/linux-3.10.1/linux-3.10.1/ which /lib/modules/3.10.1JamesRC1 is a symbolic link to it and I don't know which value I have to change in Makefile and .config.

Here is the output of the command your specified. (I can see CONFIG_LOCALVERSION="JamesRC1"):
http://www.ipaste.eu/view.php?id=4635
james
 
Posts: 2
Joined: Jul 20th, '13, 16:26


Return to Advanced support

Who is online

Users browsing this forum: No registered users and 1 guest