Building the host

After you have downloaded the QHS product package and configured your build environment, all the components that you will need to build your host should be on your development host system at $QNX_TARGET.

Configuring the buildfile and building the image

  1. If you need a BSP other than the ones provided in the QHS 2.0 package, download it to your work area on your development host (see Download a board-specific host BSP in this chapter).
  2. As needed, modify your BSP buildfile to include the files you need. For example:

    • the libmod_qvm.a kernel module, by adding a [module=qvm] prefix to the buildfile line that includes procnto*. For example, change:

      LD_LIBRARY_PATH=/usr/lib:/lib:/lib/dll procnto-smp-instr

      to:

      [module=qvm] LD_LIBRARY_PATH=/usr/lib:/lib:/lib/dll procnto-smp-instr
    • the hypervisor files: qvm and, optionally for x86: the qvm-checkutility. For example:

      /sbin/qvm = qvm
      /bin/qvm-check = qvm-check
    • the vdev-*.so file for every vdev you want to make available for your guests. For example:

      vdev-8259.so
      vdev-hpet.so
      vdev-ioapic.so
      ...
      vdev-virtio-console.so
      vdev-virtio-input.so
      vdev-virtio-net.so
    • the smmuman service, architecture and board support libraries, and configuration files. For example, for a QHS system on a supported Renesas R-Car H3 board:

      /bin/smmuman-safety = smmuman-safety
      /bin/smmu-rcar3-safety.so = smmu-rcar3-safety.so
      /etc/smmuman/rcar-h3-safety.smmu = ./smmuman-config/rcar-h3-safety.smmu
    DANGER

    If you are using the QHS, you must specify that you want the safety variants of the kernel module and the vdevs:

    • Add [module=qvm-safety] instead of [module=qvm] for the kernel module safety variant.
    • Add vdev-*-safety.so for the safety variant of each vdev; for example, vdev-foo-safety.so.
    • Add the smmuman-*-safety files required for your board (see Installation in the SMMUMAN User's Guide).

    For more information, see the QNX Hypervisor for Safety 2.0 Safety Manual for your QHS release.

  3. If you will use the shmem-host shared memory sample application for testing, download the HHBSP (see The HHBSP framework) and copy the file from the HHBSP's prebuilt/ directory to your BSP's prebuilt/ directory.
  4. Include the VM configuration files (*.qvmconf) for the VMs you will run in your hypervisor system.
  5. From your BSP's root directory, run make to build the host IFS.

You should now be ready to build the guests (i.e., IFSs for QNX guests; kernels, initrd files, disks, etc. for Linux; see Building guests), then assemble the host and its guests into a disk image you can transfer to your target.