How can I compile a device driver for the mini2440 without having to modified or recompile the kernel? whats the command?
compile device driver
that didnt work according to that module.txt and to compile a hello.c
module this is how is set
(hello.c)
#include <linux/kernel.h>
#include <linux/module.h>
static int __init mini2440_hello_module_init(void)
{
printk("Hello, Mini2440 module is installed !\n");
return 0;
}
static void __exit mini2440_hello_module_cleanup(void)
{
printk("Good-bye, Mini2440 module was removed!\n");
}
module_init(mini2440_hello_module_init);
module_exit(mini2440_hello_module_cleanup);
MODULE_LICENSE("GPL");
=======================================================================
(Makefile)
objm := hello.o
========================================================================
and command line:
andre@mini2440:~/driverdev$ make -C /home/andre/mini2440/linux-2.6.32.2/
M=`pwd`
I'm using this Makefile content instead:
---------------------------
ifeq ($(KERNEL_DIR),)
all:
@echo "please export KERNEL_DIR"
clean:
rm -rf *.o *.ko *.kmod *.mod.c .*.cmd .*.o.d Module.symvers
.tmp_versions modules.order
else
obj-m := hello.o
modules modules_install clean:
$(MAKE) -C $(KERNEL_DIR) M=$(CURDIR) V=$(V) $@
endif
------------------------

