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 have a script (found here on github) that custom compiles the 3.8 linux kernel (with Xenomai for real-time). The kernel compiles/installs/runs however when I try to install my graphics driver (fglrx for ATI RADEON 8490), I get the following error:

/lib/modules/3.8.13.20-xenomai-2.6.3/build/include/generated/uapi/linux/version.h cannot be found on this system.

When I look into this directory (/lib/modules/3.8.13.20-xenomai-2.6.3/build/) there is nothing there. I then ran an ls -l in /lib/modules/3.8.13.20-xenomai-2.6.3 and got the following output for the build directory:

build -> /home/yapatel/Dev/rtxi/scripts/linux-3.8.13

The directory that the build directory is pointing to was deleted as a part of the script for compiling/installing the custom kernel so this symbolic link is dead, which make sense as to why I am getting the error.

I am compiling the custom kernel using the following command:

fakeroot make-kpkg --initrd --append-to-version=-xenomai-$xenomai_version kernel-image kernel-headers modules

and then installing the compiled kernel using the following commands:

sudo dpkg -i linux-image-*.deb
sudo dpkg -i linux-headers*.deb
sudo update-initramfs -c -k $linux_version-xenomai-$xenomai_version
sudo update-grub

Now here is my question - I understood it as the above installation commands to take care of all the necessary pieces for installing a custom compiled kernel, however the deadlink to my build directory seems to suggest that I need to manually copy over the files from:

/home/yapatel/Dev/rtxi/scripts/linux-3.8.13

to

/lib/modules/3.8.13.20-xenomai-2.6.3/build/

This seems like a manuall fix rather than the proper fix. Is there a command I am missing in the compile/install process of my custom kernel? I am assuming this means my kernel modules are not being installed?

All advice/help is appreciated!

share|improve this question
add comment

2 Answers 2

up vote 0 down vote accepted

You need to either edit the script so that it does not delete the build directory (proper fix) as you are calling it or copy the files to the system (manual fix).

Neither of these "fixes" has anything to do with the commands used to compile a kernel (make).

You can choose where and how to compile a kernel, usually use use a build directory in your home directory and build as a user, but there is not good reason you could not use a system directory and build as root. You can use any location you wish for building.

share|improve this answer
add comment

Try to run make modules -j $number_of_cpus and then make modules_install -j $number_of_cpus to rebuild and install all the modules. Check if this still gives you errors.

share|improve this answer
    
making and installing the modules does not fix the problem of missing headers. –  bodhi.zazen Mar 21 at 18:29
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.