LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 05-03-2007, 07:13 AM   #1
swift_a2002
LQ Newbie
 
Registered: May 2007
Posts: 28

Rep: Reputation: 15
Help me in compiling kernel module


hi all,

i am beginner can any one help me compile simple kernel module i.e

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


int init_module(void)
{
printk("<1>``````````Hello world 1.\n");

// A non 0 return means init_module failed; module can't be loaded.
return 0;
}


void cleanup_module(void)
{
printk(KERN_ALERT "Goodbye world 1 .\n");
}



//i will be very great full to you
 
Old 05-05-2007, 02:28 PM   #2
nc3b
Member
 
Registered: Aug 2005
Posts: 330

Rep: Reputation: 32
http://www.faqs.org/docs/kernel/x204.html

Check out the makefile. Hope this helps, cheers.
 
  


Reply


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
compiling only one module without recompiling the kernel l_9_l Linux - General 8 07-06-2009 10:00 PM
Compiling C++ Kernel module for PPC p_srivastava Linux - General 1 08-25-2006 10:15 AM
need help compiling this module meant for 2.6.9 kernel hedpe Linux - Software 1 02-17-2006 01:44 AM
compiling single kernel module only evil_empire Linux - Software 2 01-31-2006 12:44 AM
Kernel compiling and module compiling tarballed Linux - General 1 12-22-2002 05:31 PM


All times are GMT -5. The time now is 04:47 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration