TechNexion / edm-yocto-bsp

(Archived, please change to use tn-imx-yocto-manifest) Yocto Project manifests
17 stars 18 forks source link

Nothing RPROVIDES 'optee-os-imx' in technexion pico-pi-imx7 board yocto or No device /dev/tee0 ? #22

Open gitgonewithwind opened 4 years ago

gitgonewithwind commented 4 years ago

hi, I try to add optee for pico-pi-imx7 board in current yocto version. I add below lines in local.conf .. DISTRO_FEATURES_append=" optee" IMAGE_INSTALL_append = " optee-client-imx optee-os-imx optee-test-imx" ..

but I can not pass bitbake fsl-image-qt5-validation-imx but I used a old version( a few month ago , I cloned it), It passed bitbake, I can find xtest. only there is no device /dev/tee? after boot

so I want to try the updated yocto source code version, but the error happended! I can find optee-test-imx_git.bb optee-client-imx _git.bb optee-os-imx_git.bb there but why can not bitbake? I want to know if pico-pi-imx7 board can support optee?

=======================error==================== current (2019/10/10)yocto version error:

error:ERROR: Nothing RPROVIDES 'optee-os-imx' (but /opt/oe/configs/imx7/edm_yocto/sources/meta-fsl-bsp-release/imx/meta-sdk/recipes-fsl/images/fsl-image-qt5-validation-imx.bb RDEPENDS on or otherwise requires it) NOTE: Runtime target 'optee-os-imx' is unbuildable, removing... Missing or unbuildable dependency chain was: ['optee-os-imx'] ERROR: Required build target 'fsl-image-qt5-validation-imx' has no buildable providers. Missing or unbuildable dependency chain was: ['fsl-image-qt5-validation-imx', 'optee-os-imx']

============my config================ my local.conf: MACHINE ??= 'pico-imx7' DISTRO ?= 'fsl-imx-xwayland' DISTRO_FEATURES_append=" optee" PACKAGE_CLASSES ?= "package_rpm" EXTRA_IMAGE_FEATURES ?= "debug-tweaks" USER_CLASSES ?= "buildstats image-mklibs image-prelink" PATCHRESOLVE = "noop" PARALLEL_MAKE ?= "-j 16" BB_NUMBER_THREADS ?= "16"

BB_DISKMON_DIRS ??= "\ STOPTASKS,${TMPDIR},1G,100K \ STOPTASKS,${DL_DIR},1G,100K \ STOPTASKS,${SSTATE_DIR},1G,100K \ STOPTASKS,/tmp,100M,100K \ ABORT,${TMPDIR},100M,1K \ ABORT,${DL_DIR},100M,1K \ ABORT,${SSTATE_DIR},100M,1K \ ABORT,/tmp,10M,1K" PACKAGECONFIG_append_pn-qemu-native = " sdl" PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl" CONF_VERSION = "1" BASE_BOARD ?= "pi" DISPLAY_INFO ?= "lcd" RF_FIRMWARES ?= "qca ath-pci" MACHINEOVERRIDES =. "${@'' if d.getVar('RF_FIRMWARES', True) is None else '%s:' % ':'.join([fw.lower() for fw in d.getVar('RF_FIRMWARES', True).split(' ') if fw])}" MACHINEOVERRIDES =. "${@'' if d.getVar('SOUNDCARD', True) is None else '%s:' % d.getVar('SOUNDCARD', True).lower()}"

DL_DIR ?= "${BSPDIR}/downloads/" ACCEPT_FSL_EULA = "1" IMAGE_INSTALL_append = " gnupg atftp atftpd ntp ntpdate fping optee-client-imx optee-os-imx optee-test-imx" EXTRA_IMAGE_FEATURES ?= "tools-debug tools-profile debug-tweaks eclipse-debug" IMAGE_INSTALL_append = " \ tcf-agent \ openssh-sftp-server \ gdbserver \ apache2 \ " CORE_IMAGE_EXTRA_INSTALL += " \ trace-cmd i2c-tools e2fsprogs-resize2fs \ bash bc cpio gawk tree rsync ldd vim nano \ diffutils coreutils findutils iputils \ git git-perltools libwebsockets vlan tcpdump \ " INHERIT += "extrausers" ROOT_PASSWORD = "***" EXTRA_USERS_PARAMS = "usermod -P ${ROOT_PASSWORD} root;" EXTRA_USERS_PARAMS += "useradd -P ${ROOT_PASSWORD} myuser;"

