Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


  Search this Thread
Old 05-03-2007, 08:13 AM   #1
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, 03:28 PM   #2
Registered: Aug 2005
Posts: 330

Rep: Reputation: 32

Check out the makefile. Hope this helps, cheers.


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

All times are GMT -5. The time now is 08:21 PM.

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