LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 12-18-2006, 11:47 PM   #1
zeeshanhayat
Member
 
Registered: Oct 2004
Distribution: Fedora, Debian, Free BSD
Posts: 71

Rep: Reputation: 15
Compiling and Loading Kernel Modules in FC5


Well this is my first attempt at creating a kernel module. I went on like that.

#include <linux/module.h> /* Needed by all modules */
#include <linux/kernel.h> /* Needed for KERN_INFO */

int init_module(void)
{
printk(KERN_INFO "The Usual Hello world Program.\n");
return 0;
}

void cleanup_module(void)
{
printk(KERN_INFO "Unloading.\n");
}


The Make File..


obj-m += hello-1.o

all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules

clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean


Now when i run make i get the problem,

make: *** No targets specified and no makefile found. Stop.

when i run "make MakeFile" i get the following message
make: Nothing to be done for `MakeFile'.

I am running Fedora Core 5.
Any Ideas..
 
Old 12-19-2006, 01:19 PM   #2
charleykadet
Member
 
Registered: Sep 2005
Location: Montreal
Distribution: Fedora Core 5, Gentoo, LFS
Posts: 83

Rep: Reputation: 15
This error occur when the name of your makefile isn't Makefile.. and the second error is because you specify a Makefile to make with this command:"make --makefile=you_makefile" see make --help
 
Old 12-20-2006, 04:22 AM   #3
zeeshanhayat
Member
 
Registered: Oct 2004
Distribution: Fedora, Debian, Free BSD
Posts: 71

Original Poster
Rep: Reputation: 15
But my Make file is named MakeFile
 
Old 12-20-2006, 06:16 PM   #4
charleykadet
Member
 
Registered: Sep 2005
Location: Montreal
Distribution: Fedora Core 5, Gentoo, LFS
Posts: 83

Rep: Reputation: 15
mv MakeFile Makefile
this should works
 
Old 12-20-2006, 06:17 PM   #5
charleykadet
Member
 
Registered: Sep 2005
Location: Montreal
Distribution: Fedora Core 5, Gentoo, LFS
Posts: 83

Rep: Reputation: 15
these is a difference between MakeFile and Makefile.. linux differ Capital letter...
 
  


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
FC5- Linkable Kernel Modules - HELP allomeen Linux - General 0 04-10-2006 02:18 PM
Loading Kernel Modules superdude_876 Linux - Software 1 10-28-2005 11:46 PM
loading modules at kernel startup linux_lover2005 Linux - Software 2 12-21-2004 10:43 AM
Loading modules error after loading compiled kernel td0l2 Linux - Newbie 12 07-28-2004 11:10 AM
Modules not loading in New kernel palanisaravanan Linux - General 1 11-22-2003 06:31 AM

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

All times are GMT -5. The time now is 07:33 PM.

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