编译riscv gnu 工具链依赖
sudo apt-get install autoconf automake autotools-dev curl libmpc-dev libmpfr-dev libgmp-dev gawk build-essential bison flex texinfo gperf libtool patchutils bc zlib1g-dev libexpat-dev
工具链配置
./configure --prefix=/opt/riscv64-linux --with-arch=rv64imafdc --with-abi=lp64d --enable-linux
编译
默认下没有riscv-glibc
需要执行mkdir riscv-glibc创建目录,编译过程重新clone 下这个库
sudo make linux
编译riscv optee os 版本
make ARCH=riscv PLATFORM=spike CROSS_COMPILE64=riscv64-unknown-linux-gnu- ta-targets=ta_rv64
运行optee os
spike -d -m0x40008000:0x1000,0x80000000:0x50000000 -p2 out/riscv-plat-spike/core/tee.elf
运行log