当前位置:网站首页>基於 QEMUv8 搭建 OP-TEE 開發環境
基於 QEMUv8 搭建 OP-TEE 開發環境
2022-07-06 22:20:00 【stone8761】
開發環境:Ubuntu 22.04 desktop 虛擬機
1、環境需求
$ sudo dpkg --add-architecture i386 $ sudo apt-get update
$ sudo apt-get install android-tools-adb android-tools-fastboot autoconf automake bc bison build-essential ccache codespell cpio cscope curl device-tree-compiler expect flex ftp-upload gdisk iasl libattr1-dev libcap-dev libcap-ng-dev libfdt-dev libftdi-dev libglib2.0-dev libgmp-dev libhidapi-dev libmpc-dev libncurses5-dev libpixman-1-dev libssl-dev libtool make mtools netcat ninja-build python-crypto python3-crypto python-pyelftools python3-pycryptodome python3-pyelftools rsync unzip uuid-dev xdg-utils xterm xz-utils zlib1g-dev
2、安裝 repo
$ mkdir ~/bin
$ curl https://mirrors.tuna.tsinghua.edu.cn/git/git-repo -o ~/bin/repo
$ chmod a+x ~/bin/repo
$ export PATH=~/bin:$PATH
更改 repo 獲取源,在 /etc/profile 文件最後添加如下內容,然後重啟系統
export REPO_URL='https://mirrors.tuna.tsinghua.edu.cn/git/git-repo'
3、獲取 OP-TEE 代碼
$ mkdir OP-TEE
$ cd OP-TEE/
$ repo init -u https://github.com/OP-TEE/manifest.git -m qemu_v8.xml
$ repo sync -j4 --no-clone-bundle
備注1:提示 “Failed to connect to boringssl.googlesource.com port 443: Connection timed out” 錯誤是因為相關網址無法訪問,可使用如下命令替換網址源:
$ git config --global url."https://github.com/google/boringssl.git".insteadOf "https://boringssl.googlesource.com/boringssl"
$ git config --global url."https://hub.fastgit.org/google/boringssl.git".insteadOf "https://boringssl.googlesource.com/boringssl"
備注2:sync 操作會因為 github 鏈接失敗而報錯,報錯後重新執行即可。但 sync 每次都會更新所有庫,只要有一個庫鏈接失敗都會報錯,但可能這個庫已經下載完成了。因此可以查看對應的 manifest 文件,檢查是不是所有庫都已經下載完成。如果都已經下載完成即可以進入到下一步驟。manifest.xml 文件在 .repo 目錄下。
4、編譯
$ cd ./build
$ make -j2 toolchains
$ make -j `nproc`
5、運行 qemu
依然在 build/ 目錄下
$ make run
正確運行後會彈出兩個虛擬的串口終端,其中端口號為 54320 的是非安全系統,端口號為 54321 的為安全系統:
進入 qemu 終端後輸入 c 啟動系統:
(qemu) c
非安全系統(Linux)可以通過 root 用戶登錄
安全系統:
備注1:運行過程中可能會報 python 命令找不到的錯誤,但是 ubuntu 下已經安裝了 python。這是因為名稱問題,安裝的是 python2 和 python3,這裏可以創建一條鏈接解决問題:
$ sudo ln -s /usr/bin/python3 /usr/bin/python
備注2:第一次執行 make run 會編譯相關組件再運行 qemu,之後可以直接運行 make run-only 直接運行。
6、運行測試程序
使用 ps 命令檢查 tee-supplicant 進程是否存在
運行 xtest 測試例程
$ xtest
边栏推荐
- Maximum product of three numbers in question 628 of Li Kou
- Report on technological progress and development prospects of solid oxide fuel cells in China (2022 Edition)
- 保存和检索字符串
- Shell product written examination related
- lora同步字设置
- A Mexican airliner bound for the United States was struck by lightning after taking off and then returned safely
- Management background --5, sub classification
- Shortcut keys in the terminal
- HDR image reconstruction from a single exposure using deep CNN reading notes
- AI 企业多云存储架构实践 | 深势科技分享
猜你喜欢
重磅新闻 | Softing FG-200获得中国3C防爆认证 为客户现场测试提供安全保障
嵌入式常用计算神器EXCEL,欢迎各位推荐技巧,以保持文档持续更新,为其他人提供便利
About the professional ethics of programmers, let's talk about it from the way of craftsmanship and neatness
RESNET rs: Google takes the lead in tuning RESNET, and its performance comprehensively surpasses efficientnet series | 2021 arXiv
GPS从入门到放弃(十九)、精密星历(sp3格式)
CCNA-思科网络 EIGRP协议
[Digital IC hand tearing code] Verilog burr free clock switching circuit | topic | principle | design | simulation
GPS从入门到放弃(十六)、卫星时钟误差和卫星星历误差
ZABBIX proxy server and ZABBIX SNMP monitoring
小满网络模型&http1-http2 &浏览器缓存
随机推荐
414. The third largest digital buckle
墨西哥一架飞往美国的客机起飞后遭雷击 随后安全返航
硬件开发笔记(十): 硬件开发基本流程,制作一个USB转RS232的模块(九):创建CH340G/MAX232封装库sop-16并关联原理图元器件
Maximum product of three numbers in question 628 of Li Kou
QT | UDP broadcast communication, simple use case
GPS from getting started to giving up (16), satellite clock error and satellite ephemeris error
数据处理技巧(7):MATLAB 读取数字字符串混杂的文本文件txt中的数据
[sciter]: encapsulate the notification bar component based on sciter
Management background --4, delete classification
中国1,4-环己烷二甲醇(CHDM)行业调研与投资决策报告(2022版)
Force buckle 575 Divide candy
AI enterprise multi cloud storage architecture practice | Shenzhen potential technology sharing
[MySQL] online DDL details
重磅新闻 | Softing FG-200获得中国3C防爆认证 为客户现场测试提供安全保障
11、 Service introduction and port
2022年6月国产数据库大事记-墨天轮
Assembly and Interface Technology Experiment 6 - ADDA conversion experiment, AD acquisition system in interrupt mode
GPS从入门到放弃(十三)、接收机自主完好性监测(RAIM)
i. Mx6ull build boa server details and some of the problems encountered
C#实现水晶报表绑定数据并实现打印4-条形码