下载源码
mkdir trusty
cd trusty
repo init -u https://android.googlesource.com/trusty/manifest -b master
repo sync -j32
编译
./trusty/vendor/google/aosp/scripts/build.py generic-arm64
查看编译结果
ls build-root/build-generic-arm64/lk.bin
安装运行依赖
sudo apt install libpixman-1-dev libstdc+±8-dev pkg-config libglib2.0-dev libusb-1.0-0-dev
构建qemu镜像并做测试
trusty/vendor/google/aosp/scripts/build.py qemu-generic-arm64-test-debug
手动运行一个测试
build-root/build-qemu-generic-arm64-test-debug/run --headless --boot-test “com.android.ipc-unittest.ctrl”
启动时使用内核调试输出运行测试运行程序测试
build-root/build-qemu-generic-arm64-test-debug/run-qemu --boot-test “com.android.ipc-unittest.ctrl” --headless --verbose
注意:ATF 会先停用控制台,然后再返回测试运行程序。如需在本地停用此设置,请注释掉 extern
还没有评论,来说两句吧...