在Ubuntu12.04系统上编译qemu
1.更新依赖库
apt-get install libglib2.0-0 libsdl1.2-dev libtool
2.解压,创建bin目录
下载地址http://download.csdn.net/detail/forestcell/6760091
$ unzip qemu-trustzone.zip
# tar jxvf qemu-1.4.0.tar.bz2
$ cd qemu-trustzone
$ mkdir -p bin
3.配置编译选项为arm,make,然后安装
$ cd bin
$ ../configure --enable-debug --enable-sdl --enable-kvm --target-list=arm-softmmu
$ make
$ sudo make install
4.测试效果
qemu-system-arm -kernel zImage.integrator -initrd arm_root.img
5.使用DS-5编译HelloWorld
TrustZone-versatile.axf
运行结果,,显示CP15寄存器已经支持TrustZone了。需要设置平台vexpress-a9。其他平台看不到该参数。
qemu-system-arm -M vexpress-a9 -m 1024M -serial stdio -kernel TrustZone-versatile.axf
oss: Could not initialize DAC
oss: Failed to open `/dev/dsp'
oss: Reason: No such file or directory
oss: Could not initialize DAC
oss: Failed to open `/dev/dsp'
oss: Reason: No such file or directory
audio: Failed to create voice `lm4549.out'
qemu: fatal: Unimplemented cp15 register read (c1, c1, {0, 0})
R00=91160a24 R01=00000000 R02=00000000 R03=91160960
R04=60000193 R05=00000000 R06=00000000 R07=00000000
R08=00000000 R09=00000000 R10=00000000 R11=9115a800
R12=000000e8 R13=9115a7ec R14=90407678 R15=904079ec
PSR=600001d6 -ZC- A ???32
FEATURES=vfp,auxcr,v6,v6k,v7,thumb2,vfp3,vfp-fp16,neon,thumb2ee,v7mp,v4t,v5,vapa,vfp4,trustzone
Aborted (core dumped)
TrustZone的GNU版本elf文件,下载地址
http://download.csdn.net/detail/forestcell/7144699