Make cannot generate .ko linux kernel module

cannot generate .ko file on my linux, although it can generate module.symvers.
But when I copy .c file and Makefile to another linux computer, there's no problem.

The strange thing is: make is successfuly executed, and returned 0;

make output:

	make -C /lib/modules/2.6.18-92.el5xen/build  
	M=/home/ye         modules
	make[1]: Entering directory `/usr/src/kernels/2.6.18-92.el5-xen-i686' 
	Building modules, stage 2. 
	MODPOST 
	make[1]: Leaving directory  `/usr/src/kernels/2.6.18-92.el5-xen-i686'

system: RHEL5

Makefile:
  1 ifneq ($(KERNELRELEASE),)
  2     obj-m:=hello.o
  3 else
  4     KDIR:=/lib/modules/$(shell uname -r)/build
  5     PWD:=$(shell pwd)
  6 default:
  7     $(MAKE) -C $(KDIR) M=$(PWD) modules
  8 clean:
  9     $(MAKE) -C $(KDIR) M=$(PWD) clean 
 10 endif
hello.c

 1 #include<linux/init.h>
  2 #include<linux/module.h>
  3 #include<linux/moduleparam.h>
  4 
  5 MODULE_LICENSE("GPL");
  6 
  7 static char *my_string = "parameter";
  8 static int my_int = 1;
  9 
 10 module_param(my_string,charp,S_IRUGO);
 11 module_param(my_int,int,S_IRUGO);
 12 
 13 
 14 static int hello_init(void){
 15     
 16     
 17 
 18     printk(KERN_ALERT "%s %d\n",my_string,my_int);
 19     return 0;
 20 }
 21 
 22 static void hello_exit(void){
 23     printk(KERN_ALERT "goodbye\n");
 24 }
 25 
 26 module_init(hello_init);
 27 module_exit(hello_exit);


That is strange... have you tried doing an "updatedb && locate whatever.ko"?

The kernel source does the majority of the work for this makefile. Any problem with that will prevent it from working. Make sure you have a compatible kernel, the right headers are installed, etc.

it isn't what I want.
I need a tool like winhex which can check the entire virtual memory of a process.

Pretty sure you can do that without modifying the kernel. You can get a complete map of valid memory segments via /proc/pid/map, and things like gdb peek into the memory of child processes all the time.

---------- Post updated at 09:50 AM ---------- Previous update was at 09:46 AM ----------

here is another thread on the subject.