Support library for uio_pci_generic device drivers.
- Create your own repository.
- Add Makefile with following recipe: (example from liva/xhci_uio)
TARGET_KEYWORDis used to look up a target device fromlspci -voutputs.TARGET_DEFAULT_DRIVERis used bymake restorecommand to give control of a device to default kernel driver.ARGSis passed to a.out whenmake run.
OBJS= main.o keyboard.o xhci.o usb.o hub.o
TARGET_PCI_BUS_ID= # Leave blank unless you want to specify device manually.
TARGET_KEYWORD=XHCI # This will be overrided by TARGET_PCI_BUS_ID if specified.
TARGET_DEFAULT_DRIVER=xhci_hcd
ARGS=
-include pcie_uio/common.mk
- Run following command to add this repo as a submodule.
git submodule add https://github.com/PFLab-OS/pcie_uio.git
make checkto ensure the device is there.make loadto give a device control to uio_pci_generic.- After that,
make runto start and test your driver. make restoremay be able to restore the control toTARGET_DEFAULT_DRIVER, or it may cause a kernel panic.
- Specify
TARGET_PCI_BUS_IDwhenTARGET_KEYWORDis not worked or ambiguous (e.g. multiple devices). example:02:00.0
There are some examples using this library: