473,408 Members | 2,813 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,408 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 1061
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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...

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.