You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@teaclave.apache.org by GitBox <gi...@apache.org> on 2022/09/20 20:48:32 UTC

[GitHub] [incubator-teaclave-trustzone-sdk] HakonToemte opened a new issue, #94: ./hello_world-rs not found in shared folder

HakonToemte opened a new issue, #94:
URL: https://github.com/apache/incubator-teaclave-trustzone-sdk/issues/94

   Hello, I wish to develop a new CA/TA in OPTEE using Rust with QEMUv8. I have been following this [guide](https://github.com/apache/incubator-teaclave-trustzone-sdk/blob/master/README.md), 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](https://github.com/apache/incubator-teaclave-trustzone-sdk/issues/67), and I can run hello_world-rs, but that's the original and unaltered example. I want to run my new, altered version. 
   ![image](https://user-images.githubusercontent.com/55509202/191358267-b873b283-622f-406f-b9dd-5c24ed18456e.png)
   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!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@teaclave.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@teaclave.apache.org
For additional commands, e-mail: dev-help@teaclave.apache.org


[GitHub] [incubator-teaclave-trustzone-sdk] HakonToemte commented on issue #94: ./hello_world-rs not found in shared folder

Posted by GitBox <gi...@apache.org>.
HakonToemte commented on issue #94:
URL: https://github.com/apache/incubator-teaclave-trustzone-sdk/issues/94#issuecomment-1254935750

   That was been tremendous help, thank you very much!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@teaclave.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@teaclave.apache.org
For additional commands, e-mail: dev-help@teaclave.apache.org


[GitHub] [incubator-teaclave-trustzone-sdk] HakonToemte commented on issue #94: ./hello_world-rs not found in shared folder

Posted by GitBox <gi...@apache.org>.
HakonToemte commented on issue #94:
URL: https://github.com/apache/incubator-teaclave-trustzone-sdk/issues/94#issuecomment-1253763258

   ![image](https://user-images.githubusercontent.com/55509202/191520388-4a8574a4-f1c6-43ac-9673-17824a724e0d.png)
   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 :)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@teaclave.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@teaclave.apache.org
For additional commands, e-mail: dev-help@teaclave.apache.org


[GitHub] [incubator-teaclave-trustzone-sdk] DemesneGH commented on issue #94: ./hello_world-rs not found in shared folder

Posted by GitBox <gi...@apache.org>.
DemesneGH commented on issue #94:
URL: https://github.com/apache/incubator-teaclave-trustzone-sdk/issues/94#issuecomment-1253488204

   @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.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@teaclave.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@teaclave.apache.org
For additional commands, e-mail: dev-help@teaclave.apache.org


[GitHub] [incubator-teaclave-trustzone-sdk] DemesneGH commented on issue #94: ./hello_world-rs not found in shared folder

Posted by GitBox <gi...@apache.org>.
DemesneGH commented on issue #94:
URL: https://github.com/apache/incubator-teaclave-trustzone-sdk/issues/94#issuecomment-1253143751

   Hi @HakonToemte ,
   Seems this error occurs in some cases, but I've not reproduced it. Let's check these items to figure it out:
   - What's your building environment? We recommend using our docker `teaclave/teaclave-trustzone-sdk-build:0.3.0`. I'm not sure if the building environment causes this error.
   - Check the file type in your building environment: `file ./hello_world-rs`
   - Check the dependency libraries in QEMU: `# ldd ./hello_world-rs`
   
   Thanks!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@teaclave.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@teaclave.apache.org
For additional commands, e-mail: dev-help@teaclave.apache.org


[GitHub] [incubator-teaclave-trustzone-sdk] DemesneGH commented on issue #94: ./hello_world-rs not found in shared folder

Posted by GitBox <gi...@apache.org>.
DemesneGH commented on issue #94:
URL: https://github.com/apache/incubator-teaclave-trustzone-sdk/issues/94#issuecomment-1254528931

   > 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:
   1. Duplicate the `hello_world-rs` example and modify the code upon it.
   2. Decide commands the host app sends to TA, and modify `proto/src/lib.rs`
   3. In host:
        - modify the app name in `host/Makefile` and `host/Cargo.toml`
        - write your logic in host/src/main.rs
   4. In TA:
        - generate a random `uuid` and modify `uuid.txt`
        - write your logic in ta/src/main.rs
   5. build your example


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@teaclave.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@teaclave.apache.org
For additional commands, e-mail: dev-help@teaclave.apache.org


[GitHub] [incubator-teaclave-trustzone-sdk] HakonToemte closed issue #94: ./hello_world-rs not found in shared folder

Posted by GitBox <gi...@apache.org>.
HakonToemte closed issue #94: ./hello_world-rs not found in shared folder
URL: https://github.com/apache/incubator-teaclave-trustzone-sdk/issues/94


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@teaclave.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@teaclave.apache.org
For additional commands, e-mail: dev-help@teaclave.apache.org