Please Help needed to compile my first kernel program

Please Help needed to compile my first kernel program

I have compile & install new kernel 2.6.32.3 on path: /root/linux2.6.32.3/
I have written small program [shown below] at path: /root/abc/

I already compile & install kernel 2.6.32.3 on fedora 10 machine & check /boot/grub/menu1.st entry it is there.

My program giving an error when I "make"
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

uname: extra operand `.r'
Try `uname --help' for more information.
uname: extra operand `.r'
Try `uname --help' for more information.
make: Nothing to be done for `all'.


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

My Kernel Program

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
/*
* hello.1.c . The simplest kernel module.
*/
#include /* Needed by all modules */
#include /* Needed for KERN_INFO */

int init_module(void)
{
printk(KERN_INFO "Hello world 1.
");
/*
* A non 0 return means init_module failed; module can't be loaded.
*/
return 0;
}

void cleanup_module(void)
{
printk(KERN_INFO "Goodbye world 1.
");
}

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Makefile look like

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

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++~
myemail id : rachilmeth@googlemail.com
~


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories