Integrating a vdev
After you have written the code for your vdev, you must add it to your hypervisor system.
Adding a vdev to your hypervisor system
For up-to-date instructions on adding a vdev to your hypervisor system, go to the QNX Hypervisor GitLab Repository at https://gitlab.com/qnx/hypervisor.
Setting PATH and LD_LIBRARY_PATHin the QNX OS User's Guide and
Diagnostics and debuggingin the Programmer's Guide).
If your vdev emulates a physical device (e.g., vdev pl011), your guest OS may already have a device driver that will work with the vdev. If your guest doesn't have such a driver, you will need to write one and include it in your guest. For QNX guests, refer to the QNX OS documentation; for other guests, refer to the appropriate documentation for those OSs.
We recommend that you start with one of the vdev examples available in the GitLab repository mentioned above, go through the steps described therein to add it to your system, and confirm that everything works as expected. Our examples work, so you can focus on making sure that you know how to implement a vdev. Then, when you have your own vdev ready to test, adding the vdev to your system and configuring the VM will be familiar tasks.
Compiling a vdev
If you compile a vdev using the QNX recursive makefile structure, you need
vdev/common.mk,
vdev/Makefile, and the entire
vdev/name directory
(e.g., vdev/trace).
For more information about this makefile structure, see the
Conventions for Recursive Makefiles and Directories
chapter in
the QNX OS Programmer's Guide.
This build system is just one way of compiling a vdev; you can use another system if you prefer.
Documented procedures showing how to compile in Windows and Linux are provided within the vdev source code section of the GitLab repository.
