Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inquiry on GPU Driver Integration for Rock Pi 4B with OP-TEE #299

Open
markhsumark opened this issue Nov 11, 2024 · 6 comments
Open

Inquiry on GPU Driver Integration for Rock Pi 4B with OP-TEE #299

markhsumark opened this issue Nov 11, 2024 · 6 comments

Comments

@markhsumark
Copy link

Hi, I am a student researching TrustZone, with a keen interest in the integration of GPU functionality within TrustZone environments.

Previously, I followed the OP-TEE documentation to compile and flash the OP-TEE branch 4.3.0 project into the Rock Pi 4B, and I successfully got it running.

However, I noticed that the Linux kernel provided by OP-TEE does not include the GPU driver (Mali T860 Midgard) for the Rock Pi 4B, which prevents me from utilizing the GPU driver. Additionally, even if we manually port the Midgard driver into the Linux kernel, we encounter issues due to the kernel's newer version, which causes compilation errors for the Midgard driver.

We are considering the following approaches moving forward:

  1. Switch to the Linaro 4.14 version of the Linux kernel and manually add the Midgard driver.
  2. Use a pre-existing Linux kernel developed by others (rockchip-linux).

Here are some of our attempts for approach 1:
setting:
image
building result:
image

Thanks.

@jenswi-linaro
Copy link
Contributor

Perhaps it's easier to only use the kernel provided for the Rock Pi 4, it might just work.

@markhsumark
Copy link
Author

markhsumark commented Nov 12, 2024

Thank you for your replay.
Thank you for your reply. I was trying to replace the Linux kernel with the Rock Pi 4B-specific kernel from https://github.com/radxa/kernel/tree/stable-4.4-rockpi4, and I successfully built it.

Now, after booting up, I can see the message: "Welcome to Buildroot, type 'root' or 'test' to login."

However, it's unfortunate that I am seeing many "failed" messages in the kernel startup log.
image
I suspect this is because the DTS files in rockpi4's linux kernel do not set the information about TEE.
image

Could you please guide me on how to resolve this issue?

Thanks!

@jenswi-linaro
Copy link
Contributor

Please try to apply this patch linaro-swg/linux@d3269f7

@markhsumark
Copy link
Author

Thanks you for your reply.

After adding the code, now I can run the optee_example_hello_world!!

By the way, why are there so many "failed" messages in the kernel startup log? I am worried that these logs might have a negative impact.

@jenswi-linaro
Copy link
Contributor

I guess you'll have them both with and without OP-TEE. Perhaps @radaxa can answer that.

@markhsumark
Copy link
Author

Thank you for your assistance; I have successfully resolved all the issues.
image

I will continue to reach out to Radaxa for any future issues.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants