I'm building an Yocto image using on a Var-som-mx8m-nano with Scarthgap. (https://dev.variscite.com/var-som-mx8m-nano/mx8mn-yocto-scarthgap-6.6.52_2.2.0-v1.1/yocto-build-rele...)
I've followed this guide: https://community.nxp.com/t5/i-MX-Processors/Building-optee-examples-and-trusted-Apps-in-Yocto-bitba...
Although this answer is old, I've added the Optee-examples version 4.7, and populated the .bb file with the information found in that link. The local.conf file I edited according to the official docs since the advice on the answer is depreciated.
However, the rest of the optee files are version 4.4. If I try to bitbake optee-examples without adding the .bb file, I get an error saying there's no target.
I ran bitbake -DDD optee-examples
I get the following error:
DEBUG: Attempting to disable network for do_install
DEBUG: SOURCE_DATE_EPOCH: 1627299039
DEBUG: Executing task do_install
DEBUG: optee-examples-4.7.0-r0 do_install: Executing python function extend_recipe_sysroot
DEBUG: optee-examples-4.7.0-r0 do_install: Python function extend_recipe_sysroot finished
DEBUG: optee-examples-4.7.0-r0 do_install: Executing shell function do_install
ERROR: optee-examples-4.7.0-r0 do_install: ExecutionError('/home/optee/var-fsl-yocto/build_xwayland/tmp/work/imx8mn_var_som-poky-linux/optee-examples/4.7.0/temp/run.do_install.53250', 1, None, None)
ERROR: Logfile of failure stored in: /home/optee/var-fsl-yocto/build_xwayland/tmp/work/imx8mn_var_som-poky-linux/optee-examples/4.7.0/temp/log.do_install.53250
Log data follows:
| DEBUG: Executing python function extend_recipe_sysroot
| NOTE: Direct dependencies are ['/home/optee/var-fsl-yocto/sources/meta-imx/meta-imx-bsp/recipes-security/optee/optee-client_4.4.0.imx.bb:do_populate_sysroot', '/home/optee/var-fsl-yocto/sources/meta-imx/meta-imx-bsp/recipes-security/optee/optee-os_4.4.0.imx.bb:do_populate_sysroot', '/home/optee/var-fsl-yocto/sources/poky/meta/recipes-core/glibc/glibc_2.39.bb:do_populate_sysroot', '/home/optee/var-fsl-yocto/sources/poky/meta/recipes-devtools/gcc/gcc-cross_13.3.bb:do_populate_sysroot', '/home/optee/var-fsl-yocto/sources/poky/meta/recipes-devtools/gcc/gcc-runtime_13.3.bb:do_populate_sysroot', '/home/optee/var-fsl-yocto/sources/poky/meta/recipes-devtools/quilt/quilt-native_0.67.bb:do_populate_sysroot', 'virtual:native:/home/optee/var-fsl-yocto/sources/poky/meta/recipes-devtools/patch/patch_2.7.6.bb:do_populate_sysroot', 'virtual:native:/home/optee/var-fsl-yocto/sources/poky/meta/recipes-devtools/pseudo/pseudo_git.bb:do_populate_sysroot', 'virtual:native:/home/optee/var-fsl-yocto/sources/poky/meta/recipes-devtools/python/python3-pycryptodome_3.20.0.bb:do_populate_sysroot', 'virtual:native:/home/optee/var-fsl-yocto/sources/poky/meta/recipes-devtools/python/python3_3.12.6.bb:do_populate_sysroot']
| NOTE: Installed into sysroot: []
| NOTE: Skipping as already exists in sysroot: ['optee-client', 'optee-os', 'base-files', 'base-passwd', 'gettext-minimal-native', 'glibc', 'libxcrypt', 'util-linux-libuuid', 'zlib', 'binutils-cross-aarch64', 'cmake-native', 'gcc-cross-aarch64', 'gcc-runtime', 'libgcc', 'libtool-native', 'm4-native', 'opkg-utils', 'quilt-native', 'cracklib', 'libpam', 'shadow-sysroot', 'shadow', 'texinfo-dummy-native', 'linux-libc-headers', 'attr', 'openssl-native', 'expat-native', 'ncurses-native', 'util-linux-libuuid-native', 'zlib-native', 'flex-native', 'gnu-config-native', 'libedit-native', 'make-native', 'patch-native', 'perl-native', 'pseudo-native', 'python3-build-native', 'python3-cffi-native', 'python3-flit-core-native', 'python3-installer-native', 'python3-packaging-native', 'python3-pycparser-native', 'python3-pycryptodome-native', 'python3-pyproject-hooks-native', 'python3-setuptools-native', 'python3-wheel-native', 'python3-native', 'bzip2-native', 'libnsl2-native', 'libtirpc-native', 'shadow-native', 'unzip-native', 'xz-native', 'zstd-native', 'attr-native', 'gdbm-native', 'gmp-native', 'libbsd-native', 'libffi-native', 'libmd-native', 'libmpc-native', 'mpfr-native', 'sqlite3-native']
| DEBUG: Python function extend_recipe_sysroot finished
| DEBUG: Executing shell function do_install
| install: cannot stat '/home/optee/var-fsl-yocto/build_xwayland/tmp/work/imx8mn_var_som-poky-linux/optee-examples/4.7.0/build/ta/*': No such file or directory
| WARNING: exit code 1 from a shell command.
ERROR: Task (/home/optee/var-fsl-yocto/sources/meta-imx/meta-imx-bsp/recipes-security/optee/optee-examples_4.7.0.bb:do_install) failed with exit code '1'
DEBUG: Teardown for bitbake-worker
DEBUG: Teardown for bitbake-worker
NOTE: Tasks Summary: Attempted 1508 tasks of which 1507 didn't need to be rerun and 1 failed.
NOTE: Writing buildhistory
DEBUG: Executing python function buildhistory_write_sigs
DEBUG: Python function buildhistory_write_sigs finished
DEBUG: Executing shell function buildhistory_commit
DEBUG: Shell function buildhistory_commit finished
NOTE: Writing buildhistory took: 5 seconds
Summary: 1 task failed:
/home/optee/var-fsl-yocto/sources/meta-imx/meta-imx-bsp/recipes-security/optee/optee-examples_4.7.0.bb:do_install
Summary: There were 2 WARNING messages.
Summary: There was 1 ERROR message, returning a non-zero exit code.
I am stuck:
Any help is appreciated.
Please try to keep the versions consistent. The default BSP includes an optee file and example recipes for reference.
Regards
Harvey
Thanks! If the default bsp includes optee examples, how would I access those without bitbake optee-examples? My goal is to use the examples to help build a TA for a use case I have.
To add on, since I can't edit my original reply. All the other optee files I was able to build successfully.So if there's a way to access the optee examples if they are included, that would be optimal.
There's something within Scarthgap that really doesn't like optee-examples. I was able to find the 4.4 version of optee-examples and I still got an error:
| install: cannot stat '/home/optee/var-fsl-yocto/build_xwayland/tmp/work/imx8mn_var_som-poky-linux/optee-examples/4.4.0/build/ta/*': No such file or directory
| WARNING: exit code 1 from a shell command.
ERROR: Task (/home/optee/var-fsl-yocto/sources/meta-imx/meta-imx-bsp/recipes-security/optee/optee-examples_4.4.0.bb:do_install) failed with exit code '1'