<div dir="ltr">Am I missing something? Are those drivers, uio, and uio_dmem_genirq not supposed to created device files in the linux VFS, either /dev or some subfolder /sys? <div><br></div><div>I am using mdev (<a href="http://buildroot.org/downloads/manual/manual.html#_dev_management">http://buildroot.org/downloads/manual/manual.html#_dev_management</a>), I can see the tty devices in /dev, so I know that the devices are being recognized by the kernel. In addition, insmod'ing the same device more than once gives an error where the kernel says that the file already exists.</div><div><br></div><div>I considered the possibility that these .c files are in fact skeleton files, where users are supposed to create their own uio driver and rely on the services or functions that these provide. But it doesn't explicitly say that anywhere in the guide that I read; if this were the case, why wouldn't it? </div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 20, 2015 at 11:58 AM, Kenneth Adam Miller <span dir="ltr"><<a href="mailto:kennethadammiller@gmail.com" target="_blank">kennethadammiller@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 dir="ltr">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.<div><br></div><div>I'm on linux kernel version 3.14, and I followed the guide here:</div><div><br></div><div><a href="https://www.kernel.org/doc/htmldocs/uio-howto/userspace_driver.html" target="_blank">https://www.kernel.org/doc/htmldocs/uio-howto/userspace_driver.html</a><br></div><div><br></div><div>And it describes the location on where the device file that should be opened by userland code as either one of two locations:</div><div><br></div><div>/dev/uioX, with X being a number</div><div><br></div><div>or /sys/class/uio/uioX</div><div><br></div><div>But the each of following returns nothing:</div><div><br></div><div>ls /dev/uio*</div><div>ls /sys/class/uio/</div><div><br></div><div>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 <br></div><div><br></div><div><br></div><div>What am I doing wrong? Or where are the respective device files that I'm supposed to use in my userland driver process?</div><div><br></div><div>int fd = open("where is it!!?");</div><div>mmap(...., fd,..);</div></div>
</blockquote></div><br></div>