UIO Kernel Driver with Buildroot and QEMU

Kenneth Adam Miller kennethadammiller at gmail.com
Tue Oct 20 18:55:22 EDT 2015


Thanks! To anyone else that might know the answer thanks also (in advance)
:D

On Tue, Oct 20, 2015 at 5:56 PM, Mandeep Sandhu <mandeepsandhu.chd at gmail.com
> wrote:

> >> 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
>
> Have a look at this sample driver I wrote sometime back to trigger a UIO
> issue:
>
> https://github.com/mandeepsandhu/uio-hotplug-test
>
> I have not had the time to look at where it differs from your
> implemntation, but I'll leave that to you to figure out :)
>
> This create the /devuioX device file which the userspace code is opening.
>
> HTH,
> -mandeep
>
>
> >>
> >>
> >> What am I doing wrong? Or where are the respective device files that I'm
> >> supposed to use in my userland driver process?
> >>
> >> int fd = open("where is it!!?");
> >> mmap(...., fd,..);
> >
> >
> >
> > _______________________________________________
> > 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/20151020/66541303/attachment.html 


More information about the Kernelnewbies mailing list