bblayers,conf:

LCONF_VERSION = "7"

BBPATH = "${TOPDIR}" BSPDIR := "${@os.path.abspath(os.path.dirname(d.getVar('FILE', True)) + '/../..')}"

BBFILES ?= "" BBLAYERS = " \ ${BSPDIR}/sources/poky/meta \ ${BSPDIR}/sources/poky/meta-poky \ \ ${BSPDIR}/sources/meta-openembedded/meta-oe \ ${BSPDIR}/sources/meta-openembedded/meta-webserver \ ${BSPDIR}/sources/meta-openembedded/meta-multimedia \ \ ${BSPDIR}/sources/meta-freescale \ ${BSPDIR}/sources/meta-freescale-3rdparty \ ${BSPDIR}/sources/meta-freescale-distro \ "

i.MX Yocto Project Release TechNexion Layers

BBLAYERS += " ${BSPDIR}/sources/meta-edm-bsp-release "

i.MX Yocto Project Release layers

BBLAYERS += " ${BSPDIR}/sources/meta-fsl-bsp-release/imx/meta-bsp " BBLAYERS += " ${BSPDIR}/sources/meta-fsl-bsp-release/imx/meta-sdk " BBLAYERS += " ${BSPDIR}/sources/meta-browser " BBLAYERS += " ${BSPDIR}/sources/meta-openembedded/meta-gnome " BBLAYERS += " ${BSPDIR}/sources/meta-openembedded/meta-networking " BBLAYERS += " ${BSPDIR}/sources/meta-openembedded/meta-python " BBLAYERS += " ${BSPDIR}/sources/meta-openembedded/meta-filesystems " BBLAYERS += " ${BSPDIR}/sources/meta-qt5 "

gitgonewithwind commented 4 years ago

@po-cheng-technexion do have some suggestion? I have found the optee-os-imx-tn_git.bb in meta-edm-bsp-release, and I config OPTEE in kernel config,but I still can not find the device /dev/tee ?

ls /dev/tee ls: cannot access '/dev/tee': No such file or directory fortress:/usr/include# xtest
Run test suite with level=0

TEE test application started with device [(null)]
Failed to open TEE context: 0xffff0008
fortress:/usr/include# tee-supplicant
ERR [576] TEES:main:663: failed to find an OP-TEE supplicant device
fortress:/usr/include#

gitgonewithwind commented 4 years ago

hi @po-cheng-technexion @richard-hu sorry to bother you. I want know: does pico-pi-imx7 board support optee? I find the git log in meta-edm-bsp-release ,showing that "Currently, only NXP EVK boards support OPTEE OS"


commit fb27d61ed927a66a58c0027249ecf8aad5ef53bc Author: Richard Hu richard.hu@technexion.com Date: Fri Aug 31 13:18:05 2018 +0800

patches: optee-os-imx: update patch to avoid build failure

Currently, only NXP EVK boards support OPTEE OS.
If a new board isn't supported by OPTEE OS, the new recipe will assign a default
supported board name by SOC type to pass it to build OPTEE to avoid build failure.
richard-hu commented 4 years ago

@gitgonewithwind

We didn't add custom config for PICO-IMX7 in OP-TEE yet. So if you add OP-TEE package in Yocto 2.4, it results in build failure. This commit intends to set build config as "mx7dsabresd" when compiling OP-TEE.

We haven't test OP-TEE on PICO-IMX7 yet. ARM mbed has ported OP-TEE on PICO-IMX7. Maybe it's helpful to refer to what they have done. ARM mbed

