Friday, April 19, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 2049  / 1 Year ago, sat, march 4, 2023, 12:03:13

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!


More From » kernel

 Answers
4

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.


[#26399] Saturday, March 4, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
iriousutur

Total Points: 321
Total Questions: 112
Total Answers: 106

Location: Sweden
Member since Mon, Dec 7, 2020
3 Years ago
iriousutur questions
Sun, Apr 9, 23, 02:48, 1 Year ago
Tue, May 23, 23, 00:41, 12 Months ago
Fri, Oct 21, 22, 02:47, 2 Years ago
Mon, May 9, 22, 00:01, 2 Years ago
;