Messages in this thread | | | Date | Thu, 11 Feb 1999 09:27:03 -0800 | From | Sean M Hollingsworth <> | Subject | Changes to interface from 2.0 to 2.2 |
| |
In my computer architecture class, those of us who are running linux have started writing kernel modules. As an introduction to the internals of a kernel module, we wrote a simple module (the example from Rubini's _Linux Device Drivers_) which is as follows:
#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 world\n"); }
Now if I compile this and insmod it on a machine running a 2.0.x kernel it does what it is supposed to do. If I insmod it on a machine running 2.2.1, I get an "unresolved symbol printk" error. I know many things changed between the 2.0 and 2.2 kernel and am wondering what needs to be changed in this code to make it work with a 2.2 kernel. Although I could, as my instructor suggested, use my masq bax (which is running 2.0.36) for rest of the labs involving kernel modules, which I ended up doing for this one, I would prefer to not have to do that and would much rather learn how to write modules for the 2.2 kernel. So, if someone would be so kind as to explain why the above code no longer works and/or point me in the direction of something that will help me figure what changes I need to make to the examples in the Rubini text, I would be most appreciative.
Sean M Hollingsworth
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |