<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Yes I did run sudo apt-get install build-essential
linux-headers-$(uname -r) to download the necessary headers. I also
ran an apt-get for source files and it did install a whole bunch of
them but Im not under the impression that you actually need the
source files as well since they suppose to come with the OS?<br>
<br>
The thing its complaining about... unistd_32.h appears to really be
missing. Could this be because of a 64Bit version of the OS? Maybes
just doesnt install it because its not necessary. But that wouldnt
make sense because in unistd.h the only include there is will be the
unistd_32.h and nowhere inside stands anything of
#include<unistd_64.h><br>
<br>
<br>
<br>
<div class="moz-cite-prefix">On 9/11/2014 5:06 PM, Gustavo
Bittencourt wrote:<br>
</div>
<blockquote
cite="mid:CAA8Xd+8W4YCvNEC4BMOnrzBFvSueQpjq2LjF98g-nqhA-UztBQ@mail.gmail.com"
type="cite">
<div dir="ltr">Did you install the kernel source or at least the
kernel headers?
<div><br>
</div>
<div>
<div>
<div class="gmail_quote">---------- Forwarded message
----------<br>
From: <b class="gmail_sendername">testlaster</b> <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:testlaster@gmail.com">testlaster@gmail.com</a>></span><br>
Date: Thu, Sep 11, 2014 at 11:13 AM<br>
Subject: Re: My simple kernel module wont compile<br>
To: <a moz-do-not-send="true"
href="mailto:kernelnewbies@kernelnewbies.org">kernelnewbies@kernelnewbies.org</a><br>
<br>
<br>
<div bgcolor="#FFFFFF" text="#000000"> Hi Gustavo<br>
<br>
I tried your suggestions.<br>
<br>
The first line didn't work because I seem to not have a
build directory there.<br>
And the second one did exactly the same as mine did.
<div>
<div class="h5"><br>
<br>
<div>On 9/11/2014 3:49 PM, Gustavo Bittencourt
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div><span>Maybe you should replace the </span><span>KERNEL_DIR
definition in MAKEFILE. My suggestions:</span></div>
<span>
<div><span><br>
</span></div>
KERNEL_DIR</span><span
style="color:rgb(0,0,0);font-family:verdana,arial,sans-serif;font-size:11.199999809265137px;background-color:rgb(249,249,249)">:=/usr/src/linux-headers-$(shell
uname -r)/build<br>
</span>
<div><span>or</span></div>
<div><span>KERNEL_DIR</span><span
style="color:rgb(0,0,0);font-family:verdana,arial,sans-serif;font-size:11.199999809265137px;background-color:rgb(249,249,249)">:=/lib/modules/$(shell
uname -r)/build</span><br>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Thu, Sep 11, 2014 at
8:12 AM, testlaster <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:testlaster@gmail.com"
target="_blank">testlaster@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote"
style="margin:0 0 0 .8ex;border-left:1px
#ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"> Hey
Guys<br>
<br>
All im trying to do here is learn about
make files and how to link linux header
files stored in /usr/src/<span></span><span>linux</span><span>-</span><span>headers</span><span>-</span><span>3</span><span>.</span><span>13</span><span>.</span><span>0</span><span>-</span><span>35</span><span>-</span><span>generic</span>
to my program that im writing.<br>
So far ive been getting the simplest of
Kernel Modules to compile and load in
Linux but nothing useful . The moment I
delve deeper I seem to get missing header
file errors when using "make".<br>
All I want to do is write from Kernel
space into user space and visa verse. I
will be dumping allocated PCI memory
blocks into files.<br>
I will also have to edit registers of the
PCI to be able to make triggers go off by
setting bits high etc.<br>
But this is just an introduction to it all
and im already having trouble compiling.<br>
<br>
Now im not 100% sure if its missing header
files but the errors is quite large.<br>
<br>
This is my Pastebin of the C MODULE Code
:<br>
<br>
<a moz-do-not-send="true"
href="http://pastebin.com/lWPBR8DJ"
target="_blank">pastebin.com/lWPBR8DJ</a>
<br>
<br>
And here it the PASTEBIN of my MAKEFILE
and its errors:<br>
<br>
<a moz-do-not-send="true"
href="http://pastebin.com/ffT1F26N"
target="_blank">pastebin.com/ffT1F26N</a><br>
<br>
ALSO...Does anybody know of a good
tutorial on how to write a PCI driver in
Kernel space using kernel modules...also
how to send data from and to the module
from UserSpace?<br>
</div>
<br>
_______________________________________________<br>
Kernelnewbies mailing list<br>
<a moz-do-not-send="true"
href="mailto:Kernelnewbies@kernelnewbies.org"
target="_blank">Kernelnewbies@kernelnewbies.org</a><br>
<a moz-do-not-send="true"
href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies"
target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
<br>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
Kernelnewbies mailing list
<a moz-do-not-send="true" href="mailto:Kernelnewbies@kernelnewbies.org" target="_blank">Kernelnewbies@kernelnewbies.org</a>
<a moz-do-not-send="true" href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a>
</pre>
</blockquote>
<br>
</div>
</div>
</div>
<br>
_______________________________________________<br>
Kernelnewbies mailing list<br>
<a moz-do-not-send="true"
href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
<a moz-do-not-send="true"
href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies"
target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
<br>
</div>
<br>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Kernelnewbies mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a>
<a class="moz-txt-link-freetext" href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a>
</pre>
</blockquote>
<br>
</body>
</html>