Friday, April 19, 2024
 Popular · Latest · Hot · Upcoming
29
rated 0 times [  29] [ 0]  / answers: 1 / hits: 169288  / 1 Year ago, fri, february 10, 2023, 12:16:16

I am planning to write some device drivers and I need to get the Linux kernel source. My Linux kernel version is 3.2.0-23-generic-pae and I downloaded the image from this. In many of the articles I have read, it tells me that I need to have the entire kernel tree to start inserting new modules.



Is it enough if I download this image and paste it into the usr/src/ folder or do I have to do something else?


More From » kernel

 Answers
5

This will get the source of the stock kernel:



apt-get source linux-source




You can check what version of the kernel is running like this:



uname -r


Which will print something like:



3.13.0-46-generic


You can find a list of current source package versions available on your system via:



apt-cache search linux-source


To get the upstream version of the kernel:



git clone git://kernel.ubuntu.com/ubuntu/ubuntu-trusty.git




In the above link, 'trusty' is the codename for the version of Ubuntu. You can find out the codename for the version of Ubuntu you have installed via:



cat /etc/lsb-release

[#37076] Friday, February 10, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
oraoming

Total Points: 354
Total Questions: 105
Total Answers: 124

Location: Iraq
Member since Sat, Apr 3, 2021
3 Years ago
oraoming questions
Fri, Aug 20, 21, 10:08, 3 Years ago
Mon, May 24, 21, 21:56, 3 Years ago
Mon, Dec 12, 22, 23:21, 1 Year ago
Mon, Sep 12, 22, 11:38, 2 Years ago
;