login
Header Space

 
 

Problem in Inserting a module

October 13, 2008 - 1:57am
Submitted by Vijayendra suman on October 13, 2008 - 1:57am.
Linux

Hi

I am trying to insert a simple hello world kernel module in the kernel, and i am not getting the printk's in dmesg, I have already set the log level for the kernel so that all the messages gets printed on console. even though i not getting the printk message.

The exit module is able to send the print messages.

When i tried to crash the kernel in the init module the system is not crashing. seems the init module it self is not being called.

I am using an arm6 board.

Has any one faced such a problem. Please suggest for some solution to it.
Thanks
Vijayendra Suman

Re:Problem Inserting Sample driver

October 14, 2008 - 12:08pm

Can any one even give even a pointer where i should refer, I have been stuck for this. I know this is a weird problem but someone should have faced this.
Vijayendra Suman

Could you try to put code of

October 15, 2008 - 3:07am
Marek (not verified)

Could you try to put code of init function of your module (or whole module)?

Marek

This is a simple PRintk module which works on other normal board

October 16, 2008 - 3:30am
Anonymous (not verified)

#include
#include
#include

#include

//int volatile * ptr = 0xdeaddead0;

int j;
static int cachetest()
{
printk(KERN_ALERT "aaaaaaaaaaa\n");
printk("<0>" "aaaaaaaaaaa\n");
// *ptr = 0;
// j = *ptr;
return 0;
}
static void __exit cache_exit()
{
printk(KERN_ALERT "bbbbbbbbbb\n");
}
module_init(cachetest)
module_exit(cache_exit)

MODULE_LICENSE("GPL");
MODULE_AUTHOR("abaabaab");
MODULE_DESCRIPTION("Caching");

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
speck-geostationary