Closed HakonToemte closed 1 year ago
Hi @HakonToemte , Seems this error occurs in some cases, but I've not reproduced it. Let's check these items to figure it out:
teaclave/teaclave-trustzone-sdk-build:0.3.0
. I'm not sure if the building environment causes this error.file ./hello_world-rs
# ldd ./hello_world-rs
Thanks!
Thanks for the quick response! My building environment is built by first following OP-TEE with Rust, then Build & Install, then Run Rust applications. I have not used docker. I hope that answers the first question. I am also using Ubuntu 22.04 if thats relevant.
file ./hello_world-rs
ldd ./hello_world-rs
@HakonToemte It seems the hello_world-rs
you built is a 32-bit (arm) ELF which is not compatible with the 64-bit (aarch64) QEMUv8 platform. Suggest to unset ARCH
and rebuild the host app, reference: https://github.com/apache/incubator-teaclave-trustzone-sdk#build--install.
It works now :)
So now if i want to change the value, i just change 29 to 30 for example, then compile the example again and update the shared_folder? I ask because i often end up doing something wrong, and then normal world won't start and i end up building everything from scratch again.
If I want to create a new CA/TA, is there a good guide for that?
Either way thanks :)
then compile the example again and update the shared_folder
Yes, you just need to recompile the example you've modified:
$ make -C examples/your-example
Then copy the CA and TA into shared_folder:
$ cp example/your-example/host/target/aarch64-unknown-linux-gnu/release/[your CA] path/to/shared/folder
$ cp example/your-example/ta/target/aarch64-unknown-optee-trustzone/release/[your TA] path/to/shared/folder
After copying ta into /lib/optee_armtz
you can run the new CA you built.
If I want to create a new CA/TA, is there a good guide for that?
There is no documentation about writing a new CA/TA now. You can follow these steps to write your Rust example:
hello_world-rs
example and modify the code upon it.proto/src/lib.rs
host/Makefile
and host/Cargo.toml
uuid
and modify uuid.txt
That was tremendous help, thank you very much!
Hello, I wish to develop a new CA/TA in OPTEE using Rust with QEMUv8. I have been following this guide, and created a shared folder to run these applications in QEMU. I am now trying to see if i can alter hello_world-rs to use a different number than the original example does. But even though it seems that i have succesfully shared the installed examples, I get error: not found.![Issue](https://user-images.githubusercontent.com/55509202/191357278-7f8db593-b575-403f-8e5c-01797bcfde87.png)
I found this issue, and I can run hello_world-rs, but that's the original and unaltered example. I want to run my new, altered version.
The file should be executable.
![image](https://user-images.githubusercontent.com/55509202/191360991-bc538270-1ff6-4e63-9004-e39a87a65660.png)
I am very thankful for any help with this!