All of lore.kernel.org
 help / color / mirror / Atom feed
From: greg@kroah.com (Greg KH)
To: kernelnewbies@lists.kernelnewbies.org
Subject: UIO Kernel Driver with Buildroot and QEMU
Date: Tue, 20 Oct 2015 15:54:04 -0700	[thread overview]
Message-ID: <20151020225404.GA3107@kroah.com> (raw)
In-Reply-To: <CAK7rcp_XQcSxn48OrzDX50TuAJNfV_57Kreoyk+FMjhmvzsiAA@mail.gmail.com>

On Tue, Oct 20, 2015 at 11:58:21AM -0400, Kenneth Adam Miller wrote:
> So I'm building a uio kernel driver with buildroot, and I've gotten the driver
> to compile, installed it and can insmod it in the final buildroot target after
> booting the image with QEMU.
> 
> I'm on linux kernel version 3.14, and I followed the guide here:
> 
> https://www.kernel.org/doc/htmldocs/uio-howto/userspace_driver.html
> 
> And it describes the location on where the device file that should be opened by
> userland code as either one of two locations:
> 
> /dev/uioX, with X being a number
> 
> or /sys/class/uio/uioX
> 
> But the each of following returns nothing:
> 
> ls /dev/uio*
> ls /sys/class/uio/
> 
> After I compile the uio example that is provided in the linux source at source/
> drivers/uio/uio.c and uio_dmem_genirq.c, and insmod them, I do modprobe uio and
> modprobe uio_dmem_genirq and each of those return nothing. However, I do see
> that /sys/modules/uio and /sys/modules/uio_dmem_genirq?

uio.ko is the uio "core", you need a uio driver in order to actually use
it.

uio_dmem_genirq is a uio driver, have you added the needed device tree
entries to have it actually create a device for you?  Without them, this
driver can not find any hardware to bind to, and as such, no device node
will ever be created.

I would suggest reading the UIO documentation, it should explain all of
this for you already.  If not, specific questions are always gladly
answered.

thanks,

greg k-h

  parent reply	other threads:[~2015-10-20 22:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-20 15:58 UIO Kernel Driver with Buildroot and QEMU Kenneth Adam Miller
2015-10-20 20:29 ` Kenneth Adam Miller
2015-10-20 21:56   ` Mandeep Sandhu
2015-10-20 22:55     ` Kenneth Adam Miller
2015-10-20 22:54 ` Greg KH [this message]
2015-10-20 23:40   ` Kenneth Adam Miller
2015-10-21  0:17     ` Greg KH
2015-10-21  0:28       ` Kenneth Adam Miller
2015-10-21  0:43         ` Greg KH
2015-10-21  0:48           ` Kenneth Adam Miller

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=20151020225404.GA3107@kroah.com \
    --to=greg@kroah.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.