Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Sat Jan 31, 2015 3:10 pm 
Offline

Joined: Sat Jan 31, 2015 3:05 pm
Posts: 1
Hi all,

I am trying to follow the Linux Kernel Module Programming Guide here: http://www.tldp.org/LDP/lkmpg/2.6/lkmpg.pdf

In the process of compiling the first Hello World kernel module (section 2.2 in the guide), I am running into the following error when calling make:

make: *** /lib/modules/2.6.39.1-linode34/build: No such file or directory. Stop.

I'm wondering what I should do to have it compile correctly. Please if you could provide a beginner's explanation, that would be great. I'm new at this and kind of have no idea what I'm doing... Thank you!

Edit: I forgot to say, I checked the path, and it is true that the /lib/modules/2.6.39.1-linode34/build file is not present. Should I look for it in another location? Or is this something that differs between the kernel running on linode and the one specified in the guide? Googling did not turn up anything particularly useful.


Top
   
PostPosted: Sat Jan 31, 2015 3:32 pm 
Offline
Senior Member
User avatar

Joined: Sat Aug 30, 2008 1:55 pm
Posts: 1739
Location: Rochester, New York
It's possible to build kernel modules against a Linode kernel (just grab the source tree from kernel.org and put it in the right place, etc), but it's often easier to either use your own kernel or use your distribution's kernel. That way, you've got the build environment for kernel modules in the right place.

By the way, you're running a rather old kernel from nearly 4 years ago... if you don't go for either of the custom kernel options, you'll want to make sure your configuration profile is set to boot the "Latest 32-bit" or "Latest 64-bit" kernel (as appropriate), since your current kernel is deprecated.

_________________
Code:
/* TODO: need to add signature to posts */


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group