===== Hello World Demo =====
This is the bare metal program running on i.MX53 QSB to test the TrustZone Secure-Normal World Transition.
The board will boot a bare-metal program (not a kernel, event not u-boot) to keep switching between secure and normal world.
Original code repo: https://github.com/finallyjustice/imx53qsb-code/tree/master/trustzone-smc
==== Setup ====
To setup this hello world example you first need to clone the repo. You then need to download and install the arm toolchain in order to compile the code for bare metal. After this you need to load the image to the board's SD card and execute the demo.
[[setup:arm-toolchain|ARM Toolchain]] - Follow th ARM Toolchain Setup steps presented in this page. This is necessary in order to successfully compile the following code in this tutorial.
==== Compilation ====
To compile the code you must use the ARM toolchain.
Navigate to the repo and to the imx53qsb-code/trustzone-smc/ folder.
Then:
$ export ARCH=arm
$ export CROSS_COMPILE=/usr/local/gcc-arm-none-eabi-5_2-2015q4/bin/arm-none-eabi-
$ make
You should now have the image (kernel.imx) in the compilation folder.
==== Load to the SD Card ====
First you need to insert the SD Card in to your Ubuntu machine.
Then, use fdisk to check the name of the device:
$ sudo fdisk -l
$ sudo dd if=kernel.imx of=/dev/mmcblk0 bs=512 seek=2
Where /dev/mmcblk0 is the name of the SD Card device.
==== Execute the demo ====
The output of this demo is shown in the Serial connection between the board and Ubuntu.
To configure this connection you may install minicom.
$ sudo apt-get install minicom
The connect the board and you should see the expected output!