Sponsored Content
Top Forums UNIX for Advanced & Expert Users Kernel module compilation problem Post 302300636 by natraj on Tuesday 24th of March 2009 04:17:37 PM
Old 03-24-2009
Kernel module compilation problem

Dear Marcintom,

Just saw your post on compiling the kernel modules spanning multiple files. I am not able to do it .
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
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Kernel compilation

I have re-compiled kernel source code available in /usr/src/linux.2.4.20 with "make" command. The compilation is succesful. Now the problem is create the image for this. The documentation in the same folder says that now you have compile "make image". There is no option for image in Makefile. ... (3 Replies)
Discussion started by: mankrish
3 Replies

2. SuSE

max number of slabs per kernel module (kernel 2.6.17, suse)

Hi All, Is there a max number of slabs that can be used per kernel module? I'm having a tough time finding out that kind of information, but the array 'node_zonelists' (mmzone.h) has a size of 5. I just want to avoid buffer overruns and other bad stuff. Cheers, Brendan (4 Replies)
Discussion started by: Brendan Kennedy
4 Replies

3. Red Hat

Problem with kernel-module-ntfs

Hi All Im trying to access the my windows XP NTFS from Redhat linux 4.0 Enterprise edition I have downloaded the respective rpm And im able to install it successfully Then i have given the following command , but got an error Here are my partitions And when i give the below... (1 Reply)
Discussion started by: balumankala
1 Replies

4. Linux

How to convert Linux Kernel built-in module into a loadable module

Hi all, I am working on USB data monitoring on Fedora Core 9. Kernel 2.6.25 has a built-in module (the one that isn't loadable, but compiles and links statically with the kernel during compilation) to snoop USB data. It is in <kernel_source_code>/drivers/usb/mon/. I need to know if I can... (0 Replies)
Discussion started by: anitemp
0 Replies

5. Linux

problem with kernel module loading

Hi masters, I am new to linux and unix forum and this is my first forum. So please excuse if I am not giving sufficient information. I will give them on request. I have created a bandwidth manager module. I am using a 2.6.9 kernel and in Red Hat 3.4.3 distribution. But when i run make... (1 Reply)
Discussion started by: iamjayanth
1 Replies

6. UNIX and Linux Applications

Apache module compilation error

I'm trying to compile an apache module (a tutorial module, Apache 2 Module Tutorial - GNU Build Tools and the Development Environment) and I get errors like this: apr.h:273: error: expected ´=´, ´,´,´;´,´asm´ or ´__attribute__´ before ´apr_off_t´ those errors occur like 30 times in different... (4 Replies)
Discussion started by: hjalle
4 Replies

7. Red Hat

Kernel compilation for s3c2440

Hi All, I am trying to compile Kernel 2.6.31 with arm-linux-gcc3.2.2 for s3c2440a, but I am not able to perform the task. I am using Redhat 9 firstly i am using the following commands $make s3c2410_defconfig // there is no error in execution of this command next i run $make ... (0 Replies)
Discussion started by: niranjanvg
0 Replies

8. Linux

Linux kernel compilation

I have complied the kernel with a default settings... now if I load this kernel , it'll load perfectly but the INTERNET is not workink... I think in the default settings The network modules are not included.. Can anybody help me out with the selection of the network module when i give "make... (1 Reply)
Discussion started by: naresh046
1 Replies

9. UNIX for Dummies Questions & Answers

Kernel Compilation Issue

I have installed ubuntu 11.04 on my system. After this when I used to give uname -r it showed me kernel version as 2.6.38. Now I had downloaded kernel 2.6.34.12 from kernel.org and installed it using the following steps: make make modules make modules_install make install This created... (2 Replies)
Discussion started by: rupeshkp728
2 Replies

10. Linux

Unload kernel module at boot time (Debian Wheezy 7.2, 3.2.0-4-686-pae kernel)

Hi everyone, I am trying to prevent the ehci_hcd kernel module to load at boot time. Here's what I've tried so far: 1) Add the following line to /etc/modprobe.d/blacklist.conf (as suggested here): 2) Blacklisted the module by adding the following string to 3) Tried to blacklist the module... (0 Replies)
Discussion started by: gacanepa
0 Replies
wml::mod::MakeMaker(3)						     EN Tools						    wml::mod::MakeMaker(3)

NAME
wml::mod::MakeMaker - A Makefile generator SYNOPSIS
#!wml -o Makefile #use wml::mod::MakeMaker <write-makefile [attributes]> DESCRIPTION
This include file provides an easy way to write a Makefile to distribute your own WML modules. It is inspired by the "ExtUtils::MakeMaker" Perl module. Default targets make all This is the default target. It will build all include files and their documentation. make install Install include files and documentation in the locations given by ``wml -V2''. make clean Remove files generated by make. make distclean Like make clean, plus remove the Makefile too. make dist Build a distribution. Should only be used by the module maintainer. If there is a MANIFEST file, then the list of files to include is taken from this file. Otherwise the tarball contains all source files, plus MakeMaker.wml, Makefile.wml, shtool and README if these files exist. Overriding default targets To build the Makefile, all targets are put in separate buffers during pass 3, and those buffers are diverted by pass 5. You can override this defaukt target by redefining buffer contents. Buffer names are explicit: MK_ALL MK_INSTALL MK_CLEAN MK_DISTCLEAN MK_CONFIG MK_RELEASE Defining new targets The MK_USER is empty and devoted to this task. ATTRIBUTES
The first three attributes are mandatory. package The name of the package version Its version number modules List of modules to build and install. This is a space separated list of filenames. Modules should reside in a sub-directory to be compliant with actual file hierarchy. For instance, the declaration modules="math/log.tmpl math/exp.tmpl" tells that after compilation, there are two modules which are "math/log.tmpl" and "math/exp.tmpl". This modules will be installed to "LibDir/include/math/log.tmpl" and "LibDir/include/math/exp.tmpl". These modules will then be called in a WML file by #use tmpl::math::log #use tmpl::math::exp Source files for these modules are obtained by replacing the suffix by .src. src-ext Defines an alternate suffix for the source files. man-ext Section number of the manual in which man files are put. Default is 3. extradistfiles Space separated list of files to include in a distribution. By default, all source files plus MakeMaker.wml, Makefile.wml, README and shtool are included in a distribution. EXAMPLE
<write-makefile package="log" version="3.14" modules="math/log.tmpl" source-ext="exp" > This will build the tmpl::math::log include module from the math/log.exp source file. This source file will also produce the tmpl::math::log(3) manpage. NOTES
Please do _not_ use a ".wml" suffix for your modules, they should be reserved for official WML modules shipped with WML. You may instead put your initials or anything else. AUTHOR
Denis Barbier barbier@engelschall.com REQUIRES
Internal: P1, P2, P3, P5 External: -- EN Tools 2014-04-16 wml::mod::MakeMaker(3)
All times are GMT -4. The time now is 02:49 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy