I am trying to run secure hello-world example on imx8m-mini without success.
My board is from variscite running Linux kernel 4.14.78. I followed instruction to compile tee-supplicant and hello-world host and secure examples.
Running tee-supplicant gives me the error:
ERR  TSUP:main:694: failed to find an OP-TEE supplicant device
In my kernel configuration I have:
# TEE drivers
And in Device tree I added:
compatible = "linaro,optee-tz";
method = "smc";
When system boots I see no /dev/tee in /dev folder and dmesg output is:
optee: probing for conduit method from DT.
optee: api uid mismatch
I tried changing "smc" to "hvc" in device tree method, but the result is the same.
How can I fix this so I can run the code hello-world examples?
Sorry for posting again, but I'm not able to edit my previous post anymore (time expired!?).
BTW: According to NXPs "i.MX Porting Guide", the device tree node for optee on i.MX8 processors is added dynamically by u-boot, so you're not meant to patch the devicetree manually.
just in case anyone else has this problem and finds this thread, this worked for me with Variscite VAR-SOM-MX8M-MINI, Yocto Warrior 2.7 and kernel 4.19.35:
I added " optee" by a MACHINE_FEATURES_append statement in “local.conf”. (Don't make the same mistake as me and put it in a recipe, as this will probably result in “imx-atf” and “imx-boot” builds without optee support, due to delayed statement evaluation.)
DISTRO_FEATURES of the fsl distro should contain "optee" by default, so "optee" ends up in COMBINED_FEATURES and all modifications for this feature are applied.
After modprobing the kernel module, xtest runs without problems.
Unfortunately, we cannot provide support for the Variscite BSP. Since is a different one that we currently support for our Boards. I suggest you is to submit a ticket with Variscite.
I apologize for the inconveniences this could give you.