Howdy, Stranger!

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

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

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.