Forum Moderators: bakedjake

Message Too Old, No Replies

how to insert module in fedora core 2

         

asangau

2:30 pm on Apr 8, 2005 (gmt 0)


There was a thread regarding the above topic....

.... which is closed now ... I am just posting this because the originator still had the problem (I assume)

Here is my experience,

the code
--------
#include <linux/module.h>
#include <linux/kernel.h>
int init_module(void)
{
printk("<1>Hello world 1.\n"[smilestopper]);
return 0;
}

void cleanup_module(void)
{
printk(KERN_ALERT "Goodbye world 1.\n"[smilestopper]);
}

the Makefile
------------
obj-m += hello-1.o

make command
------------
[root@localhost 2.6]# make -C /lib/modules/2.6.9-1.667/build SUBDIRS=$PWD modules

load module
-----------
[root@localhost 2.6]# /sbin/insmod ./hello-1.ko

hope this is helpful.

StupidScript

10:05 pm on Apr 8, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to Webmaster World, asangau! Welcome, indeed.

It's great to see posts like yours. The code you presented is useful in so many ways.

Thanks for a great kickoff to your WW experience.

Welcome!