<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 20, 2015 at 6:54 PM, Greg KH <span dir="ltr"><<a href="mailto:greg@kroah.com" target="_blank">greg@kroah.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Tue, Oct 20, 2015 at 11:58:21AM -0400, Kenneth Adam Miller wrote:<br>
> So I'm building a uio kernel driver with buildroot, and I've gotten the driver<br>
> to compile, installed it and can insmod it in the final buildroot target after<br>
> booting the image with QEMU.<br>
><br>
> I'm on linux kernel version 3.14, and I followed the guide here:<br>
><br>
> <a href="https://www.kernel.org/doc/htmldocs/uio-howto/userspace_driver.html" rel="noreferrer" target="_blank">https://www.kernel.org/doc/htmldocs/uio-howto/userspace_driver.html</a><br>
><br>
> And it describes the location on where the device file that should be opened by<br>
> userland code as either one of two locations:<br>
><br>
> /dev/uioX, with X being a number<br>
><br>
> or /sys/class/uio/uioX<br>
><br>
> But the each of following returns nothing:<br>
><br>
> ls /dev/uio*<br>
> ls /sys/class/uio/<br>
><br>
> After I compile the uio example that is provided in the linux source at source/<br>
> drivers/uio/uio.c and uio_dmem_genirq.c, and insmod them, I do modprobe uio and<br>
> modprobe uio_dmem_genirq and each of those return nothing. However, I do see<br>
> that /sys/modules/uio and /sys/modules/uio_dmem_genirq <br>
<br>
</span>uio.ko is the uio "core", you need a uio driver in order to actually use<br>
it.<br>
<br>
uio_dmem_genirq is a uio driver, have you added the needed device tree<br>
entries to have it actually create a device for you? Without them, this<br>
driver can not find any hardware to bind to, and as such, no device node<br>
will ever be created.<br></blockquote><div><br></div><div>I didn't know about that. How do I do that? I'm using buildroot; I guess there's something missing in menuconfig or linux-menuconfig.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
I would suggest reading the UIO documentation, it should explain all of<br>
this for you already. If not, specific questions are always gladly<br>
answered.<br></blockquote><div><br></div><div>The one that I linked? I read that repeatedly. What other documentation is there to read? I also read from Essential Linux Device Drivers, and none of them explained that. There has to be something I'm missing. </div><div><br></div><div>Thanks a lot!</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
thanks,<br>
<br>
greg k-h<br>
</blockquote></div><br></div></div>