<div dir="ltr"><div><span style="color:rgb(0,0,136);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono',monospace,serif;font-size:12px;line-height:21px">Maybe you should replace the </span><span style="color:rgb(0,0,136);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono',monospace,serif;font-size:12px;line-height:21px">KERNEL_DIR definition in MAKEFILE. My suggestions:</span></div><span style="color:rgb(0,0,136);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono',monospace,serif;font-size:12px;line-height:21px"><div><span style="color:rgb(0,0,136);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono',monospace,serif;font-size:12px;line-height:21px"><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 style="color:rgb(0,0,136);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono',monospace,serif;font-size:12px;line-height:21px">or</span></div><div><span style="color:rgb(0,0,136);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono',monospace,serif;font-size:12px;line-height:21px">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 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 style="color:rgb(0,68,0);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono',monospace,serif;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:21px;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"></span><span style="color:rgb(0,0,0);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono',monospace,serif;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:21px;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;display:inline!important;float:none;background-color:rgb(255,255,255)">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 style="color:rgb(204,34,0);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono',monospace,serif;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:21px;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">35</span><span style="color:rgb(0,68,0);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono',monospace,serif;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:21px;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">-</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 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 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 href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
<a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
<br></blockquote></div><br></div>