* Writing makefiles for headers outside 'usr/include'
@ 2014-08-26 8:09 testlaster
2014-08-26 8:31 ` Anders Darander
0 siblings, 1 reply; 3+ messages in thread
From: testlaster @ 2014-08-26 8:09 UTC (permalink / raw)
To: kernelnewbies
So the initial problem I'm having is that wanting to use headers and
their libs like|module.h|and|init.d|and|pci.h|for instance can't be used
by simply going|#include <pci.h>|because if you check the
actual|pci.h|||(40 lines or so) file you will find that its allot
shorter then the usual dev|pci.h| so needless to say you can't use all
the functions. So now I have to use makefiles to point to other directories.
I've been trying to create makefiles but at the moment the errors just
rack up so much that I really don't know what part of the process is at
fault. Is it the C or the headers or the wrong libraries? I'm kind of
clueless to where the libraries might even be.
Could someone please help me write a makefile for Linux headers and
their libraries that is not in the usual|/usr/include|directory? The
source files that I want to use will be
in|usr/src/linux-headers-3.13.0.32-generic/include|. Also if they are in
the makefile how will I include them in the source?
I've been learning a lot of things in parallel and I think the curve is
starting to get to me. :/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140826/e170f78b/attachment-0001.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Writing makefiles for headers outside 'usr/include'
2014-08-26 8:09 Writing makefiles for headers outside 'usr/include' testlaster
@ 2014-08-26 8:31 ` Anders Darander
2014-08-26 9:09 ` testlaster
0 siblings, 1 reply; 3+ messages in thread
From: Anders Darander @ 2014-08-26 8:31 UTC (permalink / raw)
To: kernelnewbies
On 26 August 2014 10:09, testlaster <testlaster@gmail.com> wrote:
> So the initial problem I'm having is that wanting to use headers and their
> libs like module.h and init.d and pci.h for instance can't be used by simply
> going #include <pci.h> because if you check the actual pci.h (40 lines or
> so) file you will find that its allot shorter then the usual dev pci.h so
> needless to say you can't use all the functions. So now I have to use
> makefiles to point to other directories.
Stop for a moment.
What are you trying to do? Are you writing a kernel module or a user-space
application?
> I've been trying to create makefiles but at the moment the errors just rack
> up so much that I really don't know what part of the process is at fault. Is
> it the C or the headers or the wrong libraries? I'm kind of clueless to
> where the libraries might even be.
>
> Could someone please help me write a makefile for Linux headers and their
> libraries that is not in the usual /usr/include directory? The source files
> that I want to use will be in
> usr/src/linux-headers-3.13.0.32-generic/include. Also if they are in the
> makefile how will I include them in the source?
If you're writing a kernel module, you can't use the headers from /usr/include.
If you're writing a user-space application, yuo should use the headers from
/usr/include, not the one from /usr/src/linux-headers-3.13.0.32-generic/include.
Let us know what you're trying to do, what you've got sofar, and what errors
you're getting.
Cheers,
Anders
--
Anders Darander
EPO guidelines 1978: "If the contribution to the known art resides
solely in a computer program then the subject matter is not
patentable in whatever manner it may be presented in the claims."
^ permalink raw reply [flat|nested] 3+ messages in thread
* Writing makefiles for headers outside 'usr/include'
2014-08-26 8:31 ` Anders Darander
@ 2014-08-26 9:09 ` testlaster
0 siblings, 0 replies; 3+ messages in thread
From: testlaster @ 2014-08-26 9:09 UTC (permalink / raw)
To: kernelnewbies
Alright soo I want to access a piece of allocated memory through the PCI
device which is PLX9054 chip.
All I really need to do is gain access to it and dump the data from it
into a file.
Now the user space one would have been nice if I could use it but the
PCI.H in user space dev folder " /usr/include " is really limiting
OR I just dont know how I can do it with only the 8 or so functions
given to me there. Also I think permissions might be a problem in user
space.
Because as far as I know accessing a PCI devices Memory you need to
populate a struct with and give it a handle and then pass it on to
mmap() if im not mistaken.
But I cant even get to try and code it cause at the moment I cant even
seem to get the environment/makefiles set up correctly to be able to
link all of the needed .H
files and libraries in.
On 8/26/2014 10:31 AM, Anders Darander wrote:
> On 26 August 2014 10:09, testlaster <testlaster@gmail.com> wrote:
>> So the initial problem I'm having is that wanting to use headers and their
>> libs like module.h and init.d and pci.h for instance can't be used by simply
>> going #include <pci.h> because if you check the actual pci.h (40 lines or
>> so) file you will find that its allot shorter then the usual dev pci.h so
>> needless to say you can't use all the functions. So now I have to use
>> makefiles to point to other directories.
> Stop for a moment.
> What are you trying to do? Are you writing a kernel module or a user-space
> application?
>
>> I've been trying to create makefiles but at the moment the errors just rack
>> up so much that I really don't know what part of the process is at fault. Is
>> it the C or the headers or the wrong libraries? I'm kind of clueless to
>> where the libraries might even be.
>>
>> Could someone please help me write a makefile for Linux headers and their
>> libraries that is not in the usual /usr/include directory? The source files
>> that I want to use will be in
>> usr/src/linux-headers-3.13.0.32-generic/include. Also if they are in the
>> makefile how will I include them in the source?
> If you're writing a kernel module, you can't use the headers from /usr/include.
>
> If you're writing a user-space application, yuo should use the headers from
> /usr/include, not the one from /usr/src/linux-headers-3.13.0.32-generic/include.
>
> Let us know what you're trying to do, what you've got sofar, and what errors
> you're getting.
>
> Cheers,
> Anders
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-08-26 9:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-26 8:09 Writing makefiles for headers outside 'usr/include' testlaster
2014-08-26 8:31 ` Anders Darander
2014-08-26 9:09 ` testlaster
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).