Hi,
I would create a driver on Linux Board TS-7800.
I have build my driver to another Linux RedHat (2.6.9-5.EL) with the
Source code (linux-2.6.21-ts-src-oct102008.tar.gz).
See my driver bellow:
------------------------------------------------------------------------------------------------------
#include <linux/module.h>
#include <linux/init.h>
#include <linux/kernel.h>
MODULE_LICENSE("GPL");
int gCpt = 0;
static int __init Eip_init(void)
{
gCpt = 100;
printk(KERN_DEBUG "EIPTIMER Driver \n");
return 0;
}
static void __exit Eip_exit(void)
{
printk(KERN_DEBUG "EIPTIMER exit 2 _module, gCpt = %d\n",gCpt);
}
module_init(Eip_init);
module_exit(Eip_exit);
------------------------------------------------------------------------------------------------------
My Makefile is:
------------------------------------------------------------------------------------------------------
obj-m += EipTimer.o
EXTRA_FLAGS += -D__KERNEL__ -DMODULE
default:
make -C /home/jybeaugrand/Linux_Board M=$(PWD) modules
clean:
make -C /home/jybeaugrand/Linux_Board M=$(PWD) clean
The command to launch the makefile is:
LinuxDriver] make ARCH=arm
CROSS_COMPILE=/usr/local/opt/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-
The result is "EipTimer.ko".
I copy the file on the Linux Board TS-7800.
And I write:
insmod EipTimer.ko
The lsmod show the driver -> OK, but the "dmesg" doesn't see my printk
"EIPTIMER Driver"
If I remove this driver : rmmod EipTimer
I see the message "EIPTIMER exit 2 _module" !
I doesn't understand why I don't see the Eip_init message ? I would
appreciate any help from you.
Best Regards
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|