Cheatography
https://cheatography.com
Most used commands when dealing with OP-TEE
This is a draft cheat sheet. It is a work in progress and is not finished yet.
Paths
OP-TEE project : $ROOT |
$HOME/devel/optee |
Makefiles |
$ROOT/build |
GP conf Trusted Application |
$ROOT/gp_conf |
--> ELF file |
$ROOT/out/gp_conf_ta/67707465-6563-6f6e-666c696e61726f15.elf |
Hello World Trusted Application |
$ROOT/hello_world |
--> ELF file |
$ROOT/hello_world/ta/8aaaf200-2450-11e4-abe20002a5d5c51b.elf |
OP-TEE secure OS |
$ROOT/optee_os |
--> ELF file |
$ROOT/optee_os/out/arm/core/tee.elf |
OP-TEE Client API |
$ROOT/optee_client |
Linux kernel |
$ROOT/linux |
make targets (from the build folder)
make all |
Builds the entire OP-TEE solution |
make run |
Prepare update ROOT FS and launch QEMU |
make run-only |
Only launches OP-TEE (ROOT FS not updated) |
make helloworld |
Build the Hello World TA |
make gp_conf_ta |
Build the GP conference TA |
make optee-os |
Build OP-TEE OS (secure side) |
Typical OP-TEE session
1. cd $ROOT/build |
Go to the build folder |
2. make all |
Build the solution |
3. make run |
Create/update root fs and launch QEMU |
4. (qemu) c |
Start the emulator |
5. tee-supplicant & |
In "Normal World" window, start tee-supplicant |
6a. xtest |
Run the test suite (Normal World) |
6b. hello_world |
Run the Hello World TA (Normal World) |
6c. gp_conf_client |
Run the GP conference TA (Normal World) |
7. (qemu) q |
Quit QEMU |
|
|
QEMU
(qemu) c |
Start the emulator |
(qemu) q |
Stop the emulator |
Normal World window - root@vExpress
tee-supplicant & |
Launches tee-supplicant |
xtest |
Run OP-TEE's test suite |
hello_world |
Run Hello World Trusted Application |
gp_conf_client |
Run GP conference Trusted Application |
GDB commands (in the debugger)
./gdb |
Launch GDB (from build folder) |
optee |
Connects to target and load tee.elf |
helloworld |
Add-symbols for Hello World TA |
gp_conf_ta |
Add-symbols for GP conference TA |
p <variable> |
Print variable |
x/4wx <address> |
Show 4 words in hex at memory <address> |
b <function> |
Set a breakpoint for <function> |
info b |
List all breakpoints |
d <breakpoint number> |
Delete breakpoint |
n |
Jump to next line |
s |
Step into function |
symbol-file <path>/name.elf |
Loads symbols |
add-symbol-file <path>/name.elf |
Adds additional symbols |
$HOME/.gdbinit |
Configuration file for GDB |
VirtualBox Image
Login / Password |
optee / optee |
VirtualBox downloads |
|
Import image |
File -> Import Alliance -> select <optee.ova> |
|