Yocto 2.4 optee-os-imx

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Yocto 2.4 optee-os-imx

4,138 Views
patrickjakob
Contributor II

Hello support team,

I am using a board with an i.MX6 CPU and I have downloaded Yocto 2.4.

   DOWNLOAD_URL=https://source.codeaurora.org/external/imx/imx-manifest
   BRANCH=imx-linux-rocko
   MANIFEST=imx-4.9.88-2.0.0_ga.xml
   ./repo init -u $DOWNLOAD_URL -b $BRANCH -m $MANIFEST

I setup my own layer and machine file. When I try to bitbake core-image-minimal I always get the same error message.

   optee-os-imx doesn´t recognize this MACHINE

I am not able to avoid this error without editing optee-os-imx_git.bb. I dont want to build this package so I tried to remove it from the machine file but it doesnt work.

   MACHINE_FEATURES_remove = " optee"

The package will be added by file image_types_fsl.bbclass

   IMAGE_INSTALL_append = " ${@bb.utils.contains('COMBINED_FEATURES', 'optee', 'packagegroup-fsl-optee-imx', '', d)} "

Can you give a hint how to remove this package and avoid this error without editing optee-os-imx_git.bb?

regards,

Patrick Jakob

0 Kudos
9 Replies

3,011 Views
csoapy
Contributor III

This works on imx-4.14.98-2.0.1_patch BSP:

IMAGE_INSTALL_remove += " packagegroup-fsl-optee-imx"

0 Kudos

3,010 Views
patrickjakob
Contributor II

Hi radhika.somaiya@volansystech.com‌,

I have tried many different things, but nothing work. I also have tried to comment out this line but it also fails.

image_types_fsl.bbclass will included by Distro fsl-imx-x11.conf and by my machine file include imx-base.inc. Both include image_types_fsl.bbclass.

Let me explain what I have tried.

  • I comment out this line -> doesnt work
  • I tried to create a own distro which includes fsl-imx-x11 and remove image_types_fsl.bbclass -> doesnt work.
  • I removed the image_types_fsl.bbclass by my machine file IMAGE_CLASSES_remove = "image_types_fsl" ->doesnt work
  • I created a own image_types_fsl.bbclass which not contains anything with optee and include it -> doesnt work.

I also have build some other custom boards which also fails with the same error, e.g.

  1. DISTRO=fsl-imx-x11 MACHINE=apalis-imx6 . fsl-setup-release.sh -b apalis-imx6-x11
  2. bitbake core-image-minimal
  3. Also fails with same error

So I dont know what I can do more.

Regards

0 Kudos

3,010 Views
johnadamson
Contributor III

Hi,

What I'm going to suggest neither avoids editing optee-os-imx_git.bb nor removes the optee package, but I believe it allowed me to get past the same problem after I created my own machine name.  

To optee-os-imx_git.bb, I added "PLATFORM_FLAVOR_mymachine = "mx8mqevk" where the second parameter is the closest supported machine without the leading "i".  

Hope this helps,

John

0 Kudos

3,011 Views
patrickjakob
Contributor II

Hi,

thanks for your answer, but I know how to bypass this error. In my opinion it´s not the correct way to modify an existing recipe. Either you should add a bbappend and add your machine file or remove it by some "remove" command.

To bypass this I have modified the python() function and add my machine to it, but that could be not the correct way. So I am looking for a clean way to remove this package because I don´t want to use it. It is not necessary for my image.

Anyone else have an idea?

best regards,

Patrick

0 Kudos

3,011 Views
diegoadrian
NXP Employee
NXP Employee

Hello,

Have you tried removing the package with: 

IMAGE_INSTALL_remove += <your package name>

Just remember that removing the package could have some dependencies problem.

Best regards,

Diego.

0 Kudos

3,011 Views
patrickjakob
Contributor II

Hello diegoadrian‌,

yes I have tried this, but it doesn´t work. I add to my machine file

   IMAGE_INSTALL_remove += "optee-os-imx"

After that I tried to build the core-image-minimal. While yocto is parsing the recipes I get the following error message:

ERROR: /.../yocto-2.4/sources/meta-fsl-bsp-release/imx/meta-bsp/recipes-security/optee-imx/optee-os-imx_git.bb: optee-os-imx doesn´t recognize this MACHINE

ERROR: Failed to parse recipe: /.../yocto-2.4/sources/meta-fsl-bsp-release/imx/meta-bsp/recipes-security/optee-imx/optee-os-imx_git.bb

Any idea how to solve this without modifing the recipe itself?

Best regards,

Patrick

0 Kudos

3,011 Views
diegoadrian
NXP Employee
NXP Employee

Hello,

Your problem seems to be because your machine is not compatible with our BSP. Unfortunately, this is out of our scope. You can see the bellow web-pages, probably it can help you. Otherwise, I recommend you to go with professional services support, they could help you:

https://www.yoctoproject.org/docs/1.4.2/dev-manual/dev-manual.html#platdev-newmachine

https://www.lynxbee.com/adding-new-machine-in-yocto-bitbake-meta-layers/

https://contact.nxp.com/CAM802_PRO_SVCS

I apologize if this could be a problem for you.

Best regards,

Diego.

0 Kudos

3,011 Views
patrickjakob
Contributor II

Hello,

We are a board manufacturer which are using several CPUs from NXP. e.G. i.MX6. in Yocto 2.1 and 2.2 everything works fine with our own machine file. I think since NXP released BSP support for Yocto 2.4 the problem occurs. I think there you add this recipe. In my Opinion there are 2 problems.

1.) I am unable to remove the recipe (optee-os-imx_git.bb) if I am using your distro fsl-imx-x11. In my opinion I am should be able to remove this.

2.) Through the reason that I am unable to remove this recipe, I must use it. My problem is that I am forced to have specific naming of my machine file. Because your code looking for the name of the machine file and then trying to match the machine. It fails if my machine file doesn´t start with the letters "imx". I tried to create an append file to add another statement to support my machine, but it doesn´t work. I am only able to build it, if I add my machine name manually to this recipe but that isn´t the goal of Yocto to modify directly in the recipe. Normally it should be possible to modify it by adding some bbappend files.

...

python () {

   machine = d.getVar("MACHINE", True)

   import re

   if re.match('imx6qpdlsolox', machine):

      subplatform = 'mx6qsabresd'

   if re.match('imx6ul7d', machine):

      subplatform = 'mx6ulevk'

   if re.match('imx6ull', machine):

      subplatform = 'mx6ullevk'

   if re.match('imx', machine):

      subplatform = 'machine[1:]'

   else

         bb.fatal("optee-os-imx doesn´t recognize this MACHINE")

   d.setVar("OPTEE_PLATFORM", subplatform)

}

...

Can you tell me how to add another statement (via bbappend) to this recipe?

Best regards,

Patrick

0 Kudos

3,010 Views
radhikasomaiya
Senior Contributor II

Hi Patrick Jakob,

Have you tried by comment out "IMAGE_INSTALL_append = " ${@bb.utils.contains('COMBINED_FEATURES', 'optee', 'packagegroup-fsl-optee-imx', '', d)} "" line in image_types_fsl.bbclass file?

0 Kudos