Compiling kernel mnodule spanning multiple files


 
Thread Tools Search this Thread
Top Forums Programming Compiling kernel mnodule spanning multiple files
# 1  
Old 03-25-2009
Compiling kernel mnodule spanning multiple files

Hello i guys i have a kernel module which has a list.c library

I have one file mod.c (the main kernel module) and one list.c (which is the library)
Could you please help me with the following questions ..
1) Is a header file needed (list.h) to be included in the mod.c ?
2) do we need to write the list.c in the kernel mode (using #define __kernel___) and using kmalloc etc ?
3) How would you write the make file ?

Right now If i try writing list.c in the kernel mode and use the makefile that u have give it give a lot of compile errors and if i write it in the user mode it give un known symobol while loading the module somehow it is not able to link it..it would be great if you could please help.

Natraj
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Replacing pattern spanning multiple lines

Hi. I have input like this: <tr> <td class="logo1" rowspan="2"><a href="index.html"><img src="images/logo.png" /></a></td> <td class="pad1" rowspan="2">__</td> <td class="userBox"><img src="images/person.png"/> <a href="http://good.mybook.com/login.jsp">Sign In</a></td> <td... (5 Replies)
Discussion started by: zorrox
5 Replies

2. UNIX for Dummies Questions & Answers

Compiling multiple files

Hey there,hope you are all well. Actually i am trying to compile two .c files with gcc in unix and i also have one .txt and one .h..How do i compine them alltogether in order for my program to run? I will have to do gcc -o myprog myprog1.c myprog2.c and then how i will use myprog with the .txt... (1 Reply)
Discussion started by: Aeria Gloris
1 Replies

3. Linux

kernel compiling

Hello, I have several questions to get awnsered about the newer linux kernels (2.6.25) and above. 1st question: Ive read that the newer kernels you can compile the marvell sd8686 driver from the source. can anyone confrim this? only binaries i see for that driver are for 2.6.24 and im already... (0 Replies)
Discussion started by: old noob
0 Replies

4. Shell Programming and Scripting

Script to display record spanning over multiple lines

Following are the lines from /etc/sudoers.conf bob SPARC = (OP) ALL : SGI = (OP) ALL fred ALL = (DB) NOPASSWD: ALL ALL CDROM = NOPASSWD: /sbin/umount /CDROM,\ /sbin/mount -o nosuid\,nodev /dev/cd0a /CDROM Could you please help me with shell/perl script to display the records with... (2 Replies)
Discussion started by: Ujan
2 Replies

5. UNIX for Dummies Questions & Answers

Compiling Mach 3.0 Kernel

Hi, I am very new to this. I would like to compile the Mach 3.0 kernel. Can someone explain, step-by-step, how to turn all the Mach 3.0 kernel code into a single binary file that will run directly on an x86 computer? Also, once (and if) I get it working, what software works on it? My goal is... (2 Replies)
Discussion started by: dublinus
2 Replies

6. Red Hat

Compiling 2.6 Kernel. :confused:

Dear Linux Masters, I need ur help in the following: 1. Compiling 2.6 kernel. 2. my Redhat system is 2.4 kernel how to add 2.6 kernel. 3. I need minimum feature in 2.6 ( most probably related to networking) Please let me know if any sites to download 2.6 kernel. Can u all please help me... (2 Replies)
Discussion started by: ashokmeti
2 Replies

7. Programming

Compiling multiple cpp files (abstract factory pattern)

Hi all, I have been working with java for awhile and because of my school projects I needed to switch C++. I tried to implement some patterns in C++ but unfortunately I couldn't. Specifically, I tried to implement abstract factory pattern but since I used separated files (habitual behavior from... (4 Replies)
Discussion started by: SaTYR
4 Replies

8. UNIX for Dummies Questions & Answers

backup spanning multiple DVDs

Fedora Core 6 2.6.20-1.2962.fc6 I have about 15 GB of data that I need to backup to Single-Layer DVDs. Is there a backup method that will allow me to backup spanning multiple DVDs? (0 Replies)
Discussion started by: dangral
0 Replies

9. Shell Programming and Scripting

using sed command to delete a string spanning multiple lines

file1 contains the following data sssssssssss firstline secondline pppppppppp ssssssssss Using sed comamnd i am trying to delete firtsline secondline. so, output should be sssssssssss pppppppppp ssssssssss I tried in the following the way, but it is not working. sed ... (9 Replies)
Discussion started by: radha.kalivar
9 Replies
Login or Register to Ask a Question
fctl(7D)                                                              Devices                                                             fctl(7D)

NAME
fctl - Sun Fibre Channel transport library DESCRIPTION
The fctl kernel module interfaces the Sun Fibre Channel upper layer protocol (ULP) mapping modules with Sun Fibre Channel adapter (FCA) drivers. There are no user-configurable options for this module. FILES
/kernel/misc/fctl 32-bit ELF kernel module (x86) /kernel/misc/amd64/fctl 64-bit ELF kernel module (x86) /kernel/misc/sparcv9/fctl 64-bit ELF kernel module (SPARC) ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Architecture |SPARC | +-----------------------------+-----------------------------+ |Interface stability |Unknown | +-----------------------------+-----------------------------+ |Availability |SUNWfctl | +-----------------------------+-----------------------------+ SEE ALSO
fp(7D) SunOS 5.10 20 Oct 2004 fctl(7D)