From: testlaster@gmail.com (testlaster)
To: kernelnewbies@lists.kernelnewbies.org
Subject: My simple kernel module wont compile
Date: Thu, 11 Sep 2014 16:13:58 +0200 [thread overview]
Message-ID: <5411AE26.4070502@gmail.com> (raw)
In-Reply-To: <CAA8Xd+-ZLOfWwx5neKYW-Mw__W-5oDbY9Y7ok+GivXpNr4Oskg@mail.gmail.com>
Hi Gustavo
I tried your suggestions.
The first line didn't work because I seem to not have a build directory
there.
And the second one did exactly the same as mine did.
On 9/11/2014 3:49 PM, Gustavo Bittencourt wrote:
> Maybe you should replace the KERNEL_DIR definition in MAKEFILE. My
> suggestions:
>
> KERNEL_DIR:=/usr/src/linux-headers-$(shell uname -r)/build
> or
> KERNEL_DIR:=/lib/modules/$(shell uname -r)/build
>
> On Thu, Sep 11, 2014 at 8:12 AM, testlaster <testlaster@gmail.com
> <mailto:testlaster@gmail.com>> wrote:
>
> Hey Guys
>
> All im trying to do here is learn about make files and how to link
> linux header files stored in
> /usr/src/linux-headers-3.13.0-35-generic to my program that im
> writing.
> 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".
> 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.
> I will also have to edit registers of the PCI to be able to make
> triggers go off by setting bits high etc.
> But this is just an introduction to it all and im already having
> trouble compiling.
>
> Now im not 100% sure if its missing header files but the errors is
> quite large.
>
> This is my Pastebin of the C MODULE Code :
>
> pastebin.com/lWPBR8DJ <http://pastebin.com/lWPBR8DJ>
>
> And here it the PASTEBIN of my MAKEFILE and its errors:
>
> pastebin.com/ffT1F26N <http://pastebin.com/ffT1F26N>
>
> 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?
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> <mailto:Kernelnewbies@kernelnewbies.org>
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>
>
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140911/4364f8d6/attachment.html
next prev parent reply other threads:[~2014-09-11 14:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-11 11:12 My simple kernel module wont compile testlaster
2014-09-11 13:49 ` Gustavo Bittencourt
2014-09-11 14:13 ` testlaster [this message]
2014-09-11 15:06 ` Fwd: " Gustavo Bittencourt
2014-09-12 8:11 ` testlaster
2014-09-12 18:29 ` Bruno Guedes Souto
2014-09-11 15:11 ` Valdis.Kletnieks at vt.edu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5411AE26.4070502@gmail.com \
--to=testlaster@gmail.com \
--cc=kernelnewbies@lists.kernelnewbies.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).