Skip to content
ckuethe edited this page Dec 31, 2014 · 7 revisions

Reading List

Compile a kernel

$ wget https://www.kernel.org/pub/linux/kernel/v3.x/testing/linux-3.19-rc2.tar.xz
$ tar xf linux-3.19-rc2.tar.xz
$ make vexpress_defconfig
$ export ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-
$ make vexpress_defconfig
$ make menuconfig
$ make -j4 zImage uImage LOADADDR=0x04080000 dtbs modules
$ mkdir -p /tmp/linux-trustzone/boot
$ cp arch/arm/boot/{,z,u}Image arch/arm/boot/dts/vexpress-v2*dtb /tmp/linux-trustzone/boot/
$ make modules_install INSTALL_MOD_PATH=/tmp/linux-trustzone

Compile qemu-trustzone

$ git clone git://git.linaro.org/people/greg.bellows/qemu.git --branch qemutz qemutz-git
$ cd qemutz-git
$ ./configure --target-list=arm-softmmu --enable-seccomp --extra-ldflags="-fPIC" --extra-cflags="-fPIC"
$ make -j4
$ cp arm-softmmu/qemu-system-arm ~/bin/qemu-system-arm-trustzone

Test qemu without trustzone

$ ~/bin/qemu-system-arm-trustzone -kernel $PATH_TO_KERNEL/zImage -M vexpress-a15 -cpu cortex-a15 -dtb PATH_TO_DTB/vexpress-v2p-ca15-tc1.dtb -m 1024 -append 'console=ttyAMA0,38400n8' -serial stdio -initrd $PATH_TO_INITRD/initrd.img

Test qemu with trustzone

$ ~/bin/qemu-system-arm-trustzone -bios $PATH_TO_IMAGE/image -M vexpress-a15 -cpu cortex-a15 -m 1024 -append 'console=ttyAMA0,38400n8' -serial stdio

Clone this wiki locally