Whoops, you are using 2.6.0-test1. Apologises. back to sleep :) Eugene <quote sender="Apurva Mehta"> > On Sat, 19 Jul 2003 17:23:13 +0530 > Apurva Mehta <apurva@gmx.net> wrote: > > > I tried to compile and run the first example in Linux Device Drivers > > on my 2.6.0-test1 kernel but got the following error: > > -- > > # insmod ./hello.o > > Error inserting './hello.o': -1 Invalid module format > > -- > > > > The code is: > > > > --- > > #define MODULE > > #include <linux/module.h> > > > > int init_module(void) { printk("<1>Hello, World\n"); return 0; } > > void cleanup_module(void) { printk("<1>Goodbye, cruel worldn\n"); } > > --- > > > > The relavent portion of my kernel config file is: > > > > CONFIG_MODULES=y > > CONFIG_MODULE_UNLOAD=y > > # CONFIG_MODULE_FORCE_UNLOAD is not set > > CONFIG_OBSOLETE_MODPARM=y > > CONFIG_MODVERSIONS=y > > CONFIG_KMOD=y > > > > What are the basic changes I need to make to the code to make it > > work on 2.6.0-test1? Is there any official documentation on the > > changes? > > Never mind, I was pointed to this set of articles in the chat room : > http://lwn.net/Articles/driver-porting/ > > Now it all works fine. > > - Apurva > -- > Kernelnewbies: Help each other learn about the Linux kernel. > Archive: http://mail.nl.linux.org/kernelnewbies/ > FAQ: http://kernelnewbies.org/faq/ > -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/