BR,

Richard

gitgonewithwind commented 4 years ago

@gitgonewithwind

We didn't add custom config for PICO-IMX7 in OP-TEE yet. So if you add OP-TEE package in Yocto 2.4, it results in build failure. This commit intends to set build config as "mx7dsabresd" when compiling OP-TEE.

We haven't test OP-TEE on PICO-IMX7 yet. ARM mbed has ported OP-TEE on PICO-IMX7. Maybe it's helpful to refer to what they have done. ARM mbed

BR,

Richard

Thanks. let me keep researching.

gitgonewithwind commented 4 years ago

@gitgonewithwind

We didn't add custom config for PICO-IMX7 in OP-TEE yet. So if you add OP-TEE package in Yocto 2.4, it results in build failure. This commit intends to set build config as "mx7dsabresd" when compiling OP-TEE.

We haven't test OP-TEE on PICO-IMX7 yet. ARM mbed has ported OP-TEE on PICO-IMX7. Maybe it's helpful to refer to what they have done. ARM mbed

BR,

Richard

the ARM mbed project is not yocto, if I port to yocto, do you know how complex it is ? or can I port from mx7dsabresd? thanks.

or replace meta-edm-bsp-release by meta-fsl-bsp-release-mbl ? @richard-hu

gitgonewithwind commented 4 years ago

@richard-hu Can I build imx7dsabresd image running on pico-imx7 baord? I only need an ethernet interface or same basic function for my app. if OK, I will try.

it looks complex for me to port PICO-IMX7 optee. so I want to directly to run imx7dsabresd optee image on PICO-IMX7 board.

gitgonewithwind commented 4 years ago

@richard-hu do you or your team have plan to port the optee into your source code. I am trying to do it by your refer ARM mbed. anyway, it looks like complex for me. if you have plan to do it. I will be very happy. Thanks.

richard-hu commented 4 years ago

@gitgonewithwind

Thanks for your feedback. I fix the build issue for "optee-test-imx_git". Fixes

Add Optee related packages in local.conf: IMAGE_INSTALL_append = " optee-client-imx optee-os-imx-tn optee-test-imx" Note: the Optee package is named optee-os-imx-tn instead of optee-os-imx.

Could you update to the latest Yocto 2.4 recipes via repo sync? The release image should contain the "OPTee" with "imx7sabresd" configuration.

Poring Op-Tee is not in our development plan of the next quarter so far. The plan probably will be postponed to next year. If you have special business plan, please contact TechNexion support team (sales@technexion.com).

BR,

Richard

gitgonewithwind commented 4 years ago

@gitgonewithwind

Thanks for your feedback. I fix the build issue for "optee-test-imx_git". Fixes

Add Optee related packages in local.conf: IMAGE_INSTALL_append = " optee-client-imx optee-os-imx-tn optee-test-imx" Note: the Optee package is named optee-os-imx-tn instead of optee-os-imx.

Could you update to the latest Yocto 2.4 recipes via repo sync? The release image should contain the "OPTee" with "imx7sabresd" configuration.

Poring Op-Tee is not in our development plan of the next quarter so far. The plan probably will be postponed to next year. If you have special business plan, please contact TechNexion support team (sales@technexion.com).

BR,

Richard

thank you very much. I did the fix before. I already got imx7sabresd optee.anyway(of course) the image of mx7sabresd optee can not boot up pico-imx7 board. so the update does not support pico-imx7. right? I want to know how complex to port optee for pico-imx7 referance to imx7sabresd and ARM mbed? you did the porting for imx7sabresd board. I want to you give me some suggestions for pico-imx7 optee porting. I can not waiting for next year. I want to port it by myself. and I want to know how many days I will spend to port it? I look forward to your reply very soon.

gitgonewithwind commented 4 years ago

@richard-hu I have sent an email to sales@technexion.com and cc to you. thank you very much for you suggestions.