Skip to main content
Associate
August 4, 2023
Question

OpenSTLinux without OP-TEE on stm32mp157c-dk2

  • August 4, 2023
  • 1 reply
  • 2186 views

Hello everyone,

I have the stm32mp157c-dk2 for performance evaluations. Our goal is to check if the CPU/GPU performance is good enough for our next productm which will be used as a GUI frontend.

I built the openstlinux (mickledore) as-is from github successfully.

Now, I want to customize the image for our needs.

As far as I see, Uboot and TF-A are not really optional, so they should be included in the project.

We do not need any "trusted" mechanisms in our project. My goal would be, building an image without optee and using the "optee-core", which is currently used by optee, under linux, thus making a dual-core linux system.

The machine configuration defines here:

BOOTSCHEME_LABELS += "optee"

At least in the configurations of uboot and tf-a optee doesn't seem to evaluate this option, uboot takes hard-coded in the default config optee as enabled.

 

My questions:

  • Is it possible to build without optee ?
  • If yes, is the "optee core" usable from kernel as "multicore" system ?
  • If yes, is it just enough to remove optee from BOOTSCHEME_LABELS (wic has to be ofcourse adapted), or are there any other steps/changes necessary ?

Thanks in advance

This topic has been closed for replies.

1 reply

August 4, 2023

To customize the image for your needs, you can follow these steps

  1. Include U-Boot and TF-A in your project: Since they are not optional components, make sure to include U-Boot and TF-A in your build.

  2. Remove trusted mechanisms: If you don't need any "trusted" mechanisms like OP-TEE, you can skip building it. Modify the configuration to exclude OP-TEE from the build site.

  3. Enable dual-core Linux system: To achieve a dual-core Linux system, use the "optee-core" that is currently used by OP-TEE under Linux. Adjust the configuration accordingly.

  4. Update BOOTSCHEME_LABELS: In the machine configuration, set BOOTSCHEME_LABELS to "optee" to ensure the system uses the correct boot scheme.

arslanAuthor
Associate
August 4, 2023

@unknown I did not expect such a fast answer. Thanks for that.

My understanding from your answer:

remove following entries:

OPTEE_IMAGE_INSTALL from MACHINE_EXTRA_RRECOMMENDS, but I should keep BOOTSCHEME_LABELS += "optee" ?

MACHINE_FEATURES:append = " ${@bb.utils.contains('BOOTSCHEME_LABELS', 'optee', 'optee', '', d)} " should be removed ?

MACHINE_FEATURES:append = " ${@bb.utils.contains('BOOTSCHEME_LABELS', 'optee', 'optee', '', d)} " in distro file?

and in image also to satisfy optee dependancy:

${@bb.utils.contains('COMBINED_FEATURES', 'optee', 'packagegroup-optee-core', '', d)} 

remove optee from COMBINED_FEATURES?

 

arslanAuthor
Associate
December 13, 2023

Hi everyone, 

Here are some other questions and concerns about removal of optee:

 

As stated in https://wiki.st.com/stm32mpu/wiki/STM32_MPU_OpenSTLinux_release_note

From this major release OpenSTLinux v5.0.0, only op-tee boot scheme is supported (no more trusted boot scheme)."

op-tee seems to be obligatory. Also according to https://wiki.st.com/stm32mpu/wiki/How_to_assign_an_internal_peripheral_to_an_execution_context

the assignment of a peripheral to a specific context seems to be done by optee, here I am not sure, if this is the only way.

Is there any easy way to remove optee in OpenSTLinux (mickledore) without inventing everything again?

It is also ok for me to configure everything with optee boot_scheme, what I really need, is, linux running on both cores. I don't want to reserve one core to optee, where I have no use case for it.

 

Currently, I am using stm32mp157c-dk2 board.

 

Thanks for any help