LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 06-27-2013, 10:07 AM   #1
Rezo
LQ Newbie
 
Registered: Jun 2013
Posts: 11

Rep: Reputation: Disabled
Question fatal error: asm/mach/dma.h: No such file or directory


Good day to everyone,
sorry for my English
i have a trouble with driver compiling. I'am using the code source from:

http://code.google.com/p/hp-touchpad...e=linux-2.6.35


of course my kernel version is diferent "3.2.0-23-generic", i know it from using "$cat /proc/sys/kernel/osrelease" in Konsole

MakeFile:
obj-m += DMAISA.o

all:
make -C /lib/modules/$(shell uname -r)/build M=$(shell pwd) modules

clean:
make -C /lib/modules/$(shell uname -r)/build M=$(shell pwd) clean
rm -f $(obj-m). *~


By compiling it's getting me error:

victor@victor-desktop:~/Workspace/DMAISA$ sudo make
[sudo] password for victor:
make -C /lib/modules/3.2.0-23-generic/build M=/home/victor/Workspace/DMAISA modules
make[1]: Entering directory `/usr/src/linux-headers-3.2.0-23-generic'
CC [M] /home/victor/Workspace/DMAISA/DMAISA.o
/home/victor/Workspace/DMAISA/DMAISA.c:7:26: fatal error: asm/mach/dma.h: No such file or directory
compilation terminated.
make[2]: *** [/home/victor/Workspace/DMAISA/DMAISA.o] Error 1
make[1]: *** [_module_/home/victor/Workspace/DMAISA] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.2.0-23-generic'
make: *** [all] Error 2

if anyone knows how to fix it, please reply, i didn't managed to find a solution on any other websites with similar questions.
 
Old 06-28-2013, 07:09 AM   #2
adelabarra
Member
 
Registered: May 2008
Location: Argentina
Distribution: Debian, Slackware
Posts: 49

Rep: Reputation: 3
Dear Rezo:
Try to find the file in your machine using:

find / -name dma.h

If it appears, add it to the directory an try again.

I f you don't find it, google: dma.h

There is a file with that name.
Then you'll have to hack.! Don't know what comes after that.

Regards.

Alejandro.
 
Old 06-28-2013, 07:27 AM   #3
Rezo
LQ Newbie
 
Registered: Jun 2013
Posts: 11

Original Poster
Rep: Reputation: Disabled
good day Alejandro,
thanx for reply

i've already found the file:

/usr/src/linux-headers-3.2.0-23-generic/arch/arm/include/asm/mach/dma.h

it was there, but not posible anyway to compile it.
 
Old 06-28-2013, 04:22 PM   #4
adelabarra
Member
 
Registered: May 2008
Location: Argentina
Distribution: Debian, Slackware
Posts: 49

Rep: Reputation: 3
Dear rezo:
Don't know why, the object (xxx.o) file and the .c file (xxx.c) must have the same name.

In your Makefile, add a line with an include flag like this:

INCLUDE:=/usr/src/linux/include (or whatever your include path would be)

Also, add an include flag in your recipe line:

make .. ...... -I$(INCLUDE)

The includes in your .c file must be referred to your include path, if there are subdirectory paths. Double check it. And do it for all the included headers.
It is easy to make a mistake on this.

Regards

Alejandro
 
Old 07-02-2013, 09:50 AM   #5
Rezo
LQ Newbie
 
Registered: Jun 2013
Posts: 11

Original Poster
Rep: Reputation: Disabled
i've tryied to do changes in makefile but didn't work anyway, if someone can help, pls reply
 
Old 11-21-2013, 05:14 AM   #6
Rezo
LQ Newbie
 
Registered: Jun 2013
Posts: 11

Original Poster
Rep: Reputation: Disabled
finally i know that i cannot use asm/mach/dma.h only
#include <asm/dma.h> its possible
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
fatal error: goo/gmem.h: No such file or directory; but file does exist!! lgoldma Linux - General 3 03-07-2013 04:00 PM
[SOLVED] error: asm/ppc_asm.h: No such file or directory and error: asm/processor.h: No such f Thirupathip Linux - Newbie 3 01-25-2013 03:02 AM
gcc fatal error :no such file or directory question NoobLion Programming 2 08-26-2011 12:53 AM
error: asm/bitops.h: No such file or directory chronickut Linux - Newbie 3 10-04-2010 04:19 PM
ubuntu modem install (attempt) get:checking for asm/mach-default...** error neonwv Linux - Newbie 7 08-19-2009 07:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 05:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration