473,425 Members | 1,812 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,425 software developers and data experts.

LINUX Modules

53
I have worked with this program of inserting a module to LINUX Kernel.
/*hellomodule.c*/
#define MODULE

int init_module(void){
printk("<1>Hello Module\n");
return 0;
}

void cleanup_module(void){
printk("<1>Goodbye\n");
}

I compiled the program with command

root# gcc -c hellomodule.c

I got the ouput file as hellomodule.o

And i failed in using the command,

root# insmod ./hellomodule.o

It is showing an error,

The file is not in module format and No module formats.

Whether we have any specific directories to put this modules?
How can i successfully install a module to the kernel?
Im using REDHAT EL - 4
Aug 20 '07 #1
2 1062
I have worked with this program of inserting a module to LINUX Kernel.
/*hellomodule.c*/
#define MODULE

int init_module(void){
printk("<1>Hello Module\n");
return 0;
}

void cleanup_module(void){
printk("<1>Goodbye\n");
}

I compiled the program with command

root# gcc -c hellomodule.c

I got the ouput file as hellomodule.o

And i failed in using the command,

root# insmod ./hellomodule.o

It is showing an error,

The file is not in module format and No module formats.

Whether we have any specific directories to put this modules?
How can i successfully install a module to the kernel?
Im using REDHAT EL - 4

Hi ,

i tried in redhat 9.

give this command for compilation

gcc -D__KERNEL__ -I/usr/src/<linux kernel for wat u r compiling>/include -O -Wall -c <filename.c>

then

insmod <filename.o>

try this...

rgds
jack
Aug 21 '07 #2
prometheuzz
197 Expert 100+
Moved this thread from the articles section to the forum.
Aug 21 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: David ROBERT | last post by:
Hello, I need to read data from a MS Access database. The program (reader) is installed on a linux box and is written in python langage. The database is MS Access 2002 installed on a Win XP box...
4
by: Logan | last post by:
Several people asked me for the following HOWTO, so I decided to post it here (though it is still very 'alpha' and might contain many (?) mistakes; didn't test what I wrote, but wrote it - more or...
7
by: Erik Johnson | last post by:
I am trying to upgrade my Python installation. After downloading sources and building Python 2.3.4, I am unable to use the command history editing feature in the interactive interpreter (where the...
7
by: Edward Diener | last post by:
I can install Python 2.4 on the Fedora 3 Linux system, but after I do a number of Linux utilities and commands, like yum, stop working because they were dependent on the Python 2.3 installation....
2
by: RU | last post by:
Hi, I am working on a porting project to port C/C++ application from unixware C++, AT&T Standard components to g++ with STL on Linux. This application has been working properly on...
4
by: Fabian Braennstroem | last post by:
Hi, I am pretty new to python and will use it mainly in combination with scientific packages. I am running ubuntu breezy right now and see that some packages are out of date. Do you have any...
1
by: Sorin Schwimmer | last post by:
Hi All, After a disaster in which I lost my whole harddrive, I decided to install the newest everything that I use. I put the latest Gentoo Linux, with gcc 4.1.1, installed tcl/tk 8.4.14 and...
8
by: Prateek | last post by:
Hello, I'm trying to package my python program into a linux executable using cx_freeze. The goal is that the user should require python on their system. I've managed to make the binaries on...
1
by: kodaliece | last post by:
Hi, I am new to this PHP and linux OS as well. I am trying to install to Apache 2.2.8 and PHP 5.2.5 and do some PHP coding. I've installed Apache and tested it. Its working fine. Then, I...
5
by: John Ladasky | last post by:
Hi folks, Running Python 2.5 on both a Windows XP laptop, and an Ubuntu Linux 7.04 desktop. I've gotten tired of maintaining multiple copies of my personal modules that I use over and over. ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.