On Fri, Dec 24, 2010 at 1:17 PM, b_hirawat <bhanu.hira...@gmail.com> wrote:
> Hi, > > I am very new to Android programming.I am trying to add a module in > Android Froyo kerkel. Can anybody help me out in this,plaese let me > know which all file I need to change for this integration. > > For Example: I have a folder caled 'Test' which contail a 'C' file > test.c and a make file 'Makefile'. I need to inegrate this folder into > Android kernel folder. > > > Please let me know what all I need to write in my Makefile and how can > I check whether my module is working or note. > > Below is the code of my test file test.c.. > > #include <linux/module.h> > #include <linux/config.h> > #include <linux/init.h> > > static int __init mymodule_init(void) > { > printk ("My module worked!\n"); > return 0; > } > > static void __exit mymodule_exit(void) > { > printk ("Unloading my module.\n"); > return; > } > > module_init(mymodule_init); > module_exit(mymodule_exit); > > I was trying to get these printk statements in 'adb logcate'. But it's > not coming. Please help me out in this integration. > > printk's will be visible in kernel log. Do "adb dmesg" instead of "adb logcat". Regards, Amit Pundir > Thanks in Advance.. > > Thanks, > > B. Hirawat > > -- > unsubscribe: > android-kernel+unsubscr...@googlegroups.com<android-kernel%2bunsubscr...@googlegroups.com> > website: http://groups.google.com/group/android-kernel -- unsubscribe: android-kernel+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-kernel