LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 05-29-2006, 06:23 AM   #1
frankjp
LQ Newbie
 
Registered: Jun 2005
Location: Around the world
Distribution: Fedora Core 2 3 4 and Freebsd 5
Posts: 10

Rep: Reputation: 0
Help to compile a module for 2.6.16-1.2122_FC5smp


Hello,
I need you help to give to compile a module.
I am trying to compile a simple Hello World module but I am have this error.
-----------------------------------------------------------
make -C /lib/modules/2.6.16-1.2122_FC5smp/build M=/home/fondjo/kerneltest/lkmpg-examples/HelloWorld modules
make: *** /lib/modules/2.6.16-1.2122_FC5smp/build: No such file or directory. Stop.
make: *** [all] Error 2
-------------------------------------------------------------

I tried also this Makefile
obj-m := helloworld.o

KDIR := /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)

default:
$(MAKE) -C $(KDIR) M=$(PWD) modules

and obtained:
make: nothing to be done for 'default'

Please tell me how to solve this problem. I read a lot of comments but it cannot solve my problem.

Regards.

Frank
 
Old 05-29-2006, 07:10 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
install the matching kernel-devel rpm
 
Old 05-29-2006, 08:45 PM   #3
frankjp
LQ Newbie
 
Registered: Jun 2005
Location: Around the world
Distribution: Fedora Core 2 3 4 and Freebsd 5
Posts: 10

Original Poster
Rep: Reputation: 0
Thank you Dear Chris,

It works. I didn't pay attention to it.

Regards,

Frank
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Please Compile This Module For Me... hellmet Linux - Software 10 05-08-2006 05:30 AM
Compile a kernel module Ralc Linux - Newbie 5 03-11-2006 08:51 AM
module compile - orinoco BashTin Linux - Newbie 2 02-09-2005 08:14 AM
can't Compile a module under Kernel 2.4.20-8 srsairam Linux - Software 3 11-09-2004 12:45 AM
Nvidia module will not compile Shafted Debian 6 04-18-2004 09:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 05:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration