I rebuilt the linux Yocto project, starting from latest of branch LinuxImage3.0. I created my own image “requiring” the console-tdx-image and adding vulkan into it (IMAGE_INSTALL+=vulkan). I then created the SDK associated with this image.

I can then create and compile and run on target an application (c++) which is using vulkan and doing the first following elementary steps of the vulkan API initialization:

const VkApplicationInfo applicationInfo = {
    VK_MAKE_VERSION(1, 0, 0)

  const VkInstanceCreateInfo instanceCreateInfo = {

  VkInstance instance;
  std::cout << vkCreateInstance(&instanceCreateInfo, 0, &instance) << std::endl;

The vkCreateInstance call returns the error code VK_ERROR_INCOMPATIBLE_DRIVER (-9). Any idea why ? I checked and the image does contain the recipe “imx-gpu-viv” so I’m assuming it is using the VIVANTE GPU driver ? And the I.mx8 is supposed to support vulkan (at least this is what NXP claims on their website). Note (if that could make any difference) that I’m launching the application from a shell over ssh… (But I think that should not be a problem…)


Note that we are not the experts on Vulkan, so take the following with a grain of salt.

I assume you linked against the Vulkan loader, i.e. /usr/lib/ to get the driver into your binary. That loader can then search and call the vendor driver for the platform your on.
The BSP currently does not install a file which allows the loader to find the installed platform drivers, You could try to create that file for the Vivante driver.

i.e. create a file /etc/vulkan/icd.d/vivante.json with the following content:

   "file_format_version": "1.0.0",
   "ICD": {
      "library_path": "/usr/lib/vulkan/",
      "api_version": "1.0.59"

With the package ‘vulkan-demos’ installed in the image and that file created I could run the demos, i.e. ‘triangle’.


Hello @max.tx

Thanks for the answer. No problem, I’m not an expert either in vulkan nor in linux so … :wink:

You are correct, I link against “”.

I noticed my yocto built image does not contain the lib “/usr/lib/vulkan/” . Any idea what I should modify in my yocto project to get that in the image ? I started from the “console-tdx-image” and added “IMAGE_INSTALL+=vulkan” to get the vulkan loader libs in (which I do have); and in my local.conf file I set MACHINE ?= “apalis-imx8”. those are pretty much the only changes I made… Note I’m on the yocto bsp 3.0b4.

You will need for sure a graphical backend, for Apalis iMX8 the only choice is weston. And you will need the Vivante GPU drivers.

I built the qt5-x11-image to which I only needed to add vulkan-demos to get the demos running.

If you want to add on top of console-tdx-image I would expect the following to be enough:
'IMAGE_INSTALL+=“weston weston-init vulkan libvulkan-imx” ’
maybe additionally vulkan-bin which would provide vulkaninfo, likely one of the most basic vulkan use cases.


thanks for your help @max.tx, I now have vulkaninfo working and also vkCreateInstance in my application returns success… So far so good, I can now continue with the next steps :slight_smile:
Thanks again.

Perfect that it works. Thanks for your feedback.