This shows you the differences between two versions of the page.
|
ass:laboratoare:03:tasks:02 [2023/07/20 14:25] florin.stancu |
— (current) | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ==== 02. Writing Trusted Applications ==== | ||
| - | |||
| - | In the second part of our lab, it's time to run some Trusted Applications (TAs)! | ||
| - | |||
| - | We will use the official [[https://github.com/linaro-swg/optee_examples|optee_examples]] as starting point. | ||
| - | |||
| - | Two questions arise: how can one compile a TA? + how to test it on our board? | ||
| - | |||
| - | == Step 1. Building a TA == | ||
| - | |||
| - | We can use our workstation / laptop to cross-compile a trusted application! | ||
| - | |||
| - | Read the [[https://optee.readthedocs.io/en/latest/building/gits/optee_examples/optee_examples.html|official instructions here]]. | ||
| - | |||
| - | <note> | ||
| - | Note that you must build [[https://optee.readthedocs.io/en/latest/building/gits/optee_client.html#build-instructions|the optee_client first]]. | ||
| - | </note> | ||
| - | |||
| - | Build both the host app and the . | ||
| - | |||
| - | == Step 2. Testing the TA == | ||
| - | |||
| - | Our rootfs image already contains the OP-TEE client library. | ||
| - | |||
| - | You just need to copy to the cross-compiled binaries to your boot partition. | ||
| - | |||
| - | For this, put u-boot in USB Mass Storage mode: | ||
| - | <code> | ||
| - | u-boot=> ums mmc 0 | ||
| - | </code> | ||
| - | |||
| - | Do not Ctrl+C yet, leave it running and mount the newly appeared USB device in your PC/VM! | ||
| - | |||
| - | After copyint the files, boot the Linux (you can use the Lab02 boot commands, see Readme.md). | ||
| - | |||
| - | Mount the boot partition and run the TA (you might need to copy it somewhere else and ''chmod +x''')! | ||
| - | |||