LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Closed Thread
  Search this Thread
Old 07-14-2004, 03:55 AM   #1
palbox2003
LQ Newbie
 
Registered: Feb 2004
Posts: 7

Rep: Reputation: 0
Problem adding a simple module to 2.6


Hello every1,
I am new to Linux and just installed Fedora Core 2. I tried adding a simple hello world module but I have been getting problems.
This is my hello.c program:

#include <linux/init.h>
#include <linux/module.h>
#include <linux/kernel.h>

static int hello_init(void)
{
printk("<1> Hello, world\n");
return 0;
}

static void hello_exit(void)
{
printk("<1> Goodbye, cruel world\n");
}

module_init(hello_init);
module_exit(hello_exit);


The Makefile for this is:

ifneq ($(KERNELRELEASE),)
obj-m:= hello.o

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

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



so the problem is once I type the command "make" at the shell prompt it gives the following message :

$ make: Nothing to be done for 'default'

I dont know whats the problem. Can any1 please help me out here. Your help will be appreciated.
 
Old 07-14-2004, 04:00 AM   #2
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 83
Please do not post the same thread in more than one forum. Picking the most relevant forum and posting it once there makes it easier for other members to help you and keeps the discussion all in one place.

http://www.linuxquestions.org/rules.php

The twin of this post can be found here Please post any replies to it, as this thread has been flagged for closure. -- J.W.


Last edited by J.W.; 07-14-2004 at 04:04 AM.
 
Old 07-14-2004, 04:22 AM   #3
palbox2003
LQ Newbie
 
Registered: Feb 2004
Posts: 7

Original Poster
Rep: Reputation: 0
ok, Didnt know that. Sorry....
Those who can help me, can you please post the replies at this place :

http://www.linuxquestions.org/questi...hreadid=204806
 
  


Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Simple Linux Kernel Module Problem for 2.4.31 KneeLess Programming 3 08-19-2005 10:59 PM
problem with compiling a simple module pele21 Linux - Software 2 04-28-2005 03:29 AM
adding simple module to kernel(2.6) qfupa Linux - General 5 07-15-2004 07:13 AM
Problem adding a simple kernel moduel in 2.6 palbox2003 Fedora 1 07-14-2004 02:24 PM
Problem adding a simple kernel module in 2.6 palbox2003 Linux - Software 2 07-14-2004 04:23 AM


All times are GMT -5. The time now is 03:44 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration