i wrote before:
>Hi all.
>
> I am in a situation very similar to Paridhi. In my module try, the compilator
>don't find headers out of /usr/src/include but it can't find all headers
>it seems need, and i can't understand why.
>
> This is the code:
>
>*/ Trying to activate and desactivate the DMA from a module. */
>
>#define __KERNEL__
>#define MODULE
>
>#include <linux/module.h>
>#include <linux/ide.h>
>
>MODULE_LICENSE("GPL");
>
>u8 using_dma;
>
>int init_module(void)
>{
> printk("Activating DMA. \n");
> using_dma = 1;
> return 0;
>}
>
>void cleanup_module(void)
>{
> using_dma = 0;
> printk("Deactivating DMA. \n");
>}
>
> I compile this code with:
>
>gcc -Wall -c -I/usr/src/linux/include -DKBUILD_MODNAME=Module_dma Module_dma.c
>
>and i'm using gcc version 3.2.1 and module-init-tools-0.7
>
> I hope you can help.
>
> Thanks you, very much, in advance.
>
> Regards.
>
> Jose.
>
Hi all, again.
Ok, i got a version of my "module project" that yes compile (but don't do
what i want):
*/ Trying to activate and desactivate the DMA from a module. */
#define __KERNEL__
#define MODULE
#include <linux/module.h>
MODULE_LICENSE("GPL");
u8 using_dma;
int init_module(void)
{
printk("Activating DMA. \n");
using_dma = 1;
return 0;
}
void cleanup_module(void)
{
using_dma = 0;
printk("Deactivating DMA. \n");
}
Why with only eliminate '#include <linux/ide.h>' the code gets compile right?,
anybody can explain it?.
Thanks you very much, in advance.
Regards.
Jose.
Debian GNU/Linux 'Sid' Kernel 2.4.19 Ext3.
ESware Linux 365 Kernel 2.5.49 ReiserFS.
Registered Linux User #213309.
Memories..... You are talking about memories.
Rick Deckard. Blade Runner.
--- message from Jose Luis Alarcon <jlalarcon@tiggerfan.com> attached:
_____________________________________________________________
Get your own free tiggerfan.com email address!!
DisneySites!! - http://www.disneysites.com/webmail/tiggerfan
_____________________________________________________________
Select your own custom email address for FREE! Get you@yourchoice.com w/No Ads, 6MB, POP & more! http://www.everyone.net/selectmail?campaign=tag
- To: kernelnewbies@nl.linux.org
- Subject: Re: Missing header files
- From: Jose Luis Alarcon <jlalarcon@tiggerfan.com>
- Date: Sat, 30 Nov 2002 04:24:48 -0800 (PST)
- List-archive: <http://mail.nl.linux.org/kernelnewbies/>
- List-help: <mailto:listar@nl.linux.org?Subject=help>
- List-owner: <mailto:riel@nl.linux.org>
- List-post: <mailto:kernelnewbies@nl.linux.org>
- List-software: Listar version 1.0.0
- List-subscribe: <mailto:kernelnewbies-request@nl.linux.org?Subject=subscribe>
- List-unsubscribe: <mailto:kernelnewbies-request@nl.linux.org?Subject=unsubscribe>
- Original-Recipient: rfc822;kernelnewbies@nl.linux.org
- Reply-To: jlalarcon@tiggerfan.com
- Sender: kernelnewbies-bounce@nl.linux.org
Hi all. I am in a situation very similar to Paridhi. In my module try, the compilator don't find headers out of /usr/src/include but it can't find all headers it seems need, and i can't understand why. This is the code: */ Trying to activate and desactivate the DMA from a module. */ #define __KERNEL__ #define MODULE #include <linux/module.h> #include <linux/ide.h> MODULE_LICENSE("GPL"); u8 using_dma; int init_module(void) { printk("Activating DMA. \n"); using_dma = 1; return 0; } void cleanup_module(void) { using_dma = 0; printk("Deactivating DMA. \n"); } I compile this code with: gcc -Wall -c -I/usr/src/linux/include -DKBUILD_MODNAME=Module_dma Module_dma.c and i'm using gcc version 3.2.1 and module-init-tools-0.7 I hope you can help. Thanks you, very much, in advance. Regards. Jose. Debian GNU/Linux 'Sid' Kernel 2.4.19 Ext3. ESware Linux 365 Kernel 2.5.49 ReiserFS. Registered Linux User #213309. Memories..... You are talking about memories. Rick Deckard. Blade Runner. --- message from Seth Arnold <sarnold@wirex.com> attached: _____________________________________________________________ Get your own free tiggerfan.com email address!! DisneySites!! - http://www.disneysites.com/webmail/tiggerfan _____________________________________________________________ Select your own custom email address for FREE! Get you@yourchoice.com w/No Ads, 6MB, POP & more! http://www.everyone.net/selectmail?campaign=tag
- To: kernelnewbies@nl.linux.org
- Subject: Re: Missing header files
- From: Seth Arnold <sarnold@wirex.com>
- Date: Fri, 29 Nov 2002 15:58:39 -0800
- In-Reply-To: <20021129065035.25141.qmail@web10802.mail.yahoo.com>
- List-archive: <http://mail.nl.linux.org/kernelnewbies/>
- List-help: <mailto:listar@nl.linux.org?Subject=help>
- List-owner: <mailto:riel@nl.linux.org>
- List-post: <mailto:kernelnewbies@nl.linux.org>
- List-software: Listar version 1.0.0
- List-subscribe: <mailto:kernelnewbies-request@nl.linux.org?Subject=subscribe>
- List-unsubscribe: <mailto:kernelnewbies-request@nl.linux.org?Subject=unsubscribe>
- Mail-Followup-To: kernelnewbies@nl.linux.org
- Original-Recipient: rfc822;kernelnewbies@nl.linux.org
- References: <20021129065035.25141.qmail@web10802.mail.yahoo.com>
- Sender: kernelnewbies-bounce@nl.linux.org
- User-Agent: Mutt/1.4i
On Thu, Nov 28, 2002 at 10:50:35PM -0800, paridhi bansal wrote: > I have included linux/skbuff.h in my program.When i > compile this program, it gives me error that asm/msr.h > and asm/fixmap.h are not in /usr/include. If your program is in the kernel, it should not be using /usr/include. Please see the FAQ. :) -- "There's an old saying in Tennessee, i know it's in Texas, probably in Tennessee, that says, 'Fool me once... shame on ... shame on .. you; but fool--you can't get fooled again.'" -- Commander in Chief of the US Military